/* Soul Beauty & Spa — ivory, beige, gold */
:root {
  --ivory: #fbf8f2;
  --paper: #ffffff;
  --beige: #f1e8d6;
  --beige-2: #e7dcc6;
  --line: #e6dcc9;
  --gold: #a9844c;
  --gold-soft: #c9ab7a;
  --ink: #2f2820;
  --ink-2: #5d5244;
  --muted: #8b7f6d;
  --ok: #4f7a52;
  --ok-bg: #edf3ea;
  --warn: #9a6a1c;
  --warn-bg: #fbf1de;
  --bad: #a14a3b;
  --bad-bg: #f8e9e5;
  --radius: 10px;
  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "Noto Sans Hebrew", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ivory); color: var(--ink); font: 15px/1.5 var(--sans); }
a { color: var(--ink); text-decoration-color: var(--gold-soft); text-underline-offset: 3px; }
a:hover { color: var(--gold); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: .01em; margin: 0 0 .4em; }
h1 { font-size: 30px; line-height: 1.15; }
h2 { font-size: 22px; margin-top: 1.4em; }
h3 { font-size: 18px; }
.num, td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* --- shell --- */
.top { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top-inner { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; gap: 22px; padding: 0 20px; height: 62px; }
.brand { text-decoration: none; display: flex; flex-direction: column; line-height: 1; }
.brand b { font-family: var(--serif); font-size: 20px; letter-spacing: .18em; font-weight: 600; }
.brand span { font-size: 10px; letter-spacing: .28em; color: var(--gold); margin-top: 4px; text-transform: uppercase; }
nav.main { display: flex; gap: 4px; flex: 1; }
nav.main a { text-decoration: none; padding: 7px 11px; border-radius: 8px; color: var(--ink-2); font-size: 14px; white-space: nowrap; }
nav.main a:hover { background: var(--ivory); color: var(--ink); }
nav.main a.on { background: var(--beige); color: var(--ink); }
.badge { display: inline-block; min-width: 19px; padding: 0 6px; height: 19px; line-height: 19px; border-radius: 10px; background: var(--gold); color: #fff; font-size: 11px; text-align: center; margin-left: 4px; font-weight: 600; }
.top form { margin: 0; }
.btn.menu-btn { display: none; }
main { max-width: 1240px; margin: 0 auto; padding: 26px 20px 80px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.head p { margin: 2px 0 0; color: var(--muted); }

/* --- buttons & forms --- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); padding: 9px 15px; border-radius: 8px; font: 500 14px var(--sans); cursor: pointer; text-decoration: none; min-height: 40px; }
.btn:hover { border-color: var(--gold-soft); color: var(--ink); }
.btn.primary { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
.btn.primary:hover { background: #463c30; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #fff; letter-spacing: .04em; }
.btn.gold:hover { background: #966f37; color: #fff; }
.btn.quiet { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 5px 10px; min-height: 32px; font-size: 13px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 4px; font-weight: 500; }
input, select, textarea { width: 100%; font: 15px var(--sans); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; min-height: 42px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold-soft); outline-offset: 0; border-color: var(--gold-soft); }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; accent-color: var(--gold); }
textarea { min-height: 70px; }
.field { margin-bottom: 14px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.inline { display: inline; }
.seg { display: inline-flex; flex-wrap: wrap; background: var(--paper); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 2px; }
.seg a { text-decoration: none; padding: 6px 11px; border-radius: 7px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.seg a.on { background: var(--beige); color: var(--ink); font-weight: 600; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filters form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; }
.filters input, .filters select { width: auto; min-height: 36px; padding: 6px 9px; font-size: 14px; }

/* --- cards --- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card + .card { margin-top: 16px; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 16px; }
.stat .k { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stat .v { font-family: var(--serif); font-size: 27px; font-weight: 600; margin-top: 6px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat.hl { border-color: var(--gold-soft); background: linear-gradient(180deg, #fffdf8, #faf3e6); }
.stat.hl .v { color: #7d5d2c; }
.stat .s { font-size: 12px; color: var(--muted); margin-top: 3px; }
.stats.s4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats.s5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

/* --- tables --- */
.tbl-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th { text-align: left; font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 11px 12px; border-bottom: 1px solid var(--line); background: #fdfbf6; white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid #f1ebdf; vertical-align: top; }
tr:last-child td { border-bottom: none; }
tr.total td { font-weight: 700; border-top: 2px solid var(--gold-soft); background: #fdfaf3; }
tr.void td { color: var(--muted); text-decoration: line-through; text-decoration-color: #c9bfae; }
tr.void td.keep { text-decoration: none; }
tbody tr.link { cursor: pointer; }
tbody tr.link:hover td { background: #fdf9f0; }
.emp-name { font-weight: 600; text-decoration: none; }
.owed { font-weight: 700; color: #7d5d2c; }
.neg { color: var(--bad); }
.pos { color: var(--ok); }
.empty { padding: 30px; text-align: center; color: var(--muted); }

/* --- pills & flashes --- */
.pill { display: inline-block; font-size: 11.5px; padding: 2px 8px; border-radius: 20px; background: var(--beige); color: var(--ink-2); white-space: nowrap; font-weight: 500; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.gold { background: #f6ecd9; color: #7d5d2c; }
.flash { padding: 11px 14px; border-radius: 8px; margin-bottom: 14px; border: 1px solid; font-size: 14px; }
.flash.ok { background: var(--ok-bg); border-color: #cfe0c9; color: #33543a; }
.flash.error { background: var(--bad-bg); border-color: #ecc9c0; color: #7c3022; }
.notice { background: var(--warn-bg); border: 1px solid #f0dcb4; color: #6d4c14; padding: 12px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.notice.calm { background: #f7f2e8; border-color: var(--line); color: var(--ink-2); }

details > summary { cursor: pointer; color: var(--ink-2); font-weight: 500; }
details[open] > summary { margin-bottom: 10px; }
pre { background: #f8f4ec; padding: 12px; border-radius: 8px; overflow: auto; font-size: 12px; max-height: 340px; }
.two { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.login { max-width: 380px; margin: 9vh auto; }
.login .brand { align-items: center; margin-bottom: 26px; }
.login .brand b { font-size: 26px; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.balance-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.balance-banner .big { font-family: var(--serif); font-size: 40px; font-weight: 600; color: #7d5d2c; line-height: 1; }

/* --- responsive --- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats.s5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .btn.menu-btn { display: inline-flex; margin-left: auto; }
  nav.main { display: none; position: absolute; top: 62px; left: 0; right: 0; background: var(--paper); flex-direction: column; padding: 8px 12px 14px; border-bottom: 1px solid var(--line); box-shadow: 0 8px 20px rgba(60, 45, 20, .08); }
  nav.main.open { display: flex; }
  nav.main a { padding: 12px; font-size: 15px; }
  .top .logout { display: none; }
  nav.main .m-only { display: block; }
  .two, .g2, .g3 { grid-template-columns: 1fr; }
  .stats, .stats.s4, .stats.s5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  h1 { font-size: 26px; }
  main { padding: 18px 16px 70px; }
  .stat .v { font-size: 22px; }
  .kv { grid-template-columns: 120px 1fr; }
  .hide-sm { display: none; }
  /* employee overview becomes cards */
  table.cards thead { display: none; }
  table.cards, table.cards tbody, table.cards tr, table.cards td { display: block; width: 100%; }
  table.cards tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  table.cards td { border: none; padding: 3px 0; display: flex; justify-content: space-between; text-align: right; }
  table.cards td::before { content: attr(data-label); color: var(--muted); font-size: 13px; text-align: left; padding-right: 12px; }
  table.cards td.name { font-size: 17px; padding-bottom: 6px; }
  table.cards td.name::before { content: none; }
  table.cards tr.total td.name::before { content: none; }
}
nav.main .m-only { display: none; }
@media print {
  .top, .filters, .btn, form { display: none !important; }
  body { background: #fff; }
  .card, .tbl-wrap, .stat { border-color: #ddd; }
}
