/* ============================================================
   DİM SİSTEM — ƏSAS CSS (main.css)
   Bütün səhifələr bu faylı import edir.
   Səhifəyə xas stillər hər səhifənin öz css faylında olur.
   ============================================================ */

/* ── CSS DEĞİŞKƏNLƏRİ ──────────────────────────────────── */
:root {
    --sb-width: 230px;
    --hdr-height: 54px;

    /* Sidebar */
    --sb-bg: #111827;
    --sb-hover: #1f2937;
    --sb-active: #1d4ed8;
    --sb-text: #ffffff;
    --sb-text-act: #ffffff;
    --sb-text-hov: #d1d5db;

    /* Ümumi rənglər */
    --bg: #f1f4f9;
    --surface: #ffffff;
    --border: #e2e8f0;

    --primary: #1d4ed8;
    --primary-h: #1e40af; /* hover */
    --primary-lt: #eff6ff; /* light bg */

    --success: #16a34a;
    --success-lt: #f0fdf4;
    --warning: #d97706;
    --warning-lt: #fffbeb;
    --danger: #dc2626;
    --danger-lt: #fef2f2;
    --info: #0891b2;
    --info-lt: #ecfeff;
    --purple: #7c3aed;
    --purple-lt: #f5f3ff;

    /* Mətn */
    --tx: #111827;
    --tx-m: #6b7280; /* muted */
    --tx-l: #9ca3af; /* light */

    /* Yer rəngləri */
    --seat-taken: #ef4444;
    --seat-empty: #22c55e;
    --seat-sel: #3b82f6;
    --seat-online: #9ca3af;

    /* Şriftlər */
    --font: 'Plus Jakarta Sans', system-ui, sans-serif;
    --mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Radiuslar */
    --r-sm: 5px;
    --r: 8px;
    --r-lg: 12px;
    --r-xl: 16px;

    /* Kölgələr */
    --sh-sm: 0 1px 2px rgba(0, 0, 0, .06), 0 1px 3px rgba(0, 0, 0, .04);
    --sh: 0 1px 3px rgba(0, 0, 0, .08), 0 2px 6px rgba(0, 0, 0, .05);
    --sh-md: 0 4px 12px rgba(0, 0, 0, .09), 0 2px 4px rgba(0, 0, 0, .04);
    --sh-lg: 0 10px 28px rgba(0, 0, 0, .10), 0 4px 10px rgba(0, 0, 0, .05);
}

/* ── RESET & BASE ───────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--tx);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

button {
    cursor: pointer;
    font-family: inherit;
}

/* ── LAYOUT ─────────────────────────────────────────────── */
.layout {
    display: flex;
    min-height: 100vh;
}

