/* =====================================================================
   Monteage Complaint System — design system
   Shared by: _Layout (Home / Privacy / Error), Login, Complaint tracker
   ===================================================================== */

:root {
    /* Brand (from the Monteage logo) */
    --brand-900: #0b1f5c;
    --brand-800: #13308a;
    --brand-700: #1a3fb0;
    --brand-600: #2150d1;
    --brand-500: #3b6af0;
    --brand-100: #e4ebff;
    --brand-50: #f1f5ff;
    --accent: #e12a2f;
    --accent-50: #fff1f1;

    /* Neutrals */
    --ink: #0f172a;
    --ink-2: #334155;
    --muted: #64748b;
    --subtle: #94a3b8;
    --line: #e5e9f2;
    --line-strong: #d3dae6;
    --surface: #f5f7fb;
    --surface-2: #eef2f8;
    --card: #ffffff;

    /* Status */
    --open: #d92d20;
    --open-bg: #fef3f2;
    --open-line: #fecdca;
    --progress: #b54708;
    --progress-bg: #fffaeb;
    --progress-line: #fedf89;
    --resolved: #067647;
    --resolved-bg: #ecfdf3;
    --resolved-line: #abefc6;

    /* Shape & depth */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 22px;
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, .05);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .04);
    --shadow-md: 0 8px 24px -6px rgba(15, 23, 42, .12);
    --shadow-lg: 0 24px 60px -12px rgba(15, 23, 42, .28);
    --ring: 0 0 0 4px rgba(59, 106, 240, .16);

    --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    --ease: cubic-bezier(.2, .8, .2, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 15px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--surface);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--brand-600);
    text-decoration: none;
}

    a:hover {
        color: var(--brand-800);
    }

button,
input,
select,
textarea {
    font-family: inherit;
}

:focus-visible {
    outline: none;
    box-shadow: var(--ring);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--brand-600);
}

    .eyebrow::before {
        content: "";
        width: 18px;
        height: 2px;
        border-radius: 2px;
        background: var(--accent);
    }

/* =====================================================================
   PUBLIC LAYOUT  (Home / Privacy / Error)
   ===================================================================== */

.app-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: radial-gradient(1200px 500px at 85% -10%, var(--brand-50), transparent 60%), var(--surface);
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .85);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
}

.app-nav {
    padding: 12px 0;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0;
    margin: 0;
}

    .app-brand img {
        height: 42px;
        width: auto;
    }

    .app-brand span {
        display: none;
    }

.app-nav .navbar-nav {
    align-items: center;
    gap: 4px;
}

.app-nav .nav-link {
    color: var(--ink-2) !important;
    font-weight: 500;
    padding: 8px 14px !important;
    border-radius: var(--radius-sm);
    transition: background .15s, color .15s;
}

    .app-nav .nav-link:hover,
    .app-nav .nav-link:focus {
        background: var(--surface-2);
        color: var(--ink) !important;
    }

    .app-nav .nav-link.nav-cta {
        background: var(--brand-700);
        color: #fff !important;
        margin-left: 6px;
        box-shadow: 0 6px 16px -6px rgba(26, 63, 176, .6);
    }

        .app-nav .nav-link.nav-cta:hover {
            background: var(--brand-800);
        }

.app-nav .navbar-toggler {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
}

.app-main {
    flex: 1;
    padding: 40px 0 64px;
}

#cookieConsent {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 14px 18px;
    margin-bottom: 28px;
    border: 1px solid var(--brand-100);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--ink-2);
    box-shadow: var(--shadow-sm);
}

    #cookieConsent .accept-policy {
        position: static;
        margin-left: auto;
        padding: 7px 16px;
        border-radius: var(--radius-sm);
        background: var(--brand-700);
        color: #fff;
        font-size: .9rem;
        font-weight: 600;
        opacity: 1;
        text-shadow: none;
    }

        #cookieConsent .accept-policy:hover {
            background: var(--brand-800);
        }

.app-footer {
    border-top: 1px solid var(--line);
    background: var(--card);
    color: var(--muted);
    font-size: .9rem;
    padding: 22px 0;
}

    .app-footer .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
    }

    .app-footer a {
        color: var(--muted);
    }

        .app-footer a:hover {
            color: var(--brand-700);
        }

/* ---------- Home hero ---------- */

.home-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    align-items: center;
    gap: 32px;
    padding: 64px 56px;
    border-radius: var(--radius-xl);
    color: #fff;
    background:
        radial-gradient(600px 300px at 100% 0%, rgba(225, 42, 47, .35), transparent 60%),
        radial-gradient(500px 400px at 0% 100%, rgba(59, 106, 240, .45), transparent 60%),
        linear-gradient(135deg, var(--brand-900), var(--brand-700));
    box-shadow: var(--shadow-lg);
}

    .home-hero::after {
        content: "";
        position: absolute;
        inset: 0;
        background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px);
        background-size: 22px 22px;
        pointer-events: none;
    }

