/* ─── Design tokens ──────────────────────────────────────────────────── */
:root {
  --bg:        #0d0d0d;
  --bg2:       #161616;
  --bg3:       #1e1e1e;
  --border:    #2a2a2a;
  --border2:   #333;
  --text:      #f0ece4;
  --text2:     #9a9590;
  --text3:     #5a5650;
  --accent:    #4a9e6b;
  --accent2:   #5dbb80;
  --green:     #4caf7d;
  --orange:    #e8935a;
  --red:       #e05a5a;
  --blue:      #5a8fe8;

  --font-head: 'Unbounded', sans-serif;
  --font-body: 'Golos Text', sans-serif;
  --radius:    10px;
  --radius-lg: 16px;
}

/* ─── Reset ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font-body); border: none; }

/* ─── Scrollbar ───────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }

/* ─── Utilities ──────────────────────────────────────────────────────── */
.loading {
  padding: 24px;
  text-align: center;
  color: var(--text3);
  font-style: italic;
}
.empty-state {
  padding: 32px 16px;
  text-align: center;
  color: var(--text3);
  font-size: 0.9rem;
  line-height: 1.6;
}
.screen--hidden { display: none !important; }

/* ═══════════════════════════════════════════════════════════════════════
   LANDING
   ═══════════════════════════════════════════════════════════════════════ */
.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.landing__grain {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}
.landing__header {
  padding: 24px 32px;
  position: relative;
  z-index: 1;
}
.logo {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
}
.landing__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 56px;
  padding: 40px 24px;
  position: relative;
  z-index: 1;
}
.landing__title {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 7vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  letter-spacing: -0.02em;
  color: var(--text);
}
.landing__title em {
  font-style: normal;
  color: var(--accent);
}
.landing__cards {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.role-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 48px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  min-width: 200px;
}
.role-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 40px rgba(74,158,107,0.15);
}
.role-card__icon { font-size: 2.4rem; }
.role-card__label {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}
.role-card__desc {
  font-size: 0.8rem;
  color: var(--text2);
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════════
   MANAGER DASHBOARD
   ═══════════════════════════════════════════════════════════════════════ */
.app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 200px;
  min-width: 200px;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  gap: 16px;
}
.sidebar__logo {
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.sidebar__back {
  color: var(--text2);
  font-size: 0.8rem;
  padding: 6px 8px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.sidebar__back:hover { background: var(--bg3); color: var(--text); }
.sidebar__role {
  font-family: var(--font-head);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text3);
  padding: 6px 8px;
}
.sidebar__refresh {
  background: none;
  color: var(--text3);
  font-size: 1.2rem;
  padding: 8px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  align-self: flex-start;
}
.sidebar__refresh:hover { color: var(--accent); background: var(--bg3); }

/* Dashboard grid */
.dashboard {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  overflow: hidden;
}

/* Panels */
.panel {
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
  flex-shrink: 0;
}
.panel__title {
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text2);
  text-transform: uppercase;
}
.panel__reload {
  background: none;
  color: var(--text3);
  font-size: 1rem;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.15s;
}
.panel__reload:hover { color: var(--accent); }
.panel__body {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}

/* ─── Orders panel ───────────────────────────────────────────────────── */
.orders-list { display: flex; flex-direction: column; gap: 0; }

.order-card {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.order-card:hover { background: var(--bg2); }
.order-card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.order-card__cafe {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}
.order-card__time {
  font-size: 0.72rem;
  color: var(--text3);
}
.order-card__items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 10px;
}
.order-card__items li {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text2);
}
.item-name { color: var(--text); }
.item-qty {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.78rem;
}
.order-card__actions { display: flex; gap: 8px; }
.order-action-btn {
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  transition: opacity 0.15s;
}
.order-action-btn:hover { opacity: 0.8; }
.order-action-btn--in_progress {
  background: var(--orange);
  color: #fff;
}
.order-action-btn--delivered {
  background: var(--green);
  color: #fff;
}

