:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-2: #f0f3f9;
    --surface-3: #e8edf5;
    --border: #e2e8f0;
    --border-2: #cbd5e1;
    --text: #1e293b;
    --text-muted: #64748b;
    --text-soft: #94a3b8;
    --primary: #2563eb;
    --primary-hov: #1d4ed8;
    --primary-soft: #eff6ff;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.1), 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 10px 30px rgba(15, 23, 42, 0.12);
    --radius: 10px;
    --radius-sm: 7px;
    --green-bg: #dcfce7;
    --green-fg: #15803d;
    --yellow-bg: #fef3c7;
    --yellow-fg: #b45309;
    --red-bg: #fee2e2;
    --red-fg: #b91c1c;
    --blue-bg: #dbeafe;
    --blue-fg: #1d4ed8;
    --gray-bg: #eef2f7;
    --gray-fg: #475569;
    --orange-bg: #ffedd5;
    --orange-fg: #c2410c;
}
[data-theme="dark"] {
    --bg: #0d1424;
    --surface: #161f33;
    --surface-2: #1d293f;
    --surface-3: #243048;
    --border: #2a3650;
    --border-2: #364667;
    --text: #e8eef9;
    --text-muted: #93a3c0;
    --text-soft: #6b7c9c;
    --primary: #4f8bff;
    --primary-hov: #6b9dff;
    --primary-soft: #1a2740;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 34px rgba(0, 0, 0, 0.5);
    --green-bg: rgba(34, 197, 94, 0.16);
    --green-fg: #4ade80;
    --yellow-bg: rgba(234, 179, 8, 0.16);
    --yellow-fg: #fbbf24;
    --red-bg: rgba(239, 68, 68, 0.16);
    --red-fg: #f87171;
    --blue-bg: rgba(59, 130, 246, 0.18);
    --blue-fg: #7cb0ff;
    --gray-bg: rgba(148, 163, 184, 0.14);
    --gray-fg: #aab8d0;
    --orange-bg: rgba(249, 115, 22, 0.16);
    --orange-fg: #fb923c;
}

* {
    box-sizing: border-box;
}
html,
body {
    height: 100%;
}
body {
    margin: 0;
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
        sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3 {
    margin: 0;
}
a {
    color: inherit;
    text-decoration: none;
}
button {
    font-family: inherit;
}

/* ===== TOPBAR ===== */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 58px;
    padding: 0 20px;
    flex-shrink: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.topbar-brand {
    display: flex;
    align-items: center;
    gap: 11px;
}
.topbar-logo {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.5px;
}
.topbar-title {
    font-weight: 700;
    font-size: 15px;
}
.topbar-sub {
    font-size: 12px;
    color: var(--text-soft);
    margin-left: 2px;
}
.topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}
.topbar-user {
    font-size: 13px;
    color: var(--text-muted);
}
.topbar-user strong {
    color: var(--text);
    font-weight: 600;
}
.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.icon-btn:hover {
    background: var(--surface-3);
    color: var(--text);
}
.link-btn {
    background: none;
    border: none;
    color: var(--text-soft);
    cursor: pointer;
    font-size: 12.5px;
    padding: 6px;
}
.link-btn:hover {
    color: var(--red-fg);
}

/* ===== LAYOUT ===== */
.layout {
    display: flex;
    flex: 1;
    min-height: 0;
}
.sidebar {
    width: 224px;
    flex-shrink: 0;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 12px 12px;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
    transition: all 0.13s;
    user-select: none;
}
.nav-item:hover {
    background: var(--surface-2);
    color: var(--text);
}
.nav-item.active {
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 600;
}
.nav-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.nav-count {
    margin-left: auto;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 19px;
    padding: 0 6px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--red-bg);
    color: var(--red-fg);
}
.nav-count.gray {
    background: var(--gray-bg);
    color: var(--gray-fg);
}
.sidebar-foot {
    margin-top: auto;
    padding: 10px 12px 4px;
    border-top: 1px solid var(--border);
}
.sidebar-foot .role {
    font-size: 12px;
    color: var(--text-soft);
}

