 :root {
    --color-primary: #001840;
    --color-secondary: #102A71;
    --color-accent: #F5C400;
    --color-accent-light: #FFDC5F;
    --color-bg: #f6f7f1;
    --color-surface: #ffffff;
    --color-surface-alt: #fffdf0;
    --color-dark: #001840;
    --color-text: #0f224f;
    --color-text-muted: #5b6786;
    --color-border: #d9dfef;
    --color-success: #22c55e;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-info: #3b82f6;
    --shadow-sm: 0 12px 28px rgba(0, 24, 64, 0.08);
    --shadow-md: 0 22px 46px rgba(0, 24, 64, 0.14);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.layout {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, Poppins, "Segoe UI", Roboto, sans-serif;
    color: var(--color-text);
    background:
        radial-gradient(circle at top right, rgba(245, 196, 0, 0.18), transparent 22%),
        radial-gradient(circle at left top, rgba(16, 42, 113, 0.10), transparent 28%),
        linear-gradient(180deg, #fffef8 0%, var(--color-bg) 100%);
}
a { color: inherit; }

 .navbar {
    position: fixed;
    inset: 0 0 auto 0;
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 1.5rem;
    background: linear-gradient(135deg, rgba(0, 24, 64, 0.88), rgba(16, 42, 113, 0.82));
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 220, 95, 0.24);
    box-shadow: 0 14px 30px rgba(0, 24, 64, 0.18);
    z-index: 1000;
}
.navbar-left, .navbar-right {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.navbar-right { margin-left: auto; }
.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
}
.logo-mark {
    width: 52px;
    height: 52px;
    display: block;
    border-radius: 999px;
    object-fit: cover;
    object-position: center;
}
.logo-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.12;
}
.logo-copy strong {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    font-size: 1rem;
    letter-spacing: 0.02em;
    color: var(--color-primary);
}
.brand-mjjd {
    color: #38b6ff;
}
.brand-telecom {
    color: #f5c400;
    background: linear-gradient(135deg, #ffef9a 0%, #f5c400 45%, #c99200 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.logo-copy small {
    color: rgba(255, 244, 194, 0.72);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.user-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.15;
}
.user-meta strong { font-size: 0.95rem; color: #f8fbff; }
.user-role {
    color: rgba(214, 228, 255, 0.82);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.icon-btn {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 999px;
    background: rgba(255, 220, 95, 0.16);
    color: var(--color-primary);
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover, .icon-btn:focus-visible {
    background: rgba(255, 220, 95, 0.24);
    border-color: rgba(255, 220, 95, 0.22);
    transform: translateY(-1px);
    outline: none;
}
.profile-dropdown { position: relative; }
.profile-toggle {
    width: auto;
    padding: 0 0.8rem;
    gap: 0.45rem;
    font-weight: 700;
}
.caret { display: inline-flex; }
.caret svg { width: 14px; height: 14px; }
.dropdown-content {
    position: absolute;
    right: 0;
    top: calc(100% + 0.55rem);
    min-width: 190px;
    padding: 0.45rem;
    display: none;
    background: rgba(255,255,255,0.98);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
}
.dropdown-content a, .dropdown-content button {
    display: block;
    width: 100%;
    padding: 0.72rem 0.9rem;
    border: 0;
    background: transparent;
    text-align: left;
    text-decoration: none;
    border-radius: 10px;
    cursor: pointer;
}
.dropdown-content a:hover, .dropdown-content button:hover { background: var(--color-surface-alt); }
.notif-shell {
    position: relative;
}
.notif-toggle {
    position: relative;
}
.notif-dot {
    position: absolute;
    top: -4px;
    right: -8px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #ff5f5f;
    box-shadow: 0 0 0 2px rgba(8, 17, 47, 0.9);
}
.notif-dropdown {
    right: -0.4rem;
    width: min(92vw, 400px);
    min-width: 0;
    max-width: 400px;
    padding: 0.35rem;
    overflow: hidden;
}
.notif-dropdown-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.8rem 0.5rem;
    color: var(--color-text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
#notifDropdownList {
    max-height: min(52vh, 360px);
    overflow-y: auto;
    padding-right: 0.1rem;
}
#notifDropdownList::-webkit-scrollbar {
    width: 8px;
}
#notifDropdownList::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.36);
    border-radius: 999px;
}
.notif-item {
    display: grid;
    gap: 0.14rem;
    padding: 0.68rem 0.75rem;
    text-decoration: none;
}
.notif-item.is-unread {
    background: rgba(37, 99, 235, 0.08);
}
.notif-title {
    font-weight: 700;
    color: #0f172a;
    font-size: 0.9rem;
    line-height: 1.3;
}
.notif-message {
    color: var(--color-text-muted);
    font-size: 0.76rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.notif-time {
    color: #64748b;
    font-size: 0.72rem;
}
.notif-empty {
    padding: 0.9rem 1rem;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.btn-link { font: inherit; }

.guest-nav-wrap {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-left: auto;
}

.guest-nav {
    display: inline-flex;
    align-items: center;
    gap: 1.75rem;
}

.guest-nav a {
    text-decoration: none;
    color: #ffffff;
    font-weight: 600;
    transition: color 0.18s ease;
}

.guest-nav a:hover {
    color: var(--color-primary);
}

.guest-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.layout.is-guest .main-content,
.layout.is-guest .footer {
    margin-left: 0;
}

.layout.is-guest .main-content {
    padding: 98px 0 1.75rem;
}

.layout.is-guest .footer {
    padding: 0 1.75rem 1.5rem;
}

  .sidebar {
    position: fixed;
    top: 74px;
    left: 0;
    bottom: 0;
    width: 266px;
    padding: 0.85rem 0.9rem 1rem;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.82) 0%, rgba(23, 37, 84, 0.72) 100%),
        url("/images/sidebar.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #f8fafc;
    overflow-y: auto;
    box-shadow: 8px 0 28px rgba(15, 23, 42, 0.15);
    z-index: 900;
    transition: transform 0.28s ease;
}
.sidebar.collapsed { transform: translateX(-100%); }
 .sidebar-floating-toggle {
    display: none;
    position: static;
    top: auto;
    left: auto;
    z-index: auto;
    width: auto;
    height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #fff7d9;
}
.sidebar-floating-toggle:hover,
.sidebar-floating-toggle:focus-visible {
    background: transparent;
    border-color: transparent;
}
.sidebar-nav {
    padding-top: 0.35rem;
}
.sidebar-nav ul { list-style: none; margin: 0; padding: 0; }
.sidebar-item { margin-bottom: 0.2rem; }
.sidebar-item a {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    padding: 0.76rem 0.9rem;
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.18s ease, transform 0.18s ease;
}
.nav-icon {
    width: 17px;
    height: 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #bfdbfe;
}
.nav-icon svg { width: 17px; height: 17px; }
.nav-label {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 500;
    font-size: 0.93rem;
    line-height: 1.2;
}
.sidebar-notification-badge {
    display: inline-grid;
    flex: 0 0 auto;
    min-width: 1.35rem;
    height: 1.35rem;
    place-items: center;
    padding: 0 0.34rem;
    border: 2px solid #0d224d;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 3px 9px rgba(239,68,68,.3);
}
.sidebar-notification-badge.is-hidden { display: none; }
.sidebar-item.active .sidebar-notification-badge { border-color:#e8b800; }
.sidebar-item:hover a {
    background: rgba(255,255,255,0.08);
    transform: translateX(2px);
}
.sidebar-item.active a {
    background: linear-gradient(135deg, #102A71 0%, #F5C400 100%);
    box-shadow: 0 14px 26px rgba(245, 196, 0, 0.22);
}
.sidebar-item.active .nav-icon, .sidebar-item.active .nav-label { color: #fff; }

.main-content {
    margin-left: 266px;
    padding: 86px 0.95rem 1.75rem;
    min-height: 100vh;
}
.page-header-card {
    padding: 1.35rem 1.5rem;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(0, 24, 64, 0.98), rgba(16, 42, 113, 0.94) 68%, rgba(245, 196, 0, 0.88) 100%);
    color: #fff;
    border: 0;
}
.page-header-card p { color: rgba(255,255,255,0.78); margin-top: 0.35rem; }
.flash-stack { display: grid; gap: 0.75rem; margin-bottom: 1rem; }
body.login-modal-open .flash-stack { display: none; }
.alert {
    padding: 0.95rem 1.05rem;
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    font-weight: 500;
}
.alert-success { background: rgba(34,197,94,0.12); color: #15803d; border: 1px solid rgba(34,197,94,0.18); }
.alert-error { background: rgba(239,68,68,0.10); color: #b91c1c; border: 1px solid rgba(239,68,68,0.18); }
.alert-info { background: rgba(59,130,246,0.10); color: #1d4ed8; border: 1px solid rgba(59,130,246,0.18); }
.footer {
    margin-left: 266px;
    padding: 0 0.95rem 1.5rem;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.card {
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(219,228,239,0.95);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem;
    margin-bottom: 1rem;
}
.grid-4, .card.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }
.card .title {
    color: var(--color-text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.45rem;
}
.card .value { font-size: clamp(1.35rem, 2vw, 2rem); font-weight: 700; color: var(--color-primary); }
h1.card, h2.card { padding: 1rem 1.2rem; font-size: 1.15rem; }

.telecom-page {
    display: grid;
    gap: 1.25rem;
}
.telecom-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(1.65rem, 3vw, 2.2rem);
    border-radius: 26px;
    background:
        linear-gradient(90deg, rgba(8, 20, 55, 0.9) 0%, rgba(19, 49, 127, 0.82) 52%, rgba(17, 35, 91, 0.46) 100%),
        linear-gradient(180deg, rgba(8, 20, 55, 0.2), rgba(8, 20, 55, 0.52)),
        url("/images/sidebar.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
    box-shadow: 0 18px 34px rgba(7, 18, 36, 0.22);
    isolation: isolate;
}
.telecom-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 82% 26%, rgba(255, 239, 190, 0.34), transparent 18%),
        radial-gradient(circle at 68% 72%, rgba(96, 165, 250, 0.18), transparent 22%);
    pointer-events: none;
    opacity: 0.95;
}
.telecom-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    pointer-events: none;
}
.telecom-hero > * { position: relative; z-index: 1; }
.telecom-hero h1, .telecom-hero h2 {
    margin: 0 0 0.65rem;
    font-size: clamp(1.85rem, 3.6vw, 3rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: #f8fbff;
}
.telecom-hero p {
    margin: 0;
    max-width: 760px;
    color: rgba(244, 248, 255, 0.92);
    font-size: clamp(0.98rem, 1.35vw, 1.12rem);
    line-height: 1.55;
}
.telecom-hero-actions {
    margin-top: 1.35rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}
.telecom-hero .btn {
    width: auto;
    min-width: 170px;
    padding: 0.82rem 1.2rem;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(53, 92, 223, 0.98), rgba(44, 75, 192, 0.96));
    color: #eef5ff;
    border: 1px solid rgba(169, 196, 255, 0.22);
    box-shadow: 0 14px 28px rgba(8, 20, 55, 0.2);
}
.telecom-hero .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 32px rgba(8, 20, 55, 0.24);
}
.telecom-hero .btn.secondary {
    background: rgba(255, 255, 255, 0.94);
    color: #17306f;
    border: 1px solid rgba(255, 255, 255, 0.92);
}
.telecom-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
}
.telecom-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.88);
    font-size: 0.86rem;
}
.telecom-chip svg { width: 15px; height: 15px; }

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
}
.metric-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid rgba(219,228,239,0.95);
    border-radius: 18px;
    padding: 1.2rem;
    box-shadow: var(--shadow-sm);
}
.metric-card::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-secondary), var(--color-accent));
}
.metric-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}
.metric-icon {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(37,99,235,0.10);
    color: var(--color-secondary);
}
.metric-icon svg { width: 20px; height: 20px; }
.metric-label {
    color: var(--color-text-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}
.metric-value { font-size: clamp(1.5rem, 2vw, 2.25rem); font-weight: 800; color: var(--color-primary); }
.metric-meta { margin-top: 0.35rem; font-size: 0.9rem; color: var(--color-text-muted); }

.panel-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 1rem;
}
.panel-grid--single {
    grid-template-columns: minmax(0, 1fr);
}
.panel-card {
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(219,228,239,0.95);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--color-border);
}
.panel-title-wrap { display: flex; align-items: center; gap: 0.75rem; }
.panel-icon {
    width: 38px; height: 38px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
    background: rgba(37,99,235,0.10); color: var(--color-secondary);
}
.panel-icon svg { width: 18px; height: 18px; }
.panel-title { font-size: 1rem; font-weight: 700; }
.panel-subtitle { color: var(--color-text-muted); font-size: 0.84rem; margin-top: 0.2rem; }
.panel-body { padding: 1rem 1.2rem 1.2rem; }
.quick-link-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.85rem; }
.quick-link {
    display: block;
    padding: 1rem;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid var(--color-border);
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.quick-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: rgba(37,99,235,0.28); }
.quick-link strong { display: block; margin-bottom: 0.35rem; }
.quick-link span { color: var(--color-text-muted); font-size: 0.9rem; }

.telecom-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.telecom-table th, .telecom-table td {
    padding: 0.95rem 1rem;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
    vertical-align: top;
}
.telecom-table th {
    background: #f8fbff;
    color: var(--color-text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.telecom-table tbody tr:hover { background: rgba(96,165,250,0.08); }
.telecom-table tbody tr:last-child td { border-bottom: 0; }
.record-strong { font-weight: 700; color: var(--color-primary); }
.record-muted { color: var(--color-text-muted); font-size: 0.9rem; }

input, select, textarea {
    width: 100%;
    padding: 0.78rem 0.92rem;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #fff;
    color: var(--color-text);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: rgba(37,99,235,0.42);
    box-shadow: 0 0 0 4px rgba(37,99,235,0.12);
}
textarea { min-height: 120px; resize: vertical; }
.small-input {
    width: auto;
    min-width: 120px;
    padding: 0.58rem 0.72rem;
    margin: 0;
    border-radius: 10px;
    font-size: 0.88rem;
}
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.admin-disable-account-form {
    display: grid;
    width: min(100%, 640px);
    gap: 0.85rem;
}
.admin-disable-account-form .btn {
    width: fit-content;
}
.btn, button.btn, a.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.75rem 1rem;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--color-secondary) 0%, #1d4ed8 100%);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(37,99,235,0.18);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.btn:hover, button.btn:hover, a.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(37,99,235,0.24);
}
.btn.secondary, a.btn.secondary, button.btn.secondary {
    background: #fff; color: var(--color-primary); border: 1px solid var(--color-border); box-shadow: none;
}
.btn.accent, a.btn.accent, button.btn.accent {
    background: linear-gradient(135deg, #d4af37 0%, #c79b20 100%);
    box-shadow: 0 12px 24px rgba(212,175,55,0.22);
}
.btn-group { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.btn-group .btn.active { background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%); color: #fff9df; }
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.34rem 0.72rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #eff6ff;
    color: #3b82f6;
}
.badge.open, .badge.active { background: rgba(59,130,246,0.12); color: #1d4ed8; }
.badge.approved, .badge.completed, .badge.resolved { background: rgba(34,197,94,0.12); color: #15803d; }
.badge.pending, .badge.in_progress, .badge.under_review, .badge.reschedule_required, .badge.cancellation_requested { background: rgba(245,158,11,0.14); color: #b45309; }
.badge.scheduled, .badge.installed, .badge.info { background: rgba(59,130,246,0.12); color: #1d4ed8; }
.badge.activated { background: rgba(20,184,166,0.14); color: #0f766e; }
.badge.closed, .badge.queued { background: rgba(100,116,139,0.14); color: #475569; }
.badge.rejected, .badge.cancelled, .badge.expired, .badge.error { background: rgba(239,68,68,0.12); color: #b91c1c; }
.badge.urgency-low,
.badge.low {
    background: rgba(148, 163, 184, 0.16);
    color: #475569;
}
.badge.urgency-medium,
.badge.medium {
    background: rgba(59,130,246,0.12);
    color: #1d4ed8;
}
.badge.urgency-high,
.badge.high {
    background: rgba(245,158,11,0.16);
    color: #b45309;
}
.badge.urgency-critical,
.badge.critical {
    background: rgba(239,68,68,0.14);
    color: #b91c1c;
}
.chart {
    min-height: 230px;
    border: 1px dashed var(--color-border);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(248,251,255,0.95), rgba(241,245,249,0.85));
    display: flex; align-items: center; justify-content: center; color: #94a3b8;
}
.message { padding: 0.8rem 0; border-bottom: 1px solid var(--color-border); }
.message:last-child { border-bottom: 0; }
.ticket-photo-block {
    margin-top: 1rem;
    display: grid;
    gap: 0.65rem;
}
.ticket-photo-preview {
    display: block;
    width: min(100%, 420px);
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: var(--shadow-sm);
}

.ticket-detail-page {
    display: grid;
    gap: 1.25rem;
}

.ticket-detail-backline {
    display: flex;
    justify-content: flex-start;
}

.ticket-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(280px, 3fr);
    gap: 1.5rem;
    align-items: start;
}

.ticket-detail-main,
.ticket-detail-sidebar {
    display: grid;
    gap: 1.5rem;
}

.ticket-detail-sidebar {
    position: sticky;
    top: 96px;
}

.ticket-detail-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(219, 228, 239, 0.9);
    border-radius: 22px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    padding: clamp(1.25rem, 2vw, 1.5rem);
}

.ticket-detail-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.14), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.94));
}

.ticket-detail-hero__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.ticket-detail-eyebrow {
    margin: 0 0 0.35rem;
    color: var(--color-text-muted);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.ticket-detail-hero h1 {
    margin: 0;
    color: var(--color-primary);
    font-size: clamp(1.45rem, 2.4vw, 2rem);
    line-height: 1.15;
}

.ticket-detail-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-top: 1rem;
    color: var(--color-text-muted);
    font-size: 0.94rem;
    font-weight: 650;
}

.ticket-detail-description {
    margin: 1.2rem 0 0;
    color: #24324f;
    line-height: 1.7;
    white-space: pre-line;
}

.ticket-detail-photo {
    display: grid;
    gap: 0.65rem;
    margin-top: 1.25rem;
}

.ticket-detail-photo span {
    color: var(--color-text-muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ticket-detail-photo img {
    width: min(100%, 560px);
    max-height: 380px;
    object-fit: cover;
    border: 1px solid rgba(219, 228, 239, 0.95);
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

.ticket-detail-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.ticket-detail-section-head h2,
.ticket-sidebar-card h2 {
    margin: 0;
    color: var(--color-primary);
    font-size: 1.08rem;
}

.ticket-detail-section-head p {
    margin: 0.28rem 0 0;
    color: var(--color-text-muted);
    font-size: 0.92rem;
}

.ticket-timeline {
    display: grid;
    gap: 1rem;
}

.ticket-message-row {
    display: flex;
}

.ticket-message-row.is-staff {
    justify-content: flex-start;
}

.ticket-message-row.is-customer {
    justify-content: flex-end;
}

.ticket-message-row.is-system {
    justify-content: center;
}

.ticket-message-bubble {
    width: fit-content;
    max-width: min(76%, 680px);
    padding: 0.9rem 1rem;
    border-radius: 18px;
    background: #fff;
    border: 1px solid rgba(219, 228, 239, 0.95);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.ticket-message-row.is-staff .ticket-message-bubble {
    border-bottom-left-radius: 6px;
    background: linear-gradient(180deg, #fff, rgba(248, 251, 255, 0.96));
}

.ticket-message-row.is-customer .ticket-message-bubble {
    border: 0;
    border-bottom-right-radius: 6px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
}

.ticket-message-row.is-system .ticket-message-bubble {
    max-width: min(86%, 760px);
    background: rgba(100, 116, 139, 0.1);
    color: #475569;
    border: 1px solid rgba(100, 116, 139, 0.12);
    box-shadow: none;
    font-size: 0.9rem;
    font-style: italic;
    text-align: center;
}

.ticket-message-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.6rem;
    align-items: baseline;
    margin-bottom: 0.42rem;
}

.ticket-message-meta strong {
    font-size: 0.88rem;
}

.ticket-message-meta span {
    color: var(--color-text-muted);
    font-size: 0.78rem;
}

.ticket-message-row.is-customer .ticket-message-meta span,
.ticket-message-row.is-customer .ticket-message-meta strong {
    color: rgba(255, 255, 255, 0.84);
}

.ticket-message-bubble p {
    margin: 0;
    line-height: 1.55;
    white-space: pre-line;
}

.ticket-empty-state {
    padding: 1.25rem;
    border: 1px dashed rgba(148, 163, 184, 0.45);
    border-radius: 16px;
    color: var(--color-text-muted);
    text-align: center;
}

.ticket-reply-form,
.ticket-reply-disabled,
.ticket-action-form {
    display: grid;
    gap: 0.9rem;
}

.ticket-reply-form textarea,
.ticket-reply-disabled textarea,
.ticket-action-form textarea,
.ticket-action-form select {
    width: 100%;
    border-radius: 14px;
}

.ticket-action-form label {
    color: var(--color-text-muted);
    font-size: 0.84rem;
    font-weight: 800;
}

.ticket-form-actions {
    display: flex;
    justify-content: flex-end;
}

.ticket-sidebar-card {
    display: grid;
    gap: 1rem;
}

.ticket-meta-list {
    display: grid;
    gap: 0.9rem;
    margin: 0;
}

.ticket-meta-list div {
    display: grid;
    gap: 0.25rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid rgba(219, 228, 239, 0.85);
}

.ticket-meta-list div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.ticket-meta-list dt {
    color: var(--color-text-muted);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ticket-meta-list dd {
    margin: 0;
    color: #24324f;
    font-size: 0.94rem;
    font-weight: 700;
}

.ticket-sidebar-note {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

.ticket-confirmation-option {
    display: grid;
    grid-template-columns: 1.15rem minmax(0, 1fr);
    gap: 0.65rem;
    align-items: start;
    margin-top: 0.65rem;
    cursor: pointer;
    line-height: 1.45;
}

.ticket-confirmation-option input[type="checkbox"] {
    width: 1.15rem;
    min-width: 1.15rem;
    height: 1.15rem;
    margin: 0.12rem 0 0;
    accent-color: #2f73f2;
    cursor: pointer;
}

.ticket-confirmation-option span {
    min-width: 0;
}

.ticket-reopen-form {
    padding-top: 0.9rem;
    border-top: 1px solid rgba(219, 228, 239, 0.85);
}

.ticket-detail-page .btn[disabled],
.ticket-detail-page button[disabled] {
    cursor: not-allowed;
    opacity: 0.58;
    transform: none;
    box-shadow: none;
}

@media (max-width: 1100px) {
    .ticket-detail-layout {
        grid-template-columns: 1fr;
    }

    .ticket-detail-sidebar {
        position: static;
    }
}

@media (max-width: 640px) {
    .ticket-detail-hero__top,
    .ticket-detail-section-head {
        flex-direction: column;
    }

    .ticket-detail-card {
        border-radius: 18px;
        padding: 1rem;
    }

    .ticket-message-bubble {
        max-width: 92%;
    }

    .ticket-message-row.is-system .ticket-message-bubble {
        max-width: 100%;
    }

    .ticket-form-actions,
    .ticket-detail-backline {
        justify-content: stretch;
    }

    .ticket-form-actions .btn,
    .ticket-detail-backline .btn,
    .ticket-action-form .btn {
        width: 100%;
    }
}
.text-center { text-align: center; }
.text-end { text-align: right; }
.text-muted { color: var(--color-text-muted); }
.mt-1 { margin-top: 1rem; }
.mb-1 { margin-bottom: 1rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }

.empty-state {
    padding: 1.4rem;
    border-radius: 16px;
    border: 1px dashed var(--color-border);
    background: linear-gradient(180deg, rgba(248,251,255,0.95), rgba(241,245,249,0.75));
    text-align: center;
    color: var(--color-text-muted);
}

.tracking-shell {
    max-width: 760px;
    margin: 0 auto;
    display: grid;
    gap: 1rem;
}
.tracking-card {
    background: rgba(255,255,255,0.97);
    border: 1px solid rgba(219,228,239,0.95);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    padding: 1.4rem;
}
.tracking-form-card { max-width: 560px; margin: 0 auto; }
.tracking-card h3 { margin: 0 0 0.45rem; }
.tracking-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.85rem 1rem;
}
.tracking-meta {
    padding: 0.9rem 1rem;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid var(--color-border);
}
.tracking-meta strong { display: block; margin-bottom: 0.25rem; color: var(--color-text-muted); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.08em; }
.progress-list { display: grid; gap: 0.65rem; }
.progress-step {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.75rem 0.85rem;
    border-radius: 14px;
    background: #f8fbff;
    border: 1px solid var(--color-border);
}
.progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #cbd5e1;
}
.progress-step.is-complete .progress-dot { background: var(--color-secondary); box-shadow: 0 0 0 6px rgba(37,99,235,0.12); }
.progress-step.is-alert .progress-dot { background: var(--color-danger); box-shadow: 0 0 0 6px rgba(239,68,68,0.12); }

.landing-page { display: grid; gap: 1.25rem; }
.landing-hero {
    position: relative;
    overflow: hidden;
    min-height: 420px;
    border-radius: 26px;
    background: linear-gradient(rgba(15,23,42,0.72), rgba(15,23,42,0.82)), url('/build/assets/images/surf2sawa-unlimited-prepaid-fiber-internet-philippines.jpg.webp') center/cover no-repeat;
    box-shadow: var(--shadow-md);
}
.landing-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(37,99,235,0.25), transparent 45%);
}
.landing-hero-content {
    position: relative;
    z-index: 1;
    min-height: 420px;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 2rem;
    color: #fff;
}
.landing-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.14);
    font-size: 0.86rem;
    margin-bottom: 1rem;
}
.landing-kicker svg { width: 15px; height: 15px; }
.landing-hero h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.8rem); }
.landing-hero p {
    margin: 1rem auto 0;
    max-width: 680px;
    font-size: 1rem;
    color: rgba(255,255,255,0.82);
}
.landing-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.85rem;
    margin-top: 1.35rem;
}
.section-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1rem;
}
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}
.feature-card {
    padding: 1.25rem;
    border-radius: 18px;
    background: rgba(255,255,255,0.97);
    border: 1px solid rgba(219,228,239,0.95);
    box-shadow: var(--shadow-sm);
}
.feature-card-icon {
    width: 44px; height: 44px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center;
    background: rgba(37,99,235,0.10); color: var(--color-secondary); margin-bottom: 0.85rem;
}
.feature-card-icon svg { width: 20px; height: 20px; }
.feature-card h3 { margin: 0 0 0.5rem; }
.feature-card p { margin: 0; color: var(--color-text-muted); }
.plan-list { display: grid; gap: 0.9rem; }
.plan-card {
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid var(--color-border);
}
.plan-card strong { display: block; font-size: 1.1rem; margin-bottom: 0.25rem; }
.plan-card span { color: var(--color-text-muted); display: block; }
.plan-card .price { color: var(--color-primary); font-size: 1.4rem; font-weight: 800; margin: 0.5rem 0; }