.main-content {
    margin-left: var(--sb-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ── SİDEBAR ────────────────────────────────────────────── */
.sidebar {
    width: var(--sb-width);
    background: var(--sb-bg);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 200;
}

.sidebar-brand {
    height: var(--hdr-height);
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    flex-shrink: 0;
}

.brand-icon {
    width: 34px;
    height: 34px;
    background: var(--primary);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 17px;
    flex-shrink: 0;
}

.brand-name {
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.01em;
}

.brand-ver {
    font-size: 10px;
    color: var(--sb-text);
}

.sidebar-nav {
    padding: 14px 10px;
    flex: 1;
    overflow-y: auto;
}

.nav-section {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #374151;
    padding: 0 10px;
    margin: 14px 0 5px;
}

.nav-section:first-child {
    margin-top: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--r-sm);
    color: var(--sb-text);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, color .15s;
    margin-bottom: 2px;
}

.nav-item:hover {
    background: var(--sb-hover);
    color: var(--sb-text-hov);
}

.nav-item.active {
    background: var(--sb-active);
    color: var(--sb-text-act);
}

.nav-item i {
    font-size: 16px;
    flex-shrink: 0;
    width: 18px;
    text-align: center;
}

.sidebar-footer {
    padding: 12px 10px;
    border-top: 1px solid rgba(255, 255, 255, .06);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sb-avatar {
    width: 34px;
    height: 34px;
    background: #1e3a5f;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #93c5fd;
    flex-shrink: 0;
}

.sb-user-name {
    font-size: 12.5px;
    font-weight: 600;
    color: #343434;
}

.sb-user-role {
    font-size: 10.5px;
    color: #ff0000;
}

/* ── TOPBAR ─────────────────────────────────────────────── */
.topbar {
    height: var(--hdr-height);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 26px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--sh-sm);
    flex-shrink: 0;
}

.topbar-bc {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
}

.topbar-bc .crumb {
    color: var(--tx-m);
}

.topbar-bc .crumb-sep {
    color: var(--tx-l);
    font-size: 10px;
}

.topbar-bc .crumb-cur {
    color: var(--tx);
    font-weight: 700;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── PAGE ───────────────────────────────────────────────── */
.page {
    padding: 24px 4px;
    flex: 1;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.page-header-left {
    display: flex;
    align-items: center;
    gap: 13px;
}

.page-icon {
    width: 42px;
    height: 42px;
    background: var(--primary-lt);
    border-radius: var(--r);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 20px;
    flex-shrink: 0;
}

.page-icon.green {
    background: var(--success-lt);
    color: var(--success);
}

.page-icon.orange {
    background: var(--warning-lt);
    color: var(--warning);
}

.page-icon.red {
    background: var(--danger-lt);
    color: var(--danger);
}

.page-icon.purple {
    background: var(--purple-lt);
    color: var(--purple);
}

.page-title {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.page-subtitle {
    font-size: 12.5px;
    color: var(--tx-m);
    margin-top: 2px;
}

/* ── DÜYMƏLƏR ───────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: var(--r-sm);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
    line-height: 1;
}

.btn i {
    font-size: 14px;
    flex-shrink: 0;
}

.btn-sm {
    padding: 6px 13px;
    font-size: 12px;
}

.btn-lg {
    padding: 11px 24px;
    font-size: 14px;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-h);
    border-color: var(--primary-h);
}

.btn-success {
    background: var(--success);
    color: #fff;
    border-color: var(--success);
}

.btn-success:hover {
    background: #15803d;
    border-color: #15803d;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

.btn-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

.btn-warning {
    background: var(--warning);
    color: #fff;
    border-color: var(--warning);
}

.btn-warning:hover {
    background: #b45309;
    border-color: #b45309;
}

.btn-purple {
    background: var(--purple);
    color: #fff;
    border-color: var(--purple);
}

.btn-purple:hover {
    background: #6d28d9;
    border-color: #6d28d9;
}

.btn-ghost {
    background: var(--surface);
    color: var(--tx-m);
    border-color: var(--border);
}

.btn-ghost:hover {
    border-color: #b8c4d8;
    color: var(--tx);
}

.btn-ghost-primary {
    background: var(--primary-lt);
    color: var(--primary);
    border-color: #bfdbfe;
}

.btn-ghost-primary:hover {
    background: #dbeafe;
}

.btn-ghost-danger {
    background: var(--surface);
    color: var(--danger);
    border-color: #fca5a5;
}

.btn-ghost-danger:hover {
    background: var(--danger-lt);
}

/* Topbar düymələri */
.topbar-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--r-sm);
    font-family: var(--font);
    font-size: 12px;
    font-weight: 600;
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--tx-m);
    cursor: pointer;
    transition: all .15s;
}

.topbar-btn:hover {
    border-color: #c4cbd8;
    color: var(--tx);
}

.topbar-btn.primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.topbar-btn.primary:hover {
    background: var(--primary-h);
}

.topbar-btn.danger-ghost {
    border-color: #fca5a5;
    color: var(--danger);
}

.topbar-btn.danger-ghost:hover {
    background: var(--danger-lt);
}

/* İkon düymə (cədvəldə) */
.icon-btn {
    width: 28px;
    height: 28px;
    border-radius: 5px;
    border: 1.5px solid var(--border);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    color: var(--tx-m);
    transition: all .15s;
}

.icon-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-lt);
}

.icon-btn.danger:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: var(--danger-lt);
}

/* ── KARTLAR ────────────────────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    box-shadow: var(--sh);
    overflow: visible;
}

.card-header {
    padding: 13px 20px;
    border-bottom: 1px solid var(--border);
    background: #fafbfe;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-icon {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.card-icon.blue {
    background: var(--primary-lt);
    color: var(--primary);
}

.card-icon.green {
    background: var(--success-lt);
    color: var(--success);
}

.card-icon.orange {
    background: var(--warning-lt);
    color: var(--warning);
}

.card-icon.red {
    background: var(--danger-lt);
    color: var(--danger);
}

.card-icon.purple {
    background: var(--purple-lt);
    color: var(--purple);
}

.card-title {
    font-size: 13.5px;
    font-weight: 700;
}

.card-body {
    padding: 20px;
}

/* ── GRİD HELPERLƏRİ ───────────────────────────────────── */
.g2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.g3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
}

