/* ============================================================
   SETTINGS PRO STYLES
   ------------------------------------------------------------
   Loaded AFTER style.css and settings.css so it can extend
   and override cleanly.

   PURPOSE:
     The settings page previously used generic content-card
     styling. This stylesheet gives it the same professional
     polish as the dashboard, maintenance, work orders, and
     assets pages.

   CONTAINS:
     1. Page hero strip (title + KPI chips)
     2. Section card polish (headers, dividers)
     3. User management table refinements
     4. Refined read-only "system settings" info layout
     5. Consistent action button grouping

   IMPORTANT:
     Every selector here is scoped under classes that already
     exist in settings.html — we never change IDs, we never
     touch onclick handlers, and we never modify settings.js
     logic.
   ============================================================ */

/* ============================================================
   1) PAGE HERO STRIP
   ------------------------------------------------------------
   Replaces the plain <h1> + <p> with a dashboard-style hero
   strip. The right side shows three live KPI chips fed by
   settings.js (see the JS addition in STEP 3).
   ============================================================ */
.settings-hero {
    position: relative;
    background: linear-gradient(135deg, #1e3a5f 0%, #152b47 60%, #2a4d7a 100%);
    color: #ffffff;
    border-radius: 14px;
    padding: 24px 28px;
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(30, 58, 95, 0.22);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.settings-hero::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -10%;
    width: 55%;
    height: 200%;
    background: linear-gradient(
        120deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(240, 176, 93, 0.10) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(15deg);
    pointer-events: none;
}

.settings-hero-text {
    position: relative;
    z-index: 1;
    min-width: 260px;
    flex: 1;
}

.settings-hero-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #f0b05d;
    margin-bottom: 6px;
}

.settings-hero-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: #ffffff;
    letter-spacing: -0.2px;
}

.settings-hero-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
}

/* ---- KPI chips on the right side of the hero ---- */
.settings-hero-kpis {
    display: flex;
    gap: 12px;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.settings-kpi {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 12px 16px;
    min-width: 92px;
    text-align: center;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.settings-kpi-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 4px;
}

.settings-kpi-value {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}

.settings-kpi-value.kpi-accent  { color: #f0b05d; }
.settings-kpi-value.kpi-success { color: #86e29b; }

/* ============================================================
   2) CONTENT CARD POLISH
   ------------------------------------------------------------
   Give every settings card the same professional look as
   other pages:
     • 12px radius
     • Soft shadow
     • Uppercase header with bottom divider
   ============================================================ */
main > .content-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 22px 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #eef1f3;
}

main > .content-card > h2 {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #244855;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #eef1f3;
}

main > .content-card > p {
    color: #6c757d;
    font-size: 13px;
    margin: 0 0 16px 0;
}

/* Refined "read-only" list in system settings */
#systemSettingsView > div[style*="line-height"] {
    /* Replaces the plain <p> list with a two-column info grid */
    background: #f8f9fa;
    border-radius: 10px;
    padding: 16px 20px;
    border: 1px solid #eef1f3;
    line-height: 1 !important;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 24px;
}

#systemSettingsView > div[style*="line-height"] > p {
    margin: 0 !important;
    padding: 8px 0;
    border-bottom: 1px dashed #e1e5e8;
    font-size: 13px;
    color: #343a40;
}

#systemSettingsView > div[style*="line-height"] > p:nth-last-child(-n+2) {
    border-bottom: none;
}

#systemSettingsView > div[style*="line-height"] strong {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #6c757d;
    margin-bottom: 3px;
}

/* Buttons under the system settings view get cleaner spacing */
#systemSettingsView > button {
    margin-top: 16px !important;
}

/* ============================================================
   3) USER MANAGEMENT TABLE
   ------------------------------------------------------------
   Sticky header, softer row hover, cleaner spacing.
   ============================================================ */
main > .content-card .data-table thead th {
    position: sticky;
    top: 0;
    background: #f8f9fa;
    color: #495057;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 12px 14px;
    border-bottom: 2px solid #eef1f3;
    z-index: 2;
    text-align: left;
}

main > .content-card .data-table tbody td {
    padding: 14px;
    font-size: 13px;
    color: #343a40;
    border-bottom: 1px solid #f1f3f5;
    vertical-align: middle;
}

main > .content-card .data-table tbody tr {
    transition: background 0.15s ease;
}

main > .content-card .data-table tbody tr:hover {
    background: #f8fafb;
}

main > .content-card .data-table td:last-child {
    text-align: center;
}

/* Status badges — same pill style as the rest of the app */
main > .content-card .status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: capitalize;
}

main > .content-card .status-badge.status-active {
    background: rgba(40, 167, 69, 0.15);
    color: #166534;
}

main > .content-card .status-badge.status-inactive {
    background: var(--gray-200, #e9ecef);
    color: #495057;
}

main > .content-card .status-badge.status-suspended {
    background: rgba(230, 72, 51, 0.12);
    color: #874F41;
}

/* ---- Action buttons row under the user table ---- */
main > .content-card > .btn,
main > .content-card > .btn-secondary {
    margin-top: 16px;
}

/* ============================================================
   4) NOTIFICATION / SECURITY / DATA CARDS
   ------------------------------------------------------------
   Slightly tighten the label lists and buttons so these cards
   don't feel too loose.
   ============================================================ */
main > .content-card label {
    font-size: 13px;
    color: #343a40;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
}

main > .content-card label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #244855;
    cursor: pointer;
}

/* ============================================================
   5) SYSTEM INFO CARD
   ------------------------------------------------------------
   The final "System Information" card gets the same info grid
   treatment as the read-only system settings.
   ============================================================ */
main > .content-card:has(> div[style*="line-height"]) > div[style*="line-height"] {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 16px 20px;
    border: 1px solid #eef1f3;
    line-height: 1 !important;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 24px;
}

main > .content-card:has(> div[style*="line-height"]) > div[style*="line-height"] > p {
    margin: 0 !important;
    padding: 8px 0;
    border-bottom: 1px dashed #e1e5e8;
    font-size: 13px;
    color: #343a40;
}

main > .content-card:has(> div[style*="line-height"]) > div[style*="line-height"] > p:nth-last-child(-n+2) {
    border-bottom: none;
}

main > .content-card:has(> div[style*="line-height"]) > div[style*="line-height"] strong {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #6c757d;
    margin-bottom: 3px;
}

/* ============================================================
   6) RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .settings-hero {
        flex-direction: column;
        align-items: flex-start;
        padding: 22px 20px;
    }

    .settings-hero-kpis {
        width: 100%;
    }

    .settings-kpi {
        flex: 1;
        min-width: 0;
        padding: 10px 12px;
    }

    .settings-kpi-value {
        font-size: 18px;
    }

    #systemSettingsView > div[style*="line-height"],
    main > .content-card:has(> div[style*="line-height"]) > div[style*="line-height"] {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .settings-hero-title {
        font-size: 20px;
    }

    .settings-hero-kpis {
        flex-wrap: wrap;
    }

    .settings-kpi {
        flex: 1 1 calc(50% - 6px);
    }

    main > .content-card {
        padding: 16px;
    }
}