.chat-window {
    display: flex; flex-direction: column; gap: 0.65rem;
    background: linear-gradient(180deg, #f9fbfd 0%, #f4f8fb 100%);
    border-radius: 16px; border: 1px solid var(--color-border);
}
.chat-window .chat-message { max-width: 72%; padding: 0.75rem 0.9rem; border-radius: 16px; line-height: 1.4; }
.chat-window .chat-message.self { align-self: flex-end; background: linear-gradient(135deg, rgba(37,99,235,0.18), rgba(96,165,250,0.22)); color: var(--color-primary); }
.chat-window .chat-message.other { align-self: flex-start; background: #fff; border: 1px solid var(--color-border); }
.chat-window .chat-message.ai { background: #eef3ff; }
.chat-header { padding: 0.5rem 0 1rem; border-bottom: 1px solid var(--color-border); }
.chat-header .subtext { margin-top: 0.25rem; color: var(--color-text-muted); }
.agent-status { display:flex; align-items:center; gap:0.45rem; margin-top:0.6rem; font-size:0.86rem; }
.agent-status .dot { width: 10px; height: 10px; border-radius: 50%; }
.agent-status .online { background: var(--color-success); }
.chat-list .avatar { width: 32px; height: 32px; display:inline-flex; align-items:center; justify-content:center; border-radius:50%; background: rgba(37,99,235,0.12); color: var(--color-primary); font-weight: 700; }
.quick-replies { display:flex; flex-wrap:wrap; gap:0.55rem; margin-top:0.85rem; }
.quick-replies .btn.small { padding:0.5rem 0.75rem; font-size:0.82rem; }
.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(96,165,250,0.28); border-radius: 999px; }

@media (max-width: 1100px) {    .panel-grid, .section-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .sidebar.collapsed { transform: translateX(-100%); }
    .main-content, .footer { margin-left: 0; }
    .main-content { padding: 96px 1rem 1.25rem; }
    .navbar { padding: 0 1rem; }
    .layout.is-guest .navbar { padding-inline: 1rem; }
    .layout.is-auth .navbar { padding-left: 1rem; }
     .sidebar-floating-toggle {
    position: static;
    top: auto;
    left: auto;
    z-index: auto;
    width: auto;
    height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #fff7d9;
}
    .guest-nav-wrap {
        gap: 0.75rem;
    }
    .guest-nav {
        gap: 1rem;
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: none;
    }
    .guest-nav::-webkit-scrollbar {
        display: none;
    }
    .user-meta { display: none; }
    .card { padding: 1rem; }
    .telecom-hero, .landing-hero { border-radius: 20px; }
    .telecom-table th, .telecom-table td, th, td { padding: 0.75rem 0.7rem; }
    .inline-form { align-items: stretch; }
    .small-input { width: 100%; }
    .landing-actions, .telecom-hero-actions { justify-content: stretch; }
}

.w-full { width: 100%; }
.rounded { border-radius: 10px; }
.rounded-lg { border-radius: 16px; }
.border { border: 1px solid var(--color-border); }
.bg-white { background: #fff; }
.shadow { box-shadow: var(--shadow-sm); }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-6 { padding: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 0.5rem; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-gray-500 { color: var(--color-text-muted); }
.font-semibold { font-weight: 700; }
.text-xl { font-size: 1.25rem; }
.leading-tight { line-height: 1.2; }
.max-w-md { max-width: 28rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-7xl { max-width: 80rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-5 > * + * { margin-top: 1.25rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

.page-body {
    width: 100%;
    max-width: 1380px;
    margin: 0 auto;
}

.page-stack {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.section-title-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 88px;
    margin-bottom: 0;
}

.section-title-card h1,
.section-title-card h2,
.section-title-card h3 {
    margin: 0;
    font-size: 1.35rem;
    color: var(--color-primary);
}

.section-title-card p {
    margin: 0.35rem 0 0;
    color: var(--color-text-muted);
}

.toolbar-card {
    margin-bottom: 0;
}

.toolbar-filter-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.toolbar-filter-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--color-text-muted);
}

.toolbar-filter-select {
    min-width: 220px;
    padding: 0.78rem 2.75rem 0.78rem 0.95rem;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    color: var(--color-primary);
    font-weight: 700;
}

.toolbar-row {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 0.85rem;
}

.toolbar-field {
    min-width: 180px;
    flex: 1 1 220px;
}

.toolbar-field.grow {
    flex: 2 1 320px;
}

.toolbar-field label,
.form-label,
.block.text-sm {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

.toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
}

.table-card {
    margin-bottom: 0;
    padding: 0;
    overflow: hidden;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.table-wrap table,
.card > table,
.table-card table {
    width: 100%;
    min-width: 760px;
}

.card > table,
.table-card table,
.table-card .telecom-table {
    margin: 0;
}

.telecom-table {
    table-layout: fixed;
}

.telecom-table th {
    white-space: nowrap;
}

.telecom-table td {
    word-break: break-word;
    font-size: 0.92rem;
}

.telecom-table .record-strong,
.telecom-table .record-muted {
    font-size: 0.92rem;
}

.telecom-table .col-actions,
.telecom-table td.actions-cell {
    width: 1%;
    white-space: nowrap;
}

.metrics-grid {
    align-items: stretch;
}

.metric-card {
    min-height: 188px;
    display: flex;
    flex-direction: column;
}

.metric-head {
    height: 100%;
}

.panel-card,
.card,
.tracking-card {
    margin-bottom: 0;
}

.empty-state.compact {
    padding: 1rem 1.2rem;
}

.notice-card {
    padding: 0.95rem 1.05rem;
    border-radius: 14px;
    background: rgba(34,197,94,0.12);
    color: #15803d;
    border: 1px solid rgba(34,197,94,0.18);
    box-shadow: var(--shadow-sm);
}

.page-cluster {
    display: grid;
    gap: 1rem;
}

.content-narrow {
    max-width: 920px;
    margin: 0 auto;
}

.status-list {
    display: grid;
    gap: 0.55rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.status-list li {
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.status-list li.active {
    border-color: rgba(37,99,235,0.28);
    color: var(--color-primary);
    font-weight: 700;
}

@media (max-width: 768px) {
    .page-body {
        max-width: none;
    }

    .section-title-card {
        min-height: 0;
        align-items: flex-start;
        flex-direction: column;
    }

    .toolbar-field,
    .toolbar-field.grow {
        min-width: 100%;
        flex-basis: 100%;
    }

    .toolbar-actions {
        width: 100%;
    }

    .toolbar-actions .btn,
    .toolbar-actions a.btn,
    .toolbar-actions button.btn {
        flex: 1 1 100%;
    }

    .table-wrap table,
    .card > table,
    .table-card table {
        min-width: 640px;
    }
}

.tech-page {
    display: grid;
    gap: 0.9rem;
}

.tech-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem;
    min-height: 0;
}

.tech-page-header h1,
.tech-page-header h2,
.tech-page-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--color-primary);
}

.tech-page-header p {
    margin: 0.25rem 0 0;
    color: var(--color-text-muted);
    font-size: 0.92rem;
}

.tech-table td .record-muted {
    margin-top: 0.2rem;
}

.tech-chat-page {
    display: grid;
    gap: 1rem;
}

.tech-chat-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 1rem;
    align-items: stretch;
}

.tech-chat-sidebar,
.tech-chat-main {
    min-height: 0;
}

.tech-chat-sidebar .card,
.tech-chat-main.card {
    height: 100%;
}

.tech-chat-sidebar .card {
    padding: 1rem;
}

.tech-chat-search {
    margin: 0.8rem 0 0.95rem;
}

.tech-chat-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.45rem;
}

.tech-chat-list a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.8rem;
    border-radius: 12px;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.tech-chat-list a:hover,
.tech-chat-list a.active {
    background: #f8fbff;
    border-color: rgba(37,99,235,0.18);
}

.tech-chat-list .avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
}

.tech-chat-main.card {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.tech-chat-main .chat-header {
    padding: 1rem 1.1rem;
}

.tech-chat-main .chat-window {
    flex: 1;
    min-height: 460px;
    padding: 1rem;
    border: 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    border-radius: 0;
    overflow-y: auto;
    background: linear-gradient(180deg, #fbfdff 0%, #f3f7fb 100%);
}

.tech-chat-main .quick-replies {
    padding: 0.85rem 1.1rem 0;
}

.tech-chat-input {
    padding: 1rem 1.1rem 1.1rem;
    display: flex;
    align-items: flex-end;
    gap: 0.65rem;
    background: #fff;
}

.tech-chat-input textarea {
    min-height: 72px;
}

.tech-chat-empty {
    display: grid;
    place-items: center;
    min-height: 520px;
    text-align: center;
    padding: 1.5rem;
}

.tech-chat-empty h3 {
    margin: 0 0 0.45rem;
    color: var(--color-primary);
}

.tech-chat-empty p {
    margin: 0;
    max-width: 360px;
    color: var(--color-text-muted);
}

@media (max-width: 980px) {
    .tech-chat-layout {
        grid-template-columns: 1fr;
    }

    .tech-chat-main .chat-window,
    .tech-chat-empty {
        min-height: 360px;
    }
}

@media (max-width: 768px) {
    .tech-page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .tech-chat-input {
        flex-wrap: wrap;
    }

    .tech-chat-input .icon-btn {
        width: 44px;
        height: 44px;
    }
}

.table-wrap .tech-ticket-table {
    min-width: 860px;
    table-layout: fixed;
}

.tech-ticket-table th,
.tech-ticket-table td,
.tech-table th,
.tech-table td {
    padding: 0.72rem 0.78rem;
    vertical-align: top;
}

.tech-ticket-table td,
.tech-table td {
    word-break: normal;
    overflow-wrap: anywhere;
}

.tech-ticket-table th:nth-child(1),
.tech-ticket-table td:nth-child(1) {
    width: 16%;
}

.tech-ticket-table th:nth-child(2),
.tech-ticket-table td:nth-child(2) {
    width: 16%;
}

.tech-ticket-table th:nth-child(3),
.tech-ticket-table td:nth-child(3) {
    width: 20%;
}

.tech-ticket-table th:nth-child(4),
.tech-ticket-table td:nth-child(4) {
    width: 10%;
}

.tech-ticket-table th:nth-child(5),
.tech-ticket-table td:nth-child(5) {
    width: 12%;
}

.tech-ticket-table th:nth-child(6),
.tech-ticket-table td:nth-child(6) {
    width: 16%;
}

.tech-ticket-table th:nth-child(7),
.tech-ticket-table td:nth-child(7) {
    width: 10%;
}

.tech-ticket-table td:nth-child(3),
.tech-ticket-table td:nth-child(4) {
    color: var(--color-text);
}

.tech-ticket-table th:nth-child(4),
.tech-ticket-table td:nth-child(4),
.tech-ticket-table th:nth-child(5),
.tech-ticket-table td:nth-child(5),
.tech-ticket-table th:nth-child(7),
.tech-ticket-table td:nth-child(7) {
    white-space: nowrap;
}

.tech-ticket-table .actions-cell,
.tech-table .actions-cell {
    vertical-align: middle;
}

.tech-ticket-table .actions-cell form {
    display: flex;
    justify-content: flex-start;
}

.tech-ticket-modal__description {
    grid-column: 1 / -1;
}

.tech-ticket-modal__description span {
    line-height: 1.5;
    white-space: normal;
}

.tech-ticket-table .btn,
.tech-table .actions-cell .btn {
    min-width: 0;
    padding: 0.58rem 0.82rem;
}

@media (max-width: 768px) {
    .table-wrap .tech-ticket-table {
        min-width: 640px;
    }
}

.table-wrap .tech-table {
    min-width: 920px;
    table-layout: fixed;
}

.tech-table th:nth-child(1),
.tech-table td:nth-child(1) {
    width: 18%;
}

.tech-table th:nth-child(2),
.tech-table td:nth-child(2) {
    width: 20%;
}

.tech-table th:nth-child(3),
.tech-table td:nth-child(3) {
    width: 14%;
}

.tech-table th:nth-child(4),
.tech-table td:nth-child(4) {
    width: 12%;
}

.tech-table th:nth-child(5),
.tech-table td:nth-child(5) {
    width: 22%;
}

.tech-table th:nth-child(6),
.tech-table td:nth-child(6) {
    width: 14%;
}

.tech-table th:nth-child(5),
.tech-table td:nth-child(5) {
    width: 21%;
}

@media (max-width: 768px) {
    .table-wrap .tech-table {
        min-width: 640px;
    }
}

.admin-app-table th:nth-child(1),
.admin-app-table td:nth-child(1) {
    width: 16%;
}

.admin-app-table th:nth-child(2),
.admin-app-table td:nth-child(2) {
    width: 20%;
}

.admin-app-table th:nth-child(3),
.admin-app-table td:nth-child(3) {
    width: 17%;
}

.admin-app-table th:nth-child(4),
.admin-app-table td:nth-child(4) {
    width: 12%;
}

.admin-app-table th:nth-child(5),
.admin-app-table td:nth-child(5) {
    width: 11%;
}

.admin-app-table th:nth-child(6),
.admin-app-table td:nth-child(6) {
    width: 12%;
}

.admin-app-table th:nth-child(7),
.admin-app-table td:nth-child(7) {
    width: 12%;
}

.admin-app-table .btn,
.admin-customer-table .btn {
    min-width: 0;
    padding: 0.58rem 0.82rem;
}
.admin-app-table th,
.admin-app-table td {
    padding: 0.72rem 0.78rem;
}
.admin-app-table .ref-cell,
.admin-app-table .contact-cell,
.admin-app-table .plan-cell,
.admin-app-table .submitted-cell,
.admin-app-table .status-cell,
.admin-app-table .actions-cell {
    white-space: nowrap;
}
.admin-app-table .customer-cell {
    word-break: normal;
    overflow-wrap: anywhere;
}
.admin-app-table .status-cell .badge {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}
.admin-app-table td {
    vertical-align: top;
}

.admin-customer-table th:nth-child(1),
.admin-customer-table td:nth-child(1) {
    width: 16%;
}

.admin-customer-table th:nth-child(2),
.admin-customer-table td:nth-child(2) {
    width: 18%;
}

.admin-customer-table th:nth-child(3),
.admin-customer-table td:nth-child(3) {
    width: 12%;
}

.admin-customer-table th:nth-child(4),
.admin-customer-table td:nth-child(4) {
    width: 22%;
}

.admin-customer-table th:nth-child(5),
.admin-customer-table td:nth-child(5) {
    width: 12%;
}

.admin-customer-table th:nth-child(6),
.admin-customer-table td:nth-child(6) {
    width: 8%;
}

.admin-customer-table th:nth-child(7),
.admin-customer-table td:nth-child(7) {
    width: 12%;
}

.admin-ticket-table {
    table-layout: auto;
}

.ticket-queue-overview {
    display: grid;
    gap: 1rem;
}

.ticket-queue-overview__head h2 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--color-primary);
}

.ticket-queue-overview__head p {
    margin: 0.35rem 0 0;
    color: var(--color-text-muted);
    max-width: 72ch;
}

.ticket-queue-overview__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.85rem;
}

.ticket-queue-metric {
    display: grid;
    gap: 0.3rem;
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid var(--color-border);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    text-decoration: none;
    color: inherit;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.ticket-queue-metric:hover {
    transform: translateY(-2px);
    border-color: rgba(37,99,235,0.24);
    box-shadow: 0 14px 28px rgba(37,99,235,0.10);
}

.ticket-queue-metric.is-active {
    border-color: rgba(37,99,235,0.34);
    background: linear-gradient(180deg, rgba(232, 240, 255, 0.98), rgba(219, 234, 254, 0.94));
    box-shadow: 0 14px 28px rgba(37,99,235,0.12);
}

.ticket-queue-metric__label {
    color: var(--color-text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ticket-queue-metric__value {
    font-size: 1.8rem;
    color: var(--color-primary);
}

.ticket-queue-metric__meta {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.ticket-queue-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
    font-size: 0.8rem;
    font-weight: 700;
}

.admin-ticket-table th:nth-child(1),
.admin-ticket-table td:nth-child(1) {
    width: 13%;
}

.admin-ticket-table th:nth-child(2),
.admin-ticket-table td:nth-child(2) {
    width: 12%;
}

.admin-ticket-table th:nth-child(3),
.admin-ticket-table td:nth-child(3) {
    width: 15%;
}

.admin-ticket-table th:nth-child(4),
.admin-ticket-table td:nth-child(4) {
    width: 10%;
}

.admin-ticket-table th:nth-child(5),
.admin-ticket-table td:nth-child(5) {
    width: 10%;
}

.admin-ticket-table th:nth-child(6),
.admin-ticket-table td:nth-child(6) {
    width: 12%;
}

.admin-ticket-table th:nth-child(7),
.admin-ticket-table td:nth-child(7) {
    width: 16%;
}

.admin-ticket-table th:nth-child(8),
.admin-ticket-table td:nth-child(8) {
    width: 12%;
}

.admin-ticket-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.6rem;
    align-items: center;
}

.admin-ticket-actions select {
    min-width: 140px;
    max-width: 240px;
}

.admin-ticket-actions .btn {
    min-width: 0;
    padding: 0.68rem 0.95rem;
}

.admin-ticket-table td {
    vertical-align: top;
}

.admin-ticket-table td:nth-child(1),
.admin-ticket-table td:nth-child(2),
.admin-ticket-table td:nth-child(4),
.admin-ticket-table td:nth-child(5),
.admin-ticket-table td:nth-child(6),
.admin-ticket-table td:nth-child(7) {
    white-space: nowrap;
}

.technician-load-select {
    min-width: 220px;
}

body.ticket-overlay-open {
    overflow: hidden;
}

.admin-ticket-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 1200;
}

.admin-ticket-modal.is-open {
    display: flex;
}

.admin-ticket-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 18, 46, 0.56);
    backdrop-filter: blur(6px);
}

.admin-ticket-modal__dialog {
    position: relative;
    width: min(100%, 760px);
    max-height: calc(100vh - 2rem);
    overflow: auto;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background:
        radial-gradient(circle at top left, rgba(245, 196, 0, 0.1), transparent 26%),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 22%),
        linear-gradient(180deg, rgba(6, 18, 46, 0.98), rgba(9, 23, 54, 0.96));
    box-shadow: 0 34px 96px rgba(2, 8, 22, 0.42);
    color: #f8fbff;
}

.admin-ticket-modal__close {
    position: absolute;
    z-index: 5;
    top: 0.95rem;
    right: 0.95rem;
    width: 2.6rem;
    height: 2.6rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #f8fbff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.admin-ticket-modal__shell {
    display: grid;
    gap: 1rem;
    min-height: 0;
    padding: 1.35rem;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.admin-ticket-modal__intro h2 {
    margin: 0;
    font-size: 1.6rem;
    line-height: 1.05;
}

.admin-ticket-modal__intro p {
    margin: 0.45rem 0 0;
    color: rgba(223, 233, 249, 0.76);
    line-height: 1.5;
}

.admin-ticket-modal__summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.admin-ticket-modal__summary .tracking-meta {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-ticket-modal__summary .tracking-meta strong,
.admin-ticket-modal__summary .tracking-meta span {
    color: #f8fbff;
}

.admin-ticket-modal__summary .tracking-meta strong {
    color: rgba(223, 233, 249, 0.76);
}

.admin-ticket-modal__form {
    display: grid;
    gap: 0.7rem;
}

.admin-ticket-modal [hidden] {
    display: none !important;
}

.admin-ticket-modal__form label {
    color: rgba(236, 242, 252, 0.92);
    font-size: 0.88rem;
    font-weight: 700;
}

.admin-ticket-modal__field-label {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.admin-ticket-modal__field-label .field-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.35rem;
    padding: 0.12rem 0.48rem;
    border: 1px solid rgba(147, 197, 253, 0.22);
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.12);
    color: rgba(219, 234, 254, 0.86);
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.2;
}

.ticket-assignment-reason {
    display: grid;
    gap: 0.7rem;
}

.ticket-assignment-help {
    margin: -0.2rem 0 0.15rem;
    color: rgba(223, 233, 249, 0.76);
    font-size: 0.84rem;
    line-height: 1.45;
}

.ticket-assignment-error {
    display: grid;
    gap: 0.2rem;
    padding: 0.8rem 0.95rem;
    border: 1px solid rgba(248, 113, 113, 0.38);
    border-radius: 14px;
    background: rgba(127, 29, 29, 0.32);
    color: #fee2e2;
}

.admin-ticket-modal__form select,
.admin-ticket-modal__form input[type="date"],
.admin-ticket-modal__form textarea {
    min-height: 3rem;
    border-radius: 14px;
    border-color: rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.08);
    color: #f8fbff;
}

.admin-ticket-modal__form textarea {
    min-height: 6rem;
    max-height: 10rem;
    resize: vertical;
}

.admin-ticket-modal__form select option,
.admin-ticket-modal__form select optgroup,
.technician-load-select option,
.technician-load-select optgroup {
    background: #ffffff;
    color: #0f172a;
}

.admin-ticket-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    align-items: center;
}

.admin-ticket-modal__actions--assignment {
    margin-top: 0.25rem;
    padding-top: 0.9rem;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.admin-ticket-modal__detail-link {
    margin-left: auto;
}

.admin-ticket-modal__actions .btn.secondary {
    background: rgba(255, 255, 255, 0.92);
}

.installation-history-modal .admin-ticket-modal__dialog {
    width: min(100%, 680px);
    background: #ffffff;
    color: #0f172a;
}

.installation-history-modal .admin-ticket-modal__close {
    background: #eff6ff;
    color: #0f172a;
}

.installation-history-modal .admin-ticket-modal__intro h2 {
    color: #0f172a;
}

.installation-history-modal .admin-ticket-modal__intro p {
    color: #64748b;
}

.installation-history-modal__body {
    max-height: min(58vh, 520px);
    overflow: auto;
    padding: 0.25rem 0.1rem 0.1rem;
}

.installation-history-modal .admin-app-timeline-meta,
.installation-history-modal .workflow-timeline-meta {
    color: #64748b;
}

.installation-history-modal .admin-app-value,
.installation-history-modal .workflow-value {
    color: #0f172a;
}

.installation-history-modal .admin-app-empty,
.installation-history-modal .workflow-empty {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.customer-ticket-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 1200;
}

.customer-ticket-modal.is-open {
    display: flex;
}

.customer-ticket-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(8px);
}

.customer-ticket-modal__dialog {
    position: relative;
    width: min(100%, 760px);
    max-height: calc(100vh - 2rem);
    overflow: auto;
    border-radius: 26px;
    border: 1px solid rgba(191, 219, 254, 0.56);
    background:
        radial-gradient(circle at top right, rgba(255, 214, 10, 0.16), transparent 26%),
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.12), transparent 20%),
        linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.98));
    box-shadow: 0 36px 90px rgba(15, 23, 42, 0.2);
}

.customer-ticket-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.7rem;
    height: 2.7rem;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    color: #0f172a;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.customer-ticket-modal__shell {
    display: grid;
    gap: 1rem;
    padding: 1.4rem;
}

.customer-ticket-modal__intro {
    display: grid;
    gap: 0.45rem;
    padding-right: 2.5rem;
}

.customer-ticket-modal__intro h2 {
    margin: 0;
    color: #0f172a;
    font-size: 1.8rem;
}

.customer-ticket-modal__intro p,
.customer-ticket-modal__hint,
.customer-ticket-modal__helper {
    margin: 0;
    color: #64748b;
    line-height: 1.55;
}

.customer-ticket-modal__form {
    display: grid;
    gap: 0.95rem;
}

.customer-ticket-modal__field {
    display: grid;
    gap: 0.5rem;
}

.customer-ticket-modal__field label {
    color: #0f172a;
    font-size: 0.9rem;
    font-weight: 700;
}

.customer-ticket-modal__field select,
.customer-ticket-modal__field textarea,
.customer-ticket-modal__field input[type="file"] {
    width: 100%;
}

.customer-ticket-modal__field select,
.customer-ticket-modal__field textarea {
    border-radius: 16px;
    border: 1px solid rgba(191, 219, 254, 0.9);
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    color: #0f172a;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

.customer-ticket-modal__field select {
    min-height: 3rem;
    padding-inline: 0.95rem;
}

.customer-ticket-modal__field textarea {
    min-height: 144px;
    padding: 0.95rem 1rem;
    resize: vertical;
}

.customer-ticket-modal__field input[type="file"] {
    padding: 0.85rem 0.95rem;
    border-radius: 16px;
    border: 1px dashed rgba(148, 163, 184, 0.62);
    background: rgba(248, 250, 252, 0.9);
}

.customer-ticket-modal__error {
    margin: 0;
    color: #dc2626;
    font-size: 0.84rem;
    font-weight: 600;
}

.customer-ticket-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
    padding-top: 0.2rem;
}

.ticket-urgency-text {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

@media (max-width: 720px) {
    .admin-ticket-modal__shell {
        padding: 1rem;
    }

    .admin-ticket-modal__summary {
        grid-template-columns: 1fr;
    }

    .admin-ticket-modal__actions {
        flex-direction: column;
    }

    .admin-ticket-modal__detail-link {
        margin-left: 0;
    }

    .admin-ticket-modal__actions .btn,
    .admin-ticket-modal__actions a.btn {
        width: 100%;
    }

    .customer-ticket-modal__shell {
        padding: 1rem;
    }

    .customer-ticket-modal__actions {
        flex-direction: column-reverse;
    }

    .customer-ticket-modal__actions .btn {
        width: 100%;
    }
}

.job-page {
    display: grid;
    gap: 1rem;
}

.job-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem;
}

.job-header h1 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--color-primary);
}

.job-header p {
    margin: 0.3rem 0 0;
    color: var(--color-text-muted);
}

.job-header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.job-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 1rem;
}

.job-card {
    background: rgba(255,255,255,0.96);
    border: 1px solid rgba(219,228,239,0.95);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.job-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid var(--color-border);
}

.job-card-header h2,
.job-card-header h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--color-primary);
}

.job-card-header p {
    margin: 0.25rem 0 0;
    color: var(--color-text-muted);
    font-size: 0.88rem;
}

.job-card-body {
    padding: 1rem 1.15rem 1.15rem;
}

.job-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.job-detail {
    padding: 0.9rem 1rem;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid var(--color-border);
}

.job-detail.full {
    grid-column: 1 / -1;
}

.job-detail-label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--color-text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.job-detail-value {
    color: var(--color-text);
    font-size: 1rem;
    line-height: 1.45;
}

.job-status-panel {
    display: grid;
    gap: 0.85rem;
}

.upload-grid {
    display: grid;
    gap: 0.85rem;
}

.upload-field {
    padding: 0.95rem 1rem;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid var(--color-border);
}

.upload-field label {
    display: block;
    margin-bottom: 0.55rem;
    color: var(--color-primary);
    font-weight: 700;
}

.upload-field input[type="file"] {
    width: 100%;
    padding: 0.85rem 0.9rem;
    border: 1px dashed rgba(37,99,235,0.24);
    border-radius: 12px;
    background: #fff;
}

.upload-field input[type="file"]::file-selector-button {
    margin-right: 0.75rem;
    padding: 0.55rem 0.8rem;
    border: 0;
    border-radius: 10px;
    background: rgba(37,99,235,0.12);
    color: var(--color-primary);
    font-weight: 700;
    cursor: pointer;
}

.job-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.35rem;
}

.proof-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
}

.proof-card {
    padding: 0.9rem;
    border-radius: 16px;
    border: 1px solid var(--color-border);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.proof-card strong {
    display: block;
    margin-bottom: 0.65rem;
    color: var(--color-primary);
}

.proof-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--color-border);
}