.g4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.span2 {
    grid-column: span 2;
}

/* ── FORM ELEMENTLƏRİ ──────────────────────────────────── */
.field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.field-label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--tx-m);
    display: flex;
    align-items: center;
    gap: 4px;
}

.field-label .req {
    color: var(--danger);
}

.form-control {
    font-family: var(--font);
    font-size: 13px;
    color: var(--tx);
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--r-sm);
    padding: 8px 12px;
    width: 100%;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color .15s, box-shadow .15s;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, .11);
}

.form-control::placeholder {
    color: #c4cdd8;
    font-size: 12.5px;
}

.form-control:disabled {
    background: #f6f8fb;
    color: var(--tx-l);
    cursor: not-allowed;
}

.form-control.is-error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, .09);
}

.form-control.is-success {
    border-color: var(--success);
}

select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239ca3af' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
    padding-right: 32px;
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.field-hint {
    font-size: 11px;
    color: var(--tx-m);
    margin-top: 2px;
}

.field-error {
    font-size: 11px;
    color: var(--danger);
    margin-top: 2px;
    display: none;
}

.field-error.show {
    display: block;
}

/* Input group */
.input-group {
    display: flex;
}

.input-group .form-control {
    border-radius: var(--r-sm) 0 0 var(--r-sm);
    border-right: none;
}

.input-group-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    background: var(--primary-lt);
    border: 1.5px solid var(--border);
    border-left: none;
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    color: var(--primary);
    font-size: 15px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s;
}

.input-group-btn:hover {
    background: #dbeafe;
}

/* Mono göstərici sahə */
.mono-display {
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-lt);
    border: 1.5px solid #bfdbfe;
    border-radius: var(--r-sm);
    padding: 8px 12px;
    letter-spacing: .05em;
}

/* ── CHECKBOXlar ────────────────────────────────────────── */
/*
  ÖNƏMLİ: -webkit-appearance:auto saxlanır ki,
  checkbox vizual olaraq görünsün.
  JS ilə .checked class-ı əlavə edilir.
*/
.check-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.check-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1.5px solid var(--border);
    background: var(--surface);
    font-size: 13px;
    cursor: pointer;
    user-select: none;
    transition: border-color .15s, background .15s, color .15s;
}

.check-item input[type="checkbox"],
.check-item input[type="radio"] {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    cursor: pointer;
    /* Chrome-da görünmə üçün: */
    -webkit-appearance: auto;
    appearance: auto;
    accent-color: var(--primary);
    margin: 0;
    padding: 0;
}

/* Seçildiyi zaman kart üslubu */
.check-item.checked {
    background: var(--primary-lt);
    border-color: #93c5fd;
    color: var(--primary);
    font-weight: 600;
}

/* ── ALTQRUP (Blok üçün) ────────────────────────────────── */
.altgroup-box {
    background: #fffbeb;
    border: 1.5px solid #fde68a;
    border-radius: var(--r-sm);
    padding: 12px 14px;
}

.altgroup-title {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #92400e;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.altgroup-row {
    display: flex;
    border: 1.5px solid #fde68a;
    border-radius: var(--r-sm);
    overflow: hidden;
}

.altgroup-opt {
    flex: 1;
    position: relative;
}

.altgroup-opt input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.altgroup-opt label {
    display: block;
    text-align: center;
    padding: 9px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    color: #92400e;
    background: #fff;
    transition: all .15s;
    border-right: 1.5px solid #fde68a;
}

.altgroup-opt:last-child label {
    border-right: none;
}

.altgroup-opt input:checked + label {
    background: #d97706;
    color: #fff;
}

/* ── BADGElər ───────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10.5px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 20px;
}

.badge-active {
    background: #dcfce7;
    color: #166534;
}

.badge-draft {
    background: #d97706;
    color: #fff;
}

.badge-closed {
    background: var(--danger-lt);
    color: #991b1b;
}

.badge-primary {
    background: var(--primary-lt);
    color: var(--primary);
}

.badge-warning {
    background: var(--warning-lt);
    color: #92400e;
}

.badge-info {
    background: var(--info-lt);
    color: #155e75;
}

/* ── ALERTlər ───────────────────────────────────────────── */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 15px;
    border-radius: var(--r-sm);
    font-size: 12.5px;
    line-height: 1.6;
}