.home-hero-content {
    position: relative;
    z-index: 1;
}

.home-hero .eyebrow {
    color: #c7d4ff;
}

.home-hero h1 {
    margin: 16px 0 14px;
    font-size: clamp(2rem, 4vw, 3.1rem);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.08;
}

.home-hero p {
    max-width: 520px;
    font-size: 1.08rem;
    color: rgba(255, 255, 255, .82);
    margin-bottom: 30px;
}

.home-hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

    .home-hero-actions .btn {
        padding: 12px 22px;
        border-radius: var(--radius);
        font-weight: 600;
    }

    .home-hero-actions .btn-light {
        color: var(--brand-800);
    }

    .home-hero-actions .btn-outline-light {
        border-color: rgba(255, 255, 255, .4);
    }

        .home-hero-actions .btn-outline-light:hover {
            background: rgba(255, 255, 255, .12);
            color: #fff;
        }

.home-hero-mark {
    position: relative;
    z-index: 1;
    justify-self: center;
    display: grid;
    place-items: center;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .16);
    box-shadow: inset 0 0 0 22px rgba(255, 255, 255, .04);
    font-size: 84px;
    color: rgba(255, 255, 255, .92);
}

.home-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 28px;
}

.feature-card {
    padding: 28px;
    border-radius: var(--radius-lg);
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}

    .feature-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-md);
    }

.feature-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 18px;
    border-radius: var(--radius);
    background: var(--brand-50);
    color: var(--brand-700);
    font-size: 20px;
}

.feature-card h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 8px;
}

.feature-card p {
    margin: 0;
    color: var(--muted);
}

/* ---------- Policy / Error ---------- */

.policy-card,
.error-card {
    max-width: 760px;
    margin: 0 auto;
    padding: 48px;
    border-radius: var(--radius-xl);
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
}

    .policy-card h1,
    .error-card h1 {
        margin: 14px 0 18px;
        font-size: 2rem;
        font-weight: 800;
        letter-spacing: -.02em;
    }

    .policy-card p,
    .error-card p {
        color: var(--ink-2);
        font-size: 1.02rem;
    }

    .error-card .eyebrow {
        color: var(--accent);
    }

    .error-card h2 {
        font-size: 1.05rem;
        font-weight: 500;
        color: var(--muted);
        margin-bottom: 22px;
    }

    .error-card h3 {
        margin-top: 28px;
        font-size: 1rem;
        font-weight: 700;
    }

    .error-card code {
        padding: 2px 8px;
        border-radius: 6px;
        background: var(--surface-2);
        color: var(--brand-800);
    }

/* =====================================================================
   LOGIN
   ===================================================================== */

.login-page {
    min-height: 100vh;
    background: var(--card);
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
}

/* Brand panel */
.login-brand {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 56px;
    color: #fff;
    background:
        radial-gradient(520px 320px at 100% 0%, rgba(225, 42, 47, .38), transparent 60%),
        radial-gradient(620px 460px at 0% 100%, rgba(59, 106, 240, .5), transparent 60%),
        linear-gradient(150deg, var(--brand-900) 0%, var(--brand-700) 100%);
}

    .login-brand::after {
        content: "";
        position: absolute;
        inset: 0;
        background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px);
        background-size: 22px 22px;
        pointer-events: none;
    }

    .login-brand > * {
        position: relative;
        z-index: 1;
    }

.login-brand-logo {
    display: inline-flex;
    align-self: flex-start;
    padding: 10px 16px;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .4);
}

    .login-brand-logo img {
        height: 44px;
        width: auto;
        display: block;
    }

.login-brand-copy h2 {
    margin: 18px 0 14px;
    max-width: 460px;
    font-size: clamp(1.9rem, 3vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.1;
}

.login-brand-copy .eyebrow {
    color: #c7d4ff;
}

.login-brand-copy p {
    max-width: 420px;
    margin: 0 0 30px;
    color: rgba(255, 255, 255, .78);
    font-size: 1.02rem;
}

.login-points {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 14px;
}

    .login-points li {
        display: flex;
        align-items: center;
        gap: 14px;
        color: rgba(255, 255, 255, .9);
        font-weight: 500;
    }

    .login-points i {
        display: grid;
        place-items: center;
        width: 36px;
        height: 36px;
        flex-shrink: 0;
        border-radius: 10px;
        background: rgba(255, 255, 255, .12);
        border: 1px solid rgba(255, 255, 255, .18);
        font-size: 15px;
    }

.login-brand-foot {
    font-size: .85rem;
    color: rgba(255, 255, 255, .6);
}

/* Form panel */
.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    background: radial-gradient(800px 400px at 100% 0%, var(--brand-50), transparent 60%), var(--card);
}