@media (max-width: 1100px) {
    .job-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .job-detail-grid,
    .proof-grid {
        grid-template-columns: 1fr;
    }

    .job-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .job-actions .btn {
        width: 100%;
    }
}

.customer-apply-page {
    max-width: 920px;
    margin: 0 auto;
}
.apply-section-card {
    display: grid;
    gap: 1rem;
}
.apply-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.2rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}
.apply-section-head h2 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--color-primary);
}
.apply-section-head p {
    margin: 0.35rem 0 0;
    color: var(--color-text-muted);
    font-size: 0.94rem;
}
.apply-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.apply-field {
    min-width: 0;
}
.apply-field.full-span {
    grid-column: 1 / -1;
}
.apply-field label {
    display: block;
    margin-bottom: 0.42rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--color-text);
}
.apply-field input,
.apply-field select,
.apply-field textarea {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.55);
    border-radius: 12px;
    background: #fff;
    padding: 0.82rem 0.95rem;
    font: inherit;
    color: var(--color-text);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.apply-field input:focus,
.apply-field select:focus,
.apply-field textarea:focus {
    outline: none;
    border-color: rgba(37, 99, 235, 0.65);
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.18);
}
.apply-plan-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.apply-plan-card {
    position: relative;
    display: block;
    cursor: pointer;
    min-height: 100%;
    border: 1px solid rgba(148, 163, 184, 0.35);
}
.apply-plan-card input[type="radio"] {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 1rem;
    height: 1rem;
}
.apply-plan-card.selected,
.apply-plan-card:has(input[type="radio"]:checked) {
    border-color: rgba(37, 99, 235, 0.55);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.12);
    background: linear-gradient(180deg, rgba(239, 246, 255, 0.92), rgba(255, 255, 255, 1));
}
.apply-plan-card .price span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-left: 0.2rem;
}
.apply-upload-field {
    max-width: 100%;
}
.apply-actions-card {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}
.apply-actions-row {
    width: 100%;
    justify-content: flex-end;
    gap: 0.75rem;
}
.apply-actions-row .btn {
    min-width: 180px;
}
@media (max-width: 780px) {
    .apply-form-grid,
    .apply-plan-grid {
        grid-template-columns: 1fr;
    }

    .apply-actions-row {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .apply-actions-row .btn {
        min-width: 0;
        width: 100%;
    }
}

.apply-wizard-shell {
    max-width: 980px;
    margin: 0 auto;
    display: grid;
    gap: 1.5rem;
}
.apply-stepper {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: start;
    gap: 0.5rem;
    padding: 0.4rem 0.2rem 0;
}
.apply-stepper::before {
    content: "";
    position: absolute;
    top: 1.05rem;
    left: 8%;
    right: 8%;
    height: 3px;
    background: rgba(148, 163, 184, 0.35);
    z-index: 0;
}
.apply-step {
    position: relative;
    z-index: 1;
    text-align: center;
    display: grid;
    justify-items: center;
    gap: 0.45rem;
}
.apply-step span {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #e7eef7;
    color: #0f172a;
    font-weight: 800;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.05);
}
.apply-step label {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    font-weight: 700;
}
.apply-step.is-active span {
    background: linear-gradient(135deg, #2d8fb0, #2563eb);
    color: #fff;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}
.apply-step.is-complete span {
    background: #16a34a;
    color: #fff;
    font-size: 0;
}
.apply-step.is-complete span::before {
    content: "";
    width: 0.42rem;
    height: 0.76rem;
    border: solid currentColor;
    border-width: 0 3px 3px 0;
    transform: translateY(-1px) rotate(45deg);
}
.apply-step.is-active label,
.apply-step.is-complete label {
    color: var(--color-text);
}
.apply-wizard-form {
    display: grid;
    gap: 1.25rem;
}
.apply-step-panel {
    display: none;
    padding: 2rem;
}
.apply-step-panel.is-active {
    display: grid;
    gap: 1.35rem;
}
.apply-step-head h1 {
    margin: 0;
    font-size: clamp(1.8rem, 2.4vw, 2.3rem);
    color: #0f172a;
}
.apply-step-head p {
    margin: 0.55rem 0 0;
    color: var(--color-text-muted);
    font-size: 0.98rem;
}
.apply-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem 1.35rem;
}
.apply-field {
    min-width: 0;
}
.apply-field.full-span {
    grid-column: 1 / -1;
}
.apply-field label {
    display: block;
    margin-bottom: 0.42rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
}
.apply-field input,
.apply-field select,
.apply-field textarea {
    width: 100%;
    border: 1px solid rgba(191, 219, 254, 0.9);
    border-radius: 14px;
    background: #f8fbff;
    padding: 0.88rem 1rem;
    font: inherit;
    color: var(--color-text);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.apply-field input:focus,
.apply-field select:focus,
.apply-field textarea:focus {
    outline: none;
    border-color: rgba(37, 99, 235, 0.55);
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.18);
    background: #fff;
}
.apply-map-card {
    border-radius: 24px;
    background: linear-gradient(180deg, #eef4fb, #e5edf6);
    padding: 1.2rem;
}
.apply-map-board {
    position: relative;
    width: 100%;
    min-height: 360px;
    border: none;
    border-radius: 22px;
    background:
        radial-gradient(circle at 20% 25%, rgba(96, 165, 250, 0.18), transparent 22%),
        radial-gradient(circle at 80% 35%, rgba(212, 175, 55, 0.16), transparent 20%),
        linear-gradient(180deg, #dce6f1, #d3dee9);
    cursor: crosshair;
    overflow: hidden;
}
.apply-map-board::before,
.apply-map-board::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.32) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.32) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}
.apply-map-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(0, 24, 64, 0.88), rgba(16, 42, 113, 0.82));
    border-radius: 999px;
    padding: 0.8rem 1.2rem;
    font-weight: 700;
    color: #0f172a;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}
.apply-map-pin {
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #ec4899;
    border: 4px solid #fff;
    box-shadow: 0 8px 18px rgba(236, 72, 153, 0.3);
    transform: translate(-50%, -50%);
    display: none;
}
.apply-map-pin.is-visible {
    display: block;
}
.apply-location-readout,
.apply-review-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.apply-plan-stack {
    display: grid;
    gap: 1rem;
}
.apply-plan-option {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 1.35rem;
    border: 1px solid rgba(191, 219, 254, 0.9);
    border-radius: 18px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.apply-plan-option:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}
.apply-plan-option input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
}
.apply-plan-option strong {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
    color: #0f172a;
}
.apply-plan-option span {
    color: var(--color-text-muted);
    font-size: 0.94rem;
}
.apply-plan-option:has(input[type="radio"]:checked) {
    border-color: rgba(37, 99, 235, 0.55);
    background: linear-gradient(180deg, rgba(239, 246, 255, 0.94), #fff);
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.12);
}
.apply-plan-price {
    font-size: 1.6rem;
    font-weight: 800;
    color: #0f172a;
}
.apply-upload-field {
    max-width: 100%;
}
.apply-step-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 0.4rem;
}
.apply-step-actions.end {
    justify-content: flex-end;
}
.apply-step-actions.between {
    justify-content: space-between;
}
.apply-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #0f172a;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}
.apply-link-btn.center-link {
    margin: 0 auto;
}
.btn.accent {
    background: #eab308;
    color: #fff;
}
.btn.accent:hover {
    background: #ca8a04;
}
.apply-notice-card {
    max-width: 880px;
    margin: 0 auto;
}
.apply-done-shell {
    padding-bottom: 1rem;
}
.apply-done-card {
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem 2.5rem;
    text-align: center;
}
.apply-done-icon {
    width: 92px;
    height: 92px;
    margin: 0 auto 1.4rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(34, 197, 94, 0.16);
    color: #16a34a;
}
.apply-done-icon::before {
    content: "";
    width: 1.05rem;
    height: 1.9rem;
    border: solid currentColor;
    border-width: 0 6px 6px 0;
    transform: translateY(-3px) rotate(45deg);
}
.apply-done-card h1 {
    margin: 0;
    font-size: clamp(2rem, 2.8vw, 2.6rem);
}
.apply-done-card p {
    margin: 1rem auto 0;
    max-width: 560px;
    color: var(--color-text-muted);
    font-size: 1.02rem;
    line-height: 1.75;
}
.apply-done-actions {
    margin-top: 2rem;
    display: grid;
    gap: 1rem;
}
@media (max-width: 860px) {
    .apply-form-grid,
    .apply-location-readout,
    .apply-review-grid {
        grid-template-columns: 1fr;
    }

    .apply-step label {
        display: none;
    }

    .apply-step-panel {
        padding: 1.35rem;
    }

    .apply-plan-option {
        grid-template-columns: 24px 1fr;
    }

    .apply-plan-price {
        grid-column: 2;
    }
}
@media (max-width: 640px) {
    .apply-step-actions,
    .apply-step-actions.between {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .apply-step-actions .btn,
    .apply-link-btn {
        width: 100%;
    }

    .apply-map-board {
        min-height: 260px;
    }
}

.real-map-card {
    padding: 1rem;
}
.apply-live-map {
    position: relative;
    isolation: isolate;
    z-index: 0;
    width: 100%;
    min-height: 380px;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.3);
}
.apply-map-status {
    margin: -0.25rem 0 0;
    font-size: 0.93rem;
    color: var(--color-text-muted);
}
.apply-map-status.is-error {
    color: #dc2626;
    font-weight: 700;
}
.location-map-card {
    display: grid;
    gap: 1rem;
}
.location-map-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}
.location-map-header h3 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--color-primary);
}
.location-map-header p {
    margin: 0.35rem 0 0;
    color: var(--color-text-muted);
}
.location-map-link {
    white-space: nowrap;
}
.location-map-canvas {
    position: relative;
    isolation: isolate;
    z-index: 0;
    width: 100%;
    min-height: 300px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: linear-gradient(180deg, #eff5fb, #e5edf6);
}
.apply-live-map .leaflet-top,
.apply-live-map .leaflet-bottom,
.location-map-canvas .leaflet-top,
.location-map-canvas .leaflet-bottom {
    z-index: 5;
}
.location-map-canvas.is-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    color: var(--color-text-muted);
    text-align: center;
    background: #f8fafc;
}
.location-map-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}
.location-map-meta-grid .full-width {
    grid-column: 1 / -1;
}
@media (max-width: 780px) {
    .location-map-header {
        flex-direction: column;
    }

    .location-map-link {
        width: 100%;
        white-space: normal;
    }

    .location-map-meta-grid {
        grid-template-columns: 1fr;
    }
}
.application-status-shell {
    display: grid;
    gap: 1rem;
}
.application-status-hero {
    display: grid;
    grid-template-columns: 1.4fr auto;
    gap: 1rem;
    padding: 1.35rem 1.45rem;
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(37,99,235,0.12), rgba(96,165,250,0.08)),
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid rgba(191,219,254,0.7);
}
.application-status-kicker {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(30,58,138,0.08);
    color: var(--color-primary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.application-status-hero h2 {
    margin: 0.85rem 0 0.4rem;
    font-size: clamp(1.7rem, 2.4vw, 2.25rem);
    color: #0f172a;
}
.application-status-hero p {
    margin: 0;
    max-width: 58ch;
    color: var(--color-text-muted);
}
.application-status-badge-wrap {
    display: grid;
    justify-items: end;
    align-content: start;
    gap: 0.45rem;
}
.application-status-badge-wrap .badge {
    font-size: 0.95rem;
    padding: 0.7rem 1rem;
}
.application-status-badge-wrap small {
    color: var(--color-text-muted);
    font-weight: 700;
}
.application-detail-grid .tracking-meta,
.application-highlight-row .tracking-meta {
    min-height: 100%;
}
.application-highlight-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem 1rem;
}
.application-alert-card {
    padding: 1rem 1.1rem;
    border-radius: 18px;
    border: 1px solid rgba(226,232,240,0.95);
    background: #fff;
}
.application-alert-card strong {
    display: block;
    margin-bottom: 0.4rem;
}
.application-alert-card p {
    margin: 0;
    color: var(--color-text-muted);
    line-height: 1.55;
}
.application-alert-card.is-danger {
    background: rgba(254,242,242,0.92);
    border-color: rgba(252,165,165,0.6);
}
.application-id-resubmission-card {
    display: grid;
    gap: 1rem;
    padding: 1.2rem;
    border: 1px solid rgba(248, 113, 113, 0.46);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(254, 242, 242, 0.68));
    box-shadow: 0 14px 34px rgba(127, 29, 29, 0.08);
}
.application-id-resubmission-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}
.application-id-resubmission-head h3 {
    margin: 0.65rem 0 0.35rem;
}
.application-id-resubmission-head p,
.application-id-rejection-reason p,
.application-id-upload-field p,
.application-id-resubmission-actions p {
    margin: 0;
    color: var(--color-text-muted);
    line-height: 1.5;
}
.application-id-rejection-reason {
    padding: 0.9rem 1rem;
    border-left: 4px solid #dc2626;
    border-radius: 12px;
    background: rgba(254, 226, 226, 0.72);
}
.application-id-rejection-reason strong {
    display: block;
    margin-bottom: 0.3rem;
    color: #991b1b;
}
.application-id-resubmission-form {
    display: grid;
    gap: 1rem;
}
.application-id-upload-field {
    display: grid;
    align-content: start;
    gap: 0.55rem;
    min-width: 0;
    padding: 1rem;
    border: 1px solid rgba(203, 213, 225, 0.9);
    border-radius: 16px;
    background: #fff;
}
.application-id-upload-field label {
    font-weight: 800;
    color: var(--color-text);
}
.application-id-upload-field input[type="file"] {
    width: 100%;
    padding: 0.7rem;
    border: 1px dashed rgba(96, 165, 250, 0.75);
    border-radius: 12px;
    background: #f8fbff;
    color: var(--color-text);
}
.application-id-upload-field small {
    color: var(--color-text-muted);
}
.application-id-upload-field .error {
    color: #b91c1c;
}
.application-id-resubmission-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 0.2rem;
}
.application-id-resubmission-actions .btn {
    flex: 0 0 auto;
}
.application-progress-card {
    padding: 1.15rem;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid rgba(219,228,239,0.95);
}
.application-progress-head h3 {
    margin: 0;
}
.application-progress-head p {
    margin: 0.35rem 0 0.8rem;
    color: var(--color-text-muted);
}
.application-progress-list {
    display: grid;
    gap: 0.8rem;
}
.application-progress-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.95rem;
    align-items: start;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: #fff;
    border: 1px solid rgba(226,232,240,0.95);
}
.application-progress-item.is-active {
    border-color: rgba(96,165,250,0.7);
    box-shadow: 0 12px 24px rgba(37,99,235,0.08);
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}
.application-progress-item.is-complete {
    border-color: rgba(134,239,172,0.7);
    background: linear-gradient(180deg, #ffffff 0%, #f6fff9 100%);
}
.application-progress-marker {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    color: #0f172a;
    font-weight: 800;
    flex-shrink: 0;
}
.application-progress-item.is-active .application-progress-marker {
    background: linear-gradient(135deg, #2d8fb0, #2563eb);
    color: #fff;
    box-shadow: 0 8px 18px rgba(37,99,235,0.24);
}
.application-progress-item.is-complete .application-progress-marker {
    background: #16a34a;
    color: #fff;
}
.application-progress-copy h4 {
    margin: 0;
    font-size: 1rem;
}
.application-progress-copy p {
    margin: 0.3rem 0 0;
    color: var(--color-text-muted);
    line-height: 1.5;
}
.application-rejected-state {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.85rem;
    align-items: center;
    margin-bottom: 0.9rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    background: rgba(254,242,242,0.92);
    border: 1px solid rgba(252,165,165,0.55);
}
.application-rejected-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ef4444;
    color: #fff;
    font-weight: 800;
}
.application-rejected-state strong {
    display: block;
    margin-bottom: 0.2rem;
}
.application-rejected-state p {
    margin: 0;
    color: var(--color-text-muted);
}
@media (max-width: 768px) {
    .application-status-hero,
    .application-highlight-row {
        grid-template-columns: 1fr;
    }
    .application-status-badge-wrap {
        justify-items: start;
    }
    .application-id-resubmission-head,
    .application-id-resubmission-actions {
        align-items: stretch;
        flex-direction: column;
    }
    .application-id-resubmission-head .badge {
        align-self: flex-start;
    }
    .application-id-resubmission-actions .btn {
        width: 100%;
    }
}
.admin-application-open-page {
    display: grid;
    gap: 1rem;
}
.admin-application-open-hero {
    display: grid;
    grid-template-columns: 1.45fr auto;
    gap: 1rem;
    align-items: start;
}
.admin-application-open-hero h1 {
    margin: 0.75rem 0 0.45rem;
}
.admin-application-open-hero p {
    margin: 0;
    max-width: 64ch;
    color: var(--color-text-muted);
}
.admin-application-open-hero-meta {
    display: grid;
    justify-items: end;
    gap: 0.45rem;
}
.admin-application-open-hero-meta small {
    color: var(--color-text-muted);
    font-weight: 700;
}
.admin-application-open-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.admin-application-panel {
    display: grid;
    gap: 1rem;
}
.admin-application-panel-head h3 {
    margin: 0;
}
.admin-application-panel-head p {
    margin: 0.35rem 0 0;
    color: var(--color-text-muted);
}
.admin-application-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.admin-status-summary {
    display: grid;
    gap: 0.55rem;
    padding: 1rem 1.05rem;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid rgba(219,228,239,0.95);
}
.admin-status-summary p {
    margin: 0;
    color: var(--color-text-muted);
}
.admin-status-action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}
.admin-status-action-grid .btn {
    width: 100%;
    justify-content: center;
}
.btn.success {
    background: #16a34a;
    color: #fff;
}
.btn.success:hover {
    background: #15803d;
}
.btn.danger {
    background: #dc2626;
    color: #fff;
}
.btn.danger:hover {
    background: #b91c1c;
}
.admin-schedule-form {
    display: grid;
    gap: 1rem;
}
.admin-schedule-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
}
.admin-form-field {
    display: grid;
    gap: 0.45rem;
}
.admin-form-field label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
}
.admin-form-field input,
.admin-form-field select {
    width: 100%;
}
.admin-form-field p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--color-text-muted);
}
.admin-schedule-footer {
    display: flex;
    justify-content: flex-end;
}
.admin-application-open-footer {
    display: flex;
    justify-content: flex-start;
}
@media (max-width: 980px) {
    .admin-application-open-grid,
    .admin-schedule-grid,
    .admin-status-action-grid,
    .admin-application-detail-grid,
    .admin-application-open-hero {
        grid-template-columns: 1fr;
    }
    .admin-application-open-hero-meta {
        justify-items: start;
    }
}
/* Admin Live Chat - Cleaned Design */
.support-chat-header-clean {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.5rem 1.75rem;
    background: linear-gradient(135deg, rgba(30,41,59,0.85), rgba(15,23,42,0.92));
    border: 1px solid rgba(71,85,105,0.4);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.support-chat-header-clean h1 {
    margin: 0 0 1rem 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: #f1f5f9;
}

.support-header-stats {
    display: flex;
    gap: 2rem;
    margin-top: 0.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0ea5e9;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    font-weight: 600;
}

.support-header-action {
    display: flex;
    align-items: center;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 6px;
    border: 1px solid transparent;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #0ea5e9;
    color: #fff;
}

.btn-primary:hover {
    background-color: #0284c7;
}

.btn-secondary {
    background-color: rgba(71,85,105,0.3);
    color: #cbd5e1;
    border-color: rgba(148,163,184,0.2);
}

.btn-secondary:hover {
    background-color: rgba(71,85,105,0.5);
}

.support-chat-page {
    display: grid;
    gap: 1rem;
}
.support-chat-header-card {
    display: grid;
    grid-template-columns: 1.5fr auto;
    gap: 1rem;
    align-items: start;
}
.support-chat-header-card h1 {
    margin: 0.7rem 0 0.4rem;
}
.support-chat-header-card p {
    margin: 0;
    max-width: 64ch;
    color: var(--color-text-muted);
}
.support-chat-header-actions {
    display: grid;
    gap: 0.8rem;
    justify-items: end;
}
.support-identity-card {
    display: grid;
    gap: 0.35rem;
    padding: 0.95rem 1rem;
    min-width: 220px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid rgba(219,228,239,0.95);
}
.support-identity-card strong {
    font-size: 1rem;
    color: #0f172a;
}
.support-identity-card span:not(.badge) {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}
.support-header-buttons,
.support-availability-form {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.support-chat-layout {
    display: grid;
    grid-template-columns: 350px minmax(0, 1fr);
    gap: 1.5rem;
    min-height: 600px;
}

.support-chat-layout-staff {
    display: grid;
    grid-template-columns: 350px minmax(0, 1fr);
    gap: 1.5rem;
}

/* New Sidebar Design */
.support-conversation-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(30,41,59,0.5);
    border: 1px solid rgba(71,85,105,0.3);
    border-radius: 12px;
    height: fit-content;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
}

.support-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(71,85,105,0.3);
}

.support-sidebar-header h2 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #f1f5f9;
}

.support-queue-search {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.support-queue-search input,
.support-scope-select {
    padding: 0.625rem 0.75rem;
    background: rgba(15,23,42,0.5);
    border: 1px solid rgba(71,85,105,0.3);
    border-radius: 6px;
    color: #e2e8f0;
    font-size: 0.875rem;
}

.support-queue-search input::placeholder {
    color: #64748b;
}

.support-scope-select {
    cursor: pointer;
}

.support-queue-filter-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-xs {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 4px;
    border: 1px solid transparent;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.support-conversation-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.support-queue-item {
    display: grid;
    gap: 0.5rem;
    padding: 0.875rem;
    background: rgba(30,41,59,0.6);
    border: 1px solid rgba(71,85,105,0.25);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.support-queue-item:hover {
    background: rgba(30,41,59,0.8);
    border-color: rgba(71,85,105,0.4);
}

.support-queue-item.active {
    background: rgba(15,118,168,0.15);
    border-color: #0ea5e9;
    box-shadow: 0 0 12px rgba(14,165,233,0.1);
}

.support-queue-item.is-mine {
    border-left: 3px solid #10b981;
}

.queue-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.queue-item-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #f1f5f9;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.badge-mini {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    flex-shrink: 0;
}

.badge-mini.waiting {
    background: rgba(71,85,105,0.4);
    color: #cbd5e1;
}

.badge-mini.assigned,
.badge-mini.active_human {
    background: rgba(14,165,233,0.2);
    color: #0ea5e9;
}

.badge-mini.success {
    background: rgba(16,185,129,0.2);
    color: #10b981;
}

.queue-item-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.8rem;
}

.meta-staff {
    color: #cbd5e1;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.meta-time {
    color: #64748b;
    flex-shrink: 0;
}

.queue-item-preview {
    margin: 0;
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.support-queue-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    text-align: center;
    color: #64748b;
    font-size: 0.875rem;
}

/* Empty State */
.support-chat-main-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30,41,59,0.5);
    border: 1px dashed rgba(71,85,105,0.3);
    border-radius: 12px;
    padding: 2rem;
    min-height: 500px;
}

.support-empty-state-centered {
    display: grid;
    place-items: center;
    gap: 1rem;
    text-align: center;
}

.empty-icon {
    font-size: 3rem;
    line-height: 1;
    opacity: 0.5;
}

.support-empty-state-centered h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #e2e8f0;
}

.support-empty-state-centered p {
    margin: 0;
    color: #94a3b8;
    font-size: 0.95rem;
    max-width: 32ch;
}

/* Scrollbar Styling */
.support-conversation-sidebar::-webkit-scrollbar,
.support-conversation-list::-webkit-scrollbar {
    width: 6px;
}

.support-conversation-sidebar::-webkit-scrollbar-track,
.support-conversation-list::-webkit-scrollbar-track {
    background: transparent;
}

.support-conversation-sidebar::-webkit-scrollbar-thumb,
.support-conversation-list::-webkit-scrollbar-thumb {
    background: rgba(148,163,184,0.3);
    border-radius: 3px;
}

.support-conversation-sidebar::-webkit-scrollbar-thumb:hover,
.support-conversation-list::-webkit-scrollbar-thumb:hover {
    background: rgba(148,163,184,0.5);
}

/* Responsive Design */
@media (max-width: 1100px) {
    .support-chat-layout,
    .support-chat-layout-staff {
        grid-template-columns: 280px minmax(0, 1fr);
        gap: 1rem;
    }

    .support-conversation-sidebar {
        max-height: calc(100vh - 350px);
    }
}

@media (max-width: 900px) {
    .support-chat-layout,
    .support-chat-layout-staff {
        grid-template-columns: 1fr;
    }

    .support-conversation-sidebar {
        max-height: 300px;
        overflow-y: auto;
    }

    .support-chat-main-empty {
        min-height: 300px;
    }

    .support-header-stats {
        flex-wrap: wrap;
        gap: 1.5rem;
    }
}