.alert i {
    font-size: 15px;
    flex-shrink: 0;
    margin-top: 1px;
}

.alert-info {
    background: var(--primary-lt);
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.alert-success {
    background: var(--success-lt);
    border: 1px solid #bbf7d0;
    color: #15803d;
}

.alert-warning {
    background: var(--warning-lt);
    border: 1px solid #fde68a;
    color: #92400e;
}

.alert-danger {
    background: var(--danger-lt);
    border: 1px solid #fca5a5;
    color: #991b1b;
}

/* ── CƏDVƏl ─────────────────────────────────────────────── */
.table-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    box-shadow: var(--sh);
    overflow: hidden;
}

.table-topbar {
    padding: 11px 18px;
    border-bottom: 1px solid var(--border);
    background: #fafbfe;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

thead th {
    padding: 10px 14px;
    text-align: left;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--tx-m);
    background: #f5f7fc;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

tbody td {
    padding: 11px 14px;
    border-bottom: 1px solid #f0f4fa;
    color: var(--tx);
    vertical-align: middle;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover td {
    background: #f8fafd;
}

.td-link {
    color: var(--primary);
    cursor: pointer;
    font-weight: 600;
}

.td-link:hover {
    text-decoration: underline;
}

.td-mono {
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--tx-m);
}

.td-actions {
    display: flex;
    gap: 5px;
}

/* ── FİLTER BAR ─────────────────────────────────────────── */
.filter-bar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 14px 18px;
    margin-bottom: 16px;
    box-shadow: var(--sh-sm);
}

.filter-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-row .form-control {
    font-size: 12.5px;
    padding: 7px 11px;
    height: 36px;
}

.filter-row select.form-control {
    padding-right: 26px;
}

.filter-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 36px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--r-sm);
    cursor: pointer;
    font-size: 15px;
    flex-shrink: 0;
    transition: background .15s;
}

.filter-search-btn:hover {
    background: var(--primary-h);
}

/* Filter etiket (sütun başlığı) */
.filter-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--tx-m);
    margin-bottom: 4px;
}

.filter-col {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 110px;
}

/* ── MULTI-SELECT ────────────────────────────────────────── */
.ms-wrap {
    position: relative;
}

.ms-display {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    min-height: 36px;
    padding: 4px 30px 4px 10px;
    border: 1.5px solid var(--border);
    border-radius: var(--r-sm);
    background: var(--surface);
    cursor: pointer;
    position: relative;
    font-size: 12.5px;
}

.ms-display::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 6px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239ca3af' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
}

.ms-placeholder {
    color: #c4cdd8;
}

.ms-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--primary-lt);
    color: var(--primary);
    border: 1px solid #bfdbfe;
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 11.5px;
    font-weight: 600;
}

.ms-tag-rm {
    background: none;
    border: none;
    padding: 0;
    font-size: 14px;
    line-height: 1;
    color: var(--primary);
    opacity: .65;
    cursor: pointer;
    font-family: inherit;
}

.ms-tag-rm:hover {
    opacity: 1;
    color: var(--danger);
}

.ms-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--r-sm);
    box-shadow: var(--sh-lg);
    z-index: 600;
    display: none;
    max-height: 220px;
    overflow-y: auto;
}

.ms-dropdown.open {
    display: block;
}

.ms-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    transition: background .1s;
}

.ms-option:hover {
    background: #f8fafd;
}

.ms-option input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--primary);
    cursor: pointer;
    -webkit-appearance: auto;
    appearance: auto;
    margin: 0;
}

.ms-option.sel {
    background: var(--primary-lt);
    color: var(--primary);
    font-weight: 600;
}

/* ── TOAST BİLDİRİŞLƏRİ ─────────────────────────────────── */
#toast-container {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 16px 16px;
    border-radius: 10px;
    min-width: 290px;
    max-width: 380px;
    background: var(--surface);
    box-shadow: var(--sh-lg);
    pointer-events: all;
    position: relative;
    overflow: hidden;
    border-left: 4px solid var(--border);
    animation: toastIn .25s cubic-bezier(.34, 1.56, .64, 1);
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.warning {
    border-left-color: var(--warning);
}

.toast.info {
    border-left-color: var(--primary);
}

.toast-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.toast.success .toast-icon {
    color: var(--success);
}

.toast.error .toast-icon {
    color: var(--danger);
}

.toast.warning .toast-icon {
    color: var(--warning);
}