/* Status badges */
.order-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.order-badge--created  { background: rgba(90,143,232,0.15); color: var(--blue); }
.order-badge--in_progress { background: rgba(232,147,90,0.15); color: var(--orange); }
.order-badge--delivered   { background: rgba(76,175,125,0.15); color: var(--green); }

/* ─── Stock table ────────────────────────────────────────────────────── */
.stock-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.stock-table th {
  text-align: left;
  padding: 10px 18px 8px;
  color: var(--text3);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
}
.stock-table td {
  padding: 8px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text2);
}
.stock-table tr:hover td { background: var(--bg2); }
.stock-qty { font-weight: 600; color: var(--text); text-align: right; }
.stock-row--low .stock-qty { color: var(--red); }

/* ─── Purchase table ─────────────────────────────────────────────────── */
.purchase-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.purchase-table th {
  text-align: left;
  padding: 10px 12px 8px;
  color: var(--text3);
  font-weight: 600;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
}
.purchase-table td {
  padding: 7px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text2);
}
.purchase-table tr:hover td { background: var(--bg2); }
.purchase-qty { color: var(--orange); font-weight: 700; }
.purchase-cost { color: var(--accent); font-weight: 600; text-align: right; }
.purchase-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-top: 2px solid var(--border2);
  margin-top: 4px;
  font-size: 0.88rem;
  color: var(--text2);
  background: var(--bg2);
  position: sticky;
  bottom: 0;
}
.purchase-total strong {
  font-family: var(--font-head);
  font-size: 1rem;
  color: var(--accent2);
}

/* ─── Cafes panel ────────────────────────────────────────────────────── */
.cafe-form {
  display: flex;
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}
.cafe-form__input {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  padding: 8px 12px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.15s;
}
.cafe-form__input:focus { border-color: var(--accent); }
.cafe-form__btn {
  background: var(--accent);
  color: #1a1208;
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 700;
  transition: background 0.15s;
  white-space: nowrap;
}
.cafe-form__btn:hover { background: var(--accent2); }
.cafes-list { list-style: none; }
.cafes-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.cafes-list__item:hover { background: var(--bg2); }
.cafes-list__name { font-size: 0.85rem; }
.cafes-list__del {
  background: none;
  color: var(--text3);
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.cafes-list__del:hover { color: var(--red); background: rgba(224,90,90,0.1); }

/* ═══════════════════════════════════════════════════════════════════════
   BARISTA APP
   ═══════════════════════════════════════════════════════════════════════ */
.barista-app {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 24px;
}
.barista-app__grain {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1;
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.screen__inner {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.screen__inner--wide { max-width: 600px; align-items: stretch; }
.screen__logo {
  font-size: 3.5rem;
  filter: drop-shadow(0 4px 20px rgba(74,158,107,0.4));
}
.screen__title {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 6vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  letter-spacing: -0.02em;
}
.screen__subtitle {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  color: var(--text2);
}
.screen__cafe-badge {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  background: rgba(74,158,107,0.1);
  padding: 4px 14px;
  border-radius: 20px;
  border: 1px solid rgba(74,158,107,0.2);
}

/* Cafe select list */
.cafe-select {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cafe-select__btn {
  width: 100%;
  padding: 14px 20px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font-body);
  text-align: left;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.cafe-select__btn:hover {
  border-color: var(--accent);
  background: var(--bg3);
  transform: translateX(4px);
}

/* Menu buttons */
.menu-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
.menu-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  border-radius: var(--radius-lg);
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-body);
  transition: transform 0.15s, box-shadow 0.15s;
  width: 100%;
}
.menu-btn:hover { transform: scale(1.02); }
.menu-btn--primary {
  background: var(--accent);
  color: #1a1208;
  box-shadow: 0 6px 24px rgba(74,158,107,0.25);
}
.menu-btn--primary:hover { box-shadow: 0 8px 32px rgba(74,158,107,0.35); }
.menu-btn--secondary {
  background: var(--bg2);
  color: var(--text);
  border: 1px solid var(--border2);
}
.menu-btn__icon { font-size: 1.3rem; }

/* Back button */
.back-btn {
  background: none;
  color: var(--text3);
  font-size: 0.8rem;
  padding: 6px 10px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  align-self: flex-start;
}
.back-btn:hover { color: var(--text); background: var(--bg3); }

/* ─── Chat / Order window ────────────────────────────────────────────── */
.screen--order-screen {
  align-items: stretch;
  padding: 0;
}
.chat-window {
  /* Fill the screen and respond to virtual keyboard on mobile */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  z-index: 10;
  /* Push up when keyboard opens (modern browsers) */
  height: 100%;
  height: 100dvh;
}

/* iOS Safari: move chat-window bottom above keyboard */
@supports (height: 100dvh) {
  .chat-window {
    height: 100dvh;
  }
}
.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
  flex-shrink: 0;
}
.chat-header__title {
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  flex: 1;
  text-align: center;
  color: var(--text);
}
.chat-header__cafe {
  font-size: 0.72rem;
  color: var(--accent);
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* Scroll stays at bottom when new items added */
  scroll-anchor: bottom;
  overscroll-behavior: contain;
}
.chat-empty {
  margin: auto;
  color: var(--text3);
  font-size: 0.85rem;
  text-align: center;
}

/* Order item row */
.order-item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  animation: slideIn 0.2s ease;
}
@keyframes slideIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; } }
.order-item-row__name {
  flex: 1;
  font-size: 0.88rem;
  color: var(--text);
}
.order-item-row__qty {
  width: 64px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 6px;
  color: var(--accent);
  padding: 5px 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.15s;
}
.order-item-row__qty:focus { border-color: var(--accent); }
.order-item-row__del {
  background: none;
  color: var(--text3);
  font-size: 0.75rem;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color 0.15s;
}
.order-item-row__del:hover { color: var(--red); }