@media (max-width: 640px) {
    .support-chat-header-clean {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .support-header-stats {
        width: 100%;
        gap: 1rem;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    .support-queue-item {
        padding: 0.75rem;
    }

    .queue-item-preview {
        font-size: 0.75rem;
    }
}
.support-conversation-sidebar,
.support-chat-main {
    display: grid;
    gap: 1rem;
}
.support-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.support-sidebar-head h3,
.support-chat-panel-head h2 {
    margin: 0;
}
.support-conversation-list {
    display: grid;
    gap: 0.75rem;
    align-content: start;
}
.support-conversation-item {
    display: grid;
    gap: 0.5rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    text-decoration: none;
    color: inherit;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid rgba(219,228,239,0.95);
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.support-conversation-item:hover,
.support-conversation-item.active {
    border-color: rgba(96,165,250,0.7);
    box-shadow: 0 12px 24px rgba(37,99,235,0.08);
    transform: translateY(-1px);
}
.support-conversation-top,
.support-conversation-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.support-conversation-item p {
    margin: 0;
    color: var(--color-text-muted);
    line-height: 1.45;
}
.support-chat-main {
    grid-template-rows: auto minmax(0, 1fr) auto auto;
}
.support-chat-panel-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid rgba(226,232,240,0.95);
}
.support-chat-panel-head p {
    margin: 0.35rem 0 0;
    color: var(--color-text-muted);
}
.support-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: rgba(37,99,235,0.1);
    color: var(--color-primary);
    font-size: 0.82rem;
    font-weight: 700;
}
.support-chat-window {
    display: grid;
    gap: 0.75rem;
    align-content: start;
    min-height: 340px;
    max-height: 520px;
    overflow-y: auto;
    padding-right: 0.25rem;
}
.support-message-row {
    display: flex;
}
.support-message-row.self {
    justify-content: flex-end;
}
.support-message-row.agent,
.support-message-row.ai {
    justify-content: flex-start;
}
.support-message-row.system {
    justify-content: center;
}
.support-message-bubble {
    max-width: min(78%, 620px);
    padding: 0.9rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(226,232,240,0.95);
    background: #fff;
}
.support-message-bubble.self {
    background: linear-gradient(135deg, rgba(37,99,235,0.16), rgba(96,165,250,0.24));
    color: #0f172a;
}
.support-message-bubble.ai {
    background: linear-gradient(135deg, rgba(15,23,42,0.96), rgba(30,58,138,0.92));
    color: #fff;
    border-color: rgba(30,58,138,0.8);
}
.support-message-bubble.agent {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}
.support-message-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
}
.support-message-meta span {
    opacity: 0.72;
}
.support-message-text {
    line-height: 1.55;
    white-space: pre-wrap;
}
.support-system-banner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    background: rgba(226,232,240,0.7);
    color: #334155;
    text-align: center;
    font-size: 0.88rem;
    font-weight: 700;
}
.support-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.support-quick-replies.is-hidden {
    display: none;
}
.support-quick-btn {
    border: 1px solid rgba(37,99,235,0.18);
    background: rgba(37,99,235,0.08);
    color: var(--color-primary);
    border-radius: 999px;
    padding: 0.6rem 0.9rem;
    font-weight: 700;
    cursor: pointer;
}
.support-chat-composer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.85rem;
    align-items: end;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(226,232,240,0.95);
}
.support-chat-composer textarea {
    width: 100%;
    min-height: 72px;
    resize: vertical;
}
.support-chat-empty-state {
    display: grid;
    place-items: center;
    min-height: 320px;
    text-align: center;
    color: var(--color-text-muted);
}
.support-chat-empty-state h3 {
    margin: 0;
    color: #0f172a;
}
.support-chat-empty-state p {
    margin: 0.45rem auto 0;
    max-width: 44ch;
}
@media (max-width: 980px) {
    .support-chat-layout,
    .support-chat-header-card {
        grid-template-columns: 1fr;
    }
    .support-chat-header-actions {
        justify-items: start;
    }
    .support-header-buttons,
    .support-availability-form {
        justify-content: flex-start;
    }
}
@media (max-width: 720px) {
    .support-chat-composer {
        grid-template-columns: 1fr;
    }
    .support-message-bubble {
        max-width: 100%;
    }
    .support-conversation-top,
    .support-conversation-meta,
    .support-chat-panel-head {
        flex-direction: column;
        align-items: flex-start;
    }
}
.support-chat-page-customer {
    max-width: 940px;
    margin: 0 auto;
}
.support-chat-layout-customer {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
}
.support-chat-main-customer {
    grid-template-rows: auto minmax(320px, 1fr) auto auto;
    max-width: 100%;
}
.support-chat-page-customer .support-chat-header-card {
    grid-template-columns: minmax(0, 1fr) 220px;
}
.support-chat-page-customer .support-chat-window {
    min-height: 320px;
    max-height: 420px;
    padding: 0.25rem 0.25rem 0 0;
}
.support-chat-page-customer .support-message-bubble {
    max-width: min(78%, 620px);
}
.support-chat-page-customer .support-quick-replies {
    padding-top: 0.25rem;
}
.support-chat-page-customer .support-chat-composer {
    grid-template-columns: minmax(0, 1fr) auto;
}
.support-chat-page-customer .support-chat-composer textarea {
    min-height: 64px;
}
@media (max-width: 980px) {
    .support-chat-page-customer .support-chat-header-card {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 720px) {
    .support-chat-page-customer .support-chat-composer {
        grid-template-columns: 1fr;
    }
    .support-chat-page-customer .support-message-bubble {
        max-width: 100%;
    }
}


.support-chat-page {
    max-width: 1520px;
    margin: 0 auto;
    display: grid;
    gap: 1rem;
}
.support-chat-hero-card {
    padding: 1.6rem 1.7rem;
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(96,165,250,0.16), transparent 26%),
        linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,251,255,0.96));
    border: 1px solid rgba(191,219,254,0.62);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}
.support-chat-hero-copy {
    display: grid;
    gap: 0.85rem;
}
.support-chat-hero-copy h1 {
    margin: 0;
    font-size: clamp(2rem, 3vw, 3rem);
}
.support-hero-stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.support-hero-stat {
    min-width: 180px;
    display: grid;
    gap: 0.2rem;
    padding: 0.85rem 1rem;
    border-radius: 18px;
    background: rgba(15,23,42,0.05);
    border: 1px solid rgba(191,219,254,0.5);
}
.support-hero-stat strong {
    color: #0f172a;
    font-size: 1rem;
}
.support-hero-stat span {
    color: var(--color-text-muted);
    font-size: 0.82rem;
}
.support-chat-layout {
    display: grid;
    grid-template-columns: minmax(320px, 360px) minmax(0, 1fr);
    gap: 1rem;
    min-height: clamp(560px, 68vh, 760px);
    align-items: stretch;
}
.support-chat-layout-customer {
    grid-template-columns: minmax(0, 1fr);
    min-height: auto;
}
.support-conversation-sidebar,
.support-chat-main {
    height: 100%;
    padding: 1.3rem;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,251,255,0.98));
    border: 1px solid rgba(219,228,239,0.95);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}
.support-conversation-sidebar {
    grid-template-rows: auto minmax(0, 1fr);
}
.support-sidebar-head {
    align-items: start;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid rgba(226,232,240,0.92);
}
.support-sidebar-head p {
    margin: 0.35rem 0 0;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}
.support-sidebar-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
    margin-bottom: 0.9rem;
}
.support-queue-tools {
    display: grid;
    gap: 0.65rem;
    margin: 0.9rem 0;
}
.support-queue-tools input,
.support-queue-tools select,
.support-note-form textarea,
.support-chat-composer textarea {
    width: 100%;
}
.support-queue-tools input,
.support-queue-tools select {
    min-height: 2.8rem;
    padding-inline: 0.95rem;
    font-size: 0.88rem;
    border-radius: 16px;
    background: #ffffff;
}
.support-queue-tools__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}
.support-queue-tools__actions .btn {
    min-width: 0;
}
.support-sidebar-summary {
    display: grid;
    gap: 0.2rem;
    padding: 0.85rem 0.95rem;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(239,246,255,0.96), rgba(248,251,255,0.96));
    border: 1px solid rgba(191,219,254,0.54);
}
.support-sidebar-summary strong {
    font-size: 1.1rem;
    color: #0f172a;
}
.support-sidebar-summary span {
    color: var(--color-text-muted);
    font-size: 0.82rem;
}
.support-conversation-list {
    overflow-y: auto;
    padding-right: 0.25rem;
    align-content: start;
}
.support-conversation-item {
    gap: 0.7rem;
    padding: 1rem 1.05rem;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}
.support-conversation-item:hover,
.support-conversation-item.active {
    border-color: rgba(37,99,235,0.38);
    box-shadow: 0 16px 32px rgba(37,99,235,0.1);
}
.support-conversation-top,
.support-conversation-meta {
    align-items: flex-start;
    flex-wrap: wrap;
}
.support-conversation-top strong {
    color: #0f172a;
}
.support-conversation-meta {
    color: var(--color-text-muted);
    font-size: 0.84rem;
}
.support-conversation-submeta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.7rem;
    color: #475569;
    font-size: 0.77rem;
    font-weight: 600;
}
.support-conversation-time {
    color: var(--color-text-muted);
    font-size: 0.78rem;
}
.support-sidebar-empty {
    display: grid;
    gap: 0.7rem;
    justify-items: start;
    padding: 1.1rem;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(248,251,255,0.94), rgba(239,246,255,0.9));
    border: 1px dashed rgba(148,163,184,0.35);
}
.support-sidebar-empty-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(37,99,235,0.1);
    color: var(--color-primary);
    font-weight: 900;
    letter-spacing: 0.1em;
}
.support-sidebar-empty strong {
    color: #0f172a;
}
.support-sidebar-empty p {
    margin: 0;
    color: var(--color-text-muted);
    line-height: 1.55;
}
.support-chat-main {
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    min-height: 0;
}
.support-chat-main-placeholder {
    background:
        radial-gradient(circle at top right, rgba(96,165,250,0.12), transparent 22%),
        linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,251,255,0.98));
}
.support-chat-panel-head {
    align-items: start;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(226,232,240,0.9);
}
.support-chat-panel-head h2 {
    margin: 0;
    color: #0f172a;
    font-size: 1.2rem;
}
.support-chat-panel-head p {
    margin: 0.35rem 0 0;
    color: var(--color-text-muted);
    font-size: 0.88rem;
    line-height: 1.55;
}
.support-chat-panel-actions {
    display: grid;
    justify-items: end;
    gap: 0.75rem;
}
.support-inline-action-form {
    display: inline-flex;
}
.support-inline-action-form .btn {
    min-width: 112px;
}
.support-chat-content-grid {
    display: grid;
    gap: 1.2rem;
    min-height: 0;
}
.support-chat-content-grid.admin,
.support-chat-content-grid.technician {
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.7fr);
}
.support-chat-content-grid.customer {
    grid-template-columns: minmax(0, 1.4fr) minmax(270px, 0.6fr);
}
.support-chat-thread {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto auto;
    gap: 0.9rem;
    min-height: 0;
}
.support-chat-context {
    display: grid;
    gap: 1rem;
    align-content: start;
    align-self: start;
    max-height: calc(100vh - 14rem);
    overflow-y: auto;
}
.support-context-card {
    display: grid;
    gap: 0.8rem;
    padding: 1rem;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,251,255,0.98));
    border: 1px solid rgba(219,228,239,0.95);
}
.support-context-card h3 {
    margin: 0;
    color: #0f172a;
    font-size: 1rem;
}
.support-context-list {
    display: grid;
    gap: 0.7rem;
}
.support-context-item {
    display: grid;
    gap: 0.18rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid rgba(226,232,240,0.9);
}
.support-context-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}
.support-context-item span {
    color: var(--color-text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.support-context-item strong {
    color: #0f172a;
    font-size: 0.95rem;
    line-height: 1.45;
}
.support-note-list {
    display: grid;
    gap: 0.55rem;
}
.support-note-list span,
.support-role-note span {
    color: var(--color-text-muted);
    line-height: 1.55;
    font-size: 0.9rem;
}
.support-note-list span {
    display: block;
    padding: 0.8rem 0.9rem;
    border-radius: 16px;
    background: rgba(239,246,255,0.88);
    border: 1px solid rgba(191,219,254,0.5);
}
.support-role-note {
    display: grid;
    gap: 0.2rem;
    max-width: 280px;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(15,23,42,0.05);
    border: 1px solid rgba(191,219,254,0.5);
}
.support-role-note strong {
    color: #0f172a;
}
.support-assignment-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
}
.support-assignment-form select {
    min-width: 220px;
    min-height: 2.75rem;
    font-size: 0.88rem;
}
.support-chat-window {
    display: grid;
    gap: 0.9rem;
    align-content: start;
    min-height: 420px;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.1rem;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(248,251,255,0.95), rgba(241,245,249,0.9));
    border: 1px solid rgba(219,228,239,0.95);
}
.support-message-row {
    display: flex;
}
.support-message-row.self {
    justify-content: flex-end;
}
.support-message-row.agent,
.support-message-row.ai,
.support-message-row.internal-note,
.support-message-row.system {
    justify-content: flex-start;
}
.support-chat-window::-webkit-scrollbar,
.support-conversation-list::-webkit-scrollbar {
    width: 8px;
}
.support-chat-window::-webkit-scrollbar-thumb,
.support-conversation-list::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(148,163,184,0.4);
}
.support-internal-note {
    max-width: min(88%, 760px);
    padding: 0.9rem 1rem;
    border-radius: 18px;
    background: rgba(251, 243, 219, 0.92);
    border: 1px solid rgba(245, 196, 0, 0.38);
    border-left: 4px solid rgba(217, 119, 6, 0.88);
    box-shadow: 0 10px 22px rgba(15,23,42,0.05);
}
.support-message-bubble {
    max-width: min(75%, 660px);
    padding: 1rem 1.1rem;
    border-radius: 22px;
    box-shadow: 0 10px 22px rgba(15,23,42,0.06);
    background: #ffffff;
    border: 1px solid rgba(226,232,240,0.95);
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.support-message-bubble.self {
    background: linear-gradient(135deg, rgba(37,99,235,0.18), rgba(96,165,250,0.3));
    border-color: rgba(96,165,250,0.35);
}
.support-message-bubble.ai {
    background: linear-gradient(180deg, rgba(239,246,255,0.96), rgba(255,255,255,0.96));
    border-color: rgba(191,219,254,0.56);
}
.support-message-bubble.agent {
    background: #ffffff;
}
.support-message-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem 0.9rem;
    margin-bottom: 0.45rem;
}
.support-message-meta strong {
    color: #0f172a;
    font-size: 0.82rem;
}
.support-message-meta span {
    color: var(--color-text-muted);
    font-size: 0.74rem;
}
.support-message-text {
    color: #1e293b;
    font-size: 0.92rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}