.toast.info .toast-icon {
    color: var(--primary);
}

.toast-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--tx);
    margin-bottom: 2px;
}

.toast-body {
    font-size: 12px;
    color: var(--tx-m);
    line-height: 1.5;
}

.toast-close {
    background: none;
    border: none;
    font-size: 17px;
    color: var(--tx-l);
    cursor: pointer;
    margin-left: auto;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}

.toast-close:hover {
    color: var(--tx);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 10px 10px;
    animation: toastProgress linear forwards;
}

.toast.success .toast-progress {
    background: var(--success);
}

.toast.error .toast-progress {
    background: var(--danger);
}

.toast.warning .toast-progress {
    background: var(--warning);
}

.toast.info .toast-progress {
    background: var(--primary);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(24px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes toastOut {
    to {
        opacity: 0;
        transform: translateX(30px);
        max-height: 0;
        padding: 0;
        margin: 0;
    }
}

@keyframes toastProgress {
    from {
        width: 100%;
    }
    to {
        width: 0;
    }
}

/* ── MODAL ──────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, .5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 20px;
}

.modal-overlay.open {
    display: flex;
}

.modal-box {
    background: var(--surface);
    border-radius: var(--r-lg);
    max-width: 95vw;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, .22);
    animation: modalIn .2s cubic-bezier(.34, 1.36, .64, 1);
    width: 100%;
}

.modal-box.sm {
    max-width: 440px;
}

.modal-box.md {
    max-width: 560px;
}

.modal-box.lg {
    max-width: 720px;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(.94) translateY(14px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.modal-header {
    background: linear-gradient(120deg, #0f1f50, #1d4ed8);
    color: #fff;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    flex-shrink: 0;
}

.modal-header h3 {
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 9px;
}

.modal-close {
    background: rgba(255, 255, 255, .15);
    border: none;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, .25);
}

.modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.modal-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    background: #fafbfe;
    border-radius: 0 0 var(--r-lg) var(--r-lg);
}

/* ── WIZARD ADDIMLAR ────────────────────────────────────── */
.wizard-steps {
    display: flex;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
    box-shadow: var(--sh-sm);
    margin-bottom: 22px;
}

.wizard-step {
    flex: 1;
    padding: 13px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    border-right: 1px solid var(--border);
    transition: background .15s;
}

.wizard-step:last-child {
    border-right: none;
}

.wizard-step:hover:not(.active) {
    background: #f8faff;
}

.wizard-step.active {
    background: var(--primary-lt);
}

.wizard-step.done {
    background: var(--success-lt);
}

.step-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    background: var(--border);
    color: var(--tx-m);
    flex-shrink: 0;
    transition: all .2s;
}

.wizard-step.active .step-dot {
    background: var(--primary);
    color: #fff;
}

.wizard-step.done .step-dot {
    background: var(--success);
    color: #fff;
}

.step-lbl {
    font-size: 12px;
    font-weight: 700;
    color: var(--tx-m);
}

.wizard-step.active .step-lbl {
    color: var(--primary);
}

.wizard-step.done .step-lbl {
    color: var(--success);
}

.step-sub {
    font-size: 10px;
    color: var(--tx-l);
}

.step-panel {
    display: none;
}

.step-panel.active {
    display: block;
}

/* ── ACTION BAR (Bilet satışı altı) ─────────────────────── */
.action-bar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 14px 20px;
    box-shadow: var(--sh-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.summary-chips {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.summary-chip {
    font-size: 12px;
    color: var(--tx-m);
    display: flex;
    align-items: center;
    gap: 5px;
}

.summary-chip i {
    color: var(--primary);
    font-size: 13px;
}

.summary-chip strong {
    color: var(--tx);
}

/* ── OTAQ DÜYMƏLƏR ──────────────────────────────────────── */
.room-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: var(--r-sm);
    border: 2px solid transparent;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s;
    user-select: none;
}

.room-btn i {
    font-size: 14px;
}

.room-count {
    font-size: 11px;
    font-family: var(--mono);
    opacity: .7;
}

.room-btn.full {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
    cursor: not-allowed;
    opacity: .8;
}

.room-btn.partial {
    background: #fff7ed;
    color: #92400e;
    border-color: #fed7aa;
}

.room-btn.partial:hover {
    background: #ffedd5;
    border-color: #fb923c;
}

.room-btn.empty {
    background: #dcfce7;
    color: #14532d;
    border-color: #86efac;
}

.room-btn.empty:hover {
    background: #bbf7d0;
    border-color: #4ade80;
}

.room-btn.sel-room {
    box-shadow: 0 0 0 3px rgba(29, 78, 216, .22) !important;
    border-color: var(--primary) !important;
}

.floor-label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--tx-m);
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 10px 0 5px;
    width: 100%;
}

