/* ═══════════════════════════════════════════════════════
   App Layout - Professional SaaS Styling
   ═══════════════════════════════════════════════════════ */

/* Page Container */
.page-container {
    padding: 0;
}

/* Page Header */
.page-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.page-header-title {
    font-weight: 600 !important;
    color: #1e293b !important;
    letter-spacing: -0.01em;
}

.page-header-subtitle {
    color: #64748b !important;
    margin-top: 0.25rem;
}

/* ═══════════════════════════════════════════════════════
   Stat Cards (Dashboard / KPIs)
   ═══════════════════════════════════════════════════════ */

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    min-height: 96px;
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    transform: translateY(-1px);
}

.stat-card--primary .stat-card-icon {
    color: #3b82f6;
    background: #eff6ff;
}

.stat-card--info .stat-card-icon {
    color: #06b6d4;
    background: #ecfeff;
}

.stat-card--success .stat-card-icon {
    color: #10b981;
    background: #ecfdf5;
}

.stat-card--warning .stat-card-icon {
    color: #f59e0b;
    background: #fffbeb;
}

.stat-card--danger .stat-card-icon {
    color: #ef4444;
    background: #fef2f2;
}

.stat-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    flex-shrink: 0;
}

.stat-card-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.stat-card-label {
    color: #64748b !important;
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-card-value {
    font-weight: 700 !important;
    color: #1e293b !important;
    line-height: 1.2;
}

/* ═══════════════════════════════════════════════════════
   Content Cards
   ═══════════════════════════════════════════════════════ */

.content-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.content-card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.content-card-body {
    padding: 1.5rem;
}

.content-card-body--flush {
    padding: 0;
}

/* ═══════════════════════════════════════════════════════
   Filter / Action Bar (above grids)
   Filters LEFT, action buttons RIGHT
   ═══════════════════════════════════════════════════════ */

.filter-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    width: 100%;
}

.filter-bar .mud-select,
.filter-bar .mud-input-control {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 140px;
    max-width: 180px;
}

.filter-bar-select {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 140px;
    max-width: 180px;
}

.filter-bar-button {
    text-transform: none !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    letter-spacing: 0 !important;
}

/* ═══════════════════════════════════════════════════════
   MudDataGrid Overrides
   ═══════════════════════════════════════════════════════ */

.content-card .mud-table {
    border-radius: 0 !important;
    box-shadow: none !important;
}

.mud-table .mud-table-head .mud-table-row .mud-table-cell {
    background-color: #f8fafc !important;
    color: #475569 !important;
    font-weight: 600 !important;
    font-size: 0.8125rem !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid #e2e8f0 !important;
}

.mud-table .mud-table-body .mud-table-row:hover {
    background-color: #f8fafc !important;
}

.mud-table .mud-table-body .mud-table-row .mud-table-cell {
    border-bottom: 1px solid #f1f5f9 !important;
    color: #334155;
    font-size: 0.875rem;
}

/* ═══════════════════════════════════════════════════════
   MudPaper Global Overrides
   ═══════════════════════════════════════════════════════ */

.mud-paper {
    border-radius: 12px !important;
}

/* ═══════════════════════════════════════════════════════
   Form Field Improvements
   ═══════════════════════════════════════════════════════ */

.mud-input-outlined .mud-input-outlined-border {
    border-color: #cbd5e1 !important;
    border-radius: 8px !important;
}

.mud-input-outlined:hover .mud-input-outlined-border {
    border-color: #94a3b8 !important;
}

.mud-input-outlined.mud-input-focused .mud-input-outlined-border {
    border-color: var(--bs-primary) !important;
}

/* ═══════════════════════════════════════════════════════
   Dialog Styling
   ═══════════════════════════════════════════════════════ */

.mud-dialog {
    background: #fff !important;
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06) !important;
}

.mud-overlay-dialog {
    background-color: rgba(0, 0, 0, 0.5) !important;
}

.mud-dialog .mud-dialog-title {
    font-weight: 600 !important;
    color: #1e293b !important;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.75rem !important;
}

/* ═══════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .stat-card {
        padding: 1rem;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-bar-select {
        max-width: 100%;
    }
}