.login-card {
    width: 100%;
    max-width: 400px;
}

.login-mobile-logo {
    display: none;
    height: 46px;
    width: auto;
    margin-bottom: 28px;
}

.login-title {
    margin: 0;
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--ink);
}

.login-subtitle {
    margin: 6px 0 30px;
    color: var(--muted);
}

.login-card .form-group {
    margin-bottom: 18px;
}

.login-card .form-label {
    display: block;
    margin-bottom: 7px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--ink-2);
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--subtle);
    font-size: 15px;
    pointer-events: none;
    transition: color .15s;
}

.login-input {
    width: 100%;
    height: 50px;
    padding: 0 46px 0 44px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    font-size: .98rem;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

    .login-input::placeholder {
        color: var(--subtle);
    }

    .login-input:hover {
        border-color: #b9c3d6;
    }

    .login-input:focus {
        border-color: var(--brand-500);
        box-shadow: var(--ring);
    }

.input-wrapper:focus-within .input-icon {
    color: var(--brand-600);
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--subtle);
    cursor: pointer;
    transition: background .15s, color .15s;
}

    .password-toggle:hover {
        background: var(--surface-2);
        color: var(--brand-700);
    }

.login-button {
    width: 100%;
    height: 50px;
    margin-top: 8px;
    border: 0;
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--brand-600), var(--brand-700));
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 24px -10px rgba(26, 63, 176, .8), inset 0 1px 0 rgba(255, 255, 255, .15);
    transition: transform .15s var(--ease), box-shadow .15s var(--ease), filter .15s;
}

    .login-button:hover {
        filter: brightness(1.06);
        transform: translateY(-1px);
        box-shadow: 0 14px 28px -10px rgba(26, 63, 176, .9), inset 0 1px 0 rgba(255, 255, 255, .15);
    }

    .login-button:active {
        transform: translateY(0);
    }

    .login-button i {
        margin-right: 8px;
    }

.validation-message {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px 14px;
    border: 1px solid var(--open-line);
    border-radius: var(--radius);
    background: var(--open-bg);
    color: var(--open);
    font-size: .92rem;
    font-weight: 500;
}

    .validation-message i {
        margin-top: 3px;
    }

.login-footer {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    color: var(--subtle);
    font-size: .82rem;
    text-align: center;
}

/* =====================================================================
   COMPLAINT TRACKER  (dashboard)
   ===================================================================== */

.complaint-page {
    background: var(--surface);
}

.complaint-wrapper {
    min-height: 100vh;
    display: flex;
}

/* ---------- Sidebar ---------- */

.sidebar {
    position: sticky;
    top: 0;
    width: 272px;
    min-width: 272px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--card);
    border-right: 1px solid var(--line);
    z-index: 1030;
}

.logo-area {
    height: 76px;
    display: flex;
    align-items: center;
    padding: 0 22px;
    border-bottom: 1px solid var(--line);
}

.sidebar-logo {
    height: 44px;
    width: auto;
    display: block;
}

.icon-btn.sidebar-close {
    display: none;
    margin-left: auto;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 14px;
}

.new-complaint-btn {
    width: 100%;
    height: 46px;
    margin-bottom: 26px;
}

.filter-heading {
    padding: 0 10px;
    margin-bottom: 8px;
    color: var(--subtle);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.filter-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 42px;
    padding: 0 10px 0 12px;
    margin-bottom: 2px;
    border-radius: var(--radius-sm);
    color: var(--ink-2);
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    transition: background .15s, color .15s;
}

    .filter-item:hover {
        background: var(--surface);
    }

    .filter-item.active {
        background: var(--brand-50);
        color: var(--brand-800);
        font-weight: 600;
    }

        .filter-item.active::before {
            content: "";
            position: absolute;
            left: -14px;
            top: 9px;
            bottom: 9px;
            width: 3px;
            border-radius: 0 3px 3px 0;
            background: var(--brand-600);
        }

    .filter-item i {
        width: 18px;
        text-align: center;
        color: var(--subtle);
        font-size: 15px;
    }

    .filter-item.active i {
        color: var(--brand-600);
    }

.filter-dot {
    width: 8px;
    height: 8px;
    margin: 0 5px;
    border-radius: 50%;
    flex-shrink: 0;
}

    .filter-dot.dot-open {
        background: var(--open);
    }

    .filter-dot.dot-progress {
        background: #f79009;
    }

    .filter-dot.dot-resolved {
        background: #17b26a;
    }

.count-badge {
    margin-left: auto;
    min-width: 26px;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: .76rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.filter-item.active .count-badge {
    background: var(--brand-100);
    color: var(--brand-800);
}

/* Resolution meter at the bottom of the sidebar */
.sidebar-stats {
    margin: 0 14px 18px;
    padding: 16px;
    border-radius: var(--radius);
    background: linear-gradient(150deg, var(--brand-900), var(--brand-700));
    color: #fff;
}

.meter-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 10px;
}

