/* ============================================================
   SmartCheckIn - Premium design system
   Palette: Deep Navy #0F2747 · Royal Blue #1769E0 · White
   ============================================================ */

:root {
    --navy: #0F2747;
    --navy-2: #14335C;
    --blue: #1769E0;
    --blue-600: #1257BD;
    --blue-50: #EAF3FF;
    --bg: #F6F8FC;
    --white: #FFFFFF;
    --text: #172033;
    --muted: #667085;
    --success: #16A34A;
    --success-bg: #ECFDF3;
    --warning: #F59E0B;
    --warning-bg: #FFFAEB;
    --danger: #DC2626;
    --danger-bg: #FEF2F2;
    --info: #1769E0;
    --info-bg: #EAF3FF;
    --neutral: #6B7280;
    --neutral-bg: #F3F4F6;
    --border: #E4EAF2;
    --border-strong: #D3DDEA;
    --radius: 14px;
    --radius-sm: 10px;
    --radius-xs: 7px;
    --shadow: 0 1px 2px rgba(15, 39, 71, 0.05), 0 8px 24px rgba(15, 39, 71, 0.06);
    --shadow-lg: 0 12px 40px rgba(15, 39, 71, 0.14);
    --sidebar-w: 258px;
    --sidebar-w-collapsed: 78px;
    --topbar-h: 66px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 { margin: 0 0 8px; font-weight: 700; color: var(--navy); letter-spacing: -0.01em; }
h1 { font-size: 24px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
h4 { font-size: 14px; }
p { margin: 0 0 12px; }

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-600); }