/* Send zone */
.chat-send-zone {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg2);
}
.send-btn {
  width: 100%;
  padding: 12px;
  background: var(--green);
  color: #fff;
  border-radius: var(--radius);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: opacity 0.15s, transform 0.1s;
}
.send-btn:hover { opacity: 0.9; transform: scale(1.01); }
.send-btn:disabled { opacity: 0.5; }

/* Input zone */
.chat-input-zone {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg2);
  position: relative;
  flex-shrink: 0;
  /* Stay above keyboard on iOS */
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}
.autocomplete-wrapper { position: relative; }
.chat-input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s;
}
.chat-input:focus { border-color: var(--accent); }
.suggestions {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  overflow: hidden;
  z-index: 100;
  box-shadow: 0 -8px 24px rgba(0,0,0,0.4);
  max-height: 240px;
  overflow-y: auto;
}
.suggestions:empty { display: none; }
.suggestion-item {
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--text2);
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
  border-bottom: 1px solid var(--border);
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover,
.suggestion-item.active {
  background: var(--bg2);
  color: var(--accent);
}

/* ─── History ────────────────────────────────────────────────────────── */
.history-list { display: flex; flex-direction: column; gap: 10px; }
.history-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.history-card--delivered { border-left: 3px solid var(--green); }
.history-card--in_progress { border-left: 3px solid var(--orange); }
.history-card--created { border-left: 3px solid var(--blue); }
.history-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.history-card__time { font-size: 0.72rem; color: var(--text3); }
.history-card__items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.history-card__items li {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text2);
}

/* ─── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .app { flex-direction: column; height: auto; }
  .sidebar { width: 100%; flex-direction: row; align-items: center; flex-wrap: wrap; }
  .dashboard {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    height: auto;
  }
  .panel { min-height: 300px; }
}

/* ─── Order card toggle ───────────────────────────────────────────────── */
.order-card__toggle {
  font-size: 0.65rem;
  color: var(--text3);
  transition: color 0.15s;
  flex-shrink: 0;
}
.order-card__head:hover .order-card__toggle { color: var(--accent); }
.order-card__details {
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: 2px;
  animation: fadeIn 0.15s ease;
}

