/* Event Site CMS — admin stylesheet.
   Hand-written CSS, custom properties on :root, no framework/preprocessor.
   Keep this under ~600 lines and readable — the owner edits it by hand. */

:root {
    --color-bg: #f4f5f7;
    --color-surface: #ffffff;
    --color-surface-alt: #fafbfc;
    --color-border: #e1e4e8;
    --color-text: #1f2328;
    --color-text-muted: #6b7280;
    --color-primary: #2f5fd8;
    --color-primary-hover: #234bb0;
    --color-danger: #d0342c;
    --color-danger-hover: #a8291f;
    --color-success-bg: #e6f6ec;
    --color-success-text: #146c3e;
    --color-error-bg: #fdecea;
    --color-error-text: #a1231b;
    --color-active: #146c3e;
    --color-inactive: #8a8f98;

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;

    --radius: 6px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);

    --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-size-base: 14px;
    --sidebar-width: 220px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-base);
    font-size: var(--font-size-base);
    color: var(--color-text);
    background: var(--color-bg);
}

a {
    color: var(--color-primary);
}

h1, h2, h3, p {
    margin: 0 0 var(--space-3);
}

/* Layout */

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    background: var(--color-text);
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: var(--space-4) 0;
}

.sidebar-brand {
    font-weight: 700;
    font-size: 16px;
    padding: 0 var(--space-4) var(--space-4);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}
.sidebar-nav a {
    color: #cfd3da;
    text-decoration: none;
    padding: var(--space-3) var(--space-4);
}
.sidebar-nav a:hover,
.sidebar-nav a.is-active {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-3) var(--space-5);
}

.topbar-title {
    font-weight: 600;
    font-size: 16px;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--color-text-muted);
}

.content {
    padding: var(--space-5);
}

/* Guest (login) */

.guest-body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
}

.guest-card {
    width: 100%;
    max-width: 360px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: var(--space-5);
}

.guest-brand {
    font-weight: 700;
    font-size: 18px;
    margin-bottom: var(--space-4);
}

.guest-intro {
    color: var(--color-text-muted);
}

/* Alerts */

.alert {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius);
    margin-bottom: var(--space-4);
}

.alert-success {
    background: var(--color-success-bg);
    color: var(--color-success-text);
}

.alert-error {
    background: var(--color-error-bg);
    color: var(--color-error-text);
}

.alert-warning {
    background: #fff8e6;
    color: #7a5b00;
    border: 1px solid #f0d78c;
}

.year-coverage-alert-title {
    display: block;
    margin-bottom: var(--space-2);
}

.year-coverage-alert-intro {
    margin: 0 0 var(--space-3);
    font-size: 13px;
}

.year-coverage-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.year-coverage-year-label {
    display: inline-block;
    font-weight: 700;
    margin-bottom: var(--space-1);
}

.year-coverage-sections {
    margin: 0;
    padding-left: var(--space-4);
}

.year-coverage-type {
    color: var(--color-text-muted);
    font-size: 12px;
}

.year-coverage-alert-footer {
    margin: var(--space-3) 0 0;
    font-size: 13px;
}

.alert ul {
    margin: 0;
    padding-left: var(--space-4);
}

/* Forms */

.form-stack {
    max-width: 640px;
}

.form-inline {
    display: flex;
    gap: var(--space-3);
    align-items: center;
    margin-bottom: var(--space-4);
}

.form-section {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: var(--space-4);
    margin: 0 0 var(--space-4);
}
.form-section legend {
    padding: 0 var(--space-2);
    font-weight: 600;
    color: var(--color-text-muted);
}

.field {
    margin-bottom: var(--space-4);
}
.field label {
    display: block;
    margin-bottom: var(--space-1);
    font-weight: 600;
    font-size: 13px;
}

.field-inline label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 400;
}

.field-hint {
    color: var(--color-text-muted);
    font-size: 12px;
    margin: var(--space-1) 0 0;
}

