/* ============================================================
   POS theme — dark navy shell, color-coded tile groups
   ============================================================ */
:root {
    --bg:            #0a0f1a;
    --panel:         #0d1524;
    --panel-2:       #111a2c;
    --row:           #131e33;
    --row-alt:       #0f1829;
    --line:          #1d2a42;
    --text:          #e7ecf4;
    --text-dim:      #8b97ac;
    --blue:          #2f7ff0;
    --blue-dark:     #2566c4;

    --olive-fill:    #3b3b22;
    --olive-border:  #c9d64c;
    --orange-fill:   #241a10;
    --orange-border: #e79b3a;
    --green-fill:    #14291f;
    --green-border:  #59c07a;
    --lime-fill:     #2c3316;
    --lime-border:   #cbe14e;
    --purple-fill:   #17162b;
    --purple-border: #8d86ea;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
button:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }

.t-right { text-align: right; }

/* ============ layout ============ */
.pos { flex: 1; display: flex; min-height: 0; }

/* ============ order panel (left) ============ */
.order-panel {
    width: 435px;
    flex-shrink: 0;
    background: var(--panel);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--line);
}

.order-panel__top {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 18px 10px;
}
.order-panel__top h1 { font-size: 24px; font-weight: 700; }
.order-panel__server { margin-left: auto; font-size: 12px; color: var(--text-dim); }

.order-panel__toolbar {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 18px 12px;
}
.order-panel__title { font-size: 16px; font-weight: 600; }
.order-panel__toolbar-right { margin-left: auto; display: flex; gap: 8px; }

.pill {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 6px 14px;
    font-size: 12.5px;
    color: var(--text);
    background: var(--panel-2);
    white-space: nowrap;
}
.pill:hover { border-color: var(--blue); }
.pill--icon { padding: 6px 10px; border-radius: 50%; }
.pill__glyph { font-size: 11px; opacity: .8; }

.round-btn {
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--panel-2); border: 1px solid var(--line);
    font-size: 16px; line-height: 1;
}

/* ---- order table ---- */
.order-list { flex: 1; overflow-y: auto; min-height: 120px; }

.order-list__head, .order-line {
    display: grid;
    grid-template-columns: 78px 1fr 64px 50px 96px;
    align-items: center;
    padding: 0 18px;
}
.order-list__head {
    font-size: 10px; letter-spacing: .06em; color: var(--text-dim);
    padding-bottom: 6px;
}

.order-divider {
    text-align: center;
    font-size: 10.5px;
    color: var(--text-dim);
    background: var(--row-alt);
    padding: 3px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.order-line { padding-top: 9px; padding-bottom: 9px; font-size: 13px; }
.order-line:nth-child(odd) { background: var(--row); }
.order-line__adjust { display: flex; justify-content: flex-end; gap: 8px; }
.qty-btn {
    width: 30px; height: 30px; border-radius: 8px;
    border: 1px solid var(--line); background: var(--panel-2);
    font-size: 16px; color: var(--text);
}
.qty-btn:hover { border-color: var(--blue); }
.qty-btn:disabled { opacity: .35; cursor: default; }

/* ---- check ---- */
.check {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 18px;
    border-top: 1px solid var(--line);
}
.check__title { font-size: 16px; font-weight: 600; }
.check__total { font-size: 15px; margin-left: 8px; margin-right: auto; }

.check-list { min-height: 120px; padding-top: 4px; border-top: 1px solid var(--line); }

/* ---- seats ---- */
.seats { display: flex; gap: 8px; padding: 10px 18px; }
.seat {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 5px 13px;
    font-size: 12px;
    background: var(--panel-2);
}
.seat.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }
.seat--add { border-style: dashed; }

/* ---- big blue actions ---- */
.actions {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 12px; padding: 12px 18px 16px;
    background: var(--bg);
}
.action {
    background: var(--blue);
    border-radius: 10px;
    padding: 10px 6px 12px;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    font-size: 12px; font-weight: 600; color: #fff;
    box-shadow: 0 3px 0 var(--blue-dark);
}
.action:active { transform: translateY(2px); box-shadow: none; }
.action small { font-size: 8.5px; font-weight: 400; opacity: .85; }
.action__icon {
    background: rgba(255,255,255,.18);
    border-radius: 6px;
    width: 30px; height: 24px;
    display: grid; place-items: center;
    font-size: 13px;
}

/* ============ menu (right) ============ */
.menu { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--bg); }

.tabs {
    display: flex;
    background: #0c1220;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
}
.tab {
    flex: 1;
    min-width: 74px;
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    padding: 8px 4px 10px;
    border-right: 1px solid var(--line);
}
.tab__label { font-size: 10px; letter-spacing: .05em; color: var(--text-dim); }
.tab__icon { width: 26px; height: 26px; }
.tab__icon svg { width: 100%; height: 100%; }
.tab.is-active { background: var(--panel-2); }
.tab.is-active .tab__label { color: var(--text); }

/* ---- tile grid ---- */
.grid-wrap {
    flex: 1;
    display: flex;
    gap: 14px;
    padding: 16px;
    overflow-y: auto;
    align-items: flex-start;
}
.grid-left { display: flex; flex-direction: column; gap: 12px; flex: 1; max-width: 640px; }
.grid-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid-rail {
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    gap: 12px;
    align-content: start;
}

.tile {
    min-height: 54px;
    border-radius: 8px;
    border: 2px solid transparent;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    gap: 1px;
    padding: 8px 10px;
    position: relative;
    transition: filter .1s;
}
.tile:hover { filter: brightness(1.25); }
.tile:active { filter: brightness(1.5); }
.tile__label { font-size: 13px; font-weight: 700; line-height: 1.15; text-align: center; }
.tile__price { font-size: 10px; color: var(--text-dim); }
.tile__chev { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 16px; opacity: .9; }
.tile--empty { visibility: hidden; }

.tile--olive  { background: var(--olive-fill);  border-color: var(--olive-border); }
.tile--orange { background: var(--orange-fill); border-color: var(--orange-border); }
.tile--green  { background: var(--green-fill);  border-color: var(--green-border); }
.tile--lime   { background: var(--lime-fill);   border-color: var(--lime-border); }
.tile--purple { background: var(--purple-fill); border-color: var(--purple-border); }
.tile--purple .tile__price { color: #a9a3c9; }

/* folders with chevrons keep the label centred-left */
.tile[data-folder] { align-items: flex-start; padding-left: 14px; }

/* ============ status bar ============ */
.statusbar {
    display: flex; align-items: center; gap: 4px;
    background: #070b13;
    border-top: 1px solid var(--line);
    padding: 6px 14px;
}
.status-btn {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 4px 12px;
    color: var(--text);
}
.status-btn small { font-size: 8px; letter-spacing: .08em; color: var(--text-dim); }
.status-btn__icon { font-size: 16px; }
.statusbar__spacer { flex: 1; }
.statusbar__clock { text-align: right; padding-left: 12px; line-height: 1.2; }
.statusbar__clock span { font-size: 14px; }
.statusbar__clock small { display: block; font-size: 9px; color: var(--text-dim); }

/* ============ responsive ============ */
@media (max-width: 980px) {
    .pos { flex-direction: column; overflow-y: auto; }
    .order-panel { width: 100%; border-right: 0; border-bottom: 1px solid var(--line); }
    .grid-wrap { flex-direction: column; }
    .grid-rail { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}

/* scrollbars */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