.meter-label {
    font-size: .8rem;
    color: rgba(255, 255, 255, .72);
}

.meter-value {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -.02em;
}

.meter-track {
    height: 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .18);
    overflow: hidden;
}

.meter-fill {
    height: 100%;
    border-radius: 6px;
    background: linear-gradient(90deg, #6ee7a8, #17b26a);
}

.meter-note {
    margin-top: 9px;
    font-size: .76rem;
    color: rgba(255, 255, 255, .66);
}

.sidebar-backdrop {
    display: none;
}

/* ---------- Main ---------- */

.main-content {
    flex: 1;
    min-width: 0;
}

.main-header {
    position: sticky;
    top: 0;
    z-index: 1020;
    height: 76px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 32px;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
}

.icon-btn.menu-toggle {
    display: none;
}

.search-box {
    flex: 1;
    max-width: 520px;
    height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    transition: border-color .15s, background .15s, box-shadow .15s;
}

    .search-box:focus-within {
        background: #fff;
        border-color: var(--brand-500);
        box-shadow: var(--ring);
    }

    .search-box i {
        color: var(--subtle);
        font-size: 14px;
    }

    .search-box input {
        width: 100%;
        border: 0;
        outline: none;
        background: transparent;
        color: var(--ink);
        font-size: .95rem;
    }

        .search-box input::placeholder {
            color: var(--subtle);
        }

.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-new-btn {
    height: 42px;
}

.icon-btn,
.notification-button {
    position: relative;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink-2);
    font-size: 16px;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}

    .icon-btn:hover,
    .notification-button:hover {
        background: var(--surface);
        border-color: var(--line-strong);
        color: var(--ink);
    }

.notification-count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    border: 2px solid #fff;
    background: var(--accent);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-button {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 42px;
    padding: 0 10px 0 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

    .user-button:hover {
        background: var(--surface);
        border-color: var(--line-strong);
    }

    .user-button .fa-chevron-down {
        font-size: 10px;
        color: var(--subtle);
    }

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--brand-600), var(--brand-800));
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .02em;
    flex-shrink: 0;
}

.avatar-lg {
    width: 44px;
    height: 44px;
    font-size: .95rem;
}

.user-name {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--ink);
    font-size: .9rem;
    font-weight: 600;
}

/* Bootstrap dropdown skin */
.complaint-page .dropdown-menu {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 6px;
    margin-top: 8px !important;
}

.user-menu {
    min-width: 260px;
}

.user-menu-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 10px 12px;
}

    .user-menu-head strong {
        display: block;
        font-size: .95rem;
        color: var(--ink);
    }

    .user-menu-head small {
        display: block;
        color: var(--muted);
        font-size: .8rem;
        word-break: break-all;
    }

.complaint-page .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: var(--radius-sm);
    font-size: .92rem;
    font-weight: 500;
}

    .complaint-page .dropdown-item.text-danger:hover {
        background: var(--open-bg);
    }

.complaint-page .dropdown-divider {
    margin: 4px 0;
    border-color: var(--line);
}

.notification-menu {
    width: 360px;
    max-height: 440px;
    overflow-y: auto;
}

.notification-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 10px 8px;
    font-size: .95rem;
    font-weight: 700;
    color: var(--ink);
}

#notificationList {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background .15s;
}

    .notification-item:hover {
        background: var(--surface);
    }

    .notification-item::before {
        content: "";
        width: 8px;
        height: 8px;
        margin-top: 7px;
        border-radius: 50%;
        background: var(--brand-500);
        flex-shrink: 0;
    }

.notification-item-title {
    font-size: .9rem;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.35;
}

.notification-item-text {
    margin-top: 2px;
    font-size: .8rem;
    color: var(--muted);
}

.notification-empty {
    padding: 22px 10px;
    text-align: center;
    color: var(--muted);
    font-size: .9rem;
}

    .notification-empty i {
        display: block;
        margin-bottom: 8px;
        font-size: 22px;
        color: var(--subtle);
    }

/* ---------- Page body ---------- */

.complaints-area {
    padding: 30px 32px 48px;
    max-width: 1280px;
}

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.page-title {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -.02em;
}

.page-subtitle {
    margin: 4px 0 0;
    color: var(--muted);
}

/* KPI tiles */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}

.kpi-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border-radius: var(--radius-lg);
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-xs);
}

.kpi-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    font-size: 17px;
}

.kpi-total .kpi-icon {
    background: var(--brand-50);
    color: var(--brand-700);
}

.kpi-open .kpi-icon {
    background: var(--open-bg);
    color: var(--open);
}