/* ─── Barista history edit button ────────────────────────────────────── */
.history-edit-btn {
  background: rgba(74,158,107,0.1);
  color: var(--accent);
  border: 1px solid rgba(74,158,107,0.25);
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  transition: background 0.15s;
  margin-left: auto;
}
.history-edit-btn:hover { background: rgba(74,158,107,0.2); }

/* ─── Manager order item checkboxes ──────────────────────────────────── */
.order-card__items { list-style: none; }

.order-item-check {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.order-item-check:last-child { border-bottom: none; }

.item-check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  cursor: pointer;
  user-select: none;
  width: 100%;
}
.item-check-label:hover { background: var(--bg3); border-radius: 6px; }

/* Hide native checkbox */
.item-checkbox { display: none; }

/* Custom checkbox */
.item-check-box {
  width: 16px;
  height: 16px;
  min-width: 16px;
  border: 1.5px solid var(--border2);
  border-radius: 4px;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
}
.item-check-box::after {
  content: '';
  display: block;
  width: 9px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
  opacity: 0;
  transition: opacity 0.1s;
}
.item-checkbox:checked + .item-check-box {
  background: var(--green);
  border-color: var(--green);
}
.item-checkbox:checked + .item-check-box::after { opacity: 1; }

/* Done state */
.order-item-check.item-done .item-name,
.order-item-check.item-done .item-qty {
  color: var(--text3);
  text-decoration: line-through;
  text-decoration-color: var(--text3);
}
.order-item-check.item-done .item-check-label {
  opacity: 0.55;
}

/* ═══════════════════════════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal__title {
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

.modal__close {
  background: none;
  color: var(--text3);
  font-size: 1rem;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.modal__close:hover { color: var(--red); background: rgba(224,90,90,0.1); }

.modal__body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.modal__input-zone {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg3);
  position: relative;
}

.modal__footer {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  justify-content: flex-end;
}

.modal__cancel {
  background: none;
  color: var(--text2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 9px 20px;
  font-size: 0.85rem;
  font-family: var(--font-body);
  transition: border-color 0.15s, color 0.15s;
}
.modal__cancel:hover { border-color: var(--text2); color: var(--text); }

.modal__save {
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  padding: 9px 24px;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: var(--font-body);
  transition: opacity 0.15s;
}
.modal__save:hover { opacity: 0.85; }
.modal__save:disabled { opacity: 0.5; }

/* ── Panel edit button ────────────────────────────────────────────── */
.panel__header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.panel__edit-btn {
  background: rgba(74,158,107,0.1);
  color: var(--accent);
  border: 1px solid rgba(74,158,107,0.25);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-body);
  transition: background 0.15s;
}
.panel__edit-btn:hover { background: rgba(74,158,107,0.2); }

/* ── Stock editor rows ────────────────────────────────────────────── */
.stock-editor-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
  animation: slideIn 0.15s ease;
}
.stock-editor-row:hover { background: var(--bg3); }