.floor-label i {
    color: var(--primary);
}

/* ── YER HARİTƏSİ ───────────────────────────────────────── */
.classroom-wrap {
    background: #eef2fc;
    border-radius: 10px;
    padding: 18px;
    border: 2px solid #d0d9f0;
}

.teacher-desk {
    background: linear-gradient(135deg, #1e293b, #334155);
    color: #fff;
    border-radius: 8px;
    padding: 10px 20px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    margin-bottom: 18px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, .2);
}

.seat-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.seat-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.row-lbl {
    font-size: 10px;
    font-weight: 700;
    color: var(--tx-l);
    width: 18px;
    text-align: center;
    font-family: var(--mono);
    flex-shrink: 0;
}

.seat-cols {
    display: flex;
    gap: 8px;
    flex: 1;
}

.seat-aisle {
    width: 22px;
    flex-shrink: 0;
}

.seat {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    transition: all .15s;
    position: relative;
    user-select: none;
    cursor: default;
    flex-shrink: 0;
}

.seat-num {
    font-size: 10px;
    font-weight: 700;
    font-family: var(--mono);
    line-height: 1;
}

.seat-sub {
    font-size: 8px;
    opacity: .8;
    text-align: center;
    margin-top: 2px;
}

.seat.taken {
    background: var(--seat-taken);
    color: #fff;
}

.seat.empty {
    background: var(--seat-empty);
    color: #fff;
    cursor: pointer;
}

.seat.empty:hover {
    filter: brightness(1.1);
    transform: scale(1.07);
}

.seat.selected {
    background: var(--seat-sel);
    color: #fff;
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .4);
    transform: scale(1.08);
}

.seat.online {
    background: var(--seat-online);
    color: #e5e7eb;
}

.seat-tip {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #fff;
    font-size: 10px;
    font-family: var(--mono);
    padding: 4px 8px;
    border-radius: 5px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s;
    z-index: 50;
}

.seat:hover .seat-tip {
    opacity: 1;
}

.seat-legend {
    display: flex;
    gap: 14px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.leg-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--tx-m);
}

.leg-dot {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    flex-shrink: 0;
}

.sel-info {
    display: none;
    align-items: center;
    gap: 10px;
    background: var(--primary-lt);
    border: 1.5px solid #bfdbfe;
    border-radius: var(--r-sm);
    padding: 10px 15px;
    font-size: 13px;
    color: var(--primary);
    font-weight: 600;
    margin-top: 12px;
}

.sel-info.show {
    display: flex;
}

/* ── BÖLÜCÜ XƏTTİ ───────────────────────────────────────── */
.section-sep {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0;
}

.sep-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}

.sep-text {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--tx-m);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ── HINT (boş vəziyyət) ────────────────────────────────── */
.hint-box {
    color: var(--tx-l);
    font-size: 13px;
    text-align: center;
    padding: 32px 0;
}

.hint-box i {
    font-size: 28px;
    display: block;
    margin-bottom: 8px;
    opacity: .2;
}

/* ── UTİLİTYlər ─────────────────────────────────────────── */
.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: 4px;
}

.gap-2 {
    gap: 8px;
}

.gap-3 {
    gap: 12px;
}

.gap-4 {
    gap: 16px;
}

.gap-5 {
    gap: 20px;
}

.flex-1 {
    flex: 1;
}

.mt-2 {
    margin-top: 8px;
}

.mt-3 {
    margin-top: 12px;
}

.mt-4 {
    margin-top: 16px;
}

.mb-2 {
    margin-bottom: 8px;
}

.mb-3 {
    margin-bottom: 12px;
}

.text-muted {
    color: var(--tx-m);
}

.text-mono {
    font-family: var(--mono);
}

.fw-bold {
    font-weight: 700;
}

.w-full {
    width: 100%;
}

/* ── SCROLLBAR ──────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ── PRINT ──────────────────────────────────────────────── */
@media print {
    .sidebar, .topbar, .action-bar, .modal-overlay, .filter-bar {
        display: none !important;
    }

    .main-content {
        margin: 0 !important;
    }

    .page {
        padding: 0 !important;
    }
}