.kpi-progress .kpi-icon {
    background: var(--progress-bg);
    color: var(--progress);
}

.kpi-resolved .kpi-icon {
    background: var(--resolved-bg);
    color: var(--resolved);
}

.kpi-label {
    color: var(--muted);
    font-size: .84rem;
    font-weight: 500;
}

.kpi-value {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.15;
    color: var(--ink);
}

.list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.showing-text {
    color: var(--muted);
    font-size: .92rem;
}

    .showing-text strong {
        color: var(--ink);
    }

/* Complaint cards */
#complaintList {
    display: grid;
    gap: 12px;
}

.complaint-card {
    position: relative;
    padding: 18px 20px 16px 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--card);
    box-shadow: var(--shadow-xs);
    cursor: pointer;
    transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s;
}

    .complaint-card:hover {
        transform: translateY(-2px);
        border-color: var(--line-strong);
        box-shadow: var(--shadow-md);
    }

.complaint-line {
    position: absolute;
    left: 10px;
    top: 16px;
    bottom: 16px;
    width: 4px;
    border-radius: 4px;
    background: var(--brand-500);
}

.complaint-card.is-open .complaint-line {
    background: var(--open);
}

.complaint-card.is-progress .complaint-line {
    background: #f79009;
}

.complaint-card.is-resolved .complaint-line {
    background: #17b26a;
}

.complaint-card.is-resolved .complaint-title {
    color: var(--ink-2);
}

.complaint-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.complaint-card-title-area {
    flex: 1;
    min-width: 0;
}

.complaint-id {
    display: block;
    margin-bottom: 2px;
    color: var(--subtle);
    font-size: .76rem;
    font-weight: 600;
    letter-spacing: .03em;
}

.complaint-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.35;
}

.complaint-edit-btn {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--subtle);
    cursor: pointer;
    opacity: 0;
    transition: opacity .15s, background .15s, color .15s, border-color .15s;
}

.complaint-card:hover .complaint-edit-btn,
.complaint-edit-btn:focus-visible {
    opacity: 1;
}

.complaint-edit-btn:hover {
    background: var(--brand-50);
    border-color: var(--brand-100);
    color: var(--brand-700);
}

.complaint-description {
    margin: 6px 0 14px;
    color: var(--muted);
    font-size: .93rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.complaint-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding-top: 12px;
    border-top: 1px dashed var(--line);
}

.meta-pills {
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: .84rem;
    white-space: nowrap;
}

    .meta-item i {
        color: var(--subtle);
        font-size: 12px;
    }

.meta-time {
    margin-left: auto;
}

/* Pills (status + priority) */
.badge-custom,
.priority-badge,
.top-status-badge,
.top-priority-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: .76rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-custom::before,
.top-status-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.badge-custom,
.top-status-badge {
    background: var(--brand-50);
    border-color: var(--brand-100);
    color: var(--brand-700);
}

    .badge-custom.st-open,
    .top-status-badge.st-open {
        background: var(--open-bg);
        border-color: var(--open-line);
        color: var(--open);
    }

    .badge-custom.st-progress,
    .top-status-badge.st-progress {
        background: var(--progress-bg);
        border-color: var(--progress-line);
        color: var(--progress);
    }

    .badge-custom.st-resolved,
    .top-status-badge.st-resolved {
        background: var(--resolved-bg);
        border-color: var(--resolved-line);
        color: var(--resolved);
    }

.priority-badge,
.top-priority-badge {
    background: var(--surface-2);
    color: var(--ink-2);
}

.priority-low {
    background: #f2f4f7;
    color: #475467;
}

.priority-medium {
    background: var(--brand-50);
    color: var(--brand-700);
}

.priority-high {
    background: #fff4ed;
    color: #c4320a;
}

.priority-urgent {
    background: #c01048;
    color: #fff;
}

.top-status-badge,
.top-priority-badge {
    height: 28px;
    padding: 0 12px;
    font-size: .8rem;
}

/* Empty state */
.empty-message {
    padding: 64px 20px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-lg);
    background: var(--card);
    text-align: center;
    color: var(--muted);
}

    .empty-message i {
        display: inline-grid;
        place-items: center;
        width: 64px;
        height: 64px;
        margin-bottom: 14px;
        border-radius: 50%;
        background: var(--brand-50);
        color: var(--brand-600);
        font-size: 26px;
    }

    .empty-message h4 {
        margin: 0 0 4px;
        font-size: 1.1rem;
        font-weight: 700;
        color: var(--ink);
    }

    .empty-message p {
        margin: 0 0 18px;
    }

.empty-filter {
    display: none;
}

/* ---------- Buttons ---------- */

