/* ============================================================
   KOR INVENTORY — styles.css
   Mobile-first, premium, clinical white design
   ============================================================ */

:root {
    --blue:        #0A84FF;
    --blue-bg:     #EAF3FF;
    --text:        #111111;
    --text-2:      #6E6E73;
    --text-3:      #AEAEB2;
    --bg:          #FFFFFF;
    --surface:     #F2F2F7;
    --border:      #E5E5EA;
    --red:         #FF3B30;
    --red-bg:      #FFF2F1;
    --yellow:      #FFCC00;
    --yellow-bg:   #FFFDE7;
    --orange:      #FF9500;
    --orange-bg:   #FFF3E0;
    --green:       #34C759;
    --green-bg:    #F0FFF4;
    --gray:        #8E8E93;
    --gray-bg:     #F9F9F9;

    --radius:      16px;
    --radius-sm:   10px;
    --radius-xs:   8px;
    --shadow:      0 2px 20px rgba(0,0,0,0.08);
    --shadow-sm:   0 1px 6px rgba(0,0,0,0.06);

    --header-h:    60px;
    --nav-h:       72px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    overflow: hidden;
    background: var(--bg);
}

body {
    font-family: -apple-system, 'SF Pro Text', 'Helvetica Neue', Roboto, Arial, sans-serif;
    font-size: 16px;
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

input, select, textarea, button {
    font-family: inherit;
    font-size: inherit;
}

button { cursor: pointer; }

/* ============================================================
   SCREENS
   ============================================================ */

.screen {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
    z-index: 1;
}

.screen.active {
    opacity: 1;
    pointer-events: all;
    z-index: 2;
}

/* ============================================================
   HEADER
   ============================================================ */

.screen-header {
    height: var(--header-h);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 20px;
    flex-shrink: 0;
    gap: 12px;
    position: relative;
}

.header-logo {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--text);
}

.header-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    flex: 1;
}

.header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-back {
    background: none;
    border: none;
    color: var(--blue);
    font-size: 16px;
    font-weight: 500;
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.header-badge {
    background: var(--surface);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
    white-space: nowrap;
}

/* ============================================================
   SCROLL CONTENT
   ============================================================ */

.screen-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 20px 100px;
    -webkit-overflow-scrolling: touch;
}

.screen-footer {
    padding: 12px 20px 28px;
    background: var(--bg);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

/* ============================================================
   KOR LOGO (home screen)
   ============================================================ */

.home-logo {
    text-align: center;
    margin-bottom: 48px;
}

.logo-wordmark {
    font-size: 56px;
    font-weight: 800;
    letter-spacing: 0.18em;
    color: var(--text);
    line-height: 1;
    display: inline-flex;
    align-items: flex-end;
}

.logo-o-wrap {
    position: relative;
    display: inline-block;
    padding-top: 10px;
}

.logo-o-wrap::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 5%;
    right: 5%;
    height: 4px;
    background: var(--blue);
    border-radius: 3px;
}

.logo-subtitle {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.25em;
    color: var(--text-2);
    text-transform: uppercase;
    margin-top: 8px;
}

/* ============================================================
   HOME SCREEN
   ============================================================ */

#screen-home .screen-content {
    padding: 48px 24px 40px;
    display: flex;
    flex-direction: column;
}

.home-heading {
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.home-sub {
    font-size: 16px;
    color: var(--text-2);
    margin-bottom: 32px;
}

.staff-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.staff-card {
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: border-color 0.15s, background 0.15s;
    box-shadow: var(--shadow-sm);
    width: 100%;
}

.staff-card:active {
    background: var(--surface);
    border-color: var(--blue);
}

.staff-card-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.staff-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

.staff-role {
    font-size: 13px;
    color: var(--text-2);
    font-weight: 400;
}

.staff-card-arrow {
    font-size: 20px;
    color: var(--text-3);
}

.staff-card--overseer {
    border-color: var(--blue);
    background: var(--blue-bg);
}

.staff-card--overseer .staff-name {
    color: var(--blue);
}

.staff-card--overseer .staff-card-arrow {
    color: var(--blue);
}

.location-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--surface);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    color: var(--text-2);
    font-weight: 500;
    align-self: center;
    margin-top: 28px;
}

