@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&family=Montserrat:wght@400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}
a { color: var(--cyan); }
.pos-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--grad-hero);
}
.pos-card {
  width: min(400px, 92vw);
  background: var(--surface);
  padding: 28px;
  border-radius: var(--radius-lg);
  border-top: 4px solid var(--copper);
}
.pos-card h1 { color: var(--text); margin: 0 0 8px; }
.pos-card .muted { color: var(--text-muted); }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; margin-bottom: 6px; color: var(--text-muted); }
.field input {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  border-radius: var(--radius);
  font: inherit;
  font-size: 16px;
}
.btn {
  width: 100%;
  padding: 16px;
  background: var(--copper);
  color: var(--white);
  border: none;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 14px;
  border-radius: var(--radius);
  cursor: pointer;
}
.btn:hover { background: var(--copper-dark); }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--cyan);
  color: var(--cyan);
}
.alert-error {
  background: rgba(196, 69, 58, 0.2);
  color: #ffb4ae;
  padding: 12px;
  border-radius: var(--radius);
  margin-bottom: 12px;
}
.topbar {
  height: 64px;
  background: var(--shell-bg);
  border-bottom: 1px solid var(--shell-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  color: var(--shell-text);
}
.shift-panel {
  margin: 24px;
  background: var(--surface);
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.shift-panel h1 { color: var(--text); }
.totals { font-size: 32px; font-weight: 800; color: var(--text); margin-top: 12px; }
.muted { color: var(--text-muted); }
.alert-ok {
  background: rgba(26, 158, 110, 0.2);
  color: #9ee0c4;
  padding: 12px;
  border-radius: var(--radius);
}
.area-panel { max-width: 920px; }
.area-h2 {
  color: var(--text);
  font-size: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 28px 0 12px;
}
.area-list { list-style: none; margin: 0; padding: 0; }
.area-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.area-badge {
  display: inline-block;
  margin-inline-start: 8px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan);
  border: 1px solid var(--cyan);
  border-radius: var(--radius);
}
.area-table-wrap { overflow-x: auto; }
.area-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.area-table th,
.area-table td {
  text-align: start;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
}
.area-table th {
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.area-forms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 8px;
}
.area-form-block {
  background: var(--surface-2);
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.area-form-block .area-h2 { margin-top: 0; }
.field select,
.field textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  border-radius: var(--radius);
  font: inherit;
  font-size: 15px;
}
.field textarea { resize: vertical; min-height: 80px; }

.oos { outline: 2px solid #c0392b; background: rgba(192, 57, 43, 0.08); }
.pay-disabled { opacity: 0.5; pointer-events: none; }
.cart-panel { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); }
.auth-body {
  min-height: calc(100vh - 64px);
  display: grid;
  place-items: center;
}
.auth-card {
  width: min(420px, 92vw);
  background: var(--charcoal);
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.login-prefs {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

/* Prefs bar (theme + language) */
.prefs-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.prefs-form { margin: 0; }
.prefs-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--shell-border);
  background: transparent;
  color: var(--shell-text);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  white-space: nowrap;
}
.prefs-btn:hover {
  background: rgba(0, 168, 180, 0.14);
  border-color: var(--cyan);
  color: var(--cyan-light);
}
.prefs-btn-icon { font-size: 13px; line-height: 1; }
.prefs-bar-compact .prefs-btn-label { display: none; }
.prefs-bar-compact .prefs-btn { padding: 8px 10px; min-width: 36px; justify-content: center; }
.login-page .prefs-btn,
.pos-login .prefs-btn {
  color: var(--silver);
  border-color: rgba(184, 197, 206, 0.35);
}

@media (max-width: 720px) {
  .area-forms { grid-template-columns: 1fr; }
  .area-row { flex-direction: column; align-items: flex-start; }
}

/* �� Work session + step shell �� */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.topbar-brand { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.topbar-brand strong { font-size: 1.05rem; letter-spacing: 0.02em; }
.topbar-user { font-size: 12px; }
.topnav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pos-session {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid rgba(0, 168, 180, 0.45);
  background: rgba(0, 168, 180, 0.12);
  font-size: 12px;
}
.pos-session-label { opacity: 0.8; text-transform: uppercase; letter-spacing: 0.06em; font-size: 10px; }
.pos-session-time { font-variant-numeric: tabular-nums; font-size: 14px; }
.pos-shell-till .topbar-till { padding-block: 8px; }
.pos-main-till { max-width: none; }
.pos-steps {
  list-style: none; margin: 0 0 18px; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.pos-step {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 999px;
  border: 1px solid var(--shell-border, rgba(255,255,255,0.12));
  opacity: 0.55; font-size: 12px; font-weight: 600;
}
.pos-step.is-current { opacity: 1; border-color: var(--cyan, #00a8b4); background: rgba(0,168,180,0.12); }
.pos-step.is-done { opacity: 0.85; }
.pos-step-num {
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.08); font-size: 11px;
}
.pos-step.is-current .pos-step-num { background: var(--cyan, #00a8b4); color: #041018; }
.pos-hero-card h1 { font-size: clamp(1.5rem, 2.5vw, 2rem); margin-bottom: 8px; }
.pos-eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 11px; opacity: 0.7; margin: 0 0 6px; }
.pos-branch-pill {
  display: inline-block; margin: 8px 0 16px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--shell-border, rgba(255,255,255,0.14)); font-size: 13px;
}
.pos-readonly-cash {
  font-size: 2rem; font-weight: 700; padding: 12px 0 4px;
  font-variant-numeric: tabular-nums;
}
.pos-step-page .btn-primary-lg { min-height: 52px; font-size: 1.05rem; }