.btn-primary-custom,
.btn-submit,
.new-complaint-btn,
.header-new-btn,
.btn-post {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 18px;
    border: 0;
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--brand-600), var(--brand-700));
    color: #fff;
    font-size: .93rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 6px 16px -8px rgba(26, 63, 176, .9), inset 0 1px 0 rgba(255, 255, 255, .14);
    transition: filter .15s, transform .15s var(--ease), box-shadow .15s;
}

    .btn-primary-custom:hover,
    .btn-submit:hover,
    .new-complaint-btn:hover,
    .header-new-btn:hover,
    .btn-post:hover:not(:disabled) {
        filter: brightness(1.07);
        transform: translateY(-1px);
    }

    .btn-post:disabled {
        background: var(--surface-2);
        color: var(--subtle);
        box-shadow: none;
        cursor: not-allowed;
    }

.btn-submit,
.btn-cancel,
.btn-post {
    height: 44px;
}

.btn-cancel {
    padding: 0 18px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink-2);
    font-size: .93rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}

    .btn-cancel:hover {
        background: var(--surface);
    }

.disabled-btn {
    display: inline-block;
}

    .disabled-btn button:disabled {
        pointer-events: none;
    }

/* ---------- New / Edit complaint modal ---------- */

.modal-backdrop-custom {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, .5);
    backdrop-filter: blur(3px);
}

    .modal-backdrop-custom.show {
        display: flex;
        animation: fadeIn .18s ease-out;
    }

        .modal-backdrop-custom.show .complaint-modal {
            animation: popIn .22s var(--ease);
        }

.complaint-modal {
    width: 100%;
    max-width: 760px;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-xl);
    background: var(--card);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.modal-header-custom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 26px;
    border-bottom: 1px solid var(--line);
}

    .modal-header-custom h2 {
        margin: 0;
        font-size: 1.25rem;
        font-weight: 700;
        letter-spacing: -.01em;
    }

.modal-header-sub {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: .88rem;
}

.modal-close {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--subtle);
    font-size: 18px;
    cursor: pointer;
    transition: background .15s, color .15s;
}

    .modal-close:hover {
        background: var(--surface-2);
        color: var(--ink);
    }

.modal-body-custom {
    padding: 24px 26px 0;
    overflow-y: auto;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 18px;
}

    .form-grid .span-2 {
        grid-column: 1 / -1;
    }

.complaint-page .form-group {
    margin-bottom: 18px;
}

.form-label-custom {
    display: block;
    margin-bottom: 7px;
    color: var(--ink-2);
    font-size: .87rem;
    font-weight: 600;
}

    .form-label-custom .req {
        color: var(--accent);
    }

.form-control-custom,
.form-select-custom {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background-color: #fff;
    color: var(--ink);
    font-size: .95rem;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

select.form-control-custom,
.form-select-custom {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

textarea.form-control-custom {
    height: 120px;
    padding-top: 11px;
    resize: vertical;
    line-height: 1.5;
}

.form-control-custom::placeholder {
    color: var(--subtle);
}

.form-control-custom:hover,
.form-select-custom:hover {
    border-color: #b9c3d6;
}

.form-control-custom:focus,
.form-select-custom:focus {
    border-color: var(--brand-500);
    box-shadow: var(--ring);
}

/* Segmented priority control */
.priority-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 4px;
    border-radius: var(--radius);
    background: var(--surface-2);
}

.priority-btn {
    height: 36px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--muted);
    font-size: .87rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, color .15s, box-shadow .15s;
}

    .priority-btn:hover {
        color: var(--ink);
    }

    .priority-btn.active {
        background: #fff;
        color: var(--brand-700);
        box-shadow: var(--shadow-sm);
    }

        .priority-btn.active[data-priority="High"] {
            color: #c4320a;
        }

        .priority-btn.active[data-priority="Urgent"] {
            color: #c01048;
        }

/* Photo picker */
.photo-picker {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    background: var(--surface);
}

.photo-thumb {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: var(--radius-sm);
    background: #fff;
    border: 1px solid var(--line);
    color: var(--subtle);
    overflow: hidden;
}

    .photo-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

        .photo-thumb img[style*="block"] + i {
            display: none;
        }

.photo-copy {
    flex: 1;
    min-width: 0;
    font-size: .85rem;
    color: var(--muted);
}

    .photo-copy strong {
        display: block;
        color: var(--ink-2);
        font-size: .9rem;
    }

.photo-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 14px;
    margin: 0;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink-2);
    font-size: .87rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

    .photo-btn:hover {
        background: var(--brand-50);
        border-color: var(--brand-100);
        color: var(--brand-700);
    }

.modal-footer-custom {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin: 6px -26px 0;
    padding: 16px 26px;
    border-top: 1px solid var(--line);
    background: var(--card);
}

/* ---------- Admin: permissions modal ---------- */