.main {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}
.main-inner {
    max-width: 1500px;
    margin: 0 auto;
}

.section {
    display: none;
}
.section.active {
    display: block;
}
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.section-title {
    font-size: 20px;
    font-weight: 700;
}
.section-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ===== CARDS / TABLE ===== */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.card-head {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 14px;
}
.table-wrap {
    overflow-x: auto;
}
table.tbl {
    width: 100%;
    border-collapse: collapse;
}
table.tbl th {
    text-align: left;
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-soft);
    padding: 11px 16px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
table.tbl td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
table.tbl tr:last-child td {
    border-bottom: none;
}
table.tbl tbody tr {
    transition: background 0.12s;
}
table.tbl tbody tr:hover td {
    background: var(--surface-2);
}
.t-strong {
    font-weight: 600;
    color: var(--text);
}
.t-sub {
    font-size: 12px;
    color: var(--text-soft);
    margin-top: 1px;
}
.t-mono {
    font-variant-numeric: tabular-nums;
    color: var(--text-soft);
}
.empty {
    text-align: center;
    color: var(--text-soft);
    padding: 36px 16px;
    font-size: 13.5px;
}

/* ===== STATS ===== */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}
.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: var(--shadow-sm);
}
.stat-val {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.stat-lbl {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-top: 4px;
}
.stat.accent-blue .stat-val {
    color: var(--primary);
}
.stat.accent-yellow .stat-val {
    color: var(--yellow-fg);
}
.stat.accent-red .stat-val {
    color: var(--red-fg);
}
.stat.accent-green .stat-val {
    color: var(--green-fg);
}

/* ===== BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 20px;
    white-space: nowrap;
}
.badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.9;
}
.badge.plain::before {
    display: none;
}
.b-green {
    background: var(--green-bg);
    color: var(--green-fg);
}
.b-yellow {
    background: var(--yellow-bg);
    color: var(--yellow-fg);
}
.b-red {
    background: var(--red-bg);
    color: var(--red-fg);
}
.b-blue {
    background: var(--blue-bg);
    color: var(--blue-fg);
}
.b-gray {
    background: var(--gray-bg);
    color: var(--gray-fg);
}
.b-orange {
    background: var(--orange-bg);
    color: var(--orange-fg);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.13s;
    white-space: nowrap;
}
.btn-sm {
    padding: 6px 11px;
    font-size: 12.5px;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--primary-hov);
}
.btn-outline {
    background: var(--surface);
    border-color: var(--border-2);
    color: var(--text);
}
.btn-outline:hover {
    background: var(--surface-2);
}
.btn-soft {
    background: var(--surface-2);
    color: var(--text);
    border-color: var(--border);
}
.btn-soft:hover {
    background: var(--surface-3);
}
.btn-green {
    background: var(--green-bg);
    color: var(--green-fg);
}
.btn-green:hover {
    filter: brightness(0.96);
}
.btn-danger {
    background: var(--red-bg);
    color: var(--red-fg);
}
.btn-danger:hover {
    filter: brightness(0.96);
}
.btn-icon {
    padding: 8px;
}
.btn-icon svg {
    display: block;
}

/* ===== FILTER CHIPS ===== */
.chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.chip {
    padding: 6px 13px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
    border: 1px solid var(--border-2);
    background: var(--surface);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.13s;
}
.chip:hover {
    background: var(--surface-2);
    color: var(--text);
}
.chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ===== INPUTS ===== */
.input,
select.input,
textarea.input {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border-2);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 9px 11px;
    font-size: 13.5px;
    outline: none;
    transition: border-color 0.13s;
}
.input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}
textarea.input {
    resize: vertical;
}
.field {
    margin-bottom: 14px;
}
.field label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.select-inline {
    width: auto;
    min-width: 160px;
}

/* ===== FILTRY TICKETÓW ===== */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    align-items: center;
}
.filters .input {
    width: auto;
    padding: 8px 11px;
    font-size: 13px;
}
.filters .f-search {
    flex: 1;
    min-width: 200px;
}
.filters .f-date {
    color: var(--text-muted);
}
.filters .f-clear {
    margin-left: auto;
}

