/* Composants UI AdBudget — tables, badges, alertes, cartes métiers */

/* Badges statut commande */
.badge-status {
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.03em;
    padding: 0.35em 0.65em;
}

.badge-status-pending { background: #d97706 !important; color: #fff !important; }
.badge-status-approved { background: #0d9488 !important; color: #fff !important; }
.badge-status-active { background: #16a34a !important; color: #fff !important; }
.badge-status-completed { background: #64748b !important; color: #fff !important; }
.badge-status-cancelled { background: #b91c1c !important; color: #fff !important; }

/* Tableaux dans cartes */
.table-card {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.table-card .card-header,
.table-card > .card-header {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #475569;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: #fafbfc !important;
}

.table-card .table {
    margin-bottom: 0;
    font-size: 0.875rem;
}

.table-card .table thead th {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    color: #64748b;
    border-bottom-width: 1px;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
    white-space: nowrap;
}

.table-card .table tbody tr {
    transition: background 0.1s;
}

.table-card .table tbody tr:hover {
    background: #f8fafc;
}

.table-card .table td,
.table-card .table th {
    vertical-align: middle;
    border-color: #f1f5f9;
}

.table-card .font-monospace {
    font-size: 0.8125rem;
}

/* Cartes dashboard secondaires */
.card.shadow-sm {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05) !important;
}

.card .card-header.bg-white {
    font-weight: 600;
    font-size: 0.875rem;
    color: #334155;
}

/* Alertes flash */
.app-flash-stack {
    margin-bottom: 1.25rem;
}

.app-flash-stack .alert {
    border: none;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.app-flash-stack .alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border-left: 4px solid #dc2626;
}

.app-flash-stack .alert-success {
    background: #f0fdf4;
    color: #166534;
    border-left: 4px solid #16a34a;
}

/* Login */
.auth-body .form-control {
    padding: 0.65rem 0.85rem;
    border-radius: 0.5rem;
    border-color: #cbd5e1;
}

.auth-body .form-control:focus {
    border-color: #a5b4fc;
    box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.15);
}

.auth-body .btn-primary {
    padding: 0.65rem 1rem;
    font-weight: 600;
    border-radius: 0.5rem;
}

/* Liens retour */
.app-back-link {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
}

.app-back-link:hover {
    color: #4f46e5;
}

/* Alerte dashboard */
.border-warning.card {
    border-color: #fcd34d !important;
}

.border-warning .card-header {
    background: #fffbeb !important;
    color: #92400e !important;
}

/* Alertes dans le contenu (fiches commande, etc.) */
.app-content .alert-warning {
    border: none;
    border-left: 4px solid #f59e0b;
    background: #fffbeb;
    color: #92400e;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.app-content .alert-info {
    border: none;
    border-left: 4px solid #0ea5e9;
    background: #f0f9ff;
    color: #0c4a6e;
    border-radius: 0.5rem;
}

/* Fiche marque : tableaux haute volume */
.brand-tables-hint {
    background: #f8fafc;
    border-color: #e2e8f0 !important;
}

.brand-per-page-select {
    min-width: 4.5rem;
    max-width: 5.5rem;
}

.ad-table-scroll {
    max-height: min(52vh, 28rem);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.ad-table-scroll table {
    border-collapse: separate;
    border-spacing: 0;
}

.ad-table-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    box-shadow: 0 1px 0 #dee2e6;
}

.ad-table-scroll thead.table-light th {
    background: #f8f9fa !important;
}

.brand-list-pagination .btn.disabled,
.brand-list-pagination a.btn.disabled {
    pointer-events: none;
    opacity: 0.55;
}