.field-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1) var(--space-4);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    color: var(--color-text);
    font-family: inherit;
    font-size: inherit;
}

input:disabled {
    background: var(--color-surface-alt);
    color: var(--color-text-muted);
}

textarea {
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-5);
}

/* Buttons */

.button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-size: inherit;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.4;
}

.button-primary {
    background: var(--color-primary);
    color: #fff;
}
.button-primary:hover {
    background: var(--color-primary-hover);
}

.button-secondary {
    background: var(--color-surface);
    border-color: var(--color-border);
    color: var(--color-text);
}
.button-secondary:hover {
    background: var(--color-surface-alt);
}

.button-danger {
    background: var(--color-surface);
    border-color: var(--color-danger);
    color: var(--color-danger);
}
.button-danger:hover {
    background: var(--color-error-bg);
}

.link-button {
    background: none;
    border: none;
    color: var(--color-danger);
    cursor: pointer;
    padding: 0;
    font: inherit;
    text-decoration: underline;
}

.badge-button {
    border: none;
    border-radius: 999px;
    padding: 2px var(--space-3);
    font-size: 12px;
    cursor: pointer;
}

/* Toolbar / table */

.toolbar {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.record-count {
    margin-left: auto;
    color: var(--color-text-muted);
    font-size: 13px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
}
.data-table th,
.data-table td {
    text-align: left;
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}
.data-table th {
    background: var(--color-surface-alt);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
}
.data-table tbody tr:last-child td {
    border-bottom: none;
}

.reorder-hint {
    margin-bottom: var(--space-3);
}

.col-drag {
    width: 36px;
    padding-right: 0 !important;
}

.drag-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: var(--radius);
    background: transparent;
    color: var(--color-text-muted);
    font-size: 14px;
    letter-spacing: -2px;
    line-height: 1;
    cursor: grab;
}

.drag-handle:active {
    cursor: grabbing;
}

.data-table tbody tr.is-dragging {
    opacity: 0.45;
    background: var(--color-surface-alt);
}

.data-table tbody tr.is-drag-over td {
    box-shadow: inset 0 2px 0 var(--color-primary);
}

.row-actions {
    display: flex;
    gap: var(--space-3);
    white-space: nowrap;
}

.empty-row {
    text-align: center;
    color: var(--color-text-muted);
    padding: var(--space-6) !important;
}

.thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    display: block;
}

.thumb-video {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-text);
    color: #fff;
    font-size: 14px;
}

.status-select {
    width: auto;
    padding: var(--space-1) var(--space-2);
}

.badge {
    display: inline-block;
    border-radius: 999px;
    padding: 2px var(--space-3);
    font-size: 12px;
}

.badge-active {
    background: var(--color-success-bg);
    color: var(--color-active);
}

.badge-inactive {
    background: #f1f2f4;
    color: var(--color-inactive);
}

.menu-item-children {
    list-style: none;
    margin: var(--space-2) 0 0;
    padding: var(--space-2) 0 0 var(--space-4);
    border-top: 1px dashed var(--color-border);
}

.menu-item-children li {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-1) 0;
    color: var(--color-text-muted);
    font-size: 13px;
}

.menu-item-children li a,
.menu-item-children li button {
    font-size: 12px;
}

/* Dashboard */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--space-4);
}

.stat-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: var(--space-4);
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
}

.stat-label {
    color: var(--color-text-muted);
    font-size: 13px;
}

/* Media field / library */

.media-field-items {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.media-field-item {
    position: relative;
    width: 96px;
    height: 96px;
}
.media-field-item img,
.media-field-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}

.media-field-filename {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: var(--space-2);
    font-size: 11px;
    line-height: 1.3;
    text-align: center;
    overflow-wrap: break-word;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    background: var(--color-surface-alt);
}

.media-field-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background: var(--color-danger);
    color: #fff;
    cursor: pointer;
    line-height: 1;
}