.permissions-modal {
    max-width: 560px;
}

    .permissions-modal .modal-body-custom {
        padding-bottom: 20px;
    }

.permission-search.search-box {
    max-width: none;
    margin-bottom: 14px;
}

.permission-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.permission-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    background: #fff;
}

    .permission-item:last-child {
        border-bottom: 0;
    }

.permission-user {
    flex: 1;
    min-width: 0;
}

    .permission-user strong {
        display: block;
        font-size: .92rem;
        color: var(--ink);
    }

    .permission-user small {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: .8rem;
        color: var(--muted);
    }

.switch {
    position: relative;
    flex-shrink: 0;
    width: 42px;
    height: 24px;
    margin: 0;
    cursor: pointer;
}

    .switch input {
        position: absolute;
        opacity: 0;
        width: 0;
        height: 0;
    }

.switch-track {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: var(--line-strong);
    transition: background .18s;
}

    .switch-track::after {
        content: "";
        position: absolute;
        top: 3px;
        left: 3px;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        background: #fff;
        box-shadow: var(--shadow-sm);
        transition: transform .18s var(--ease);
    }

.switch input:checked + .switch-track {
    background: var(--brand-600);
}

    .switch input:checked + .switch-track::after {
        transform: translateX(18px);
    }

.switch input:focus-visible + .switch-track {
    box-shadow: var(--ring);
}

.switch input:disabled + .switch-track {
    opacity: .6;
}

/* ---------- Details drawer ---------- */

.details-overlay {
    position: fixed;
    inset: 0;
    z-index: 1040;
    display: none;
    background: rgba(15, 23, 42, .45);
    backdrop-filter: blur(2px);
}

    .details-overlay.show {
        display: block;
        animation: fadeIn .2s ease-out;
    }

.details-panel {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1045;
    width: 600px;
    max-width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--card);
    box-shadow: var(--shadow-lg);
    transform: translateX(105%);
    transition: transform .32s var(--ease);
}

    .details-panel.show {
        transform: translateX(0);
    }

.details-header {
    flex-shrink: 0;
    height: 68px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px 0 26px;
    border-bottom: 1px solid var(--line);
}

.details-header-spacer {
    flex: 1;
}

.details-icon-btn {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--muted);
    font-size: 15px;
    cursor: pointer;
    transition: background .15s, color .15s;
}

    .details-icon-btn:hover {
        background: var(--surface-2);
        color: var(--ink);
    }

    .details-icon-btn.danger:hover {
        background: var(--open-bg);
        color: var(--open);
    }

.details-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 26px 32px;
}

.details-title {
    margin: 0 0 24px;
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.25;
}

.details-section-title {
    margin-bottom: 10px;
    color: var(--subtle);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.details-status-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 4px;
    margin-bottom: 26px;
    border-radius: var(--radius);
    background: var(--surface-2);
}

.status-update-btn {
    height: 38px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--muted);
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, color .15s, box-shadow .15s;
}

    .status-update-btn:hover {
        color: var(--ink);
    }

    .status-update-btn.active {
        background: #fff;
        box-shadow: var(--shadow-sm);
    }

        .status-update-btn.active[data-status="Open"] {
            color: var(--open);
        }

        .status-update-btn.active[data-status="In Progress"] {
            color: var(--progress);
        }

        .status-update-btn.active[data-status="Resolved"] {
            color: var(--resolved);
        }

.details-description {
    margin-bottom: 26px;
    color: var(--ink-2);
    font-size: .97rem;
    line-height: 1.65;
    white-space: pre-wrap;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.detail-box {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    background: #fff;
}

    .detail-box:nth-child(odd) {
        border-right: 1px solid var(--line);
    }

.detail-photo-box {
    grid-column: 1 / -1;
    border-right: 0 !important;
}

.detail-label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 3px;
    color: var(--subtle);
    font-size: .78rem;
    font-weight: 500;
}

    .detail-label i {
        width: 14px;
        text-align: center;
    }

.detail-value {
    color: var(--ink);
    font-size: .93rem;
    font-weight: 600;
    word-break: break-word;
}

.detail-photo {
    width: 100%;
    max-height: 280px;
    margin-top: 6px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    cursor: zoom-in;
}

/* Comments */
.comments-block {
    margin-top: 30px;
}

.comments-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--subtle);
}

.comments-heading {
    margin: 0;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 700;
}

.comment-count-pill {
    min-width: 22px;
    height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: .74rem;
    font-weight: 700;
    display: inline-grid;
    place-items: center;
}

#commentList {
    margin-bottom: 16px;
}

.comment-thread {
    position: relative;
    display: grid;
    gap: 14px;
}

.comment-item {
    display: flex;
    gap: 12px;
    animation: fadeIn .2s ease-in;
}

    .comment-item .avatar {
        width: 32px;
        height: 32px;
        font-size: .72rem;
    }