.stock-editor-row__name {
  flex: 1;
  font-size: 0.85rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.stock-editor-row__qty {
  width: 72px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 6px;
  color: var(--accent);
  padding: 5px 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.15s;
  flex-shrink: 0;
}
.stock-editor-row__qty:focus { border-color: var(--accent); }

.stock-editor-row__unit {
  width: 72px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 6px;
  color: var(--text2);
  padding: 5px 8px;
  font-size: 0.82rem;
  text-align: center;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.15s;
  flex-shrink: 0;
}
.stock-editor-row__unit:focus { border-color: var(--border2); }

.stock-editor-row__del {
  background: none;
  color: var(--text3);
  font-size: 0.75rem;
  padding: 4px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
}
.stock-editor-row__del:hover { color: var(--red); background: rgba(224,90,90,0.1); }

/* ─── Purchase editor modal ───────────────────────────────────────── */
.modal--wide { max-width: 680px; }
.modal--sm   { max-width: 420px; }

.purchase-add-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.pur-edit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}
.pur-edit-table th {
  text-align: left;
  padding: 9px 14px 8px;
  color: var(--text3);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
  position: sticky;
  top: 0;
}
.pur-edit-table td {
  padding: 7px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.pur-edit-table tr:hover td { background: var(--bg3); }

.pur-edit-name {
  color: var(--text);
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pur-edit-cost {
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}
.pur-edit-input {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 6px;
  color: var(--text);
  padding: 5px 7px;
  font-size: 0.83rem;
  font-family: var(--font-body);
  text-align: center;
  outline: none;
  transition: border-color 0.15s;
}
.pur-edit-input:focus { border-color: var(--accent); }

/* ─── Move-to-stock confirm button ───────────────────────────────── */
.panel__move-btn {
  background: rgba(76,175,125,0.12);
  color: var(--green);
  border: 1px solid rgba(76,175,125,0.3);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-body);
  transition: background 0.15s;
  white-space: nowrap;
}
.panel__move-btn:hover { background: rgba(76,175,125,0.22); }

.modal__save--green {
  background: var(--green);
}

/* ─── Order card: in_progress hint ───────────────────────────────── */
.order-card__hint {
  font-size: 0.75rem;
  color: var(--text3);
  padding: 6px 4px 8px;
  font-style: italic;
}

/* ─── Delivered list: not-delivered items ────────────────────────── */
.order-card__items--delivered li {
  display: flex;
  justify-content: space-between;
  padding: 6px 4px;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--border);
}
.order-card__items--delivered li:last-child { border-bottom: none; }

.item-not-delivered {
  color: var(--text3) !important;
  text-decoration: line-through;
  text-decoration-color: var(--text3);
}
.item-skipped-badge {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.65rem;
  color: var(--red);
  background: rgba(224,90,90,0.1);
  border-radius: 4px;
  padding: 1px 5px;
  vertical-align: middle;
  font-style: normal;
  text-decoration: none;
}

/* ═══════════════════════════════════════════════════════════════════════
   ARRIVAL (ПРИХОД)
   ═══════════════════════════════════════════════════════════════════════ */

/* Menu button — arrival style */
.menu-btn--arrival {
  background: var(--bg2);
  color: var(--green);
  border: 1px solid rgba(76,175,125,0.3);
}
.menu-btn--arrival:hover {
  background: rgba(76,175,125,0.1);
  box-shadow: 0 4px 16px rgba(76,175,125,0.15);
}

/* Hint bar inside arrival editor */
.arrival-hint {
  padding: 10px 18px;
  font-size: 0.78rem;
  color: var(--text3);
  font-style: italic;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
  flex-shrink: 0;
}

/* Arrival item row */
.arrival-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s, opacity 0.15s;
  animation: slideIn 0.15s ease;
}
.arrival-item-row:hover { background: var(--bg2); }
.arrival-item-row--unchecked { opacity: 0.45; }

.arrival-item-check {
  display: flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.arrival-item-name {
  flex: 1;
  font-size: 0.88rem;
  color: var(--text);
  transition: color 0.15s;
}
.arrival-item-name--dim { color: var(--text3); }

.arrival-item-qty {
  width: 90px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 6px;
  color: var(--accent);
  padding: 6px 8px;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.15s, opacity 0.15s;
  flex-shrink: 0;
}
.arrival-item-qty:focus { border-color: var(--accent); }
.arrival-item-qty--dim { opacity: 0.3; }
.arrival-item-qty:disabled { cursor: not-allowed; }

/* Send button arrival variant */
.send-btn--arrival {
  background: var(--green);
}

/* Arrival badge in history */
.order-badge--arrival {
  background: rgba(76,175,125,0.15);
  color: var(--green);
}
.order-badge--pending {
  background: rgba(90,143,232,0.12);
  color: var(--blue);
}
.order-badge--saved {
  background: rgba(76,175,125,0.12);
  color: var(--green);
}

/* Arrival cards in history */
.history-card--arrival {
  border-left: 3px solid var(--green);
}
.history-card--pending {
  border-left: 3px solid var(--blue);
}

/* ─── In-progress editable qty ───────────────────────────────────── */
.item-qty-edit {
  width: 68px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 6px;
  color: var(--accent);
  padding: 4px 6px;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  font-family: var(--font-body);
  outline: none;
  flex-shrink: 0;
  transition: border-color 0.15s;
}
.item-qty-edit:focus { border-color: var(--accent); }

/* Make check label flex so qty field aligns right */
.order-card__items .item-check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.order-card__items li.order-item-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 4px;
}

