:root {
  --bg:        #0e1014;
  --panel:     #171a21;
  --panel-2:   #1e222b;
  --line:      #2a2f3a;
  --text:      #e8eaf0;
  --muted:     #8e96a8;
  --accent:    #635bff;   /* Stripe indigo */
  --accent-h:  #7a73ff;
  --good:      #29b96a;
  --bad:       #f0616d;
  --radius:    14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.banner {
  background: #3a2c10;
  border-bottom: 1px solid #5c4617;
  color: #f4d58a;
  padding: 12px 20px;
  font-size: 13.5px;
}
.banner code {
  background: rgba(0,0,0,.3);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 12.5px;
}

.register {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(320px, 1fr);
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 28px 20px 48px;
  align-items: start;
}

.pane {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.pane__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.pane__head h1, .pane__head h2 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .2px;
  margin: 0;
}
.currency {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .8px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 2px 10px;
}

/* ---------- amount ---------- */

.amount {
  font-size: 46px;
  font-weight: 600;
  letter-spacing: -1.5px;
  text-align: right;
  padding: 14px 18px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-variant-numeric: tabular-nums;
}

.note {
  width: 100%;
  margin-top: 12px;
  padding: 11px 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
}
.note::placeholder { color: #5f6779; }
.note:focus { outline: none; border-color: var(--accent); }

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0;
}

.key {
  padding: 18px 0;
  font-size: 21px;
  font-weight: 500;
  font-family: inherit;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: background .12s, transform .06s;
}
.key:hover  { background: #262b36; }
.key:active { transform: scale(.96); }
.key--muted { color: var(--muted); }

.charge, .submit {
  width: 100%;
  padding: 15px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 11px;
  cursor: pointer;
  transition: background .15s;
}
.charge:hover:not(:disabled),
.submit:hover:not(:disabled) { background: var(--accent-h); }
.charge:disabled, .submit:disabled {
  background: #2c3040;
  color: #626a7d;
  cursor: not-allowed;
}

.submit--ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  margin-top: 18px;
}
.submit--ghost:hover { background: var(--panel-2); }

/* ---------- payment ---------- */

.idle {
  color: var(--muted);
  text-align: center;
  padding: 34px 10px;
  font-size: 14px;
}

.charging-for {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 16px;
}
.charging-for span {
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
}

#payment-element { margin-bottom: 18px; min-height: 40px; }

.link {
  background: none;
  border: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}
.link:hover { color: var(--text); }

.msg {
  min-height: 18px;
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--bad);
}

/* ---------- result ---------- */

.result { text-align: center; padding: 20px 0 6px; }
.result__mark {
  width: 54px; height: 54px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 26px;
  background: rgba(41,185,106,.12);
  color: var(--good);
}
.result__mark.is-bad {
  background: rgba(240,97,109,.12);
  color: var(--bad);
}
.result__amount {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -.8px;
  font-variant-numeric: tabular-nums;
}
.result__text { color: var(--muted); font-size: 13.5px; margin-top: 6px; }

/* ---------- recent ---------- */

.recent { margin-top: 26px; border-top: 1px solid var(--line); padding-top: 18px; }
.recent h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin: 0 0 10px;
}
.recent ul { list-style: none; margin: 0; padding: 0; }
.recent li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid #21252e;
  font-size: 13.5px;
}
.recent li:last-child { border-bottom: none; }
.recent .empty { color: var(--muted); justify-content: center; }
.recent .amt { font-variant-numeric: tabular-nums; font-weight: 500; }
.recent .status {
  font-size: 11px;
  letter-spacing: .4px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 20px;
  background: #262b36;
  color: var(--muted);
}
.recent .status.is-good { background: rgba(41,185,106,.14); color: var(--good); }
.recent .status.is-bad  { background: rgba(240,97,109,.14); color: var(--bad); }

@media (max-width: 780px) {
  .register { grid-template-columns: 1fr; }
}

/* ---------- site header / tabs ---------- */
/* Same shape as the El Palacio header: black bar, bordered pill tabs,
   active tab inverted to solid white. */

.site-header {
  width: 100%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  padding: 14px 26px;
  box-sizing: border-box;
  border-bottom: 1px solid #2a2f3a;
}