/* ===== TICKETS (inline accordion) ===== */
.ticket-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ticket-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition:
        box-shadow 0.15s,
        border-color 0.15s;
}
.ticket-item.open {
    box-shadow: var(--shadow);
    border-color: var(--border-2);
}
.ticket-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    cursor: pointer;
    user-select: none;
}
.ticket-head:hover {
    background: var(--surface-2);
}
.ticket-id {
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-weight: 700;
    color: var(--text-muted);
    font-size: 12px;
    flex-shrink: 0;
    white-space: nowrap;
    background: var(--surface-2);
    border: 1px solid var(--border);
    padding: 3px 8px;
    border-radius: 6px;
}
.ticket-main {
    flex: 1;
    min-width: 0;
}
.ticket-subject {
    font-weight: 600;
    font-size: 14.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ticket-meta {
    font-size: 12.5px;
    color: var(--text-soft);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-email-link {
    color: var(--primary);
    cursor: pointer;
    font-weight: 500;
}
.user-email-link:hover {
    text-decoration: underline;
}
.info-section {
    margin-bottom: 18px;
}
.info-section:last-child {
    margin-bottom: 0;
}
.info-section h4 {
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-soft);
    margin: 0 0 8px;
    font-weight: 600;
}
.info-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 7px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13.5px;
}
.info-row:last-child {
    border-bottom: none;
}
.info-row .k {
    color: var(--text-muted);
    flex-shrink: 0;
}
.info-row .v {
    color: var(--text);
    font-weight: 500;
    text-align: right;
    word-break: break-word;
}
.ticket-head .badge {
    flex-shrink: 0;
}
.ticket-status-slot {
    flex-shrink: 0;
    display: inline-flex;
}
.bar-select {
    background: var(--surface);
    border: 1px solid var(--border-2);
    color: var(--text);
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
}
.bar-select:focus {
    border-color: var(--primary);
}
.ticket-date {
    font-size: 12px;
    color: var(--text-soft);
    white-space: nowrap;
    flex-shrink: 0;
}
/* obecność — kto aktualnie pracuje nad zgłoszeniem (na pasku wiersza) */
.head-presence {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.head-presence:empty {
    display: none;
}
.presence-bar {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 11.5px;
    cursor: pointer;
    transition:
        border-color 0.12s,
        background 0.12s;
    white-space: nowrap;
}
.presence-bar:hover {
    border-color: var(--red-fg);
}
.presence-bar:hover .pname,
.presence-bar:hover .ptime {
    text-decoration: line-through;
}
.presence-bar .pdot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green-fg);
    animation: pulse 1.6s ease-in-out infinite;
    flex-shrink: 0;
}
.presence-bar .pname {
    font-weight: 600;
    color: var(--text);
}
.presence-bar .ptime {
    font-variant-numeric: tabular-nums;
    color: var(--text-muted);
}
.presence-bar.me {
    border-color: var(--primary);
    background: var(--primary-soft);
}
.presence-bar.me .pname {
    color: var(--primary);
}
.ticket-chevron {
    color: var(--text-soft);
    transition: transform 0.2s;
    flex-shrink: 0;
}
.ticket-item.open .ticket-chevron {
    transform: rotate(180deg);
}
.ticket-body {
    border-top: 1px solid var(--border);
    padding: 16px;
    background: var(--surface-2);
}

.thread {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}
.msg {
    display: flex;
    flex-direction: column;
    max-width: 76%;
}
.msg.user {
    align-self: flex-start;
}
.msg.support {
    align-self: flex-end;
    align-items: flex-end;
}
.bubble {
    padding: 10px 13px;
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}
.msg.user .bubble {
    background: var(--surface);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}