.comment-bubble {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border-radius: 4px var(--radius) var(--radius) var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
}

.comment-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 3px;
}

.comment-author {
    font-size: .87rem;
    font-weight: 700;
    color: var(--ink);
}

.comment-date {
    font-size: .74rem;
    color: var(--subtle);
    white-space: nowrap;
}

.comment-followup {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 2px 0 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--brand-50);
    color: var(--brand-700);
    font-size: .74rem;
    font-weight: 600;
}

.comment-body {
    margin: 0;
    color: var(--ink-2);
    font-size: .9rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.comment-state {
    padding: 14px;
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--muted);
    font-size: .88rem;
    text-align: center;
}

    .comment-state.error {
        background: var(--open-bg);
        color: var(--open);
    }

.comment-composer {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-xs);
}

    .comment-composer textarea.form-control-custom {
        height: 88px;
    }

.composer-foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.followup-field {
    flex: 1;
    min-width: 180px;
    max-width: 240px;
}

    .followup-field .form-label-custom {
        font-size: .78rem;
        margin-bottom: 5px;
    }

    .followup-field .form-control-custom {
        height: 40px;
        font-size: .9rem;
    }

.composer-foot .disabled-btn {
    margin-left: auto;
}

.btn-post {
    height: 40px;
}

/* ---------- Toast ---------- */

.toast-message {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9999;
    display: none;
    align-items: center;
    gap: 10px;
    min-width: 280px;
    max-width: calc(100vw - 48px);
    padding: 14px 18px;
    border-radius: var(--radius);
    background: var(--ink);
    color: #fff;
    font-size: .92rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
}

    .toast-message::before {
        content: "\f05a";
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        color: #93b4ff;
    }

    .toast-message.show {
        display: flex;
        animation: toastIn .25s var(--ease);
    }

/* ---------- Animations ---------- */

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(.98);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */

@media (max-width: 1200px) {
    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    /* Public */
    .home-hero {
        grid-template-columns: 1fr;
        padding: 44px 32px;
    }

    .home-hero-mark {
        display: none;
    }

    .home-features {
        grid-template-columns: 1fr;
    }

    .app-nav .navbar-nav {
        align-items: stretch;
        padding-top: 10px;
    }

    .app-nav .nav-link.nav-cta {
        margin: 6px 0 0;
        text-align: center;
    }

    /* Login */
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-brand {
        display: none;
    }

    .login-mobile-logo {
        display: block;
    }

    /* Dashboard: sidebar becomes a drawer */
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        transform: translateX(-100%);
        transition: transform .28s var(--ease);
        box-shadow: var(--shadow-lg);
        z-index: 1048;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .icon-btn.sidebar-close {
        display: inline-flex;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1047;
        background: rgba(15, 23, 42, .45);
    }

    body.sidebar-open .sidebar-backdrop {
        display: block;
    }

    .icon-btn.menu-toggle {
        display: inline-flex;
    }

    .main-header {
        padding: 0 20px;
    }

    .complaints-area {
        padding: 24px 20px 40px;
    }
}

@media (max-width: 767px) {
    .header-new-btn .btn-text,
    .user-name,
    .user-button .fa-chevron-down {
        display: none;
    }

    .header-new-btn {
        width: 42px;
        padding: 0;
    }

    .user-button {
        padding: 0 3px;
    }

    .search-box {
        min-width: 0;
    }

    .page-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-box:nth-child(odd) {
        border-right: 0;
    }

    .notification-menu {
        width: calc(100vw - 32px);
    }

    .complaint-edit-btn {
        opacity: 1;
    }

    .meta-time {
        margin-left: 0;
    }

    .policy-card,
    .error-card {
        padding: 32px 24px;
    }
}

@media (max-width: 575px) {
    .main-header {
        gap: 8px;
        padding: 0 12px;
    }

    .header-actions {
        gap: 6px;
    }

    .complaints-area {
        padding: 20px 12px 32px;
    }

    .kpi-grid {
        gap: 10px;
    }

    .kpi-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 14px;
    }

    .modal-backdrop-custom {
        padding: 0;
        align-items: flex-end;
    }

    .complaint-modal {
        max-height: 94vh;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    }

    .modal-header-custom,
    .modal-body-custom {
        padding-left: 18px;
        padding-right: 18px;
    }

    .modal-footer-custom {
        margin: 6px -18px 0;
        padding: 14px 18px;
    }

        .modal-footer-custom button {
            flex: 1;
        }

    .details-body {
        padding: 20px 18px 28px;
    }

    .details-header {
        padding: 0 12px 0 18px;
    }

    .login-panel {
        padding: 32px 20px;
    }

    .toast-message {
        left: 12px;
        right: 12px;
        bottom: 12px;
        min-width: 0;
        max-width: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}