/* ============================================================
   BOTTOM NAVIGATION
   ============================================================ */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    background: var(--bg);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: stretch;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav.hidden {
    display: none;
}

.nav-btn {
    flex: 1;
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-3);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 8px 4px;
    transition: color 0.15s;
    position: relative;
}

.nav-btn.active {
    color: var(--blue);
}

.nav-icon {
    font-size: 22px;
    line-height: 1;
}

/* red dot on ordering tab when items are low */
.nav-btn .badge {
    position: absolute;
    top: 6px;
    right: 50%;
    transform: translateX(12px);
    background: var(--red);
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 10px;
    padding: 1px 5px;
    min-width: 16px;
    text-align: center;
    line-height: 14px;
}

/* ============================================================
   LEGEND
   ============================================================ */

.legend {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--surface);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-2);
    white-space: nowrap;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-dot.red    { background: var(--red); }
.legend-dot.yellow { background: var(--yellow); }
.legend-dot.orange { background: var(--orange); }
.legend-dot.green  { background: var(--green); }
.legend-dot.gray   { background: var(--gray); }

/* ============================================================
   FILTER TABS
   ============================================================ */

.filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
}

.filter-tabs::-webkit-scrollbar { display: none; }

.filter-tab {
    background: var(--surface);
    border: none;
    border-radius: 20px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-2);
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}

.filter-tab.active {
    background: var(--blue);
    color: white;
}

/* ============================================================
   ITEM CARDS (Dashboard)
   ============================================================ */

.items-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.item-card {
    border-radius: var(--radius);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-sm);
    border: 1.5px solid transparent;
    position: relative;
    overflow: hidden;
}