.media-field-upload input[type="file"] {
    display: none;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--space-4);
    margin: var(--space-4) 0;
}

.media-grid-item {
    margin: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: var(--space-2);
}
.media-grid-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius);
}
.media-grid-item figcaption {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: var(--space-2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pagination {
    display: flex;
    gap: var(--space-4);
    align-items: center;
    color: var(--color-text-muted);
}

/* Rich text editor — Quill (see fields/richtext.blade.php); .ql-* rules
   below are Quill's own classes, restyled onto our tokens rather than
   its default look. */

.quill-wrap {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    overflow: hidden;
}

.quill-wrap .ql-toolbar.ql-snow {
    border: none;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface-alt);
    font-family: var(--font-base);
}

.quill-wrap .ql-container.ql-snow {
    border: none;
    font-family: var(--font-base);
    font-size: inherit;
}

.quill-wrap .ql-editor {
    min-height: 160px;
    padding: var(--space-3);
}

.quill-wrap .ql-editor.ql-blank::before {
    color: var(--color-text-muted);
    font-style: normal;
}

/* Persian / RTL richtext — Quill Snow sets text-align:left on .ql-editor,
   which defeats a bare dir="rtl" attribute. Force direction + alignment. */
.quill-wrap[data-dir="rtl"],
.quill-wrap[data-lang="fa"],
.quill-wrap[data-lang="fa-ir"] {
    direction: rtl;
}

.quill-wrap[data-dir="rtl"] .ql-toolbar.ql-snow,
.quill-wrap[data-lang="fa"] .ql-toolbar.ql-snow,
.quill-wrap[data-lang="fa-ir"] .ql-toolbar.ql-snow {
    direction: ltr; /* keep toolbar icons LTR so they stay usable */
}

.quill-wrap[data-dir="rtl"] .ql-container.ql-snow,
.quill-wrap[data-lang="fa"] .ql-container.ql-snow,
.quill-wrap[data-lang="fa-ir"] .ql-container.ql-snow,
.quill-wrap[data-dir="rtl"] .ql-editor,
.quill-wrap[data-lang="fa"] .ql-editor,
.quill-wrap[data-lang="fa-ir"] .ql-editor {
    direction: rtl;
    text-align: right;
}

.quill-wrap[data-dir="rtl"] .ql-editor.ql-blank::before,
.quill-wrap[data-lang="fa"] .ql-editor.ql-blank::before,
.quill-wrap[data-lang="fa-ir"] .ql-editor.ql-blank::before {
    right: var(--space-3);
    left: auto;
    text-align: right;
}

/* Locale tabs */

.locale-tabs {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
}

.locale-tab {
    border: 1px solid var(--color-border);
    background: var(--color-surface-alt);
    border-radius: var(--radius);
    padding: var(--space-1) var(--space-3);
    cursor: pointer;
}
.locale-tab.is-active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.locale-panel {
    display: none;
}
.locale-panel.is-active {
    display: block;
}

/* Site settings language list */

.locale-list {
    list-style: none;
    margin: 0 0 var(--space-3);
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
}

.locale-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    border-bottom: 1px solid var(--color-border);
}

.locale-list-item:last-child {
    border-bottom: none;
}

.locale-list-label {
    font-weight: 600;
}

.locale-list-code {
    font-weight: 400;
    color: var(--color-text-muted);
}