.support-system-banner {
    border-radius: 18px;
    padding: 0.95rem 1.05rem;
    background: rgba(226,232,240,0.78);
    color: #334155;
    font-size: 0.86rem;
    line-height: 1.55;
}
.support-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    padding: 0.25rem 0 0.1rem;
}
.support-quick-btn {
    min-height: 2.25rem;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(191,219,254,0.75);
    background: rgba(255,255,255,0.92);
    color: #1d4ed8;
    font-size: 0.84rem;
    font-weight: 600;
}
.support-quick-btn:hover {
    border-color: rgba(37,99,235,0.32);
    background: rgba(37,99,235,0.12);
}
.support-chat-composer {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.9rem;
    align-items: flex-end;
    padding: 1.1rem;
    border: 1px solid rgba(219,228,239,0.95);
    border-radius: 22px;
    background: #fff;
}
.support-chat-composer textarea {
    min-height: 88px;
    max-height: 240px;
    resize: vertical;
    border-radius: 16px;
    border: 1px solid rgba(219,228,239,0.8);
    background: rgba(248,251,255,0.86);
    font-size: 0.92rem;
    line-height: 1.55;
    padding: 0.8rem 0.9rem;
}
.support-note-form {
    display: grid;
    gap: 0.7rem;
    padding: 1rem;
    border: 1px dashed rgba(191,219,254,0.72);
    border-radius: 20px;
    background: rgba(248,251,255,0.88);
}
.support-note-form label {
    color: #0f172a;
    font-size: 0.88rem;
    font-weight: 700;
}
.support-note-form textarea {
    min-height: 74px;
    border-radius: 14px;
    background: #fffdf2;
    font-size: 0.88rem;
    line-height: 1.55;
}
.support-chat-context .support-context-card:first-child {
    background: linear-gradient(180deg, rgba(239,246,255,0.96), rgba(255,255,255,0.98));
}
.support-conversation-sidebar,
.support-chat-main,
.support-chat-thread {
    min-height: 0;
}
@media (min-width: 1200px) {
    .support-conversation-sidebar {
        position: sticky;
        top: 1.2rem;
        max-height: calc(100vh - 8rem);
        overflow-y: auto;
    }
    .support-chat-context {
        position: sticky;
        top: 1.2rem;
        max-height: calc(100vh - 8rem);
    }
}
@media (max-width: 1100px) {
    .support-chat-content-grid.admin,
    .support-chat-content-grid.technician,
    .support-chat-content-grid.customer {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .support-chat-context {
        position: static;
        max-height: auto;
        overflow-y: visible;
    }
}
@media (max-width: 720px) {
    .support-chat-panel-actions {
        justify-items: stretch;
    }
    .support-chat-composer {
        grid-template-columns: 1fr;
        align-items: center;
    }
    .support-chat-composer .btn {
        width: 100%;
    }
    .support-chat-composer textarea {
        min-height: 80px;
    }
    .support-assignment-form {
        width: 100%;
    }
    .support-assignment-form select,
    .support-inline-action-form .btn,
    .support-chat-composer .btn,
    .support-note-form .btn {
        width: 100%;
    }
    .support-message-bubble,
    .support-internal-note {
        max-width: 100%;
    }
}
.support-chat-empty-state {
    min-height: 100%;
    padding: 2.3rem 1.4rem;
    border-radius: 24px;
    background:
        radial-gradient(circle at top, rgba(96,165,250,0.12), transparent 32%),
        linear-gradient(180deg, rgba(255,255,255,0.9), rgba(248,251,255,0.92));
    border: 1px dashed rgba(148,163,184,0.32);
}
.support-chat-empty-state-rich {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 1rem;
}
.support-empty-illustration {
    display: flex;
    gap: 0.55rem;
}
.support-empty-illustration span {
    width: 14px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(37,99,235,0.92), rgba(96,165,250,0.48));
}
.support-empty-illustration span:nth-child(1) {
    height: 52px;
}
.support-empty-illustration span:nth-child(2) {
    height: 58px;
}
.support-empty-illustration span:nth-child(3) {
    height: 32px;
}
.support-empty-tips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem;
}
.support-empty-tips span {
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(0, 24, 64, 0.88), rgba(16, 42, 113, 0.82));
    border: 1px solid rgba(219,228,239,0.95);
    color: var(--color-text-muted);
    font-size: 0.84rem;
    font-weight: 700;
}
.support-chat-page-customer {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0.35rem;
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(255,214,10,0.14), transparent 22%),
        radial-gradient(circle at top left, rgba(59,130,246,0.08), transparent 18%),
        linear-gradient(180deg, rgba(255,255,255,0.88), rgba(248,250,252,0.96));
    border: 1px solid rgba(191,219,254,0.4);
    box-shadow: 0 26px 46px rgba(15,23,42,0.1);
}
.support-chat-page-customer .support-chat-hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    padding: 1.45rem 1.55rem 1.1rem;
    border-radius: 22px 22px 0 0;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.98), rgba(248,250,252,0.98)),
        radial-gradient(circle at top right, rgba(255,214,10,0.18), transparent 32%);
    border: 1px solid rgba(226,232,240,0.95);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.85);
}
.support-chat-page-customer .support-chat-hero-copy {
    gap: 0.3rem;
}
.support-chat-page-customer .application-status-kicker {
    display: none;
}
.support-chat-page-customer .support-chat-hero-copy h1 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(2rem, 2.6vw, 2.6rem);
}
.support-chat-page-customer .support-chat-hero-copy p {
    margin: 0;
    color: #64748b;
    font-size: 1rem;
}
.support-chat-page-customer .support-hero-stat-row,
.support-chat-page-customer .support-chat-panel-head,
.support-chat-page-customer .support-chat-context {
    display: none;
}
.support-chat-page-customer .support-chat-layout {
    gap: 0;
    min-height: auto;
}
.support-chat-page-customer .support-chat-main {
    padding: 0;
    border-radius: 0 0 22px 22px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.98));
    border: 1px solid rgba(226,232,240,0.95);
    border-top: 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
    overflow: hidden;
}
.support-chat-page-customer .support-chat-content-grid.customer {
    grid-template-columns: 1fr;
    gap: 0;
}
.support-chat-page-customer .support-chat-thread {
    gap: 0;
}
.support-chat-page-customer .support-chat-window {
    min-height: 420px;
    height: 100%;
    padding: 1.8rem 1.3rem 1.4rem;
    border: 0;
    border-radius: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at top left, rgba(255,214,10,0.06), transparent 18%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    position: relative;
}
.support-chat-page-customer .support-chat-window::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(226,232,240,0.22) 1px, transparent 1px),
        linear-gradient(90deg, rgba(226,232,240,0.16) 1px, transparent 1px);
    background-size: 26px 26px;
    opacity: 0.35;
    pointer-events: none;
}
.support-chat-page-customer .support-chat-header-actions {
    align-self: start;
}
.support-chat-page-customer .support-identity-card {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}
.support-online-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 600;
}
.support-online-dot {
    width: 0.95rem;
    height: 0.95rem;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 6px rgba(34,197,94,0.12);
}
.support-chat-page-customer .support-message-row {
    align-items: flex-start;
    gap: 0.7rem;
    position: relative;
    z-index: 1;
}
.support-chat-page-customer .support-message-row.self {
    justify-content: flex-end;
}
.support-chat-page-customer .support-message-avatar {
    width: 2.45rem;
    height: 2.45rem;
    flex: 0 0 2.45rem;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #e5e7eb;
    color: #111827;
    font-size: 1rem;
    font-weight: 700;
}
.support-chat-page-customer .support-message-bubble {
    max-width: min(82%, 740px);
    padding: 1rem 1.1rem;
    border-radius: 18px 18px 18px 12px;
    background: linear-gradient(180deg, #eef2f7 0%, #e5eaf1 100%);
    border: 1px solid rgba(226,232,240,0.95);
    box-shadow: 0 10px 24px rgba(15,23,42,0.06);
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.support-chat-page-customer .support-message-bubble.self {
    border-radius: 18px 18px 12px 18px;
    background: linear-gradient(135deg, #1f3159 0%, #274777 100%);
    border-color: rgba(39,71,119,0.9);
}
.support-chat-page-customer .support-message-bubble.self .support-message-meta strong,
.support-chat-page-customer .support-message-bubble.self .support-message-text,
.support-chat-page-customer .support-message-bubble.self .support-message-meta span {
    color: #ffffff;
}
.support-chat-page-customer .support-message-bubble.ai,
.support-chat-page-customer .support-message-bubble.agent {
    background: linear-gradient(180deg, #eef2f7 0%, #e5e9ef 100%);
}
.support-chat-page-customer .support-message-meta {
    margin-bottom: 0.25rem;
}
.support-chat-page-customer .support-message-meta strong {
    font-size: 0.9rem;
}
.support-chat-page-customer .support-message-meta span {
    font-size: 0.76rem;
}
.support-chat-page-customer .support-message-text {
    font-size: 0.98rem;
    line-height: 1.55;
    color: #0f172a;
}
.support-chat-page-customer .support-system-banner {
    max-width: min(80%, 720px);
    margin-left: 3.15rem;
    border-radius: 18px;
    padding: 1rem 1.15rem;
    background: linear-gradient(180deg, #eef2f7 0%, #e5ebf2 100%);
    border: 1px solid rgba(226,232,240,0.95);
    box-shadow: 0 10px 24px rgba(15,23,42,0.05);
    color: #334155;
}
.support-chat-page-customer .support-quick-replies {
    gap: 0.65rem;
    padding: 1.15rem 1rem 0.8rem;
    border-top: 1px solid rgba(226,232,240,0.92);
    background: #ffffff;
}
.support-chat-page-customer .support-quick-btn {
    min-height: 2.75rem;
    padding: 0.65rem 0.95rem;
    border-radius: 10px;
    border: 1px solid rgba(203,213,225,0.95);
    background: #ffffff;
    color: #0f172a;
    font-size: 0.9rem;
    font-weight: 500;
}
.support-chat-page-customer .support-chat-composer {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.9rem;
    align-items: flex-end;
    padding: 0.95rem 1.1rem 1.15rem;
    border: 0;
    border-top: 1px solid rgba(226,232,240,0.85);
    border-radius: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.92), #ffffff);
    box-shadow: none;
}
.support-chat-page-customer .support-chat-composer textarea {
    min-height: 100px;
    max-height: 260px;
    border-radius: 16px;
    border: 1px solid rgba(191,219,254,0.88);
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    color: #0f172a;
    font-size: 0.98rem;
    padding: 0.95rem 1rem;
    box-shadow: inset 0 1px 2px rgba(15,23,42,0.05);
}
.support-chat-page-customer .support-chat-composer .btn {
    align-self: end;
    min-width: 58px;
    min-height: 58px;
    padding: 0.75rem 0.9rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #1f2f58 0%, #294577 100%);
    border-color: #1f2f58;
    font-size: 0;
    box-shadow: 0 14px 26px rgba(31,47,88,0.22);
}
.support-chat-page-customer .support-chat-composer .btn::before {
    content: "\2708";
    color: #ffffff;
    font-size: 1.2rem;
    line-height: 1;
}
.support-chat-page-customer .support-chat-composer .btn:hover {
    filter: brightness(1.04);
}
.support-chat-page-customer .support-chat-window:empty::after {
    content: "Start a conversation with MJJD support.";
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    color: #94a3b8;
    font-size: 0.98rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}
@media (max-width: 780px) {
    .support-chat-page-customer .support-chat-hero-card {
        grid-template-columns: 1fr;
        border-radius: 18px 18px 0 0;
    }
    .support-chat-page-customer .support-chat-main {
        border-radius: 0 0 18px 18px;
    }
    .support-chat-page-customer .support-chat-composer {
        grid-template-columns: 1fr;
    }
    .support-chat-page-customer .support-chat-composer .btn {
        width: 100%;
        font-size: 0.95rem;
    }
    .support-chat-page-customer .support-chat-composer .btn::before {
        margin-right: 0.45rem;
    }
    .support-chat-page-customer .support-chat-composer .btn {
        font-size: 0.95rem;
    }
    .support-chat-page-customer .support-chat-composer .btn::after {
        content: " Send";
        color: #ffffff;
        font-size: 0.95rem;
    }
    .support-chat-page-customer .support-system-banner {
        margin-left: 0;
        max-width: 100%;
    }
}
@media (max-width: 1100px) {
    .support-chat-content-grid.admin,
    .support-chat-content-grid.technician,
    .support-chat-content-grid.customer,
    .support-chat-layout,
    .support-chat-header-card,
    .support-chat-page-customer .support-chat-header-card {
        grid-template-columns: 1fr;
    }
    .support-chat-header-actions,
    .support-chat-panel-actions {
        justify-items: start;
    }
    .support-header-buttons,
    .support-availability-form {
        justify-content: flex-start;
    }
}
@media (max-width: 780px) {
    .support-chat-layout {
        min-height: auto;
    }
    .support-sidebar-summary-grid {
        grid-template-columns: 1fr 1fr;
    }
    .support-chat-composer,
    .support-chat-page-customer .support-chat-composer {
        grid-template-columns: 1fr;
    }
    .support-message-bubble,
    .support-chat-page-customer .support-message-bubble {
        max-width: 100%;
    }
    .support-conversation-top,
    .support-conversation-meta,
    .support-chat-panel-head,
    .support-sidebar-head {
        flex-direction: column;
        align-items: flex-start;
    }
    .support-hero-stat {
        width: 100%;
    }
}









.support-chat-page-staff {
    max-width: 100%;
    padding: 0.35rem;
    border-radius: 30px;
    background:
        radial-gradient(circle at top left, rgba(88,101,242,0.14), transparent 24%),
        radial-gradient(circle at top right, rgba(59,130,246,0.08), transparent 18%),
        linear-gradient(180deg, #15171c 0%, #111318 100%);
    border: 1px solid rgba(88,101,242,0.18);
    box-shadow: 0 30px 60px rgba(0,0,0,0.28);
}
.support-chat-page-staff .support-chat-hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    padding: 1.15rem 1.25rem;
    border-radius: 24px;
    background: linear-gradient(180deg, #1e1f22 0%, #191b1f 100%);
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: none;
}
.support-chat-page-staff .application-status-kicker,
.support-chat-page-staff .support-chat-hero-copy p,
.support-chat-page-staff .support-hero-stat span,
.support-chat-page-staff .support-sidebar-head p,
.support-chat-page-staff .support-conversation-meta,
.support-chat-page-staff .support-role-note span,
.support-chat-page-staff .support-context-item span,
.support-chat-page-staff .support-conversation-time,
.support-chat-page-staff .support-chat-panel-head p,
.support-chat-page-staff .support-note-list span {
    color: #a5adba;
}
.support-chat-page-staff .support-chat-hero-copy h1,
.support-chat-page-staff .support-hero-stat strong,
.support-chat-page-staff .support-sidebar-head h3,
.support-chat-page-staff .support-conversation-top strong,
.support-chat-page-staff .support-chat-panel-head h2,
.support-chat-page-staff .support-context-card h3,
.support-chat-page-staff .support-role-note strong,
.support-chat-page-staff .support-context-item strong,
.support-chat-page-staff .support-message-meta strong,
.support-chat-page-staff .support-sidebar-empty strong {
    color: #f2f3f5;
}
.support-chat-page-staff .support-chat-hero-copy {
    gap: 0.65rem;
}
.support-chat-page-staff .support-chat-hero-copy h1 {
    font-size: clamp(1.35rem, 2vw, 1.9rem);
}
.support-chat-page-staff .support-chat-hero-copy p {
    max-width: 72ch;
    margin: 0;
    font-size: 0.9rem;
}
.support-chat-page-staff .support-hero-stat {
    min-width: 150px;
    padding: 0.75rem 0.85rem;
    border-radius: 16px;
    background: #2b2d31;
    border: 1px solid rgba(255,255,255,0.05);
}
.support-chat-page-staff .support-identity-card,
.support-chat-page-staff .support-role-note {
    padding: 0.9rem 1rem;
    border-radius: 18px;
    background: #2b2d31;
    border: 1px solid rgba(255,255,255,0.05);
}
.support-chat-page-staff .support-chat-layout {
    gap: 1.5rem;
    min-height: 600px;
}

.support-chat-page-staff .support-conversation-sidebar,
.support-chat-page-staff .support-chat-main {
    padding: 1.25rem;
    border-radius: 12px;
    background: rgba(30,41,59,0.5);
    border: 1px solid rgba(71,85,105,0.3);
}

.support-chat-page-staff .support-conversation-sidebar {
    padding: 1.25rem;
}

.support-chat-page-staff .support-chat-main-empty {
    padding: 2rem;
}
.support-chat-page-staff .support-conversation-sidebar {
    overflow: hidden;
}
.support-chat-page-staff .support-sidebar-head {
    display: none;
}

.support-chat-page-staff .support-queue-tools {
    display: none;
}

.support-chat-page-staff .support-sidebar-summary-grid {
    display: none;
}

.support-chat-page-staff .support-conversation-item {
    display: none;
}
}
.support-chat-page-staff .support-conversation-item::before {
    content: "";
    position: absolute;
    inset: 10px auto 10px -1px;
    width: 3px;
    border-radius: 999px;
    background: transparent;
}
.support-chat-page-staff .support-conversation-item:hover {
    background: #2b2d31;
    border-color: rgba(255,255,255,0.04);
    box-shadow: none;
}
.support-chat-page-staff .support-conversation-item.active {
    background: rgba(88,101,242,0.18);
    border-color: rgba(88,101,242,0.28);
    box-shadow: none;
}
.support-chat-page-staff .support-conversation-item.active::before {
    background: #5865f2;
}
.support-chat-page-staff .support-conversation-item p,
.support-chat-page-staff .support-conversation-submeta {
    display: none;
}

.support-chat-page-staff .support-sidebar-empty {
    display: none;
}

.support-chat-page-staff .support-chat-main {
    grid-template-rows: auto minmax(0, 1fr);
}
.support-chat-page-staff .support-chat-panel-head {
    padding: 0.95rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: #111214;
}
.support-chat-page-staff .support-chip {
    color: #e3e5e8;
    background: #2b2d31;
    border: 1px solid rgba(255,255,255,0.05);
}
.support-chat-page-staff .support-chat-content-grid {
    padding: 0;
    gap: 0;
}
.support-chat-page-staff .support-chat-content-grid.admin,
.support-chat-page-staff .support-chat-content-grid.technician {
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.7fr);
}
.support-chat-page-staff .support-chat-thread {
    gap: 0;
    background: #313338;
    border-right: 1px solid rgba(255,255,255,0.06);
}
.support-chat-page-staff .support-chat-window {
    min-height: 460px;
    padding: 1rem 1.2rem 1.1rem;
    border: 0;
    border-radius: 0;
    background: #313338;
}
.support-chat-page-staff .support-chat-window::-webkit-scrollbar-thumb,
.support-chat-page-staff .support-conversation-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.14);
}
.support-chat-page-staff .support-message-bubble {
    max-width: min(78%, 720px);
    padding: 0.8rem 0.9rem;
    border-radius: 16px;
    background: #383a40;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: none;
}
.support-chat-page-staff .support-message-bubble.self {
    background: linear-gradient(135deg, rgba(88,101,242,0.88), rgba(71,82,196,0.96));
    border-color: rgba(88,101,242,0.45);
}
.support-chat-page-staff .support-message-bubble.ai {
    background: #2f3136;
    border-color: rgba(59,130,246,0.18);
}
.support-chat-page-staff .support-message-meta span {
    color: #a5adba;
}
.support-chat-page-staff .support-message-text {
    color: #eceef0;
}
.support-chat-page-staff .support-system-banner {
    background: #2b2d31;
    color: #c8ccd1;
}
.support-chat-page-staff .support-internal-note {
    background: rgba(105,74,0,0.28);
    border: 1px solid rgba(255,201,71,0.22);
    border-left: 4px solid #f0b232;
    box-shadow: none;
}
.support-chat-page-staff .support-chat-composer,
.support-chat-page-staff .support-note-form {
    padding: 0.95rem 1rem;
    border: 0;
    border-top: 1px solid rgba(255,255,255,0.06);
    border-radius: 0;
    background: #2b2d31;
}
.support-chat-page-staff .support-note-form {
    background: #26282c;
}
.support-chat-page-staff .support-note-form label {
    color: #d7dbe0;
}
.support-chat-page-staff .support-chat-context {
    gap: 0;
    background: #232428;
}
.support-chat-page-staff .support-context-card {
    padding: 1rem;
    border: 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    border-radius: 0;
    background: #232428;
}
.support-chat-page-staff .support-chat-context .support-context-card:first-child {
    background: #232428;
}
.support-chat-page-staff .support-context-item {
    border-bottom-color: rgba(255,255,255,0.06);
}
.support-chat-page-staff .support-note-list span {
    background: #2b2d31;
    border: 1px solid rgba(255,255,255,0.05);
}
.support-chat-page-staff .support-chat-main-placeholder {
    background: #1e1f22;
}
.support-chat-page-staff .support-chat-empty-state {
    background: linear-gradient(180deg, #313338 0%, #2b2d31 100%);
    border: 1px dashed rgba(255,255,255,0.08);
}
.support-chat-page-staff .support-chat-empty-state h3 {
    color: #f2f3f5;
}
.support-chat-page-staff .support-chat-empty-state p {
    color: #b5bac1;
}
.support-chat-page-staff .support-empty-tips span {
    background: #232428;
    border: 1px solid rgba(255,255,255,0.06);
    color: #cfd5dc;
}
.support-chat-page-staff .btn {
    border-radius: 12px;
}
.support-chat-page-staff .btn.secondary {
    color: #eef2ff;
    background: #3a3c43;
    border-color: rgba(255,255,255,0.06);
}
.support-chat-page-staff .btn:not(.secondary) {
    background: linear-gradient(135deg, #5865f2, #4752c4);
    border-color: #5865f2;
    box-shadow: none;
}
.support-chat-page-staff .btn:hover {
    filter: brightness(1.04);
    box-shadow: none;
}
@media (max-width: 1100px) {
    .support-chat-page-staff .support-chat-hero-card,
    .support-chat-page-staff .support-chat-content-grid.admin,
    .support-chat-page-staff .support-chat-content-grid.technician {
        grid-template-columns: 1fr;
    }
    .support-chat-page-staff .support-chat-thread {
        border-right: 0;
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }
}
@media (max-width: 780px) {
    .support-chat-page-staff {
        padding: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
    }
    .support-chat-page-staff .support-chat-hero-card {
        border-radius: 20px;
    }
    .support-chat-page-staff .support-chat-window {
        min-height: 360px;
    }
}

.layout.is-auth .navbar {
    justify-content: flex-end;
    padding-left: 1.5rem;
    background:
        radial-gradient(circle at 18% 28%, rgba(108, 124, 255, 0.14), transparent 26%),
        radial-gradient(circle at 72% 18%, rgba(84, 118, 255, 0.10), transparent 22%),
        linear-gradient(135deg, #08112f 0%, #0b1740 38%, #14295f 100%);
    border-bottom: 1px solid rgba(96, 165, 250, 0.38);
    box-shadow: 0 12px 28px rgba(2, 10, 28, 0.28);
}
.navbar-spacer {
    display: none;
}







.layout.is-guest .navbar {
    padding-inline: max(0.9rem, calc((100vw - 1500px) / 2 + 0.9rem));
    background: linear-gradient(135deg, #000f2e 0%, #001840 42%, #102A71 100%);
    border-bottom: 1px solid rgba(245, 196, 0, 0.24);
    box-shadow: 0 12px 28px rgba(2, 10, 28, 0.24);
}

.layout.is-guest .navbar-right .btn {
    padding: 0.52rem 0.86rem;
    min-height: 2.35rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}
.layout.is-guest .navbar-right .btn:hover {
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.16);
}
.layout.is-guest .navbar-right .btn.secondary {
    background: linear-gradient(135deg, #000f2e 0%, #001840 50%, #102A71 100%);
    border: 1px solid rgba(96, 165, 250, 0.28);
    color: #f8fbff;
}
.layout.is-guest .navbar-right .btn:not(.secondary) {
    background: linear-gradient(135deg, #000f2e 0%, #001840 50%, #102A71 100%);
    border: 1px solid rgba(96, 165, 250, 0.28);
    color: #f8fbff;
}
.layout.is-guest .navbar-right {
    gap: 0.55rem;
}
.layout.is-auth .navbar .icon-btn {
    width: auto;
    height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #fff7d9;
}
.layout.is-auth .navbar .icon-btn:hover,
.layout.is-auth .navbar .icon-btn:focus-visible {
    background: transparent;
    border-color: transparent;
    transform: translateY(0);
}
.layout.is-auth .navbar .icon-btn svg {
    width: 22px;
    height: 22px;
}

@media (min-width: 1025px) {
    .layout.is-auth .sidebar,
    .layout.is-auth .sidebar.open,
    .layout.is-auth .sidebar.collapsed {
        transform: translateX(0);
    }

    .layout.is-auth .sidebar-floating-toggle {
        display: none;
    }
}

@media (max-width: 1024px) {
    .layout.is-auth .sidebar {
        transform: translateX(-100%);
    }

    .layout.is-auth .sidebar.open {
        transform: translateX(0);
    }

    .layout.is-auth .sidebar.collapsed {
        transform: translateX(-100%);
    }

    .layout.is-auth .main-content,
    .layout.is-auth .footer {
        margin-left: 0;
    }

    .layout.is-auth .main-content {
        padding: 96px 1rem 1.25rem;
    }

    .layout.is-auth .navbar {
        padding-left: 1rem;
    }

    .layout.is-auth .sidebar-floating-toggle {
        display: inline-flex;
    }
}





.layout.is-guest .main-content {
    background: transparent;
}




































.notif-dot.is-hidden {
    display: none;
}
.notif-dropdown-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.8rem 0.7rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}
.notif-dropdown-actions .btn-link,
.notif-view-all {
    color: #1d4ed8;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    background: transparent;
    border: 0;
    cursor: pointer;
}
.notif-dropdown-actions .btn-link {
    padding: 0;
}
.notifications-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 1300;
}
.notifications-overlay.is-open {
    display: flex;
}
.notifications-overlay__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(8px);
}
.notifications-overlay__dialog {
    position: relative;
    width: min(100%, 760px);
    max-height: calc(100vh - 2rem);
    overflow: auto;
    border-radius: 26px;
    border: 1px solid rgba(203,213,225,0.92);
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.98));
    box-shadow: 0 34px 96px rgba(15, 23, 42, 0.2);
}
.notifications-overlay__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.7rem;
    height: 2.7rem;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    color: #0f172a;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}
.notifications-overlay__shell {
    display: grid;
    gap: 0.95rem;
    padding: 1.4rem 1.4rem 1.25rem;
}
.notifications-overlay__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: start;
    padding-right: 3.9rem;
}
.notifications-overlay__head h2 {
    margin: 0;
    color: #0f172a;
    font-size: 1.8rem;
}
.notifications-overlay__head p {
    margin: 0.35rem 0 0;
    color: var(--color-text-muted);
    line-height: 1.55;
    max-width: 52ch;
}
.notifications-overlay__filters {
    display: flex;
    gap: 0.75rem;
    padding-bottom: 0.2rem;
}
.notifications-overlay__list {
    max-height: min(70vh, 760px);
    overflow-y: auto;
    padding-right: 0.25rem;
    padding-top: 0.15rem;
}
.notifications-overlay__list::-webkit-scrollbar {
    width: 8px;
}
.notifications-overlay__list::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(148,163,184,0.4);
}
.notifications-page-card {
    overflow: hidden;
}
.notifications-compact-page {
    max-width: 940px;
}
.notifications-compact-card {
    padding: 1rem;
}
.notifications-compact-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.9rem;
    align-items: center;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid rgba(226,232,240,0.92);
}
.notifications-compact-head h1 {
    margin: 0;
    color: #0f172a;
    font-size: 1.8rem;
}
.notifications-compact-head p {
    margin: 0.25rem 0 0;
    color: var(--color-text-muted);
}
.notifications-compact-filters {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 0 0.35rem;
}
.notifications-filter-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    background: rgba(226,232,240,0.72);
    color: #334155;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease;
}
.notifications-filter-chip.is-active {
    background: linear-gradient(135deg, #173f8a, #2f66df);
    color: #ffffff;
}
.notifications-page-list {
    display: grid;
    gap: 0.9rem;
}
.notifications-compact-list {
    gap: 0.45rem;
}
.notifications-page-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 18px;
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, 0.8);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.notifications-page-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.08);
    border-color: rgba(37, 99, 235, 0.28);
}
.notifications-page-item.is-unread {
    background: linear-gradient(180deg, rgba(219, 234, 254, 0.7), rgba(255, 255, 255, 0.94));
    border-color: rgba(59, 130, 246, 0.34);
}
.notifications-compact-item {
    justify-content: flex-start;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.95rem 1rem;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(247,250,255,0.96));
    border-color: rgba(191,219,254,0.68);
    box-shadow: none;
}
.notifications-compact-dot-wrap {
    padding-top: 0.35rem;
    flex: 0 0 auto;
}
.notifications-compact-dot {
    display: block;
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 999px;
    background: rgba(148,163,184,0.5);
}
.notifications-compact-dot.is-unread {
    background: #3b82f6;
}
.notifications-overlay__list .notifications-page-item:hover {
    transform: none;
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.05);
}
.notifications-overlay__list .notifications-page-item.is-unread {
    background: linear-gradient(180deg, rgba(231,240,255,0.96), rgba(255,255,255,0.98));
    border-color: rgba(96,165,250,0.5);
}
.notifications-page-main {
    display: grid;
    gap: 0.45rem;
    min-width: 0;
}
.notifications-overlay__list .notifications-page-main {
    flex: 1 1 auto;
    width: 100%;
}
.notifications-overlay__list .notifications-page-title-row {
    display: block;
}
.notifications-overlay__list .notifications-page-title {
    display: block;
    font-size: 0.98rem;
    line-height: 1.4;
}
.notifications-overlay__list .notifications-page-message {
    margin-top: 0.05rem;
    font-size: 0.95rem;
    line-height: 1.55;
}
.notifications-overlay__list .notifications-page-time {
    margin-top: 0.1rem;
    font-size: 0.82rem;
    white-space: normal;
}
.notifications-page-title-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}
.notifications-page-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}
.notifications-page-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.notifications-page-message {
    margin: 0;
    color: #475569;
    line-height: 1.6;
}
.notifications-page-time {
    flex-shrink: 0;
    color: #64748b;
    font-size: 0.86rem;
    white-space: nowrap;
}
.notifications-page-pagination {
    margin-top: 1.5rem;
}
@media (max-width: 720px) {
    .notif-dropdown {
        right: -0.75rem;
        width: min(92vw, calc(100vw - 1rem));
    }

    .notifications-overlay__shell {
        padding: 1rem;
    }

    .notifications-overlay__head {
        grid-template-columns: 1fr;
        align-items: flex-start;
        padding-right: 0;
    }

    .notifications-overlay__head .btn {
        width: 100%;
    }

    .notifications-compact-head {
        align-items: flex-start;
    }

    .notifications-compact-head .btn {
        width: 100%;
    }

    .notifications-page-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .notifications-page-time {
        white-space: normal;
    }
}
@media (max-width: 768px) {
    .layout.is-guest .navbar {
        height: auto;
        min-height: 74px;
        align-items: flex-start;
        flex-wrap: wrap;
        row-gap: 0.75rem;
        padding-top: 0.8rem;
        padding-bottom: 0.8rem;
    }

    .layout.is-guest .navbar-left {
        min-width: 0;
    }

    .layout.is-guest .navbar-right {
        width: 100%;
        margin-left: 0;
        justify-content: flex-start;
    }

    .layout.is-guest .guest-nav-wrap {
        width: 100%;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 0.7rem;
    }

    .layout.is-guest .guest-nav {
        order: 2;
        width: 100%;
        gap: 0.9rem;
    }

    .layout.is-guest .guest-actions {
        order: 1;
        margin-left: auto;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .layout.is-guest .logo-mark {
        width: 46px;
        height: 46px;
    }

    .layout.is-guest .logo-copy strong {
        font-size: 0.94rem;
    }

    .layout.is-guest .logo-copy small {
        font-size: 0.66rem;
        letter-spacing: 0.06em;
    }
}

@media (max-width: 560px) {
    .layout.is-guest .guest-actions {
        width: 100%;
        margin-left: 0;
        justify-content: stretch;
    }

    .layout.is-guest .guest-actions .btn {
        flex: 1 1 0;
        justify-content: center;
    }
}








body.login-modal-open {
    overflow: hidden;
}
.login-modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 3000;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}
.login-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.login-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 10, 26, 0.52);
    backdrop-filter: blur(10px);
}
.login-modal-dialog {
    position: relative;
    width: min(100%, 520px);
    max-height: calc(100vh - 2.5rem);
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(180deg, rgba(6, 18, 46, 0.92), rgba(10, 25, 60, 0.86));
    box-shadow: 0 28px 90px rgba(3, 10, 24, 0.42);
}
.login-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.4rem;
    height: 2.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: #f7fbff;
    cursor: pointer;
    z-index: 2;
    transition: background-color 0.18s ease, border-color 0.18s ease;
}
.login-modal-close:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.22);
}
.login-modal-close svg {
    width: 1rem;
    height: 1rem;
}
.login-modal-shell {
    display: grid;
    gap: 0.95rem;
    padding: 1.15rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
}
.login-modal-intro {
    display: grid;
    gap: 0.45rem;
    padding-right: 2.8rem;
}
.login-modal-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 0.35rem 0.68rem;
    border-radius: 999px;
    background: rgba(245, 196, 0, 0.14);
    border: 1px solid rgba(245, 196, 0, 0.24);
    color: #f5c400;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.login-modal-intro h2 {
    margin: 0;
    color: #f8fbff;
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
}
.login-modal-intro p {
    margin: 0;
    color: rgba(219, 229, 248, 0.82);
    line-height: 1.55;
}
.login-modal-status {
    border-radius: 14px;
    padding: 0.78rem 0.9rem;
    background: rgba(255, 255, 255, 0.08);
    color: #dbeafe;
    font-size: 0.88rem;
}
.login-modal-form {
    padding: 1.1rem;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 253, 0.96));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 18px 40px rgba(5, 10, 24, 0.18);
    overflow: auto;
}
.login-modal-form .form-group {
    margin-bottom: 0.72rem;
    position: relative;
}
.login-modal-form label,
.login-modal-form .field-link,
.login-modal-form .small-text,
.login-modal-form .small-text a {
    color: #17305f;
}
.login-modal-form label {
    display: block;
    margin-bottom: 0.34rem;
    font-weight: 600;
}
.login-modal-form input {
    box-sizing: border-box;
    width: 100%;
    padding: 0.78rem 0.92rem;
    border: 1px solid rgba(18, 41, 87, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    color: #0d1f45;
    box-shadow: inset 0 1px 2px rgba(7, 24, 52, 0.03);
}
.login-modal-form input::placeholder {
    color: #8293b0;
}
.login-modal-form input:focus {
    outline: none;
    border-color: #173c8c;
    box-shadow: 0 0 0 4px rgba(23, 60, 140, 0.08);
}
.login-modal-form .field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.2rem;
}
.login-modal-form .field-link {
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;
}
.login-modal-form .field-link:hover {
    text-decoration: underline;
}
.login-modal-form .show-password {
    position: absolute;
    right: 0.75rem;
    top: 2.45rem;
    width: 2.2rem;
    height: 2.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #556685;
    cursor: pointer;
}
.login-modal-form .show-password:hover {
    background: rgba(19, 42, 98, 0.08);
}
.login-modal-form .show-password svg {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
}
.login-modal-form .show-password .icon-eye-off {
    display: none;
}
.login-modal-form .show-password.is-visible .icon-eye {
    display: none;
}
.login-modal-form .show-password.is-visible .icon-eye-off {
    display: block;
}
.login-modal-form .checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 500;
}
.login-modal-form .checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}
.login-modal-submit-row .btn {
    width: 100%;
    justify-content: center;
    padding: 0.86rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #102a71 0%, #2457c3 54%, #f5c400 100%);
    color: #fff;
    box-shadow: 0 16px 28px rgba(16, 42, 113, 0.18);
}
.login-modal-submit-row .btn:hover {
    background: linear-gradient(135deg, #0c2256 0%, #1c47a4 54%, #d8aa16 100%);
}
.login-modal-form .small-text {
    margin-top: 0.3rem;
    font-size: 0.86rem;
}
.login-modal-form .error {
    color: #dc2626;
    font-size: 0.82rem;
    display: block;
    margin-top: 0.35rem;
}
.register-error-banner {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.62rem 0.72rem;
    border: 1px solid rgba(248, 113, 113, 0.38);
    border-radius: 10px;
    background: rgba(127, 29, 29, 0.24);
    color: #fecaca;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
    animation: slideDown 0.22s ease-out;
}
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.register-error-banner-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    color: #f87171;
}
.register-field.has-error input,
.register-field input.is-invalid,
.register-field.has-error textarea {
    border-color: #f87171;
    background: rgba(239, 68, 68, 0.04);
}
.register-field.has-error input:focus,
.register-field input.is-invalid:focus,
.register-field.has-error textarea:focus {
    border-color: #f87171;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.register-auth-form .error {
    color: #f87171;
    font-size: 0.75rem;
    font-weight: 500;
    display: block;
    margin-top: 0.08rem;
    line-height: 1.35;
}
.register-modal .alert {
    margin-bottom: 0.8rem;
}
.register-modal .alert-error {
    background: rgba(239, 68, 68, 0.15);
    color: #DC2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
    font-weight: 600;
}
.auth-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    width: 100%;
    min-height: 3.1rem;
    padding: 0.86rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.985), rgba(246, 249, 255, 0.96));
    color: #132a62;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94), 0 14px 28px rgba(4, 10, 24, 0.18);
}
.auth-social-btn:hover {
    background: linear-gradient(180deg, #ffffff, #eef4ff);
}
.auth-divider {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.1rem 0 0.15rem;
    color: rgba(219, 229, 248, 0.5);
    font-size: 0.76rem;
    letter-spacing: 0.02em;
    text-transform: none;
}
.auth-divider::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    top: 50%;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    transform: translateY(-50%);
}
.auth-divider span {
    position: relative;
    z-index: 1;
    padding: 0 0.9rem;
    background: linear-gradient(180deg, rgba(7, 19, 46, 0.98), rgba(10, 25, 60, 0.94));
}
.register-modal .auth-divider {
    margin: 0.18rem 0 0.28rem;
    color: rgba(214, 226, 245, 0.62);
    font-size: 0.76rem;
}
.register-modal .auth-divider::before {
    border-top-color: rgba(255, 255, 255, 0.08);
}
.register-modal .auth-divider span {
    padding: 0 0.7rem;
}
.register-modal .auth-divider span::before {
    content: "or";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.55rem;
    height: 1.55rem;
    margin-right: 0.5rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(230, 238, 250, 0.7);
    font-size: 0.72rem;
    line-height: 1;
    vertical-align: middle;
}
.login-modal .login-modal-dialog {
    width: min(100%, 640px);
    max-height: calc(100vh - 1.7rem);
    border-radius: 32px;
    border-color: rgba(255, 255, 255, 0.12);
    background:
        radial-gradient(circle at top left, rgba(245, 196, 0, 0.12), transparent 24%),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.14), transparent 20%),
        linear-gradient(180deg, rgba(6, 18, 46, 0.96), rgba(9, 23, 54, 0.94));
    box-shadow: 0 34px 96px rgba(2, 8, 22, 0.48);
}
.login-modal .login-modal-shell {
    gap: 0.88rem;
    padding: 1.12rem 1.12rem 1rem;
}
.login-modal .login-modal-intro {
    gap: 0.26rem;
}
.login-modal .login-modal-intro h2 {
    font-size: clamp(1.68rem, 3.6vw, 2.12rem);
    line-height: 1.02;
    letter-spacing: -0.045em;
}
.login-modal .login-modal-intro p {
    max-width: 48ch;
    color: rgba(223, 233, 249, 0.7);
    font-size: 0.9rem;
    line-height: 1.45;
}
.login-modal .login-modal-status {
    border-radius: 16px;
    padding: 0.72rem 0.82rem;
    background: rgba(255, 255, 255, 0.08);
    color: #dbeafe;
}
.login-modal-auth-form {
    display: grid;
    gap: 0.8rem;
    padding: 0.18rem 0 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: visible;
}
.login-modal .login-modal-form .form-group {
    margin-bottom: 0;
}
.login-modal .login-modal-form label {
    margin-bottom: 0.28rem;
    color: rgba(226, 235, 249, 0.88);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.login-modal .login-modal-form .field-link,
.login-modal .login-modal-form .small-text,
.login-modal .login-modal-form .small-text a {
    color: rgba(214, 226, 245, 0.72);
}
.login-modal .login-modal-form .field-link {
    font-size: 0.78rem;
    font-weight: 700;
}
.login-modal .login-modal-form input {
    min-height: 2.95rem;
    padding: 0.76rem 0.92rem;
    border-radius: 16px;
    border-color: rgba(148, 163, 184, 0.14);
    background: rgba(255, 255, 255, 0.08);
    color: #f8fbff;
    font-size: 0.96rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}
.login-modal .login-modal-form input::placeholder {
    color: rgba(197, 211, 231, 0.52);
}
.login-modal .login-modal-form input:focus {
    border-color: rgba(245, 196, 0, 0.62);
    box-shadow: 0 0 0 4px rgba(245, 196, 0, 0.1);
}
.login-modal .login-modal-form .field-head {
    margin-bottom: 0.28rem;
}
.login-modal .login-modal-form .show-password {
    top: 2.1rem;
    color: rgba(214, 226, 245, 0.7);
}
.login-modal-social-row {
    margin-bottom: 0;
}
.login-modal .checkbox-group label {
    gap: 0.48rem;
    color: rgba(241, 246, 255, 0.88);
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.88rem;
}
.login-modal .checkbox-group input[type="checkbox"] {
    width: 0.98rem;
    height: 0.98rem;
    accent-color: #f5c400;
}
.login-modal-primary-action {
    margin-top: 0.1rem;
}
.login-modal .login-modal-submit-row .btn {
    min-height: 3rem;
    padding: 0.88rem 1rem;
    border-radius: 16px;
    font-size: 0.98rem;
    box-shadow: 0 16px 34px rgba(16, 42, 113, 0.26);
}
.login-modal-footer {
    text-align: center;
}
.login-modal-footer a {
    color: #ffd95f;
    font-weight: 700;
}
@media (max-width: 720px) {
    .login-modal {
        padding: 0.85rem;
    }
    .login-modal-dialog {
        width: 100%;
        max-height: calc(100vh - 1.7rem);
        border-radius: 24px;
    }
    .login-modal-shell {
        padding: 0.9rem;
    }
    .login-modal-form {
        padding: 0.95rem;
    }
}
.register-modal .login-modal-dialog {
    width: min(100%, 690px);
    max-height: min(90vh, 860px);
    max-height: min(90dvh, 860px);
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    border-radius: 32px;
    border-color: rgba(255, 255, 255, 0.12);
    background:
        radial-gradient(circle at top left, rgba(245, 196, 0, 0.12), transparent 24%),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.14), transparent 20%),
        linear-gradient(180deg, rgba(6, 18, 46, 0.96), rgba(9, 23, 54, 0.94));
    box-shadow: 0 34px 96px rgba(2, 8, 22, 0.48);
}
.register-modal .login-modal-shell {
    gap: 0.88rem;
    padding: 1.12rem 1.12rem 1rem;
    max-height: min(90vh, 860px);
    max-height: min(90dvh, 860px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
    scrollbar-gutter: stable;
}
.register-modal .login-modal-intro {
    padding-right: 2.8rem;
    gap: 0.26rem;
}
.register-modal .login-modal-intro h2 {
    font-size: clamp(1.68rem, 3.6vw, 2.12rem);
    line-height: 1.02;
    letter-spacing: -0.045em;
}
.register-modal .login-modal-intro p {
    max-width: 52ch;
    color: rgba(223, 233, 249, 0.7);
    font-size: 0.9rem;
    line-height: 1.45;
}
.register-modal-form {
    display: grid;
    gap: 0.8rem;
    max-height: none;
    overflow: visible;
    padding: 0.18rem 0 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}
.register-modal-form-grid,
.register-modal-password-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}
.register-modal .login-modal-form .form-group {
    margin-bottom: 0;
}
.register-modal .login-modal-form label {
    margin-bottom: 0.28rem;
    color: rgba(226, 235, 249, 0.88);
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}
.register-modal .login-modal-form input {
    min-height: 2.95rem;
    padding: 0.76rem 0.92rem;
    border-radius: 16px;
    border-color: rgba(148, 163, 184, 0.14);
    background: rgba(255, 255, 255, 0.08);
    color: #f8fbff;
    font-size: 0.96rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}