.msg.support .bubble {
    background: var(--primary);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.msg-meta {
    font-size: 11px;
    color: var(--text-soft);
    margin-top: 4px;
    padding: 0 2px;
}

.reply-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.reply-bar .lbl {
    font-size: 12.5px;
    color: var(--text-muted);
}
.reply-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

/* notatka wewnętrzna (widoczna tylko dla supportu) */
.note {
    align-self: stretch;
}
.note-bubble {
    background: var(--yellow-bg);
    color: var(--text);
    border: 1px dashed var(--yellow-fg);
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}
.closed-note {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

/* split-button wysyłki odpowiedzi */
.send-split {
    position: relative;
    display: inline-flex;
}
.send-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 30;
    min-width: 250px;
    background: var(--surface);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    padding: 5px;
    display: none;
}
.send-menu.open {
    display: block;
}
.send-menu button {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    padding: 8px 11px;
    border-radius: 7px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
    white-space: nowrap;
}
.send-menu button:hover {
    background: var(--surface-2);
}

/* sekcja komentarza wewnętrznego (legacy — używane też w nowym layoucie) */
.comment-box {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed var(--border);
}
.comment-box-head {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-soft);
    margin-bottom: 8px;
}

/* ===== layout 3-kolumnowy rozwiniętego ticketu ===== */
.tp-cols {
    display: grid;
    grid-template-columns: 1fr 1.5fr minmax(300px, 350px);
    gap: 20px;
    align-items: start;
}
.tp-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.tp-col-title {
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-soft);
    font-weight: 600;
    margin-bottom: 8px;
}
.tp-scroll {
    max-height: 480px;
    overflow-y: auto;
    padding-right: 4px;
}
.tp-col .thread {
    margin-bottom: 0;
}
.tp-col .msg {
    max-width: 92%;
}
.tp-empty {
    font-size: 12.5px;
    color: var(--text-soft);
    padding: 6px 2px;
}
.tp-col-compose {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    position: sticky;
    top: 12px;
}
.tp-compose {
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
}
.tp-send-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 10px;
}
.tp-foot-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
}
.tp-foot-row .btn-danger {
    margin-left: auto;
}
@media (max-width: 1100px) {
    .tp-cols {
        grid-template-columns: 1fr;
    }
    .tp-col-compose {
        position: static;
    }
    .tp-scroll {
        max-height: none;
    }
}

/* timer pracy nad zgłoszeniem */
.ticket-timerbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 12px;
}
.ticket-timer {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 12.5px;
    color: var(--text-muted);
}
.ticket-timer svg {
    width: 14px;
    height: 14px;
    color: var(--primary);
}
.ticket-timer strong {
    color: var(--text);
    font-variant-numeric: tabular-nums;
    font-size: 13.5px;
    letter-spacing: 0.02em;
}
.ticket-timer .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green-fg);
    animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.35;
    }
}

/* toast */
.toast {
    position: fixed;
    bottom: 22px;
    right: 22px;
    z-index: 200;
    background: var(--text);
    color: var(--surface);
    font-size: 13px;
    font-weight: 500;
    padding: 11px 16px;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(8px);
    transition:
        opacity 0.25s,
        transform 0.25s;
}
.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* ===== POOLS ===== */
.pool {
    margin-bottom: 16px;
}
.pool-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}
.pool-name {
    font-weight: 600;
    font-size: 14.5px;
}
.pool-desc {
    font-size: 12.5px;
    color: var(--text-soft);
}
.pool-feats {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* ===== MODAL ===== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.modal.open {
    display: flex;
}
.modal-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.modal-head h3 {
    font-size: 15.5px;
    font-weight: 700;
}
.modal-x {
    background: none;
    border: none;
    color: var(--text-soft);
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
}
.modal-x:hover {
    color: var(--text);
}
.modal-body {
    padding: 20px;
}
.modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 0 20px 20px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 720px) {
    .sidebar {
        width: 64px;
        padding: 12px 8px;
    }
    .nav-item span.lbl {
        display: none;
    }
    .nav-item {
        justify-content: center;
        padding: 11px;
    }
    .nav-count {
        position: absolute;
        margin: 0;
        transform: translate(14px, -14px);
    }
    .nav-item {
        position: relative;
    }
    .sidebar-foot {
        display: none;
    }
    .main {
        padding: 16px;
    }
    .topbar-sub {
        display: none;
    }
    .ticket-date {
        display: none;
    }
}