.locale-add-row {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

.locale-add-row select {
    flex: 1;
}

.button-small {
    padding: var(--space-1) var(--space-2);
    font-size: 12px;
}

/* Responsive */

@media (max-width: 800px) {
    .app-shell {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        padding: var(--space-2);
    }

    .sidebar-brand {
        padding: var(--space-2);
    }

    .sidebar-nav {
        flex-direction: row;
    }

    .content {
        padding: var(--space-4);
    }

    .data-table {
        display: block;
        overflow-x: auto;
    }
}

/* File upload buttons: rounded, same look as the other buttons */
input[type="file"]::file-selector-button {
    margin-right: var(--space-3, 12px);
    padding: 6px 16px;
    border: 1px solid var(--color-primary);
    border-radius: 999px;
    background: var(--color-surface);
    color: var(--color-primary);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

input[type="file"]::file-selector-button:hover {
    background: var(--color-primary);
    color: #fff;
}

/* Sponsor invoices, conversation and materials */
.inv-table{width:100%;border-collapse:collapse;margin:8px 0 14px;max-width:560px}
.inv-table td{padding:6px 4px;border-bottom:1px solid var(--color-border,#e5e0ea);vertical-align:top}
.inv-table .num{text-align:right;white-space:nowrap}
.inv-total td{border-top:2px solid var(--color-border,#e5e0ea)}
.msg-thread{display:flex;flex-direction:column;gap:10px;margin:8px 0 14px;max-width:720px}
.msg{border:1px solid var(--color-border,#e5e0ea);border-radius:14px;padding:10px 14px;background:#fff}
.msg--admin,.msg--organizer{background:#f4eff7}
.msg-meta{font-size:12px;color:#6b5d78;margin-bottom:4px}
.msg-empty{color:#6b5d78}
.mat-list{list-style:none;padding:0;margin:8px 0 14px;display:flex;flex-direction:column;gap:10px;max-width:720px}
.mat-list li{display:flex;gap:12px;align-items:center;border:1px solid var(--color-border,#e5e0ea);border-radius:12px;padding:8px 12px;background:#fff}
.mat-thumb{width:56px;height:56px;object-fit:cover;border-radius:8px}
.mat-icon{font-size:28px;width:56px;text-align:center}
.mat-main{flex:1;min-width:0;overflow-wrap:anywhere}
.mat-by{font-size:12px;color:#6b5d78}

/* Pagination (resources/views/pagination/gww.blade.php) used site-wide, including admin */
.gww-pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 24px 0; flex-wrap: wrap; }
.gww-pager-info { font-size: 14px; color: var(--color-text-muted); }
.gww-pager-btn { display: inline-flex; padding: 8px 18px; border-radius: 999px; border: 1px solid var(--color-primary); color: var(--color-primary); font-weight: 700; text-decoration: none; }
.gww-pager-btn:hover { background: var(--color-primary); color: #fff; }
.gww-pager-btn.is-disabled { opacity: .4; pointer-events: none; }
.pagination svg { width: 20px; height: 20px; }

/* ---- Admin UI pass (26 Nov): bigger type, roomier tables, big action buttons, progress cards, timeline, palette ---- */
:root { --font-size-base: 16px; --sidebar-width: 240px; }
.data-table th, .data-table td { padding: 16px 18px; line-height: 1.45; }
.data-table th { font-size: 13px; }
.badge { font-size: 14px; padding: 4px 12px; font-weight: 600; }
.button { padding: 10px 18px; font-weight: 600; }
.button-lg { padding: 14px 24px; font-size: 17px; border-radius: 10px; min-height: 52px; justify-content: center; }
.button-block { display: flex; width: 100%; margin: 6px 0; }
.button-warn { background: #b45309; color: #fff; }
.button-warn:hover { background: #92400e; }
input, select, textarea { font-size: 16px; }
.toolbar { gap: 12px; margin-bottom: 18px; }
.dash-h { font-size: 20px; margin: 22px 0 12px; }
.pcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 0 0 24px; }
.pcard { display: block; background: #fff; border: 1px solid #e2dde6; border-left: 6px solid #8a8f98; border-radius: 12px; padding: 16px 18px; text-decoration: none; color: inherit; box-shadow: var(--shadow-sm); transition: transform .12s, box-shadow .12s; }
.pcard:hover, .pcard:focus { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(40,20,60,.14); }
.pcard.is-active { outline: 3px solid #5a2a55; }
.pcard strong { display: block; font-size: 32px; line-height: 1.1; }
.pcard span { font-size: 14px; color: #6b5d78; }
.pcard--new { border-left-color: #2563eb; } .pcard--reviewing { border-left-color: #b45309; } .pcard--needmore { border-left-color: #c2410c; }
.pcard--approved { border-left-color: #146c3e; } .pcard--workrooms { border-left-color: #7c3aed; } .pcard--complete { border-left-color: #0f766e; }
.sub-status { font-size: 15px; padding: 5px 14px; border-radius: 999px; font-weight: 700; letter-spacing: .01em; }
.sub-status--new { background: #dbe8ff; color: #1d4ed8; } .sub-status--reviewing { background: #fde9c8; color: #8a4b00; }
.sub-status--approved { background: #d5f0df; color: #146c3e; } .sub-status--waitlist { background: #e9e3f5; color: #4c3a8a; } .sub-status--declined { background: #f6d9d9; color: #9b1c1c; }
.tl { list-style: none; margin: 0 0 14px; padding: 0 0 0 14px; border-left: 3px solid #d8cfe3; }
.tl li { position: relative; margin: 0 0 14px; padding: 10px 12px; background: #faf8fb; border-radius: 10px; font-size: 15px; }
.tl li::before { content: ""; position: absolute; left: -23px; top: 16px; width: 12px; height: 12px; border-radius: 50%; background: #8a8f98; border: 2px solid #fff; }
.tl-note::before { background: #b45309; } .tl-mail::before { background: #5a2a55; } .tl-reply::before { background: #2563eb; } .tl-status::before { background: #146c3e; }
.tl-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin-bottom: 4px; }
.tl-kind { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #AC7C44; font-weight: 700; }
.kpal { position: fixed; inset: 0; z-index: 3000; background: rgba(20,10,35,.55); display: flex; align-items: flex-start; justify-content: center; padding-top: 12vh; }
.kpal[hidden] { display: none; }
.kpal-box { width: min(680px, 94vw); background: #fff; border-radius: 16px; box-shadow: 0 30px 80px rgba(0,0,0,.4); overflow: hidden; }
.kpal-box input { width: 100%; border: 0; border-bottom: 1px solid #e2dde6; padding: 20px 22px; font-size: 19px; outline: none; }
.kpal-list { max-height: 55vh; overflow: auto; padding: 8px; }
.kpal-list a { display: block; padding: 12px 14px; border-radius: 10px; color: #221530; text-decoration: none; }
.kpal-list a:hover, .kpal-list a.is-sel { background: #f3eef7; }
.kpal-list small { display: block; color: #7a6a85; font-size: 13px; }
.kpal-g { padding: 10px 14px 2px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #AC7C44; font-weight: 700; }
.kpal-foot { padding: 8px 16px; font-size: 13px; color: #7a6a85; border-top: 1px solid #eee; }
@media (max-width: 700px) { .button-lg { width: 100%; } .pcards { grid-template-columns: repeat(2, 1fr); } .data-table th, .data-table td { padding: 12px; } }

/* ---- Admin redesign (27 Nov): grouped sidebar with icons, touch-size targets, hub tiles, mobile drawer ---- */
:root { --sb-bg: #24102f; --sb-bg2: #321745; --sb-text: #e9dff0; --sb-gold: #E8C27A; --sidebar-width: 292px; }
.sidebar { background: linear-gradient(180deg, var(--sb-bg) 0%, #1a0b24 100%); padding: 0 0 24px; position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: thin; }
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 20px 20px 16px; color: #fff; text-decoration: none; font-size: 17px; line-height: 1.2; position: sticky; top: 0; background: var(--sb-bg); z-index: 2; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar-brand small { display: block; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--sb-gold); font-weight: 700; margin-top: 2px; }
.sb-logo { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, #AC7C44, #E8C27A); color: #24102f; display: grid; place-items: center; font-size: 24px; font-weight: 800; flex: none; }
.sidebar-nav { padding: 12px 12px 0; gap: 4px; }
.sidebar-nav a, .sn-group summary { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 14px; border-radius: 12px; color: var(--sb-text); text-decoration: none; font-size: 16px; font-weight: 500; cursor: pointer; list-style: none; }
.sn-group summary::-webkit-details-marker { display: none; }
.sidebar-nav a:hover, .sn-group summary:hover { background: rgba(255,255,255,.09); color: #fff; }
.sidebar-nav a.is-active { background: #fff; color: #24102f; font-weight: 700; }
.sn-top { font-weight: 700 !important; margin-bottom: 6px; }
.sn-ic { width: 30px; height: 30px; display: grid; place-items: center; font-size: 18px; background: rgba(255,255,255,.08); border-radius: 9px; flex: none; }
.is-active .sn-ic { background: #f1e7d6; }
.sn-title { flex: 1; font-weight: 700; letter-spacing: .01em; }
.sn-caret { margin-left: auto; opacity: .6; transition: transform .15s; font-size: 13px; }
.sn-group[open] > summary .sn-caret { transform: rotate(180deg); }
.sn-group[open] { background: rgba(255,255,255,.04); border-radius: 14px; padding-bottom: 6px; margin: 2px 0; }
.sn-group[open] > summary { color: var(--sb-gold); }
.sn-group a { padding-left: 20px; min-height: 46px; font-size: 15.5px; }
.sn-group a .sn-ic { width: 26px; height: 26px; font-size: 15px; }
.sn-badge { margin-left: auto; background: #E8C27A; color: #24102f; border-radius: 999px; min-width: 26px; padding: 2px 9px; text-align: center; font-size: 13px; font-weight: 800; }
.is-active .sn-badge { background: #24102f; color: #fff; }
.topbar { min-height: 68px; position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.94); backdrop-filter: blur(6px); }
.topbar-title { font-size: 22px; font-weight: 800; }
.menu-btn { display: none; min-height: 48px; padding: 0 16px; border-radius: 12px; border: 1px solid #d6cbe0; background: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; margin: 0 0 26px; }
.hub-card { background: #fff; border: 1px solid #e8e1ee; border-radius: 18px; padding: 18px; box-shadow: var(--shadow-sm); }
.hub-card h3 { display: flex; align-items: center; gap: 10px; font-size: 19px; margin: 0 0 2px; }
.hub-card h3 span.hb-ic { width: 40px; height: 40px; border-radius: 12px; background: #f6efe3; display: grid; place-items: center; font-size: 22px; }
.hub-card > p { color: #6b5d78; font-size: 14.5px; margin: 0 0 12px; }
.hub-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.hub-tile { position: relative; display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 10px 12px; border-radius: 14px; background: #faf7fc; border: 1px solid #ece4f2; color: #24102f; text-decoration: none; font-weight: 600; font-size: 15.5px; line-height: 1.25; transition: background .12s, transform .12s; }
.hub-tile:hover, .hub-tile:focus { background: #f1e7fa; transform: translateY(-2px); outline: none; }
.hub-tile .sn-ic { background: #fff; width: 34px; height: 34px; font-size: 19px; }
.hub-tile .sn-badge { position: absolute; top: -8px; right: -6px; margin: 0; }
.hub-card--today { border-color: #E8C27A; background: linear-gradient(180deg, #fffaf0, #fff); }
.sb-scrim { position: fixed; inset: 0; background: rgba(20,10,35,.6); z-index: 90; }
.sb-scrim[hidden] { display: none; }
@media (max-width: 960px) {
  .app-shell { flex-direction: row; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(86vw, 340px); z-index: 100; transform: translateX(-102%); transition: transform .2s; flex-direction: column; height: 100vh; padding: 0 0 24px; }
  body.nav-open .sidebar { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.5); }
  .sidebar-nav { flex-direction: column; }
  .menu-btn { display: inline-flex; align-items: center; }
  .hub { grid-template-columns: 1fr; }
  .topbar { flex-wrap: wrap; gap: 10px; padding: 10px 14px; }
  .topbar-search { order: 5; flex: 1 1 100% !important; max-width: none !important; }
  .topbar-user span { display: none; }
}
@media (max-width: 420px) { .hub-tiles { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .sidebar, .hub-tile, .sn-caret { transition: none; } }

/* ---- Touch screen look (restaurant / cashier style): chosen per admin ---- */
.ui-touch { font-size: 18px; }
.ui-touch .sidebar, .ui-touch .menu-btn, .ui-touch .sb-scrim { display: none !important; }
.ui-touch .app-shell { display: block; }
.ui-touch .main { padding-bottom: 110px; }
.ui-touch .content { padding: 20px; }
.ui-touch .topbar { min-height: 76px; }
.ui-touch .topbar-title { font-size: 26px; }
.ui-touch .button, .ui-touch button, .ui-touch select, .ui-touch input[type=text], .ui-touch input[type=search], .ui-touch input[type=email] { min-height: 56px; font-size: 18px; }
.ui-touch .button { padding: 14px 24px; border-radius: 14px; }
.ui-touch .data-table td, .ui-touch .data-table th { padding: 20px 18px; }
.touch-sub { font-size: 19px; color: #6b5d78; margin: 0 0 18px; }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.pos-grid--home { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.pos-tile { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; text-align: center; min-height: 170px; padding: 20px 16px; border-radius: 22px; color: #fff; text-decoration: none; box-shadow: 0 6px 0 rgba(0,0,0,.22); transition: transform .08s, box-shadow .08s; -webkit-tap-highlight-color: transparent; }
.pos-big { min-height: 230px; }
.pos-tile:active { transform: translateY(5px); box-shadow: 0 1px 0 rgba(0,0,0,.22); }
.pos-ic { font-size: 54px; line-height: 1; }
.pos-big .pos-ic { font-size: 72px; }
.pos-lb { font-size: 24px; font-weight: 800; line-height: 1.15; }
.pos-big .pos-lb { font-size: 28px; }
.pos-sub { font-size: 15px; opacity: .92; }
.pos-badge { position: absolute; top: 12px; right: 12px; min-width: 44px; padding: 4px 12px; border-radius: 999px; background: #fff; color: #24102f; font-size: 22px; font-weight: 800; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.pos-c0 { background: #7c3aed; } .pos-c1 { background: #2563eb; } .pos-c2 { background: #0f766e; } .pos-c3 { background: #b45309; }
.pos-c4 { background: #be185d; } .pos-c5 { background: #146c3e; } .pos-c6 { background: #c2410c; } .pos-c7 { background: #4338ca; }
.touch-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; display: flex; gap: 10px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #24102f; box-shadow: 0 -8px 30px rgba(0,0,0,.3); }
.touch-bar a { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 72px; border-radius: 16px; background: rgba(255,255,255,.1); color: #fff; text-decoration: none; font-size: 15px; font-weight: 700; }
.touch-bar a span { font-size: 28px; line-height: 1; }
.touch-bar a.is-active { background: #E8C27A; color: #24102f; }
.touch-bar b { position: absolute; top: 4px; right: 8px; background: #E8C27A; color: #24102f; border-radius: 999px; padding: 1px 8px; font-size: 13px; }
.ui-classic .touch-bar { display: none; }
.ui-switch { margin: 0; }
.ui-switch .button { min-height: 48px; white-space: nowrap; }
@media (max-width: 960px) { .ui-switch .button { padding: 10px 12px; } .pos-grid, .pos-grid--home { grid-template-columns: repeat(2, 1fr); gap: 12px; } .pos-tile { min-height: 150px; } .pos-lb, .pos-big .pos-lb { font-size: 20px; } }