.item-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.item-card.status-red    { background: var(--red-bg);    border-color: #FFCCCB; }
.item-card.status-red::before    { background: var(--red); }

.item-card.status-yellow { background: var(--yellow-bg); border-color: #FFE88A; }
.item-card.status-yellow::before { background: var(--yellow); }

.item-card.status-orange { background: var(--orange-bg); border-color: #FFCC80; }
.item-card.status-orange::before { background: var(--orange); }

.item-card.status-green  { background: var(--green-bg);  border-color: #A8E6C0; }
.item-card.status-green::before  { background: var(--green); }

.item-card.status-gray   { background: var(--gray-bg);   border-color: var(--border); }
.item-card.status-gray::before   { background: var(--gray); }

.item-card-body {
    flex: 1;
    min-width: 0;
}

.item-card-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-card-meta {
    font-size: 12px;
    color: var(--text-2);
    margin-top: 2px;
}

.item-card-right {
    text-align: right;
    flex-shrink: 0;
}

.item-stock {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}

.item-days {
    font-size: 12px;
    font-weight: 500;
    margin-top: 2px;
    white-space: nowrap;
}

.item-card.status-red    .item-days { color: var(--red); }
.item-card.status-yellow .item-days { color: #B8860B; }
.item-card.status-orange .item-days { color: #CC7000; }
.item-card.status-green  .item-days { color: #1A7A35; }
.item-card.status-gray   .item-days { color: var(--gray); }

/* Edit button on item card (Fortune only) */
.item-card-edit {
    background: none;
    border: none;
    font-size: 18px;
    padding: 4px;
    color: var(--text-3);
    display: none;
}

.fortune-mode .item-card-edit {
    display: block;
}

/* ============================================================
   COUNT SCREEN
   ============================================================ */

.count-intro {
    font-size: 14px;
    color: var(--text-2);
    background: var(--blue-bg);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.count-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.count-row {
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 16px 16px 18px;
    box-shadow: var(--shadow-sm);
}

.count-row-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 8px;
}

.count-row-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.count-row-current {
    font-size: 13px;
    color: var(--text-2);
    white-space: nowrap;
    margin-top: 2px;
    flex-shrink: 0;
}

.count-controls {
    display: flex;
    align-items: center;
    gap: 0;
}

.count-btn {
    width: 56px;
    height: 56px;
    border: 1.5px solid var(--border);
    background: var(--surface);
    font-size: 28px;
    font-weight: 300;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.1s;
    flex-shrink: 0;
    line-height: 1;
}

.count-btn:first-child {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    border-right: none;
}

.count-btn:last-child {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    border-left: none;
    background: var(--blue-bg);
    color: var(--blue);
}

.count-btn:active { background: var(--border); }
.count-btn:last-child:active { background: #c5deff; }

.count-input {
    flex: 1;
    height: 56px;
    border: 1.5px solid var(--border);
    border-left: none;
    border-right: none;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    background: var(--bg);
    outline: none;
    min-width: 0;
    padding: 0 8px;
    -moz-appearance: textfield;
}

.count-input::-webkit-outer-spin-button,
.count-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.count-input:focus {
    border-color: var(--blue);
    background: var(--blue-bg);
}

.count-category-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    background: var(--surface);
    color: var(--text-2);
    border-radius: 6px;
    padding: 2px 8px;
    margin-top: 4px;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn-primary {
    background: var(--blue);
    color: white;
    border: none;
    border-radius: var(--radius);
    padding: 18px 24px;
    font-size: 17px;
    font-weight: 600;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.15s;
    letter-spacing: 0.01em;
}

.btn-primary:active { opacity: 0.85; }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: none;
    border-radius: var(--radius);
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 500;
    width: 100%;
    transition: background 0.15s;
}

.btn-secondary:active { background: var(--border); }

.btn-danger {
    background: var(--red-bg);
    color: var(--red);
    border: 1.5px solid #FFCCCB;
    border-radius: var(--radius);
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 500;
    width: 100%;
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.form-input,
.form-select {
    width: 100%;
    height: 52px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0 16px;
    font-size: 16px;
    color: var(--text);
    background: var(--bg);
    outline: none;
    transition: border-color 0.15s;
    -webkit-appearance: none;
    appearance: none;
}

.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236E6E73' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.form-input:focus, .form-select:focus {
    border-color: var(--blue);
}

.form-hint {
    font-size: 13px;
    color: var(--text-2);
    margin-top: 6px;
    line-height: 1.4;
}

/* Receive stock qty control */
.qty-control {
    display: flex;
    align-items: center;
    gap: 0;
}

.qty-control .count-btn { width: 64px; height: 64px; font-size: 32px; }
.qty-control .count-input { height: 64px; font-size: 26px; }

/* ============================================================
   SECTION HEADERS
   ============================================================ */

.section-header {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 28px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

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

/* ============================================================
   ORDERING PAGE
   ============================================================ */

.supplier-block {
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.supplier-header {
    background: var(--surface);
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.supplier-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.supplier-contact {
    font-size: 12px;
    color: var(--text-2);
    margin-top: 2px;
}

.order-row {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.order-row:last-child { border-bottom: none; }

.order-row-left { flex: 1; min-width: 0; }

.order-item-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.order-item-stock {
    font-size: 13px;
    color: var(--text-2);
    margin-top: 2px;
}

.order-row-right { text-align: right; flex-shrink: 0; }

.order-suggestion {
    font-size: 14px;
    font-weight: 700;
    color: var(--blue);
}

.order-days-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    border-radius: 6px;
    padding: 2px 8px;
    margin-top: 4px;
}

.order-days-badge.red    { background: var(--red-bg);    color: var(--red); }
.order-days-badge.yellow { background: var(--yellow-bg); color: #7A6000; }

/* ============================================================
   YOCO UPLOAD
   ============================================================ */

.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 40px 24px;
    text-align: center;
    background: var(--surface);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    margin-bottom: 20px;
}

.upload-zone:active, .upload-zone.dragover {
    border-color: var(--blue);
    background: var(--blue-bg);
}

.upload-icon { font-size: 48px; margin-bottom: 12px; }

.upload-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.upload-sub {
    font-size: 14px;
    color: var(--text-2);
}

.yoco-preview {
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 20px;
}

.yoco-preview-header {
    background: var(--surface);
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

.yoco-row {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.yoco-row:last-child { border-bottom: none; }

.yoco-row.matched  { background: var(--green-bg); }
.yoco-row.unmatched { background: var(--gray-bg); }

.yoco-item-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.yoco-qty {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    flex-shrink: 0;
}

.yoco-match-label {
    font-size: 11px;
    margin-top: 2px;
    font-weight: 500;
}

.yoco-row.matched   .yoco-match-label { color: #1A7A35; }
.yoco-row.unmatched .yoco-match-label { color: var(--gray); }

/* ============================================================
   MORE SCREEN
   ============================================================ */

.more-user-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px 20px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.more-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.more-user-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

.more-user-role {
    font-size: 14px;
    color: var(--text-2);
    margin-top: 2px;
}

.more-menu {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.more-menu-item {
    background: var(--bg);
    border: none;
    border-bottom: 1px solid var(--border);
    padding: 18px 20px;
    text-align: left;
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    transition: background 0.15s;
}

.more-menu-item:last-child { border-bottom: none; }
.more-menu-item:active { background: var(--surface); }

.more-menu-icon {
    font-size: 22px;
    width: 28px;
    text-align: center;
}

.more-menu-item.danger { color: var(--red); }
.more-menu-item.fortune-only { display: none; }

.fortune-mode .more-menu-item.fortune-only { display: flex; }

.more-version {
    text-align: center;
    font-size: 12px;
    color: var(--text-3);
    margin-top: 28px;
    padding-bottom: 20px;
}

/* ============================================================
   DISCREPANCY SCREEN
   ============================================================ */

.discrepancy-row {
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
}

.discrepancy-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.discrepancy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    text-align: center;
}

.discrepancy-cell-label {
    font-size: 11px;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.discrepancy-cell-value {
    font-size: 16px;
    font-weight: 700;
    margin-top: 2px;
}

.discrepancy-cell-value.negative { color: var(--red); }
.discrepancy-cell-value.positive { color: var(--green); }
.discrepancy-cell-value.neutral  { color: var(--text-2); }

/* ============================================================
   EMPTY STATES
   ============================================================ */

.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-2);
}

.empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-title { font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.empty-sub   { font-size: 14px; line-height: 1.5; }

/* ============================================================
   TOAST
   ============================================================ */

.toast {
    position: fixed;
    bottom: calc(var(--nav-h) + 16px);
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--text);
    color: white;
    border-radius: 24px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 999;
    pointer-events: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.toast.success { background: var(--green); }
.toast.error   { background: var(--red); }
.toast.show    { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
   LOADING
   ============================================================ */

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 500;
    gap: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.loading-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 15px;
    color: var(--text-2);
    font-weight: 500;
}

/* ============================================================
   UTILITY
   ============================================================ */

.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }

.section-note {
    font-size: 14px;
    color: var(--text-2);
    margin-bottom: 20px;
    line-height: 1.5;
}

.divider {
    height: 1px;
    background: var(--border);
    margin: 20px 0;
}

/* category pill in count list */
.cat-pill {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    background: var(--surface);
    color: var(--text-2);
    border-radius: 6px;
    padding: 2px 8px;
    margin-top: 4px;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */

.screen-content::-webkit-scrollbar { width: 4px; }
.screen-content::-webkit-scrollbar-track { background: transparent; }
.screen-content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