/* ═══════════════════════════════════════════════════════════════════════
   SIDEBAR TABS
   ═══════════════════════════════════════════════════════════════════════ */
.sidebar__tabs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  padding-top: 8px;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: none;
  color: var(--text2);
  font-size: 0.85rem;
  font-family: var(--font-body);
  font-weight: 500;
  text-align: left;
  transition: background 0.15s, color 0.15s;
  border: 1px solid transparent;
  width: 100%;
}
.tab-btn:hover { background: var(--bg3); color: var(--text); }
.tab-btn--active {
  background: rgba(74,158,107,0.12);
  color: var(--accent);
  border-color: rgba(74,158,107,0.25);
}
.tab-btn__icon { font-size: 1rem; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════════════════
   TAB PAGES
   ═══════════════════════════════════════════════════════════════════════ */
.tab-content-area {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.tab-page { display: none; flex: 1; overflow: hidden; }
.tab-page--active { display: flex; flex-direction: column; flex: 1; }

/* ── Supplies: 2-col top + full-width bottom ── */
.tab-page--active .dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr auto;
  gap: 1px;
  background: var(--border);
  flex: 1;
  overflow: hidden;
}
.panel--full-width {
  grid-column: 1 / -1;
  max-height: 280px;
}

/* ── Single panel pages (cafes / positions) ── */
.single-panel-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}
.single-panel-page .panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.single-panel-page .panel__body {
  flex: 1;
  overflow-y: auto;
}

/* ═══════════════════════════════════════════════════════════════════════
   POSITIONS EDITOR
   ═══════════════════════════════════════════════════════════════════════ */
.positions-add-bar {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
  flex-shrink: 0;
}

.position-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
  animation: slideIn 0.15s ease;
}
.position-row:hover { background: var(--bg2); }

.position-row__name {
  flex: 1;
  font-size: 0.85rem;
  color: var(--text);
}

.position-row__edit {
  background: none;
  color: var(--text3);
  font-size: 0.8rem;
  padding: 3px 7px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.position-row__edit:hover { color: var(--accent); background: rgba(74,158,107,0.1); }

.position-row__del {
  background: none;
  color: var(--text3);
  font-size: 0.75rem;
  padding: 3px 7px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.position-row__del:hover { color: var(--red); background: rgba(224,90,90,0.1); }

.position-row__input {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--text);
  padding: 5px 10px;
  font-size: 0.85rem;
  font-family: var(--font-body);
  outline: none;
}

/* ─── Revert to in_progress button ───────────────────────────────── */
.order-action-btn--revert {
  background: rgba(90,143,232,0.15);
  color: var(--blue);
  border: 1px solid rgba(90,143,232,0.3);
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  transition: background 0.15s;
}
.order-action-btn--revert:hover { background: rgba(90,143,232,0.25); }

/* ─── Order comment ───────────────────────────────────────────────── */
.order-comment {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 6px 0 8px;
  padding: 8px 12px;
  background: rgba(90,143,232,0.07);
  border-left: 3px solid var(--blue);
  border-radius: 0 6px 6px 0;
  font-size: 0.82rem;
  color: var(--text2);
  line-height: 1.5;
}
.order-comment__icon { font-size: 0.85rem; flex-shrink: 0; margin-top: 1px; }
.order-comment__text { flex: 1; word-break: break-word; }

/* ─── Comment zone in barista order form ─────────────────────────── */
.send-zone-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0;
}
.send-zone-actions .send-btn { flex: 1; }

.comment-zone {
  padding: 0 0 10px;
}
.comment-textarea {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  padding: 10px 12px;
  font-size: 0.88rem;
  font-family: var(--font-body);
  resize: none;
  outline: none;
  line-height: 1.5;
  transition: border-color 0.15s;
}
.comment-textarea:focus { border-color: var(--blue); }
.comment-textarea::placeholder { color: var(--text3); }