.register-modal .login-modal-form input::placeholder {
    color: rgba(197, 211, 231, 0.52);
}
.register-modal .login-modal-form input:focus {
    border-color: rgba(245, 196, 0, 0.62);
    box-shadow: 0 0 0 4px rgba(245, 196, 0, 0.1);
}
.register-modal .login-modal-form .show-password {
    top: 2.1rem;
    color: rgba(214, 226, 245, 0.7);
}
.register-modal-social-row {
    margin-bottom: 0;
}
.register-modal .login-modal-submit-row .btn {
    min-height: 3rem;
    padding: 0.88rem 1rem;
    border-radius: 16px;
    font-size: 0.98rem;
    box-shadow: 0 16px 34px rgba(16, 42, 113, 0.26);
}
.register-modal-submit-row .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
}
.register-modal-submit-row .btn svg {
    width: 1.05rem;
    height: 1.05rem;
    flex: 0 0 auto;
}
.register-modal .login-modal-form .small-text {
    margin-top: 0;
    font-size: 0.8rem;
}
.register-modal-consent-wrap {
    display: grid;
    gap: 0.4rem;
    margin-top: 0.1rem;
    padding: 0.1rem 0 0.15rem;
    background: transparent;
}
.register-modal-submit-row {
    margin-top: 0.2rem;
}
.register-modal-footer {
    text-align: center;
    color: rgba(214, 226, 245, 0.66);
    font-size: 0.84rem;
}
.register-modal-footer a {
    font-weight: 700;
    color: #ffd95f;
}
.register-modal .consent-section-head p {
    margin: 0;
    color: rgba(200, 212, 231, 0.7);
    font-size: 0.75rem;
    line-height: 1.35;
    font-weight: 500;
}
.register-modal .consent-section {
    gap: 0.3rem;
}
.register-modal .consent-form-group {
    margin-bottom: 0;
}
.register-modal .consent-panel {
    gap: 0;
    padding: 0.4rem 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.register-modal .consent-option-inline {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.1rem;
    align-items: start;
    margin: 0;
    text-transform: none;
    letter-spacing: 0;
    padding: 0.38rem 0;
}

.register-modal .consent-option {
    padding: 0;
}
.register-modal .consent-option + .consent-option {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.register-modal .consent-option-text {
    color: rgba(241, 246, 255, 0.9);
    font-size: 0.8rem;
    line-height: 1.4;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
}
.register-modal .consent-link {
    color: #ffd95f;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.2em;
    display: inline;
    margin: 0;
    padding: 0;
    line-height: inherit;
}

.register-modal .consent-link:hover {
    color: #ffeb99;
    text-decoration-thickness: 2px;
}

.register-modal .consent-link-inline {
    color: #ffd95f;
    font-size: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.2em;
    display: inline;
    margin: 0 0.05em;
    padding: 0;
    line-height: inherit;
}

.register-modal .consent-link-inline:hover {
    color: #ffeb99;
    text-decoration-thickness: 2px;
}
.register-modal .consent-helper,
.register-modal .consent-links,
.register-modal .consent-links a,
.register-modal .consent-link {
    color: #ffd95f;
}
.register-modal .consent-option-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.42rem;
    align-items: start;
    cursor: pointer;
}
.register-modal .consent-option-main input[type="checkbox"] {
    width: 0.82rem;
    height: 0.82rem;
    margin: 0.16rem 0 0;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 0.22rem;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.register-modal .consent-option-main input[type="checkbox"]:checked {
    border-color: #f5c400;
    background-color: #f5c400;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%230b1f4f' d='M6.5 11.3 3.2 8l1.1-1.1 2.2 2.2 5-5 1.1 1.1z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 0.64rem 0.64rem;
    box-shadow: 0 0 0 2px rgba(245, 196, 0, 0.12);
}
.register-modal .consent-option-main input[type="checkbox"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(245, 196, 0, 0.18);
}
.register-modal .consent-link::after {
    content: "";
}
.register-modal .consent-error {
    margin-top: 0.1rem;
    color: #ffd4d4;
    font-size: 0.72rem;
}
.register-modal {
    place-items: center;
    overflow: hidden;
    padding: 1rem;
}
.register-modal .login-modal-close {
    z-index: 4;
}
.register-modal .register-modal-shell {
    gap: 0.78rem;
    padding: 1rem 1.05rem 0.95rem;
}
.register-modal .register-modal-intro {
    padding-right: 2.75rem;
    gap: 0.2rem;
}
.register-modal .register-modal-intro h2 {
    font-size: clamp(1.62rem, 3.4vw, 2.05rem);
}
.register-modal .register-modal-intro p {
    max-width: 36rem;
    font-size: 0.88rem;
    line-height: 1.42;
}
.register-modal .register-auth-form {
    display: grid;
    gap: 0.78rem;
    padding: 0;
}
.register-modal .register-auth-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}
.register-modal .register-field {
    position: relative;
    display: grid;
    gap: 0.28rem;
}
.register-modal .register-field > label {
    margin: 0;
    color: rgba(236, 242, 252, 0.92);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}
.register-modal .register-field > input {
    min-height: 3rem;
    padding: 0.82rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    background: rgba(255, 255, 255, 0.07);
    color: #f8fbff;
    font-size: 0.96rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.register-modal .register-field > input::placeholder {
    color: rgba(197, 211, 231, 0.56);
}
.register-modal .register-field > input:focus {
    outline: none;
    border-color: rgba(245, 196, 0, 0.58);
    box-shadow: 0 0 0 4px rgba(245, 196, 0, 0.08);
}
.register-modal .register-password-grid {
    gap: 0.9rem;
}
.register-modal .register-password-toggle {
    position: absolute;
    right: 0.78rem;
    top: 2.12rem;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(214, 226, 245, 0.74);
}
.register-modal .register-password-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
}
.register-modal .register-password-toggle svg {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
}
.register-modal .register-password-toggle .icon-eye-off {
    display: none;
}
.register-modal .register-password-toggle.is-visible .icon-eye {
    display: none;
}
.register-modal .register-password-toggle.is-visible .icon-eye-off {
    display: block;
}
.register-modal .register-consent-section {
    gap: 0.3rem;
}
.register-modal .register-consent-panel {
    gap: 0;
    padding: 0.35rem 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.01);
}
.register-modal .register-consent-panel.has-error {
    border-color: rgba(248, 113, 113, 0.4);
    background: rgba(127, 29, 29, 0.12);
    box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.08);
}
.register-modal .register-consent-option {
    padding: 0.32rem 0;
}
.register-modal .register-consent-option + .register-consent-option {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.register-modal .register-consent-option-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.55rem;
    align-items: center;
}
.register-modal .register-consent-option-main input[type="checkbox"] {
    width: 0.95rem;
    height: 0.95rem;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 0.2rem;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.register-modal .register-consent-option-main input[type="checkbox"]:checked {
    border-color: #f5c400;
    background-color: #f5c400;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%230b1f4f' d='M6.5 11.3 3.2 8l1.1-1.1 2.2 2.2 5-5 1.1 1.1z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 0.68rem 0.68rem;
}
.register-modal .register-consent-option-main input[type="checkbox"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(245, 196, 0, 0.14);
}
.register-modal .register-consent-option-text {
    color: rgba(240, 246, 255, 0.92);
    font-size: 0.78rem;
    line-height: 1.4;
    font-weight: 500;
}
.register-modal .register-consent-link {
    display: inline;
    align-items: center;
    gap: 0;
    justify-self: auto;
    margin: 0;
    color: #ffd95f;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}
.register-modal .register-consent-link::after {
    content: "";
}
.register-modal .register-consent-link:hover,
.register-modal .register-consent-link:focus-visible {
    color: #ffeb99;
    text-decoration-thickness: 2px;
}
.register-modal .register-consent-error {
    margin-top: 0.15rem;
    color: #ffd4d4;
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.35;
}
.register-modal .register-modal-submit-row {
    margin-top: 0.1rem;
    display: flex;
    justify-content: center;
}
.register-modal .register-modal-submit-row .btn {
    width: min(100%, 420px);
    min-height: 3rem;
    padding: 0.82rem 1rem;
    border-radius: 14px;
}
.register-modal .register-modal-footer {
    margin-top: -0.1rem;
    text-align: center;
    color: rgba(214, 226, 245, 0.7);
    font-size: 0.84rem;
}
.register-modal .register-modal-footer a {
    color: #ffd95f;
    font-weight: 700;
    text-decoration: none;
}
@media (max-width: 720px) {
    .register-modal .login-modal-dialog {
        width: 100%;
        max-height: min(90vh, calc(100vh - 1.2rem));
        max-height: min(90dvh, calc(100dvh - 1.2rem));
        border-radius: 22px;
    }
    .register-modal .login-modal-shell {
        max-height: min(90vh, calc(100vh - 1.2rem));
        max-height: min(90dvh, calc(100dvh - 1.2rem));
        padding: 0.85rem;
    }
    .register-modal-form-grid,
    .register-modal-password-grid {
        grid-template-columns: 1fr;
    }
    .register-modal-form {
        max-height: none;
        padding: 0.95rem;
    }
    .auth-divider {
        margin: 0;
        font-size: 0.76rem;
    }
    .auth-social-btn {
        min-height: 2.85rem;
        padding: 0.76rem 0.9rem;
    }
    .register-modal .register-auth-grid {
        grid-template-columns: 1fr;
        gap: 0.62rem;
    }
    .register-modal .register-consent-link {
        justify-self: start;
        margin-left: 1.7rem;
        margin-top: 0.08rem;
    }
}












@media (max-width: 720px) {
    .login-modal {
        place-items: start center;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0.85rem;
    }
    .login-modal-dialog {
        margin: auto 0;
        max-height: none;
    }
    .login-modal-form {
        overflow: visible;
    }
    .register-modal-form {
        max-height: none;
    }
}
@media (max-width: 980px) {
    .login-modal {
        place-items: start center;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0.9rem;
    }
    .login-modal-dialog,
    .register-modal .login-modal-dialog {
        width: min(100%, 680px);
        max-height: none;
        margin: 0;
    }
    .login-modal-shell,
    .register-modal .login-modal-shell {
        padding: 0.95rem;
        gap: 0.85rem;
    }
    .login-modal-intro,
    .register-modal .login-modal-intro {
        padding-right: 3rem;
    }
    .login-modal-form,
    .register-modal-form {
        max-height: none;
    }
}

@media (max-width: 720px) {
    .login-modal {
        padding: 0.7rem;
    }
    .login-modal-dialog,
    .register-modal .login-modal-dialog {
        width: 100%;
        border-radius: 22px;
    }
    .login-modal-close,
    .register-modal .login-modal-close {
        top: 0.75rem;
        right: 0.75rem;
        width: 2.2rem;
        height: 2.2rem;
    }
    .login-modal-shell,
    .register-modal .login-modal-shell {
        padding: 0.82rem;
        gap: 0.78rem;
    }
    .login-modal-intro,
    .register-modal .login-modal-intro {
        padding-right: 2.7rem;
        gap: 0.35rem;
    }
    .login-modal-intro h2,
    .register-modal .login-modal-intro h2 {
        font-size: clamp(1.45rem, 7vw, 1.9rem);
    }
    .login-modal-intro p,
    .register-modal .login-modal-intro p {
        font-size: 0.88rem;
        line-height: 1.45;
    }
    .login-modal-form,
    .register-modal-form {
        padding: 0.88rem;
        border-radius: 20px;
        overflow: visible;
    }
    .register-modal-form-grid,
    .register-modal-password-grid {
        grid-template-columns: 1fr;
        gap: 0.72rem;
    }
    .login-modal-form .form-group,
    .register-modal .login-modal-form .form-group {
        margin-bottom: 0.68rem;
    }
    .login-modal-form input,
    .register-modal .login-modal-form input {
        min-height: 2.95rem;
        padding: 0.74rem 0.9rem;
    }
    .login-modal-form .show-password,
    .register-modal .login-modal-form .show-password {
        top: 2.18rem;
    }
    .register-modal-note {
        align-items: flex-start;
        font-size: 0.8rem;
        line-height: 1.45;
    }
    .register-modal .consent-option {
        padding: 0.78rem 0.8rem;
    }
    .register-modal .consent-option-text,
    .register-modal .consent-link,
    .register-modal .consent-section-head p {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .login-modal {
        padding: 0.55rem;
    }
    .login-modal-shell,
    .register-modal .login-modal-shell {
        padding: 0.72rem;
    }
    .login-modal-intro,
    .register-modal .login-modal-intro {
        padding-right: 2.5rem;
    }
    .login-modal-kicker {
        font-size: 0.62rem;
        letter-spacing: 0.11em;
    }
    .login-modal-form,
    .register-modal-form {
        padding: 0.8rem;
    }
    .login-modal-submit-row .btn {
        min-height: 2.9rem;
    }
}

@media (max-width: 980px) {
    .register-modal {
        place-items: center;
        overflow: hidden;
    }

    .register-modal .login-modal-dialog {
        display: grid;
        grid-template-rows: minmax(0, 1fr);
        max-height: min(90vh, calc(100vh - 1.8rem));
        max-height: min(90dvh, calc(100dvh - 1.8rem));
    }

    .register-modal .login-modal-shell {
        max-height: min(90vh, calc(100vh - 1.8rem));
        max-height: min(90dvh, calc(100dvh - 1.8rem));
        overflow-y: auto;
    }
}

@media (max-width: 480px) {
    .register-modal .login-modal-dialog,
    .register-modal .login-modal-shell {
        max-height: min(90vh, calc(100vh - 0.9rem));
        max-height: min(90dvh, calc(100dvh - 0.9rem));
    }
}

.admin-ticket-modal__form input[type="date"] {
    color-scheme: dark;
}
.admin-ticket-modal .ticket-appointment-fields .ticket-sidebar-note {
    color: rgba(236, 242, 252, 0.82);
}


/* Authenticated account controls live in the sidebar footer. */
.sidebar {
    display: flex;
    flex-direction: column;
}
.sidebar-nav {
    flex: 1 1 auto;
}
.sidebar-account {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: .55rem;
    align-items: center;
    margin-top: 1rem;
    padding: .7rem;
    border: 1px solid rgba(191, 219, 254, .2);
    border-radius: 14px;
    background: rgba(0, 24, 64, .58);
    backdrop-filter: blur(10px);
}
.sidebar-account__profile {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .65rem;
    color: #fff;
    text-decoration: none;
}
.sidebar-account__profile.is-active {
    color: #ffdc5f;
}
.sidebar-account__avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: #dbeafe;
    color: #102a71;
    font-weight: 800;
}
.sidebar-account__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sidebar-account__copy {
    min-width: 0;
    display: grid;
    line-height: 1.2;
}
.sidebar-account__copy strong,
.sidebar-account__copy small,
.sidebar-account__copy span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sidebar-account__copy strong { font-size: .84rem; }
.sidebar-account__copy small { color: #bfdbfe; font-size: .7rem; text-transform: uppercase; }
.sidebar-account__copy span { color: #fde68a; font-size: .72rem; }
.sidebar-account__logout button {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 11px;
    background: rgba(255,255,255,.1);
    color: #fff;
    cursor: pointer;
}
.sidebar-account__logout button:hover,
.sidebar-account__logout button:focus-visible { background: rgba(239,68,68,.25); outline: 2px solid #fecaca; }
.sidebar-account__logout svg { width: 20px; height: 20px; }

.profile-password-control {
    position: relative;
}
.profile-password-control input {
    width: 100%;
    padding-right: 4.5rem;
}
.profile-password-toggle {
    position: absolute;
    right: .45rem;
    top: 50%;
    transform: translateY(-50%);
    min-width: 3.4rem;
    padding: .4rem .55rem;
    border: 0;
    border-radius: 8px;
    background: #e8eefc;
    color: #102a71;
    font: inherit;
    font-size: .78rem;
    font-weight: 800;
    cursor: pointer;
}
.profile-password-toggle.is-visible::after { content: ''; }
.validation-toast-stack {
    position: sticky;
    top: 84px;
    z-index: 70;
}
.validation-toast {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    max-width: 760px;
}
.validation-toast-icon {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #b91c1c;
    color: #fff;
    font-weight: 900;
}
.technician-day-picker{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.5rem}.technician-day-chip{position:relative}.technician-day-chip input{position:absolute;inset:0;opacity:0}.technician-day-chip span{display:flex;justify-content:center;padding:.65rem;border:1px solid #cbd5e1;border-radius:999px;background:#fff;font-weight:800}.technician-day-chip input:checked+span{border-color:#2563eb;background:#dbeafe;color:#1d4ed8}.technician-day-chip input:focus-visible+span{outline:3px solid rgba(37,99,235,.22)}@media(max-width:640px){.technician-day-picker{grid-template-columns:repeat(3,minmax(0,1fr))}}
/* Compact status filters and fitted ticket tables shared by admin and technician queues. */
.ticket-queue-overview {
    gap: 0.85rem;
    padding: 1rem;
}
.ticket-filter-toolbar {
    display: grid;
    align-items: end;
    gap: 0.75rem;
    width: 100%;
}
.ticket-filter-toolbar--admin {
    grid-template-columns: minmax(17rem, 1.8fr) repeat(3, minmax(9rem, 1fr)) auto;
}
.ticket-filter-toolbar--technician {
    grid-template-columns: minmax(17rem, 1.8fr) repeat(2, minmax(9rem, 1fr)) auto;
}
.ticket-filter-toolbar .toolbar-field,
.ticket-filter-toolbar .toolbar-field.grow {
    width: 100%;
    min-width: 0;
    flex: none;
}
.ticket-filter-toolbar .toolbar-actions {
    align-self: end;
    flex-wrap: nowrap;
}
.ticket-queue-overview__grid {
    grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
    gap: 0.65rem;
}
.ticket-queue-metric {
    display: flex;
    min-width: 0;
    min-height: 68px;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.9rem;
    border-radius: 13px;
}
.ticket-queue-metric__label {
    min-width: 0;
    line-height: 1.25;
}
.ticket-queue-metric__value {
    flex: 0 0 auto;
    min-width: 2.25rem;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    background: rgba(16, 42, 113, 0.08);
    font-size: 1.25rem;
    line-height: 1;
    text-align: center;
}
.ticket-queue-metric.is-active .ticket-queue-metric__value {
    background: #102a71;
    color: #ffffff;
}
.ticket-queue-metric__meta {
    display: none;
}
.ticket-table-card {
    overflow: visible;
}
.ticket-table-wrap {
    border-radius: inherit;
}
body.layout .telecom-table.ticket-list-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}
body.layout .ticket-list-table--admin .ticket-col-reference { width: 13%; }
body.layout .ticket-list-table--admin .ticket-col-person { width: 14%; }
body.layout .ticket-list-table--admin .ticket-col-urgency { width: 8%; }
body.layout .ticket-list-table--admin .ticket-col-status { width: 10%; }
body.layout .ticket-list-table--admin .ticket-col-submitted { width: 13%; }
body.layout .ticket-list-table--admin .ticket-col-action { width: 6rem; }
body.layout .ticket-list-table--technician .ticket-col-reference { width: 15%; }
body.layout .ticket-list-table--technician .ticket-col-person { width: 18%; }
body.layout .ticket-list-table--technician .ticket-col-urgency { width: 10%; }
body.layout .ticket-list-table--technician .ticket-col-status { width: 13%; }
body.layout .ticket-list-table--technician .ticket-col-submitted { width: 15%; }
body.layout .ticket-list-table--technician .ticket-col-action { width: 6rem; }
body.layout .ticket-list-table :is(th, td) {
    min-width: 0;
    padding: 0.75rem 0.65rem;
}
body.layout .ticket-list-table td:nth-child(3) {
    overflow-wrap: anywhere;
}
.ticket-submitted-cell {
    white-space: normal;
}

.ticket-submitted-cell > span,
.ticket-submitted-cell > small {
    display: block;
}
.ticket-submitted-cell small {
    color: var(--color-text-muted);
    font-size: 0.78rem;
}
body.layout .ticket-list-table :is(.col-actions, .actions-cell) {
    position: sticky;
    right: 0;
    z-index: 2;
    width: 6rem;
    min-width: 6rem;
    border-left: 1px solid rgba(217, 223, 239, 0.85);
    background: #ffffff;
    box-shadow: -8px 0 14px rgba(15, 23, 42, 0.035);
    text-align: center;
}
body.layout .ticket-list-table .col-actions {
    z-index: 3;
    background: #f5f8fd;
}
body.layout .ticket-list-table tbody tr:hover .actions-cell {
    background: #f7faff;
}

/* Compact ticket workspace shared by administrator and technician views. */
.ticket-detail-page {
    gap: 0.9rem;
}

.ticket-detail-backline .btn {
    min-height: 2.65rem;
    padding: 0.65rem 1rem;
}

.ticket-detail-layout {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
    gap: 1rem;
    align-items: start;
}

.ticket-detail-main,
.ticket-detail-sidebar {
    gap: 1rem;
}

.ticket-detail-sidebar {
    position: static;
}

.ticket-detail-card {
    padding: clamp(1rem, 1.5vw, 1.25rem);
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(12, 35, 75, 0.07);
}

.ticket-detail-hero h1 {
    font-size: clamp(1.65rem, 2.5vw, 2.2rem);
}

.ticket-detail-description {
    margin-top: 0.85rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid #dbe4f0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.7);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.ticket-detail-section-head {
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.8rem;
}

.ticket-section-count,
.ticket-history-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.8rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: #e8f0ff;
    color: #1746b5;
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.ticket-conversation-card .ticket-timeline {
    max-height: min(52vh, 34rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 0.35rem;
    scrollbar-gutter: stable;
}

.ticket-timeline {
    gap: 0.65rem;
}

.ticket-message-bubble {
    max-width: min(84%, 720px);
    padding: 0.75rem 0.9rem;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(12, 35, 75, 0.05);
}

.ticket-message-row.is-system {
    justify-content: stretch;
}

.ticket-message-row.is-system .ticket-message-bubble {
    display: grid;
    grid-template-columns: minmax(170px, max-content) minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    max-width: 100%;
    padding: 0.65rem 0.8rem;
    border-left: 3px solid #3b82f6;
    border-radius: 12px;
    text-align: left;
    font-style: normal;
}

.ticket-message-row.is-system .ticket-message-meta {
    margin: 0;
}

.ticket-message-row.is-system .ticket-message-bubble p {
    font-size: 0.86rem;
    line-height: 1.45;
}

.ticket-reply-form textarea {
    min-height: 6rem;
}

.ticket-reply-form input[type="file"] {
    width: 100%;
    padding: 0.7rem;
    border: 1px dashed #b9c9e4;
    border-radius: 12px;
    background: #f8fbff;
}

.ticket-meta-list--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.ticket-meta-list--compact div,
.ticket-meta-list--compact div:last-child {
    min-width: 0;
    padding: 0.7rem;
    border: 1px solid #e0e7f2;
    border-radius: 12px;
    background: #f8fafc;
}

.ticket-meta-list--compact dd {
    overflow-wrap: anywhere;
}

.ticket-sidebar-card {
    gap: 0.8rem;
}

.ticket-status-card {
    border-top: 3px solid #2454d3;
}

.ticket-workflow-state {
    margin: 0;
    padding: 0.7rem 0.8rem;
    border-radius: 11px;
    background: #edf3ff;
    color: #29436f;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.45;
}

.ticket-status-card .ticket-action-form .btn,
.ticket-status-card .ticket-action-form form .btn {
    width: 100%;
}

.ticket-history-card summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    cursor: pointer;
    list-style: none;
    font-size: 1.05rem;
    font-weight: 800;
}

.ticket-history-card summary::-webkit-details-marker {
    display: none;
}

.ticket-history-card summary::after {
    content: "+";
    margin-left: auto;
    color: #2454d3;
    font-size: 1.25rem;
    line-height: 1;
}

.ticket-history-card[open] summary::after {
    content: "\2212";
}

.ticket-history-list {
    display: grid;
    gap: 0.7rem;
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid #e0e7f2;
}

.ticket-history-list .ticket-sidebar-note {
    margin: 0;
    padding: 0.75rem;
    border-radius: 11px;
    background: #f8fafc;
}

@media (max-width: 1100px) {
    .ticket-detail-layout {
        grid-template-columns: 1fr;
    }

    .ticket-detail-sidebar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    .ticket-assignment-card,
    .ticket-status-card {
        grid-column: span 2;
    }
}

@media (max-width: 640px) {
    .ticket-detail-sidebar,
    .ticket-meta-list--compact {
        grid-template-columns: 1fr;
    }

    .ticket-assignment-card,
    .ticket-status-card {
        grid-column: auto;
    }

    .ticket-detail-section-head {
        align-items: flex-start;
    }

    .ticket-conversation-card .ticket-timeline {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    .ticket-message-bubble {
        max-width: 94%;
    }

    .ticket-message-row.is-system .ticket-message-bubble {
        grid-template-columns: 1fr;
        gap: 0.3rem;
    }

    .ticket-form-actions .btn {
        width: 100%;
    }
}

/* Reports and queued-ticket availability. */
.sidebar {
    overflow-x: hidden;
}

.sidebar-nav {
    min-width: 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.sidebar-nav ul,
.sidebar-item,
.sidebar-item a {
    max-width: 100%;
}

.ticket-queue-reason,
.ticket-queue-next {
    display: block;
    max-width: 15rem;
    margin-top: 0.3rem;
    color: var(--color-text-muted);
    font-size: 0.74rem;
    line-height: 1.35;
}

.ticket-queue-next {
    color: #1d4ed8;
    font-weight: 700;
}

.ticket-queue-notice {
    padding: 0.75rem 0.9rem;
    border: 1px solid #f2cc72;
    border-radius: 12px;
    background: #fff8e8;
    color: #744500;
    font-size: 0.88rem;
    line-height: 1.5;
}

.ticket-queue-notice[hidden] {
    display: none !important;
}

.ticket-queue-notice--detail {
    display: grid;
    gap: 0.18rem;
    margin-top: 0.9rem;
}

.ticket-detail-hero__top > .badge {
    max-width: min(100%, 22rem);
    white-space: normal;
    text-align: center;
    line-height: 1.3;
}

.report-page {
    display: grid;
    gap: 1rem;
}

.report-filter-panel {
    padding: 1.2rem;
}

.report-filter-form {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) repeat(2, minmax(160px, 0.8fr)) auto;
    gap: 0.8rem;
    align-items: end;
}

.report-filter-form label {
    display: grid;
    gap: 0.4rem;
    color: var(--color-text-muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.report-filter-form select,
.report-filter-form input {
    width: 100%;
    min-height: 2.8rem;
    border-radius: 12px;
}

.report-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
}

.report-print-sheet {
    overflow: hidden;
    padding: clamp(1.1rem, 2.5vw, 2rem);
    border: 1px solid #d8e1ee;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.report-document-header,
.report-generated-line,
.report-document-footer,
.report-table-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.report-document-header {
    padding-bottom: 1rem;
    border-bottom: 3px solid #102a71;
}

.report-document-header > div,
.report-document-meta {
    display: grid;
    gap: 0.2rem;
}

.report-brand {
    color: #102a71;
    font-size: 1.35rem;
}

.report-document-header span,
.report-generated-line,
.report-document-footer {
    color: #5b6984;
    font-size: 0.78rem;
}

.report-document-meta {
    text-align: right;
}

.report-document-meta strong {
    color: #102a71;
    font-size: 1.05rem;
}

.report-generated-line {
    padding: 0.7rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.report-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 1rem;
}

.report-summary-grid article {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
    padding: 0.75rem;
    border: 1px solid #dce5f2;
    border-radius: 12px;
    background: #f8fafc;
}

.report-summary-grid span {
    color: #5b6984;
    font-size: 0.74rem;
    font-weight: 700;
}

.report-summary-grid strong {
    color: #102a71;
    font-size: 1.45rem;
    font-variant-numeric: tabular-nums;
}

.report-chart-section,
.report-table-section {
    margin-top: 1.25rem;
}

.report-chart-section h2,
.report-table-heading h2 {
    margin: 0;
    color: #102a71;
    font-size: 1rem;
}

.report-bar-chart {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.75rem;
}

.report-bar-row {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr) 2.5rem;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.78rem;
}

.report-bar-row > div {
    height: 0.72rem;
    overflow: hidden;
    border-radius: 999px;
    background: #e5edf8;
}

.report-bar-row i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2454d3, #0891b2);
}

.report-table-heading {
    align-items: center;
    margin-bottom: 0.65rem;
}

.report-table-heading span,
.report-limit-note {
    color: #5b6984;
    font-size: 0.78rem;
}

.report-data-table {
    min-width: 720px;
}

.report-data-table th,
.report-data-table td {
    padding: 0.65rem 0.7rem;
    font-size: 0.78rem;
    overflow-wrap: anywhere;
}

.report-document-footer {
    margin-top: 1.2rem;
    padding-top: 0.75rem;
    border-top: 1px solid #dce5f2;
}


@media (max-width: 900px) {
    .report-filter-form {
        grid-template-columns: 1fr 1fr;
    }

    .report-filter-form label:first-of-type,
    .report-filter-form .btn {
        grid-column: 1 / -1;
    }

    .report-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .report-filter-form {
        grid-template-columns: 1fr;
    }

    .report-summary-grid { grid-template-columns: 1fr 1fr; }
    .report-toolbar { display: grid; grid-template-columns: 1fr; }
    .report-toolbar .btn { width: 100%; }
    .report-document-header,
    .report-generated-line,
    .report-document-footer { display: grid; }
    .report-document-meta { text-align: left; }
    .report-bar-row { grid-template-columns: 4.5rem minmax(0, 1fr) 2rem; }
}

@media print {
    @page { size: A4 landscape; margin: 10mm; }
    body.layout { background: #fff !important; }
    body.layout .top-header,
    body.layout .sidebar,
    body.layout .footer,
    body.layout .notification-dropdown,
    body.layout .report-screen-only { display: none !important; }
    body.layout .main-content { margin: 0 !important; padding: 0 !important; }
    body.layout .content-wrapper,
    body.layout .container { width: 100% !important; max-width: none !important; padding: 0 !important; margin: 0 !important; }
    .report-page { display: block; }
    .report-print-sheet { padding: 0; border: 0; border-radius: 0; box-shadow: none; }
    .report-summary-grid { grid-template-columns: repeat(4, 1fr); }
    .report-table-wrap { overflow: visible !important; }
    .report-data-table { width: 100%; min-width: 0; }
    .report-data-table th,
    .report-data-table td { padding: 4px 5px; font-size: 8.5pt; }
    .report-summary-grid article,
    .report-chart-section,
    .report-table-section { break-inside: avoid; }
    .report-document-footer { position: running(report-footer); }
}

/* Compact automatic-assignment state in the admin ticket queue. */
body.layout .ticket-list-table tbody tr.ticket-row--queued td {
    background: #fffdf7;
}
body.layout .ticket-list-table tbody tr.ticket-row--queued:hover td {
    background: #fffaf0;
}
body.layout .ticket-list-table tbody tr.ticket-row--queued .actions-cell {
    background: #fffdf7;
}
.ticket-status-cell.is-queued {
    vertical-align: middle;
}
.ticket-queue-status {
    display: grid;
    justify-items: start;
    gap: 0.35rem;
    max-width: 10rem;
}
.ticket-queue-status__badge,
.ticket-auto-queue__label {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    width: max-content;
    max-width: 100%;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.045em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}
.ticket-queue-status__badge {
    padding: 0.42rem 0.68rem;
    background: #e7efff;
    color: #1748c9;
}
.ticket-queue-status__badge > span,
.ticket-auto-queue__label > span {
    flex: 0 0 auto;
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 50%;
    background: currentColor;
}
.ticket-queue-status small {
    color: #52617d;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.3;
}
.ticket-auto-queue {
    display: grid;
    justify-items: start;
    gap: 0.38rem;
    min-width: 0;
}
.ticket-auto-queue__label {
    padding: 0.4rem 0.65rem;
    border: 1px solid #f5d28b;
    background: #fff5df;
    color: #a64b00;
}
.ticket-auto-queue__schedule {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.2rem 0.35rem;
    color: #66728c;
    font-size: 0.72rem;
    line-height: 1.3;
}
.ticket-auto-queue__schedule strong {
    color: #1748c9;
    font-size: 0.74rem;
    font-variant-numeric: tabular-nums;
}
.ticket-list-table--admin .ticket-queue-status,
.ticket-list-table--admin .ticket-auto-queue {
    width: 100%;
    max-width: none;
}
.ticket-list-table--admin .ticket-queue-status small {
    max-width: 15rem;
    overflow-wrap: normal;
}
.ticket-list-table--admin .ticket-auto-queue__schedule {
    display: grid;
    align-items: start;
    gap: 0.12rem;
    width: 100%;
}
.ticket-list-table--admin .ticket-auto-queue__schedule strong {
    display: block;
    white-space: nowrap;
}
.ticket-list-table--admin .ticket-submitted-cell {
    white-space: nowrap;
}
@media (max-width: 1100px) {
    .ticket-queue-status,
    .ticket-auto-queue { max-width: none; }
    .ticket-queue-status small,
    .ticket-auto-queue__schedule { font-size: 0.7rem; }
}
@media (max-width: 640px) {
    .ticket-queue-status,
    .ticket-auto-queue { gap: 0.3rem; }
    .ticket-auto-queue__schedule strong { display: inline; }
}
/* Analytics workspace and printable record summaries. */
.analytics-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.analytics-tab {
    display: grid;
    gap: 0.22rem;
    min-width: 0;
    padding: 1rem 1.1rem;
    border: 1px solid #d7e1ef;
    border-radius: 15px;
    background: #fff;
    color: #52617e;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(15, 35, 75, 0.05);
}

.analytics-tab strong { color: #102a71; font-size: 1rem; }
.analytics-tab span { font-size: 0.8rem; line-height: 1.45; }
.analytics-tab:hover { border-color: #89a8ef; transform: translateY(-1px); }
.analytics-tab.active {
    border-color: #2454d3;
    background: linear-gradient(135deg, #eef4ff, #fff);
    box-shadow: inset 0 0 0 1px #2454d3, 0 10px 24px rgba(36, 84, 211, 0.1);
}

.report-period-presets {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.8rem;
    color: #5b6984;
    font-size: 0.78rem;
    font-weight: 700;
}

.report-period-presets button {
    padding: 0.38rem 0.65rem;
    border: 1px solid #cbd8ec;
    border-radius: 999px;
    background: #f8fafc;
    color: #18376d;
    font: inherit;
    cursor: pointer;
}

.report-period-presets button:hover { border-color: #2454d3; background: #edf3ff; }
.report-toolbar { align-items: center; justify-content: space-between; }
.report-toolbar-summary { display: grid; gap: 0.1rem; color: #102a71; }
.report-toolbar-summary span { color: #5b6984; font-size: 0.8rem; }
.report-toolbar-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.analytics-note { margin-top: 1.15rem; padding: 0.9rem 1rem; border: 1px solid #dbe5f3; border-radius: 12px; background: #f8fafc; }
.analytics-note strong { color: #102a71; }
.analytics-note p { margin: 0.25rem 0 0; color: #5b6984; font-size: 0.82rem; line-height: 1.5; }

.telecom-hero-actions,
.admin-app-header-actions,
.report-detail-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}
.telecom-hero-actions { margin-top: 1rem; }
.admin-app-header-actions { justify-content: flex-end; }
.report-detail-toolbar { justify-content: space-between; }
.report-detail-sheet { max-width: 1080px; width: 100%; margin-inline: auto; }
.report-detail-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 0;
}
.report-detail-heading h1 { margin: 0.12rem 0 0.35rem; color: #071f4c; font-size: clamp(1.65rem, 3vw, 2.25rem); }
.report-detail-heading p { margin: 0; color: #5b6984; line-height: 1.55; }
.report-detail-status { padding: 0.45rem 0.75rem; border-radius: 999px; background: #e7efff; color: #1748c9; font-size: 0.75rem; font-weight: 800; text-transform: uppercase; }
.report-detail-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; margin-top: 1rem; }
.report-detail-section { break-inside: avoid; padding: 1rem; border: 1px solid #dce5f2; border-radius: 14px; background: #fbfcfe; }
.report-detail-section h2 { margin: 0 0 0.75rem; padding-bottom: 0.55rem; border-bottom: 1px solid #e2e8f0; color: #102a71; font-size: 1rem; }
.report-detail-section dl { display: grid; gap: 0; margin: 0; }
.report-detail-section dl > div { display: grid; grid-template-columns: minmax(120px, 0.75fr) minmax(0, 1.25fr); gap: 0.8rem; padding: 0.52rem 0; border-bottom: 1px solid #edf1f6; }
.report-detail-section dl > div:last-child { border-bottom: 0; }
.report-detail-section dt { color: #5b6984; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; }
.report-detail-section dd { min-width: 0; margin: 0; color: #172b4d; font-size: 0.86rem; font-weight: 700; overflow-wrap: anywhere; }
.report-detail-privacy { margin: 1rem 0 0; padding: 0.75rem; border-radius: 10px; background: #fff8e8; color: #744500; font-size: 0.76rem; line-height: 1.5; }
@media (max-width: 720px) {
    .analytics-tabs,
    .report-detail-sections { grid-template-columns: 1fr; }
    .report-toolbar,
    .report-detail-heading { display: grid; }
    .report-toolbar-actions,
    .report-detail-toolbar,
    .admin-app-header-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
    .report-toolbar-actions .btn,
    .report-detail-toolbar .btn,
    .admin-app-header-actions .btn,
    .telecom-hero-actions .btn { width: 100%; }
    .report-detail-section dl > div { grid-template-columns: 1fr; gap: 0.2rem; }
}

@media print {
    .report-detail-sections { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-detail-privacy { border: 1px solid #e5d6a9; background: #fff; }
}

/* MJJD Analytics dashboard panels. */
.analytics-insight-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr);
    gap: 0.9rem;
    margin-top: 1.1rem;
}
.analytics-insight-card {
    min-width: 0;
    padding: 1rem;
    border: 1px solid #dce5f2;
    border-radius: 14px;
    background: #fff;
    break-inside: avoid;
}
.analytics-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.9rem;
}
.analytics-section-heading h2 { margin: 0; color: #102a71; font-size: 1rem; }
.analytics-section-heading p,
.analytics-section-heading > span { margin: 0.18rem 0 0; color: #6a7892; font-size: 0.74rem; }
.analytics-chart-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.45rem 0.75rem; }
.analytics-chart-legend span { display: inline-flex; align-items: center; gap: 0.3rem; color: #5b6984; font-size: 0.67rem; font-weight: 700; }
.analytics-chart-legend span::before { width: 0.5rem; height: 0.5rem; border-radius: 2px; background: currentColor; content: ''; }
.analytics-chart-legend .is-applications { color: #2454d3; }
.analytics-chart-legend .is-installations { color: #d5a900; }
.analytics-chart-legend .is-tickets { color: #0891b2; }
.analytics-chart-legend .is-customers { color: #16a05d; }
.analytics-trend-scroll { overflow-x: auto; padding: 0.4rem 0 0.2rem; }
.analytics-trend-chart {
    display: grid;
    grid-auto-columns: minmax(64px, 1fr);
    grid-auto-flow: column;
    align-items: end;
    min-width: max(100%, 520px);
    height: 225px;
    padding: 0.6rem 0.4rem 0;
    border-bottom: 1px solid #cfd9e8;
    background: repeating-linear-gradient(to bottom, transparent 0, transparent 49px, #edf1f7 50px);
}
.analytics-trend-month { display: grid; grid-template-rows: 185px auto; align-items: end; gap: 0.4rem; min-width: 0; }
.analytics-trend-month > span { color: #65728b; font-size: 0.64rem; text-align: center; white-space: nowrap; }
.analytics-trend-bars { display: flex; align-items: flex-end; justify-content: center; gap: 3px; height: 100%; }
.analytics-trend-bars i { position: relative; width: min(9px, 18%); min-height: 4px; border-radius: 5px 5px 1px 1px; }
.analytics-trend-bars i b { position: absolute; left: 50%; bottom: calc(100% + 2px); color: #596985; font-size: 0.55rem; font-style: normal; font-weight: 700; transform: translateX(-50%); }
.analytics-trend-bars .is-applications { background: #2454d3; }
.analytics-trend-bars .is-installations { background: #d5a900; }
.analytics-trend-bars .is-tickets { background: #0891b2; }
.analytics-trend-bars .is-customers { background: #16a05d; }
.analytics-pipeline-list { display: grid; gap: 0.9rem; }
.analytics-pipeline-row { display: grid; gap: 0.35rem; }
.analytics-pipeline-row > div:first-child { display: flex; justify-content: space-between; gap: 0.6rem; color: #53627d; font-size: 0.75rem; }
.analytics-pipeline-row strong { color: #102a71; }
.analytics-pipeline-track { overflow: hidden; height: 0.58rem; border-radius: 999px; background: #e8edf5; }
.analytics-pipeline-track i { display: block; height: 100%; min-width: 3px; border-radius: inherit; background: linear-gradient(90deg, #2454d3, #d5a900); }
.analytics-recent-card { margin-top: 0.9rem; }
.analytics-recent-card .report-table-wrap { width: 100%; }
.analytics-recent-table {
    width: 100%;
    min-width: 760px;
    table-layout: fixed;
}
.analytics-recent-table th:nth-child(1),
.analytics-recent-table td:nth-child(1) { width: 12%; }
.analytics-recent-table th:nth-child(2),
.analytics-recent-table td:nth-child(2) { width: 16%; }
.analytics-recent-table th:nth-child(3),
.analytics-recent-table td:nth-child(3) { width: 27%; }
.analytics-recent-table th:nth-child(4),
.analytics-recent-table td:nth-child(4) { width: 16%; }
.analytics-recent-table th:nth-child(5),
.analytics-recent-table td:nth-child(5) { width: 29%; }
.analytics-record-type { display: inline-flex; padding: 0.25rem 0.48rem; border-radius: 999px; background: #eaf0fb; color: #214a9b; font-size: 0.68rem; font-weight: 800; }

@media (max-width: 1000px) {
    .analytics-insight-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .analytics-section-heading { display: grid; }
    .analytics-chart-legend { justify-content: flex-start; }
}

@media screen and (max-width: 640px) {
    .analytics-recent-card {
        padding: 0.85rem;
    }

    .analytics-recent-card .report-table-wrap {
        overflow: visible;
        border: 0;
        background: transparent;
    }

    .analytics-recent-table {
        display: block;
        width: 100%;
        min-width: 0;
        table-layout: auto;
    }

    .analytics-recent-table thead {
        display: none;
    }

    .analytics-recent-table tbody {
        display: grid;
        gap: 0.7rem;
        width: 100%;
    }

    .analytics-recent-table tbody tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "type date"
            "reference reference"
            "record record"
            "status status";
        gap: 0.52rem 0.8rem;
        width: 100%;
        min-width: 0;
        padding: 0.8rem;
        border: 1px solid #dce5f2;
        border-radius: 12px;
        background: #fbfcff;
        box-shadow: 0 5px 14px rgba(15, 35, 75, 0.045);
    }

    .analytics-recent-table tbody td:not([colspan]) {
        width: auto !important;
        min-width: 0;
        padding: 0;
        border: 0;
        background: transparent;
        color: #172b4d;
        font-size: 0.76rem;
        line-height: 1.4;
        overflow-wrap: anywhere;
    }

    .analytics-recent-table tbody td:not([colspan])::before {
        content: attr(data-label);
        color: #73809a;
        font-size: 0.62rem;
        font-weight: 800;
        letter-spacing: 0.055em;
        line-height: 1.3;
        text-transform: uppercase;
    }

    .analytics-recent-table tbody td:nth-child(1) {
        grid-area: type;
        align-self: start;
    }

    .analytics-recent-table tbody td:nth-child(1)::before {
        content: none;
    }

    .analytics-recent-table tbody td:nth-child(2) {
        grid-area: reference;
    }

    .analytics-recent-table tbody td:nth-child(3) {
        grid-area: record;
    }

    .analytics-recent-table tbody td:nth-child(4) {
        grid-area: status;
    }

    .analytics-recent-table tbody td:nth-child(2),
    .analytics-recent-table tbody td:nth-child(3),
    .analytics-recent-table tbody td:nth-child(4) {
        display: grid;
        grid-template-columns: 5.9rem minmax(0, 1fr);
        gap: 0.65rem;
        align-items: baseline;
    }

    .analytics-recent-table tbody td:nth-child(5) {
        grid-area: date;
        display: grid;
        justify-items: end;
        text-align: right;
        white-space: nowrap;
    }

    .analytics-record-type {
        max-width: 100%;
        white-space: nowrap;
    }

    .analytics-recent-table tbody tr:has(td[colspan]) {
        display: block;
    }

    .analytics-recent-table tbody td[colspan] {
        display: block;
        width: 100%;
        padding: 1rem 0.5rem;
        border: 0;
    }

    .report-table-section .report-table-wrap {
        overflow: visible;
        border: 0;
        background: transparent;
    }

    .report-table-section .report-data-table {
        display: block;
        width: 100%;
        min-width: 0;
        table-layout: auto;
    }

    .report-table-section .report-data-table thead {
        display: none;
    }

    .report-table-section .report-data-table tbody {
        display: grid;
        gap: 0.75rem;
        width: 100%;
    }

    .report-table-section .report-data-table tbody tr {
        display: grid;
        width: 100%;
        min-width: 0;
        padding: 0.2rem 0.8rem;
        border: 1px solid #dce5f2;
        border-radius: 12px;
        background: #fbfcff;
        box-shadow: 0 5px 14px rgba(15, 35, 75, 0.045);
    }

    .report-table-section .report-data-table tbody td:not([colspan]) {
        display: grid;
        grid-template-columns: minmax(6.6rem, 0.78fr) minmax(0, 1.22fr);
        align-items: baseline;
        gap: 0.7rem;
        width: auto;
        min-width: 0;
        padding: 0.55rem 0;
        border: 0;
        border-bottom: 1px solid #e6ebf3;
        background: transparent;
        color: #172b4d;
        font-size: 0.76rem;
        line-height: 1.4;
        overflow-wrap: anywhere;
    }

    .report-table-section .report-data-table tbody td:not([colspan])::before {
        content: attr(data-label);
        color: #73809a;
        font-size: 0.62rem;
        font-weight: 800;
        letter-spacing: 0.055em;
        line-height: 1.4;
        text-transform: uppercase;
    }

    .report-table-section .report-data-table tbody td:first-child:not([colspan]) {
        color: #102a71;
        font-weight: 800;
    }

    .report-table-section .report-data-table tbody td:last-child:not([colspan]) {
        border-bottom: 0;
    }

    .report-table-section .report-data-table tbody tr:has(td[colspan]) {
        display: block;
        padding: 0;
    }

    .report-table-section .report-data-table tbody td[colspan] {
        display: block;
        width: 100%;
        padding: 1rem;
        border: 0;
    }
}

@media print {
    .analytics-insight-grid { grid-template-columns: 1.7fr 0.8fr; }
    .analytics-trend-scroll { overflow: visible; }
    .analytics-trend-chart { min-width: 0; height: 190px; }
    .analytics-trend-month { grid-template-rows: 155px auto; }
    .analytics-recent-table { min-width: 0; }
}

/* Admin current-workload dashboard. */
.admin-workload-dashboard { display: grid; gap: 1rem; }
.admin-workload-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; }
.admin-workload-hero > div:first-child { min-width: 0; }
.admin-workload-hero h1 { margin-top: .25rem; }
.admin-workload-hero p { max-width: 760px; }
.admin-workload-eyebrow { color: #2c59c8; font-size: .7rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.telecom-hero .admin-workload-eyebrow { color: #9fc0ff; }
.admin-workload-toolbar,
.admin-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.admin-workload-toolbar { padding: 1rem 1.1rem; border: 1px solid #d6e0ee; border-radius: 16px; background: rgba(255, 255, 255, .94); box-shadow: 0 10px 30px rgba(25, 47, 83, .06); }
.admin-workload-toolbar h2,
.admin-section-heading h2 { margin: .18rem 0 0; color: #071f4c; font-size: 1.05rem; }
.admin-workload-toolbar p,
.admin-section-heading p { margin: .24rem 0 0; color: #65728b; font-size: .78rem; line-height: 1.45; }
.admin-workload-periods { display: inline-flex; gap: .35rem; padding: .3rem; border: 1px solid #d8e2f0; border-radius: 999px; background: #f5f8fc; }
.admin-workload-periods a { padding: .52rem .8rem; border-radius: 999px; color: #53627c; font-size: .76rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.admin-workload-periods a:hover { color: #123d9a; background: #e8effc; }
.admin-workload-periods a.is-active { color: #fff; background: #1948bd; box-shadow: 0 5px 14px rgba(25, 72, 189, .25); }
.admin-attention-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.admin-section-heading--full { grid-column: 1 / -1; padding: .15rem .15rem .25rem; }
.admin-attention-card { position: relative; display: grid; min-width: 0; min-height: 144px; padding: 1rem; overflow: hidden; border: 1px solid #d9e3f1; border-radius: 15px; background: #fff; box-shadow: 0 9px 25px rgba(25, 47, 83, .055); color: #52617a; text-decoration: none; }
.admin-attention-card::before { position: absolute; inset: 0 auto 0 0; width: 4px; background: #2b59c3; content: ''; }
.admin-attention-card > span { color: #586680; font-size: .72rem; font-weight: 850; text-transform: uppercase; }
.admin-attention-card > strong { margin-top: .3rem; color: #071f4c; font-size: 1.8rem; line-height: 1; font-variant-numeric: tabular-nums; }
.admin-attention-card > small { margin-top: .38rem; color: #6a7890; font-size: .72rem; line-height: 1.35; }
.admin-attention-card > em { align-self: end; margin-top: .6rem; color: #214eb3; font-size: .72rem; font-style: normal; font-weight: 800; }
.admin-attention-card:hover { border-color: #aac0ec; transform: translateY(-1px); box-shadow: 0 13px 28px rgba(25, 47, 83, .09); }
.admin-attention-card.is-info::before { background: #0891b2; }
.admin-attention-card.is-warning::before { background: #d59f00; }
.admin-attention-card.is-danger::before { background: #dc3545; }
.admin-attention-card.is-neutral::before { background: #64748b; }
.admin-workload-main-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }
.admin-workload-dashboard .panel-card { min-width: 0; padding: 1rem; }
.admin-section-heading { margin-bottom: .9rem; }
.admin-section-heading > div { min-width: 0; }
.admin-section-heading .btn { flex-shrink: 0; }
.admin-schedule-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; margin-bottom: .8rem; }
.admin-schedule-summary span { display: flex; align-items: baseline; gap: .35rem; padding: .65rem .75rem; border-radius: 11px; background: #f3f6fb; color: #64718a; font-size: .72rem; }
.admin-schedule-summary strong { color: #102a71; font-size: 1rem; font-variant-numeric: tabular-nums; }
.admin-schedule-list { display: grid; gap: .5rem; max-height: 560px; overflow-y: auto; padding-right: .2rem; scrollbar-width: thin; }
.admin-schedule-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) minmax(180px, .72fr); align-items: center; gap: .8rem; padding: .72rem; border: 1px solid #e0e7f1; border-radius: 13px; color: #172b4d; text-decoration: none; }
.admin-schedule-item:hover { border-color: #9fb8ea; background: #f8faff; }
.admin-schedule-item > time { display: grid; align-content: center; min-height: 54px; padding: .45rem; border-radius: 10px; background: #edf3ff; color: #214bad; text-align: center; }
.admin-schedule-item > time strong { font-size: .7rem; text-transform: uppercase; }
.admin-schedule-item > time span { margin-top: .08rem; font-size: .84rem; font-weight: 850; }
.admin-schedule-copy,
.admin-schedule-assignment { display: grid; min-width: 0; gap: .18rem; }
.admin-schedule-title { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; }
.admin-schedule-copy > span,
.admin-schedule-assignment > strong { color: #172b4d; font-size: .82rem; font-weight: 750; }
.admin-schedule-copy small,
.admin-schedule-assignment span,
.admin-schedule-assignment small { color: #69768e; font-size: .71rem; overflow-wrap: anywhere; }
.admin-schedule-assignment { padding-left: .8rem; border-left: 1px solid #e4e9f1; }
.admin-status-pill { display: inline-flex; width: max-content; max-width: 100%; padding: .26rem .48rem; border-radius: 999px; background: #e7efff; color: #2352bf; font-size: .62rem; font-weight: 900; letter-spacing: .035em; line-height: 1.2; text-transform: uppercase; }
.admin-status-pill.is-in_progress,
.admin-status-pill.is-info { background: #dff5fa; color: #08728b; }
.admin-status-pill.is-completed,
.admin-status-pill.is-activated,
.admin-status-pill.is-success { background: #dcf5e6; color: #147a42; }
.admin-status-pill.is-reschedule_required,
.admin-status-pill.is-warning { background: #fff0d5; color: #a85a00; }
.admin-status-pill.is-danger { background: #ffe1e3; color: #b51f2e; }
.admin-status-pill.is-muted { background: #e9edf3; color: #566176; }
.admin-list-footer { display: block; margin-top: .7rem; padding: .72rem; border-radius: 10px; background: #f3f6fb; color: #214dad; font-size: .76rem; font-weight: 800; text-align: center; text-decoration: none; }
.admin-ticket-queue { display: grid; gap: .55rem; }
.admin-ticket-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: .65rem; padding: .75rem; border: 1px solid #dfe6f0; border-radius: 12px; color: #172b4d; text-decoration: none; }
.admin-ticket-row:hover { border-color: #9fb8ea; background: #f8faff; }
.admin-ticket-count { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: #e8efff; color: #1d4bb8; font-size: 1rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.admin-ticket-row > span:nth-child(2) { display: grid; min-width: 0; gap: .16rem; }
.admin-ticket-row strong { font-size: .78rem; }
.admin-ticket-row small { color: #6d7990; font-size: .68rem; line-height: 1.35; }
.admin-ticket-row.is-warning .admin-ticket-count { background: #fff0d4; color: #9d5900; }
.admin-ticket-row.is-info .admin-ticket-count { background: #dff5fa; color: #08728b; }
.admin-ticket-row.is-danger .admin-ticket-count { background: #ffe1e3; color: #b51f2e; }
.admin-ticket-view-all { width: 100%; margin-top: .8rem; text-align: center; }
.admin-technician-list,
.admin-activity-list { display: grid; gap: .5rem; }
.admin-technician-list { max-height: 530px; overflow-y: auto; padding-right: .2rem; scrollbar-width: thin; }
.admin-technician-row { display: grid; grid-template-columns: 48px minmax(170px, 1.25fr) minmax(155px, 1fr) minmax(86px, .5fr) minmax(190px, 1.25fr) auto; align-items: center; gap: .75rem; padding: .72rem; border: 1px solid #e0e7f1; border-radius: 13px; color: #172b4d; text-decoration: none; }
.admin-technician-row:hover { border-color: #9fb8ea; background: #f8faff; }
.admin-technician-avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #e4edff; color: #173f9d; font-size: .82rem; font-weight: 900; }
.admin-technician-identity,
.admin-technician-load,
.admin-technician-tickets,
.admin-technician-next { display: grid; min-width: 0; gap: .2rem; }
.admin-technician-row strong { font-size: .78rem; overflow-wrap: anywhere; }
.admin-technician-row small { color: #6a7790; font-size: .67rem; line-height: 1.35; overflow-wrap: anywhere; }
.admin-technician-identity .admin-status-pill { margin-top: .18rem; }
.admin-technician-load > span:first-child { color: #53617a; font-size: .69rem; }
.admin-load-track { overflow: hidden; width: 100%; height: 6px; border-radius: 999px; background: #e6ebf3; }
.admin-load-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2454d3, #d8ae00); }
.admin-technician-load small { font-weight: 850; }
.admin-technician-load small.is-success { color: #168047; }
.admin-technician-load small.is-warning { color: #a86100; }
.admin-technician-load small.is-danger { color: #bd2635; }
.admin-technician-load small.is-muted { color: #69758b; }
.admin-row-arrow { color: #2454d3; font-weight: 900; }
.admin-activity-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) minmax(170px, auto); align-items: start; gap: .7rem; padding: .72rem .2rem; border-bottom: 1px solid #e8edf4; }
.admin-activity-row:last-child { border-bottom: 0; }
.admin-activity-dot { width: 8px; height: 8px; margin-top: .3rem; border-radius: 50%; background: #2d5bd0; box-shadow: 0 0 0 4px #e8efff; }
.admin-activity-row > span:nth-child(2),
.admin-activity-meta { display: grid; min-width: 0; gap: .2rem; }
.admin-activity-row strong { color: #172b4d; font-size: .76rem; }
.admin-activity-row small,
.admin-activity-row time { color: #6a7790; font-size: .68rem; line-height: 1.4; overflow-wrap: anywhere; }
.admin-activity-meta { text-align: right; }
.admin-empty-state { padding: 1.25rem; border: 1px dashed #cbd7e8; border-radius: 12px; background: #f8fafc; text-align: center; }
.admin-empty-state strong { color: #172b4d; }
.admin-empty-state p { margin: .35rem 0 0; color: #6a7790; font-size: .75rem; line-height: 1.45; }

@media (max-width: 1180px) {
    .admin-attention-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .admin-workload-main-grid { grid-template-columns: 1fr; }
    .admin-technician-row { grid-template-columns: 48px minmax(180px, 1.2fr) minmax(150px, 1fr) minmax(80px, .55fr) minmax(170px, 1fr) auto; }
}

@media (max-width: 900px) {
    .admin-workload-hero,
    .admin-workload-toolbar { align-items: stretch; display: grid; }
    .admin-workload-periods { width: 100%; border-radius: 13px; }
    .admin-workload-periods a { flex: 1 1 0; text-align: center; }
    .admin-technician-row { grid-template-columns: 44px minmax(0, 1fr) auto; align-items: start; }
    .admin-technician-load,
    .admin-technician-tickets,
    .admin-technician-next { grid-column: 2 / -1; padding-top: .45rem; border-top: 1px solid #e6ebf2; }
    .admin-row-arrow { grid-column: 3; grid-row: 1; }
}

@media (max-width: 700px) {
    .admin-attention-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-section-heading { align-items: stretch; display: grid; }
    .admin-section-heading .btn { width: 100%; }
    .admin-schedule-summary { grid-template-columns: 1fr; }
    .admin-schedule-item { grid-template-columns: 56px minmax(0, 1fr); align-items: start; }
    .admin-schedule-assignment { grid-column: 2; padding: .55rem 0 0; border-top: 1px solid #e4e9f1; border-left: 0; }
    .admin-activity-row { grid-template-columns: 10px minmax(0, 1fr); }
    .admin-activity-meta { grid-column: 2; text-align: left; }
}

@media (max-width: 480px) {
    .admin-attention-grid { grid-template-columns: 1fr; }
    .admin-workload-periods { display: grid; grid-template-columns: 1fr; border-radius: 14px; }
    .admin-attention-card { min-height: 126px; }
    .admin-schedule-item { grid-template-columns: 1fr; }
    .admin-schedule-item > time { display: flex; justify-content: space-between; min-height: 0; }
    .admin-schedule-assignment { grid-column: 1; }
}


/* Production System Logs audit workspace */
.system-log-page {
    display: grid;
    gap: 20px;
    color: #071c43;
}

.system-log-hero {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    min-height: 150px;
    padding: clamp(24px, 3vw, 38px);
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 88% 18%, rgba(255, 208, 0, .22), transparent 24%),
        linear-gradient(130deg, #071936 0%, #0d2b62 58%, #17449a 100%);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 24px;
    box-shadow: 0 18px 48px rgba(3, 20, 52, .18);
}

.system-log-hero::after {
    position: absolute;
    right: -74px;
    bottom: -125px;
    z-index: -1;
    width: 300px;
    height: 300px;
    content: "";
    border: 44px solid rgba(255, 255, 255, .045);
    border-radius: 50%;
}

.system-log-hero__icon {
    display: grid;
    width: 64px;
    height: 64px;
    color: #ffd51b;
    place-items: center;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 18px;
}

.system-log-hero__icon svg {
    width: 31px;
    height: 31px;
}

.system-log-kicker {
    display: block;
    margin-bottom: 5px;
    color: #2456c8;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .11em;
    line-height: 1.3;
    text-transform: uppercase;
}

.system-log-hero .system-log-kicker {
    color: #8eb5ff;
}

.system-log-hero h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(29px, 3vw, 42px);
    line-height: 1.05;
}

.system-log-hero p {
    max-width: 760px;
    margin: 9px 0 0;
    color: rgba(255, 255, 255, .76);
    font-size: 16px;
    line-height: 1.55;
}

.system-log-hero__meta {
    display: grid;
    justify-items: end;
    gap: 8px;
    text-align: right;
}

.system-log-hero__meta small {
    color: rgba(255, 255, 255, .65);
}

.system-log-readonly {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    color: #fff;
    font-size: 13px;
    font-weight: 750;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 999px;
}

.system-log-readonly > span {
    width: 8px;
    height: 8px;
    background: #47dc8b;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(71, 220, 139, .13);
}

.system-log-page .panel {
    margin: 0;
}

.system-log-filter-panel,
.system-log-records {
    padding: clamp(20px, 2.4vw, 30px);
    background: #fff;
    border: 1px solid #d8e2f2;
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(15, 43, 83, .065);
}

.system-log-section-head,
.system-log-records__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.system-log-section-head {
    padding-bottom: 20px;
    border-bottom: 1px solid #e4eaf3;
}

.system-log-section-head h2,
.system-log-records__head h2 {
    margin: 0;
    color: #071c43;
    font-size: clamp(20px, 2vw, 25px);
}

.system-log-section-head p,
.system-log-records__head p {
    margin: 6px 0 0;
    color: #697690;
    line-height: 1.5;
}

.system-log-periods {
    display: inline-flex;
    flex-shrink: 0;
    gap: 4px;
    padding: 4px;
    background: #eff3f9;
    border: 1px solid #e0e7f1;
    border-radius: 12px;
}

.system-log-periods a {
    padding: 8px 11px;
    color: #53617c;
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
    border-radius: 8px;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.system-log-periods a:hover {
    color: #123b93;
    background: rgba(255, 255, 255, .72);
}

.system-log-periods a.is-active {
    color: #fff;
    background: #1748bc;
    box-shadow: 0 3px 9px rgba(23, 72, 188, .2);
}

.system-log-filter-form {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 16px;
    margin-top: 22px;
}

.system-log-field {
    display: grid;
    grid-column: span 2;
    align-content: start;
    gap: 8px;
    min-width: 0;
}

.system-log-field--search {
    grid-column: span 4;
}

.system-log-field--action {
    grid-column: span 3;
}

.system-log-field > span:first-child {
    color: #34425f;
    font-size: 13px;
    font-weight: 750;
}

.system-log-field input,
.system-log-field select {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    color: #102447;
    font: inherit;
    background: #fbfcff;
    border: 1px solid #cfd9e9;
    border-radius: 12px;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.system-log-field input:hover,
.system-log-field select:hover {
    border-color: #aebddb;
}

.system-log-field input:focus,
.system-log-field select:focus {
    background: #fff;
    border-color: #3972ed;
    box-shadow: 0 0 0 4px rgba(57, 114, 237, .13);
}

.system-log-search-control {
    position: relative;
    display: block;
}

.system-log-search-control svg {
    position: absolute;
    top: 50%;
    left: 14px;
    width: 19px;
    height: 19px;
    color: #75829a;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    transform: translateY(-50%);
    pointer-events: none;
}

.system-log-search-control input {
    padding-left: 43px;
}

.system-log-filter-actions {
    display: flex;
    grid-column: span 3;
    align-items: end;
    gap: 9px;
}

.system-log-filter-actions .btn {
    min-height: 48px;
    white-space: nowrap;
}

.system-log-filter-actions .btn:first-child {
    flex: 1;
}

.system-log-active-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding-top: 17px;
    border-top: 1px solid #e8edf5;
}

.system-log-active-filters__label {
    flex-shrink: 0;
    color: #5e6c86;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.system-log-active-filters > div {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    gap: 7px;
}

.system-log-active-filters > div a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    color: #17449a;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    background: #edf3ff;
    border: 1px solid #cbdcff;
    border-radius: 999px;
}

.system-log-active-filters > div a span {
    font-size: 16px;
    line-height: 1;
}

.system-log-clear {
    flex-shrink: 0;
    color: #a43c3c;
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
}

.system-log-records__head {
    align-items: center;
    margin-bottom: 20px;
}

.system-log-page-count {
    flex-shrink: 0;
    padding: 8px 12px;
    color: #405170;
    font-size: 13px;
    font-weight: 750;
    background: #f0f3f8;
    border: 1px solid #dfe6f0;
    border-radius: 999px;
}

.system-log-table-wrap {
    overflow-x: auto;
    border: 1px solid #dce4ef;
    border-radius: 16px;
    outline: none;
}

.system-log-table-wrap:focus-visible {
    box-shadow: 0 0 0 4px rgba(57, 114, 237, .13);
}

.system-log-table {
    min-width: 890px;
    margin: 0;
    border: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.system-log-table th {
    padding: 14px 18px;
    color: #52617e;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .085em;
    text-transform: uppercase;
    background: #f4f7fb;
    border-bottom: 1px solid #dce4ef;
}

.system-log-table th:nth-child(1) { width: 24%; }
.system-log-table th:nth-child(2) { width: 23%; }
.system-log-table th:nth-child(3) { width: 37%; }
.system-log-table th:nth-child(4) { width: 16%; }

.system-log-table td {
    padding: 17px 18px;
    color: #263756;
    vertical-align: middle;
    background: #fff;
    border-bottom: 1px solid #e4eaf3;
}

.system-log-table tbody tr:last-child td {
    border-bottom: 0;
}

.system-log-table tbody tr:hover td {
    background: #fbfcff;
}

.system-log-event {
    display: grid;
    justify-items: start;
    gap: 5px;
}

.system-log-event strong,
.system-log-actor strong {
    color: #0b2249;
    font-size: 14px;
    line-height: 1.35;
}

.system-log-event small,
.system-log-actor small,
.system-log-time small {
    color: #7a879e;
    font-size: 12px;
}

.system-log-module {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 8px;
    color: #30517c;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .055em;
    line-height: 1;
    text-transform: uppercase;
    background: #edf2f8;
    border-radius: 999px;
}

.system-log-module--application { color: #194cae; background: #e8f0ff; }
.system-log-module--installation { color: #876600; background: #fff4c4; }
.system-log-module--ticket { color: #b14c11; background: #fff0dc; }
.system-log-module--chat { color: #08734e; background: #e2f8ed; }
.system-log-module--account { color: #6741a5; background: #f0e9ff; }
.system-log-module--system { color: #3f4b60; background: #e9edf3; }

.system-log-actor {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.system-log-actor > span:last-child {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.system-log-actor strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.system-log-avatar {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    color: #1648ad;
    font-size: 12px;
    font-weight: 850;
    place-items: center;
    background: #e6efff;
    border: 1px solid #ceddff;
    border-radius: 12px;
}

.system-log-description-text {
    margin: 0;
    color: #3f4f6d;
    font-size: 14px;
    line-height: 1.55;
}

.system-log-description {
    color: #3f4f6d;
    font-size: 14px;
    line-height: 1.55;
}

.system-log-description summary {
    cursor: pointer;
}

.system-log-description summary > span:last-child {
    display: inline-block;
    margin-top: 5px;
    color: #2456c8;
    font-size: 12px;
    font-weight: 750;
}

.system-log-description__full {
    display: block;
    margin-top: 9px;
    padding: 10px 12px;
    color: #34425e;
    background: #f6f8fc;
    border-radius: 9px;
}

.system-log-time {
    display: grid;
    gap: 2px;
    white-space: nowrap;
}

.system-log-time strong {
    color: #0b2249;
    font-size: 13px;
}

.system-log-time span {
    color: #50607d;
    font-size: 13px;
}

.system-log-empty {
    display: grid;
    justify-items: center;
    max-width: 460px;
    margin: 20px auto;
    padding: 38px 20px;
    text-align: center;
}

.system-log-empty > span {
    display: grid;
    width: 58px;
    height: 58px;
    margin-bottom: 14px;
    color: #3869dc;
    place-items: center;
    background: #edf3ff;
    border-radius: 18px;
}

.system-log-empty svg {
    width: 28px;
    height: 28px;
}

.system-log-empty h3 {
    margin: 0;
    color: #0b2249;
    font-size: 19px;
}

.system-log-empty p {
    margin: 7px 0 18px;
    color: #697690;
}

@media (max-width: 1100px) {

    .system-log-field--search {
        grid-column: span 6;
    }

    .system-log-field,
    .system-log-field--action {
        grid-column: span 3;
    }

    .system-log-filter-actions {
        grid-column: span 6;
    }
}

@media (max-width: 767px) {
    .system-log-page {
        gap: 14px;
    }

    .system-log-hero {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 14px;
        min-height: auto;
        padding: 22px 18px;
        border-radius: 18px;
    }

    .system-log-hero__icon {
        width: 52px;
        height: 52px;
        border-radius: 15px;
    }

    .system-log-hero__meta {
        grid-column: 1 / -1;
        align-items: center;
        justify-items: start;
        padding-top: 14px;
        text-align: left;
        border-top: 1px solid rgba(255, 255, 255, .12);
    }

    .system-log-hero p {
        font-size: 14px;
    }


    .system-log-filter-panel,
    .system-log-records {
        padding: 18px;
        border-radius: 18px;
    }

    .system-log-section-head {
        display: grid;
        gap: 16px;
    }

    .system-log-periods {
        width: 100%;
        overflow-x: auto;
    }

    .system-log-periods a {
        flex: 1 0 auto;
        text-align: center;
    }

    .system-log-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 13px;
    }

    .system-log-field,
    .system-log-field--search,
    .system-log-field--action,
    .system-log-filter-actions {
        grid-column: span 1;
    }

    .system-log-field--search,
    .system-log-field--action,
    .system-log-filter-actions {
        grid-column: 1 / -1;
    }

    .system-log-active-filters {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .system-log-active-filters > div {
        flex-basis: 100%;
        order: 3;
    }

    .system-log-clear {
        margin-left: auto;
    }

    .system-log-records__head {
        align-items: flex-start;
    }

    .system-log-table-wrap {
        overflow: visible;
        border: 0;
    }

    .system-log-table {
        min-width: 0;
    }

    .system-log-table tbody tr {
        position: relative;
        overflow: hidden;
        border: 1px solid #dce4ef;
        border-radius: 15px;
        box-shadow: 0 5px 15px rgba(15, 43, 83, .045);
    }

    .system-log-table tbody tr::before {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        width: 4px;
        content: "";
        background: #9ab0d4;
    }

    .system-log-table tbody tr[data-log-module="application"]::before { background: #2f67d8; }
    .system-log-table tbody tr[data-log-module="installation"]::before { background: #d7ad00; }
    .system-log-table tbody tr[data-log-module="ticket"]::before { background: #e3782b; }
    .system-log-table tbody tr[data-log-module="chat"]::before { background: #18a36e; }
    .system-log-table tbody tr[data-log-module="account"]::before { background: #7952b3; }

    .system-log-table tbody tr + tr {
        margin-top: 10px;
    }

    .system-log-table td {
        padding-left: 18px;
        background: #fff;
    }

    .system-log-table td::before {
        color: #697690;
        font-size: 10px;
        font-weight: 850;
        letter-spacing: .07em;
        text-transform: uppercase;
    }

    .system-log-table tbody tr:hover td {
        background: #fff;
    }

    .system-log-actor strong {
        white-space: normal;
    }

    .system-log-time {
        white-space: normal;
    }
}

@media (max-width: 420px) {
    .system-log-hero {
        grid-template-columns: 1fr;
    }

    .system-log-hero__icon {
        width: 46px;
        height: 46px;
    }


    .system-log-filter-form {
        grid-template-columns: 1fr;
    }

    .system-log-field,
    .system-log-field--search,
    .system-log-field--action,
    .system-log-filter-actions {
        grid-column: 1;
    }

    .system-log-filter-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .system-log-filter-actions .btn {
        width: 100%;
    }

    .system-log-records__head {
        display: grid;
        gap: 12px;
    }

    .system-log-page-count {
        justify-self: start;
    }
}


/* Shared date-range control keeps From and To together in every filter layout. */
.filter-date-range {
    display: grid;
    min-width: 0;
    gap: 0.4rem;
}
.filter-date-range__label {
    color: var(--color-text-muted);
    font-size: 0.84rem;
    font-weight: 700;
}
.filter-date-range__fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}
.filter-date-range :is(.toolbar-field, .system-log-field, .report-filter-field) {
    width: 100%;
    min-width: 0;
}
.filter-date-range .system-log-field {
    grid-column: auto;
}
.filter-date-range .toolbar-field label,
.filter-date-range .system-log-field > span:first-child,
.filter-date-range .report-filter-field {
    font-size: 0.75rem;
}
.toolbar-row > .filter-date-range {
    flex: 2 1 390px;
}
.installation-filter-toolbar > .filter-date-range,
.ticket-filter-toolbar--admin > .filter-date-range,
.report-date-range {
    grid-column: span 2;
}
.system-log-date-range {
    grid-column: span 4;
}

/* Applications workflow filter layout. */
.application-filter-toolbar {
    grid-template-columns: minmax(22rem, 2fr) repeat(2, minmax(12rem, 1fr));
}
.application-filter-toolbar .toolbar-actions {
    justify-content: flex-start;
}
.badge.reschedule {
    background: #fff3cd;
    color: #9a6700;
}
@media (max-width: 1100px) and (min-width: 768px) {
    .application-filter-toolbar {
        grid-template-columns: minmax(0, 1.5fr) minmax(12rem, 1fr);
    }
    .application-filter-toolbar .ticket-filter-search,
    .application-date-range {
        grid-column: 1 / -1;
    }
    .system-log-date-range {
        grid-column: span 6;
    }
    .application-filter-toolbar .toolbar-actions {
        grid-column: auto;
        justify-content: flex-start;
    }
}
@media (max-width: 767px) {
    body.layout .mobile-filter__body .application-filter-toolbar,
    .application-filter-toolbar {
        grid-template-columns: minmax(0, 1fr);
    }
    .ticket-filter-toolbar--admin > .filter-date-range,
    .system-log-date-range,
    .report-date-range {
        grid-column: 1 / -1;
    }
}
@media (max-width: 520px) {
    .filter-date-range__fields {
        grid-template-columns: minmax(0, 1fr);
    }
    .report-date-range,
    .system-log-date-range {
        grid-column: 1 / -1;
    }
}

/* Production report builder, scope confirmation, and comparison cards. */
.report-filter-form {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    align-items: end;
}
.report-filter-form .report-filter-field {
    min-width: 0;
}
.report-filter-form .report-filter-field[hidden] {
    display: none !important;
}
.report-period-guidance {
    grid-column: 1 / -1;
    margin: -0.15rem 0 0;
    color: var(--color-text-muted);
    font-size: 0.82rem;
    line-height: 1.45;
}
.report-builder-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 2.8rem;
}
.report-builder-actions .btn {
    min-height: 2.8rem;
    white-space: nowrap;
}
.report-scope {
    display: grid;
    grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
    gap: 1rem;
    align-items: center;
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid #cddbef;
    border-radius: 13px;
    background: linear-gradient(135deg, #f4f8ff, #fff);
}
.report-scope h2 {
    margin: 0.15rem 0 0.18rem;
    color: #102a71;
    font-size: 1rem;
}
.report-scope p {
    margin: 0;
    color: #64718a;
    font-size: 0.74rem;
}
.report-scope-eyebrow {
    color: #2454d3;
    font-size: 0.64rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.report-scope-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}
.report-scope-filters > span {
    display: grid;
    gap: 0.12rem;
    max-width: 100%;
    padding: 0.48rem 0.65rem;
    border: 1px solid #d8e2f1;
    border-radius: 9px;
    background: #fff;
}
.report-scope-filters small {
    color: #748099;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.report-scope-filters strong {
    color: #172b4d;
    font-size: 0.72rem;
    overflow-wrap: anywhere;
}
.report-comparison-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
}
.report-comparison-heading > div {
    display: grid;
    gap: 0.12rem;
}
.report-comparison-heading strong {
    color: #102a71;
    font-size: 0.92rem;
}
.report-comparison-heading span,
.report-comparison-heading > small {
    color: #6b7891;
    font-size: 0.7rem;
}
.report-summary-grid .report-summary-card {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
    padding: 0.75rem;
    border: 1px solid #dce5f2;
    border-radius: 12px;
    background: #f8fafc;
    color: inherit;
    text-decoration: none;
}
.report-summary-grid .report-summary-card.is-clickable {
    position: relative;
    padding-right: 1.8rem;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.report-summary-grid .report-summary-card.is-clickable::after {
    position: absolute;
    top: 0.8rem;
    right: 0.7rem;
    color: #2454d3;
    font-size: 1rem;
    font-weight: 900;
    content: ">";
}
.report-summary-grid .report-summary-card.is-clickable:hover,
.report-summary-grid .report-summary-card.is-clickable:focus-visible {
    border-color: #8ca9e8;
    background: #f5f8ff;
    box-shadow: 0 8px 18px rgba(31, 75, 174, 0.1);
    transform: translateY(-1px);
}
.report-comparison {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: baseline;
    color: #65728a;
    font-size: 0.63rem;
    font-weight: 800;
}
.report-comparison em {
    color: #7b879b;
    font-style: normal;
    font-weight: 600;
}
.report-comparison.is-up { color: #168047; }
.report-comparison.is-down { color: #a45f00; }
.report-preview-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    min-height: 260px;
    padding: 2rem;
    text-align: left;
}
.report-preview-empty__icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: #e8efff;
    color: #2454d3;
    font-size: 1.25rem;
    font-weight: 900;
}
.report-preview-empty h2 {
    margin: 0 0 0.35rem;
    color: #102a71;
    font-size: 1.08rem;
}
.report-preview-empty p {
    max-width: 620px;
    margin: 0;
    color: #65728a;
    font-size: 0.82rem;
    line-height: 1.55;
}
@media (max-width: 900px) {
    .report-filter-form .report-filter-field:first-of-type,
    .report-filter-form .btn {
        grid-column: auto;
    }
    .report-scope {
        grid-template-columns: 1fr;
    }
    .report-scope-filters {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .report-builder-actions,
    .report-comparison-heading,
    .report-preview-empty {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }
    .report-builder-actions .btn,
    .report-builder-actions a {
        width: 100%;
    }
    .report-preview-empty {
        justify-items: center;
        text-align: center;
    }
    .report-summary-grid {
        grid-template-columns: 1fr;
    }
    .report-scope-filters > span {
        width: 100%;
    }
}

@media print {
    .report-summary-grid .report-summary-card.is-clickable {
        padding-right: 0.75rem;
        color: inherit;
    }
    .report-summary-grid .report-summary-card.is-clickable::after {
        display: none;
    }
    .report-summary-grid .report-summary-card.is-clickable,
    .report-summary-grid .report-summary-card.is-clickable:hover {
        box-shadow: none;
        transform: none;
    }
    .report-scope {
        border-color: #cbd5e1;
        background: #fff;
        break-inside: avoid;
    }
    .report-scope-filters > span {
        border-color: #d5dce7;
    }
}