.site-brand {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: #fff;
  text-transform: uppercase;
}
.site-brand em {
  font-style: normal;
  font-weight: 400;
  letter-spacing: 1.2px;
  color: var(--muted);
  text-transform: none;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.top-nav a {
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  background: transparent;
  border: 1px solid #555;
  border-radius: 5px;
  transition: background .14s, border-color .14s;
}
.top-nav a:hover { background: #1b1f27; border-color: #7a8296; }
.top-nav a.active {
  background: #fff;
  color: #000;
  border-color: #fff;
}

.page-content { width: 100%; box-sizing: border-box; }

/* ---------- employee select ---------- */

.field-label {
  display: block;
  margin: 14px 0 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}

.select {
  width: 100%;
  padding: 11px 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%238e96a8' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.select:focus { outline: none; border-color: var(--accent); }
.select:invalid, .select option[value=""] { color: var(--muted); }

/* ---------- history page ---------- */

.history {
  max-width: 1000px;
  margin: 0 auto;
  padding: 28px 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  font-weight: 600;
  padding: 0 12px 10px 0;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td {
  padding: 12px 12px 12px 0;
  border-bottom: 1px solid #21252e;
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table .num    { text-align: right; font-variant-numeric: tabular-nums; padding-right: 18px; }
.table .strong { font-weight: 600; }
.table .muted  { color: var(--muted); }

.chip {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 20px;
  font-size: 10.5px;
  letter-spacing: .3px;
}
.chip--warn { background: rgba(240,176,97,.14); color: #f0b061; }

.footnote {
  margin: 18px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
}
.footnote code {
  background: var(--panel-2);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 11.5px;
}

.empty-state {
  color: var(--muted);
  text-align: center;
  padding: 30px 0;
  font-size: 14px;
}

/* status pill is shared with the register's Recent list */
.status {
  display: inline-block;
  font-size: 11px;
  letter-spacing: .4px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 20px;
  background: #262b36;
  color: var(--muted);
  white-space: nowrap;
}
.status.is-good { background: rgba(41,185,106,.14); color: var(--good); }
.status.is-bad  { background: rgba(240,97,109,.14); color: var(--bad); }

@media (max-width: 700px) {
  .site-header { padding: 12px 16px; }
  .table { font-size: 12.5px; }
}

.recent .who {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70px;
}

/* ---------- admin ---------- */

.admin {
  max-width: 1000px;
  margin: 0 auto;
  padding: 28px 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}
.stat {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 14px 16px;
}
.stat__label {
  display: block;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 6px;
}
.stat__value {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -.5px;
  font-variant-numeric: tabular-nums;
}

.subhead {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin: 22px 0 4px;
}

.mini {
  padding: 5px 11px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
}
.mini:hover:not(:disabled) { background: #2b3140; border-color: #7a8296; }
.mini:disabled { opacity: .5; cursor: not-allowed; }

.add-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.add-row .note { margin-top: 0; flex: 1 1 160px; }

.submit--inline {
  width: auto;
  flex: 0 0 auto;
  padding: 11px 22px;
}

/* ---------- lock screen ---------- */

.lock {
  display: flex;
  justify-content: center;
  padding: 70px 20px;
}
.lock__box {
  width: 100%;
  max-width: 340px;
  text-align: center;
}
.lock__box h1 {
  font-size: 17px;
  margin: 0 0 6px;
}
.lock__hint {
  color: var(--muted);
  font-size: 13.5px;
  margin: 0 0 18px;
  line-height: 1.6;
}
.lock__hint code {
  background: var(--panel-2);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 12px;
}
.lock__input {
  width: 100%;
  padding: 13px 14px;
  margin-bottom: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  font-size: 20px;
  letter-spacing: 6px;
  text-align: center;
}
.lock__input:focus { outline: none; border-color: var(--accent); }
.lock .msg { text-align: center; }

.mini--danger { color: var(--bad); border-color: rgba(240,97,109,.35); }
.mini--danger:hover:not(:disabled) {
  background: rgba(240,97,109,.12);
  border-color: var(--bad);
}

/* ---------- service checklist ---------- */

.checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.check {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13.5px;
  cursor: pointer;
  user-select: none;
  transition: background .13s, border-color .13s;
}
.check:hover { background: #262b36; }
.check input { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }
.check:has(input:checked) {
  border-color: var(--accent);
  background: rgba(99,91,255,.12);
}
.check:has(input:checked) span { font-weight: 600; }

.note--required { border-color: #f0b061; }
.note--required::placeholder { color: #f0b061; }

/* The details box is toggled via the hidden attribute; make sure no later
   rule can accidentally out-specify it. */
[hidden] { display: none !important; }

/* ---------- home ---------- */

.home { max-width: 1000px; margin: 0 auto; padding: 40px 20px 56px; }

.hero { text-align: center; margin-bottom: 34px; }
.hero h1 {
  font-size: 34px;
  letter-spacing: -1px;
  margin: 0 0 10px;
}
.hero__tag { font-size: 16px; color: var(--text); margin: 0 0 6px; }
.hero__note { font-size: 13.5px; color: var(--muted); margin: 0; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}
.card h2 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--muted);
  margin: 0 0 14px;
}
.card__body { font-size: 14px; line-height: 1.8; margin: 0 0 12px; }
.table--plain td { border-bottom: none; padding: 5px 12px 5px 0; font-size: 14px; }

.home__foot {
  text-align: center;
  margin-top: 34px;
  font-size: 13.5px;
  color: var(--muted);
}
.home__foot a { color: var(--accent-h); }

/* ---------- staff nav bits ---------- */

.site-brand { text-decoration: none; }

.nav-staff { border-color: var(--accent) !important; }
.nav-staff:hover { background: rgba(99,91,255,.16) !important; }

.nav-who {
  font-size: 12.5px;
  color: var(--muted);
  padding: 0 4px;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-signout {
  padding: 9px 14px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: 1px solid #555;
  border-radius: 5px;
  cursor: pointer;
}
.nav-signout:hover { color: #fff; border-color: #7a8296; }

.lock__box .select { margin-bottom: 12px; text-align: left; }

/* Keep the Code column's controls on one line rather than wrapping mid-cell. */
.table td .mini { margin-left: 6px; }
.table td .status + .mini { margin-left: 8px; }
@media (min-width: 860px) { .table td { white-space: nowrap; } }

/* ---------- inline cell editing ---------- */


.cell-input {
  width: 100%;
  min-width: 110px;
  max-width: 210px;
  padding: 5px 8px;
  background: var(--panel-2);
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
}
.cell-input:focus { outline: none; }

.mini--save {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}
.mini--save:hover:not(:disabled) { background: var(--accent-h); border-color: var(--accent-h); }

.head-actions { display: inline-flex; gap: 8px; }

.check__price {
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
  margin-left: 2px;
}
.check:has(input:checked) .check__price { color: var(--accent-h); }

.cell-input--narrow { max-width: 90px; text-align: right; }
.note--narrow { flex: 0 1 150px; }

/* ---------- period picker ---------- */

.periods { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

.period {
  padding: 8px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  cursor: pointer;
  transition: background .13s, color .13s, border-color .13s;
}
.period:hover { background: #262b36; color: var(--text); }
.period.is-on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.custom-range {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 11px;
}
.custom-range .field-label { margin: 0; }
.custom-range .note { margin-top: 0; }

.admin-bar {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-bar h1 { font-size: 15px; font-weight: 600; margin: 0; }

.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.filter-row .field-label { margin: 0; white-space: nowrap; }
.select--inline { width: auto; min-width: 190px; }

.detail { color: var(--muted); font-size: 12.5px; }

.other-row { display: flex; gap: 8px; margin-top: 12px; }
.other-row .note { margin-top: 0; }
.other-row #details { flex: 1 1 auto; min-width: 0; }
.note--price {
  flex: 0 0 92px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.shop-grid {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px 14px;
  align-items: start;
}
.shop-grid .field-label { margin: 9px 0 0; }
.shop-grid .note { margin-top: 0; width: 100%; }
.shop-grid textarea.note {
  resize: vertical;
  line-height: 1.6;
  font-family: inherit;
}
.shop-grid .note:disabled {
  opacity: .75;
  cursor: default;
  border-color: #23272f;
}
@media (max-width: 620px) {
  .shop-grid { grid-template-columns: 1fr; gap: 4px 0; }
  .shop-grid .field-label { margin-top: 12px; }
}

/* ---------- tips ---------- */

.tips { display: flex; gap: 7px; flex-wrap: wrap; }
.tip {
  flex: 1 1 auto;
  padding: 9px 4px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  transition: background .13s, color .13s, border-color .13s;
}
.tip:hover { background: #262b36; color: var(--text); }
.tip.is-on {
  background: rgba(41,185,106,.14);
  border-color: var(--good);
  color: var(--good);
}
.note--tip { margin-top: 8px; width: 100%; text-align: right; }

/* The running total shows the tip it contains, so nobody has to do the sum. */
.amount[data-tip]:not([data-tip=""])::after {
  content: "incl. " attr(data-tip) " tip";
  display: block;
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--good);
  margin-top: 2px;
}

.chip--tip { background: rgba(41,185,106,.14); color: var(--good); }