.comment-toggle-btn {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text3);
  padding: 10px 14px;
  font-size: 0.82rem;
  font-family: var(--font-body);
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.comment-toggle-btn:hover { color: var(--blue); border-color: var(--blue); }
.comment-toggle-btn--active {
  color: var(--blue);
  border-color: var(--blue);
  background: rgba(90,143,232,0.1);
}

/* ─── Arrival qty: text input (overrides number width) ───────────── */
.arrival-item-qty {
  width: 110px !important;
  text-align: left !important;
  font-weight: 500 !important;
  letter-spacing: 0.01em;
}
.arrival-item-qty::placeholder { font-size: 0.78rem; }

/* ─── Arrival status badges ───────────────────────────────────────── */
.order-badge--arr-new       { background: rgba(90,143,232,0.12); color: var(--blue); }
.order-badge--arr-confirmed { background: rgba(74,158,107,0.12); color: var(--accent); }
.order-badge--arr-entered   { background: rgba(76,175,125,0.12); color: var(--green); }

/* ─── Arrival card actions ────────────────────────────────────────── */
.arrival-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
  margin-top: 4px;
  border-top: 1px solid var(--border);
}
.arrival-action-btn {
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-body);
  transition: opacity 0.15s;
}
.arrival-action-btn:hover { opacity: 0.8; }
.arrival-action-btn--confirm { background: var(--accent); color: #fff; }
.arrival-action-btn--enter   { background: var(--green);  color: #fff; }
.arrival-locked-badge {
  font-size: 0.75rem;
  color: var(--text3);
}

/* ─── New arrival button ──────────────────────────────────────────── */
.arrival-new-btn {
  background: rgba(74,158,107,0.12);
  color: var(--accent);
  border: 1px solid rgba(74,158,107,0.3);
  border-radius: var(--radius);
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font-body);
  transition: background 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.arrival-new-btn:hover { background: rgba(74,158,107,0.22); }

/* ─── View button variant ─────────────────────────────────────────── */
.history-edit-btn--view {
  color: var(--text3);
  border-color: var(--border2);
  background: none;
}

/* ═══════════════════════════════════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════════════════════════════════ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
}
.login-page__grain {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
}
.login-box {
  width: 100%;
  max-width: 360px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}
.login-box__logo { font-size: 3rem; }
.login-box__title {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
  color: var(--text);
}
.login-box__title span { color: var(--accent); }
.login-box__sub {
  font-size: 0.85rem;
  color: var(--text3);
  text-align: center;
}
.login-box__error {
  width: 100%;
  background: rgba(224,90,90,0.12);
  border: 1px solid rgba(224,90,90,0.3);
  border-radius: 8px;
  color: var(--red);
  font-size: 0.82rem;
  padding: 10px 14px;
  text-align: center;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
.login-form__input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  padding: 12px 16px;
  font-size: 1.1rem;
  font-family: var(--font-body);
  text-align: center;
  letter-spacing: 0.15em;
  outline: none;
  transition: border-color 0.15s;
}
.login-form__input:focus { border-color: var(--accent); }
.login-form__btn {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  padding: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font-body);
  transition: opacity 0.15s;
}
.login-form__btn:hover { opacity: 0.85; }

/* ═══════════════════════════════════════════════════════════════════════
   SIDEBAR USER INFO & LOGOUT
   ═══════════════════════════════════════════════════════════════════════ */
.sidebar__user {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  background: var(--bg3);
  border-radius: 8px;
  margin-bottom: 8px;
}
.sidebar__user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}
.sidebar__user-role {
  font-size: 0.7rem;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.sidebar__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.sidebar__logout {
  font-size: 0.78rem;
  color: var(--text3);
  padding: 5px 8px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.sidebar__logout:hover { color: var(--red); background: rgba(224,90,90,0.1); }

/* ═══════════════════════════════════════════════════════════════════════
   ACCOUNTS LIST
   ═══════════════════════════════════════════════════════════════════════ */
.accounts-error {
  margin: 12px 16px 0;
  padding: 8px 14px;
  background: rgba(224,90,90,0.1);
  border: 1px solid rgba(224,90,90,0.25);
  border-radius: 6px;
  font-size: 0.82rem;
  color: var(--red);
}
.accounts-list { list-style: none; }

.account-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}
.account-row:hover { background: var(--bg2); }
.account-row--dev { opacity: 0.5; }

.account-row__info { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.account-row__name { font-size: 0.85rem; color: var(--text); font-weight: 500; }
.account-row__code {
  font-size: 0.78rem;
  color: var(--text3);
  font-family: monospace;
  background: var(--bg3);
  padding: 2px 8px;
  border-radius: 4px;
}
.account-row__locked { font-size: 0.75rem; color: var(--text3); }
.account-row__actions { display: flex; gap: 4px; flex-shrink: 0; }

.account-role {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.account-role--admin   { background: rgba(200,169,110,0.15); color: #c8a96e; }
.account-role--manager { background: rgba(74,158,107,0.15);  color: var(--accent); }
.account-role--barista { background: rgba(90,143,232,0.15);  color: var(--blue); }

.account-edit-btn {
  background: none; color: var(--text3);
  font-size: 0.8rem; padding: 4px 6px; border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.account-edit-btn:hover { color: var(--accent); background: rgba(74,158,107,0.1); }
.account-del-btn {
  background: none; color: var(--text3);
  font-size: 0.75rem; padding: 4px 6px; border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.account-del-btn:hover { color: var(--red); background: rgba(224,90,90,0.1); }

.account-edit-row { padding: 8px 16px; border-bottom: 1px solid var(--border); background: var(--bg3); }
.account-edit-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.account-edit-input {
  background: var(--bg2); border: 1px solid var(--border2); border-radius: 6px;
  color: var(--text); padding: 6px 10px; font-size: 0.82rem;
  font-family: var(--font-body); outline: none; flex: 1; min-width: 80px;
  transition: border-color 0.15s;
}
.account-edit-input:focus { border-color: var(--accent); }
.account-edit-input--code { max-width: 90px; flex: 0 0 90px; }
.account-edit-select {
  background: var(--bg2); border: 1px solid var(--border2); border-radius: 6px;
  color: var(--text); padding: 6px 8px; font-size: 0.82rem;
  font-family: var(--font-body); outline: none; transition: border-color 0.15s;
}
.account-edit-select:focus { border-color: var(--accent); }
.account-save-btn {
  background: var(--accent); color: #fff; border-radius: 6px;
  padding: 6px 12px; font-size: 0.82rem; font-weight: 700; transition: opacity 0.15s;
}
.account-save-btn:hover { opacity: 0.85; }
.account-cancel-btn {
  background: none; color: var(--text3); border: 1px solid var(--border2);
  border-radius: 6px; padding: 6px 10px; font-size: 0.8rem; transition: color 0.15s;
}
.account-cancel-btn:hover { color: var(--red); }

.account-role-select {
  background: var(--bg3); border: 1px solid var(--border2); border-radius: 6px;
  color: var(--text); padding: 8px 10px; font-size: 0.85rem;
  font-family: var(--font-body); outline: none;
}

/* ─── Landing: admin card + header right ─────────────────────── */
.role-card--admin {
  border-color: rgba(200,169,110,0.2);
}
.role-card--admin:hover {
  border-color: #c8a96e;
  box-shadow: 0 12px 40px rgba(200,169,110,0.15);
}

.landing__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.landing__header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.landing__user {
  font-size: 0.82rem;
  color: var(--text2);
}
.landing__logout {
  font-size: 0.78rem;
  color: var(--text3);
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  transition: color 0.15s, border-color 0.15s;
}
.landing__logout:hover { color: var(--red); border-color: var(--red); }

/* ─── Admin arrivals: show cafe name ─────────────────────────── */
.arrival-cafe-tag {
  font-size: 0.72rem;
  color: var(--accent);
  background: rgba(74,158,107,0.1);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}