img { max-width: 100%; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.mr-1 { margin-right: 8px; } .ml-1 { margin-left: 8px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.flex { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.flex-grow { flex: 1; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; }
.w-100 { width: 100%; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    background: var(--navy);
    color: #B9C7DD;
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    transition: width 0.28s var(--ease), transform 0.28s var(--ease);
    overflow: hidden;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    height: var(--topbar-h);
    padding: 0 20px;
    color: #fff;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-logo .logo-mark {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--blue), #4E9BFF);
    display: flex; align-items: center; justify-content: center;
    color: #fff; flex-shrink: 0;
}
.sidebar-logo .logo-name { font-weight: 700; font-size: 15px; white-space: nowrap; }
.sidebar-logo .logo-sub { font-size: 10.5px; color: #7E93B4; white-space: nowrap; letter-spacing: 0.06em; text-transform: uppercase; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 14px 12px 20px; }
.sidebar-nav::-webkit-scrollbar { width: 5px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

.nav-section { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.09em; color: #5E7699; padding: 16px 12px 6px; white-space: nowrap; }
.nav-section:first-child { padding-top: 2px; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: #B9C7DD;
    margin-bottom: 2px;
    white-space: nowrap;
    transition: background 0.18s var(--ease), color 0.18s var(--ease);
    position: relative;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-item.active { background: var(--blue); color: #fff; box-shadow: 0 6px 16px rgba(23,105,224,0.35); }
.nav-item svg { width: 19px; height: 19px; flex-shrink: 0; }
.nav-item .nav-label { flex: 1; font-weight: 500; font-size: 13.5px; }
.nav-item .nav-badge { background: var(--danger); color: #fff; border-radius: 20px; padding: 1px 7px; font-size: 11px; font-weight: 700; }

.sidebar-footer { padding: 12px; border-top: 1px solid rgba(255,255,255,0.08); }

.main {
    flex: 1;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: margin-left 0.28s var(--ease);
}

/* collapsed sidebar */
body.sidebar-collapsed .sidebar { width: var(--sidebar-w-collapsed); }
body.sidebar-collapsed .main { margin-left: var(--sidebar-w-collapsed); }
body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .nav-section,
body.sidebar-collapsed .logo-name,
body.sidebar-collapsed .logo-sub,
body.sidebar-collapsed .nav-badge { display: none; }
body.sidebar-collapsed .nav-item, body.sidebar-collapsed .sidebar-logo { justify-content: center; padding-left: 0; padding-right: 0; }

/* ---------- Topbar ---------- */
.topbar {
    height: var(--topbar-h);
    background: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 30;
}
.topbar-title { font-size: 16px; font-weight: 700; color: var(--navy); }

.icon-btn {
    width: 38px; height: 38px;
    border: none;
    background: transparent;
    border-radius: var(--radius-xs);
    color: var(--muted);
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background 0.15s var(--ease), color 0.15s var(--ease);
    position: relative;
}
.icon-btn:hover { background: var(--bg); color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn .dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; background: var(--danger); border-radius: 50%; border: 2px solid #fff; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 5px 10px 5px 5px; border-radius: 40px; border: 1px solid var(--border); }
.user-chip .avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--blue-50); color: var(--blue); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.user-chip .user-meta { line-height: 1.2; }
.user-chip .user-name { font-weight: 600; font-size: 13px; }
.user-chip .user-role { font-size: 11px; color: var(--muted); }

/* ---------- Content ---------- */
.page {
    padding: 26px 28px 60px;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
}
.page-header { margin-bottom: 22px; }
.page-header h1 { font-size: 22px; }
.page-header .sub { color: var(--muted); font-size: 13.5px; }

/* ---------- Cards ---------- */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    transition: box-shadow 0.2s var(--ease);
}
.card + .card { margin-top: 20px; }
.card-hover:hover { box-shadow: var(--shadow-lg); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-header h3 { margin: 0; }
.card-header .hint { color: var(--muted); font-size: 12.5px; }
.card-body > *:last-child { margin-bottom: 0; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-icon {
    width: 46px; height: 46px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.stat-icon svg { width: 22px; height: 22px; }
.stat-icon.blue { background: var(--blue-50); color: var(--blue); }
.stat-icon.green { background: var(--success-bg); color: var(--success); }
.stat-icon.amber { background: var(--warning-bg); color: var(--warning); }
.stat-icon.red { background: var(--danger-bg); color: var(--danger); }
.stat-icon.neutral { background: var(--neutral-bg); color: var(--neutral); }
.stat-value { font-size: 26px; font-weight: 800; color: var(--navy); line-height: 1.1; letter-spacing: -0.02em; }
.stat-label { color: var(--muted); font-size: 12.5px; font-weight: 500; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font);
    font-size: 13.5px;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: var(--radius-xs);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s var(--ease), transform 0.1s var(--ease), box-shadow 0.15s var(--ease), border-color 0.15s var(--ease);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.3;
}
.btn svg { width: 17px; height: 17px; flex-shrink: 0; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 4px 14px rgba(23,105,224,0.3); }
.btn-primary:hover { background: var(--blue-600); color: #fff; }
.btn-secondary { background: var(--white); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--bg); border-color: var(--blue); color: var(--blue); }
.btn-ghost { background: transparent; color: var(--muted); border-color: transparent; }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #B91C1C; color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #12883B; color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; }
.btn-sm svg { width: 15px; height: 15px; }
.btn-lg { padding: 13px 22px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-loading { pointer-events: none; opacity: 0.7; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.field label .req { color: var(--danger); }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

.input, .select, .textarea {
    width: 100%;
    font-family: var(--font);
    font-size: 14px;
    color: var(--text);
    background: var(--white);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xs);
    padding: 10px 13px;
    transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
    outline: none;
}
.input::placeholder, .textarea::placeholder { color: #9AA6B8; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23,105,224,0.14); }
.textarea { resize: vertical; min-height: 90px; }
.input-error { border-color: var(--danger) !important; }
.field-error { color: var(--danger); font-size: 12.5px; margin: 6px 0 0; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 18px; }
.form-grid .field.full { grid-column: 1 / -1; }
.form-grid > * { min-width: 0; }

.checkbox-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; cursor: pointer; }
.checkbox-row input { width: 18px; height: 18px; accent-color: var(--blue); margin-top: 2px; cursor: pointer; }
.checkbox-row .checkbox-label { font-size: 13.5px; }

/* phone input group */
.phone-input { display: flex; }
.phone-input .select { width: 150px; flex-shrink: 0; border-radius: var(--radius-xs) 0 0 var(--radius-xs); border-right: none; background: var(--bg); }
.phone-input .input { border-radius: 0 var(--radius-xs) var(--radius-xs) 0; }
.phone-input .flag { margin-right: 6px; }

/* search */
.search-box { display: flex; gap: 10px; max-width: 460px; }
.search-box .input { flex: 1; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
    text-align: left;
    padding: 11px 14px;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    font-weight: 700;
}
.table td { padding: 13px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr { transition: background 0.12s var(--ease); }
.table tbody tr:hover { background: #FAFCFF; }
.table .row-actions { display: flex; gap: 6px; justify-content: flex-end; }

.guest-cell { display: flex; align-items: center; gap: 11px; }
.guest-cell .avatar { width: 38px; height: 38px; border-radius: 11px; background: var(--blue-50); color: var(--blue); display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.guest-cell .g-name { font-weight: 600; color: var(--text); }
.guest-cell .g-sub { font-size: 12px; color: var(--muted); }

/* ---------- Badges ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 30px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: #B45309; }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-neutral { background: var(--neutral-bg); color: var(--neutral); }
.badge-muted { background: #EEF1F6; color: #8A94A6; }

/* ---------- Alerts / toasts ---------- */
.alert {
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    margin-bottom: 18px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    border: 1px solid transparent;
}
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: var(--success-bg); color: #0F7A33; border-color: #BBF7D0; }
.alert-danger { background: var(--danger-bg); color: #B91C1C; border-color: #FECACA; }
.alert-warning { background: var(--warning-bg); color: #B45309; border-color: #FDE68A; }
.alert-info { background: var(--info-bg); color: #1257BD; border-color: #BFDBFE; }

.toast-wrap { position: fixed; bottom: 22px; right: 22px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.toast {
    background: var(--navy);
    color: #fff;
    padding: 13px 18px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    font-size: 13.5px;
    max-width: 360px;
    display: flex;
    gap: 10px;
    align-items: center;
    animation: toast-in 0.28s var(--ease);
}
.toast svg { width: 18px; height: 18px; flex-shrink: 0; }
.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--danger); }
.toast-warning { border-left: 4px solid var(--warning); }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.toast-out { opacity: 0; transform: translateY(10px); transition: all 0.25s var(--ease); }

/* ---------- Empty states ---------- */
.empty-state { text-align: center; padding: 48px 20px; }
.empty-state .empty-icon {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: var(--blue-50);
    color: var(--blue);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 14px;
}
.empty-state .empty-icon svg { width: 28px; height: 28px; }
.empty-state h4 { margin-bottom: 4px; }
.empty-state p { color: var(--muted); font-size: 13px; max-width: 360px; margin: 0 auto; }

/* ---------- Modals ---------- */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 39, 71, 0.45);
    backdrop-filter: blur(3px);
    z-index: 80;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.open { display: flex; animation: fade-in 0.18s var(--ease); }
.modal {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modal-in 0.24s var(--ease);
}
.modal-lg { max-width: 720px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-header h3 { margin: 0; }
.modal-body { padding: 22px; }
.modal-footer { padding: 16px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Pagination ---------- */
.pagination { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: space-between; margin-top: 18px; }
.pagination .pages { display: flex; gap: 6px; flex-wrap: wrap; }
.page-btn {
    min-width: 34px; height: 34px;
    padding: 0 10px;
    border-radius: var(--radius-xs);
    border: 1px solid var(--border-strong);
    background: var(--white);
    color: var(--text);
    font-weight: 600;
    font-size: 13px;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all 0.14s var(--ease);
}
.page-btn:hover { border-color: var(--blue); color: var(--blue); }
.page-btn.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.page-btn.disabled { opacity: 0.4; pointer-events: none; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 22px; overflow-x: auto; }
.tab {
    padding: 10px 16px;
    font-weight: 600;
    font-size: 13.5px;
    color: var(--muted);
    border-bottom: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    background: none;
    border-top: none; border-left: none; border-right: none;
    font-family: var(--font);
    transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--blue); border-bottom-color: var(--blue); }

/* ---------- Wizard steps ---------- */
.wizard-steps { display: flex; align-items: center; gap: 4px; margin-bottom: 24px; flex-wrap: wrap; }
.wizard-step { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.wizard-step .step-dot {
    width: 26px; height: 26px;
    border-radius: 50%;
    border: 2px solid var(--border-strong);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
    color: var(--muted);
    transition: all 0.2s var(--ease);
    flex-shrink: 0;
}
.wizard-step.active .step-dot { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 4px 10px rgba(23,105,224,0.3); }
.wizard-step.active { color: var(--navy); }
.wizard-step.done .step-dot { background: var(--success); border-color: var(--success); color: #fff; }
.wizard-step.done { color: var(--success); }
.wizard-step .step-line { width: 22px; height: 2px; background: var(--border-strong); }
.wizard-step.done .step-line, .wizard-step.active .step-line { background: var(--success); }

/* ---------- Skeleton ---------- */
.skeleton { background: linear-gradient(90deg, #EEF1F6 25%, #F7F9FC 50%, #EEF1F6 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.timeline-item { position: relative; padding-bottom: 20px; }
.timeline-item::before {
    content: '';
    position: absolute;
    left: -22px; top: 4px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--blue);
    border: 3px solid var(--blue-50);
}
.timeline-item.negative::before { background: var(--danger); border-color: var(--danger-bg); }
.timeline-item.positive::before { background: var(--success); border-color: var(--success-bg); }
.timeline-item .tl-title { font-weight: 600; font-size: 13.5px; }
.timeline-item .tl-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.timeline-item .tl-body { font-size: 13px; color: var(--text); margin-top: 4px; }

/* ---------- Misc ---------- */
.avatar-lg { width: 64px; height: 64px; border-radius: 16px; background: var(--blue-50); color: var(--blue); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; }
.profile-hero { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.dl { display: grid; grid-template-columns: 1fr; gap: 0; }
.dl .dl-row { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
.dl .dl-row:last-child { border-bottom: none; }
.dl dt { color: var(--muted); font-weight: 500; }
.dl dd { margin: 0; font-weight: 600; text-align: right; word-break: break-word; }
.dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 24px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-2.grid-1 { grid-template-columns: 1fr; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.mobile-menu-btn { display: none; }

/* signature pad */
.signature-pad { border: 1.5px dashed var(--border-strong); border-radius: var(--radius-sm); background: #fff; touch-action: none; cursor: crosshair; }

/* language flags */
.lang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.lang-btn { border: 1px solid var(--border-strong); background: var(--white); border-radius: var(--radius-sm); padding: 14px 10px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; transition: all 0.16s var(--ease); }
.lang-btn:hover { border-color: var(--blue); box-shadow: 0 4px 14px rgba(23,105,224,0.14); transform: translateY(-1px); }
.lang-btn .flag { font-size: 26px; }
.lang-btn .lang-name { font-weight: 600; font-size: 13px; color: var(--text); }
.lang-btn.active { border-color: var(--blue); background: var(--blue-50); box-shadow: 0 4px 14px rgba(23,105,224,0.2); }

/* QR display */
.qr-box { display: inline-block; padding: 14px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); }

/* print */
@media print {
    .sidebar, .topbar, .no-print, .pagination, .btn, .search-box, .tabs, .row-actions, .modal-overlay, .toast-wrap { display: none !important; }
    .main { margin-left: 0; }
    body.sidebar-collapsed .main { margin-left: 0; }
    .page { padding: 0; }
    .card { box-shadow: none; border: none; padding: 0; }
    .card + .card { margin-top: 12px; }
    body { background: #fff; }
    table.table td, table.table th { border-color: #ccc; }
    a { color: inherit; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); width: var(--sidebar-w); }
    body.sidebar-collapsed .sidebar { transform: translateX(0); width: var(--sidebar-w); }
    body.sidebar-collapsed .main { margin-left: 0; }
    .main { margin-left: 0; }
    .mobile-menu-btn { display: inline-flex; }
    body.sidebar-collapsed .nav-label,
    body.sidebar-collapsed .nav-section,
    body.sidebar-collapsed .logo-name,
    body.sidebar-collapsed .logo-sub { display: block; }
    body.sidebar-collapsed .nav-item, body.sidebar-collapsed .sidebar-logo { justify-content: flex-start; padding-left: 12px; padding-right: 12px; }
    .page { padding: 18px 14px 50px; }
    .topbar { padding: 0 14px; }
    .user-chip .user-meta { display: none; }
    .stat-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
    .stat-value { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
