/* ============================================================
   XCLUSIVEHAIRDEALS — BUSINESS MANAGEMENT SYSTEM
   Dark executive theme. Same type family as the website,
   flipped to charcoal so front-of-house and back-of-house
   feel like two sides of one brand.
   ============================================================ */

@font-face { font-family: 'Fraunces'; src: url('../fonts/fraunces-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('../fonts/fraunces-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('../fonts/fraunces-latin-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('../fonts/space-grotesk-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('../fonts/space-grotesk-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('../fonts/space-grotesk-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --bg: #171210;
  --panel: #201915;
  --panel2: #2A211B;
  --line: rgba(242, 232, 220, .1);
  --line2: rgba(242, 232, 220, .18);
  --text: #F2EAE0;
  --dim: rgba(242, 234, 224, .58);
  --accent: #D08A5C;
  --accent-soft: rgba(208, 138, 92, .16);
  --good: #8FBd8A;
  --good-soft: rgba(143, 189, 138, .15);
  --bad: #D97B62;
  --bad-soft: rgba(217, 123, 98, .15);
  --info: #8DA6C9;
  --info-soft: rgba(141, 166, 201, .16);
  --display: 'Fraunces', Georgia, serif;
  --ui: 'Space Grotesk', 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --r: 16px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--ui); font-size: 14px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input, select, textarea {
  font: inherit; color: var(--text);
  background: var(--panel2); border: 1px solid var(--line2); border-radius: 10px;
  padding: 11px 14px; outline: none; width: 100%;
  transition: border-color .25s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
select option { background: var(--panel2); color: var(--text); }
::selection { background: var(--accent); color: #1B1410; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--panel2); border-radius: 999px; border: 2px solid var(--bg); }

/* ============================================================
   LOGIN
   ============================================================ */
.login {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  background:
    radial-gradient(70% 60% at 50% 30%, rgba(208,138,92,.09), transparent 70%),
    var(--bg);
  padding: 24px;
}
.login__card { width: min(400px, 100%); text-align: center; }
.login__mark {
  width: 58px; height: 58px; margin: 0 auto 22px;
  display: grid; place-items: center; border-radius: 18px;
  background: var(--accent-soft); color: var(--accent);
}
.login__mark svg { width: 30px; height: 30px; }
.login__card h1 { font-family: var(--display); font-weight: 600; font-size: 27px; }
.login__card h1 em { font-style: italic; font-weight: 400; color: var(--accent); }
.login__sub { margin-top: 8px; font-size: 12.5px; color: var(--dim); letter-spacing: .04em; }
.login__pin {
  margin: 30px auto 0; display: flex; gap: 12px; justify-content: center;
}
.login__pin input {
  width: 58px; height: 66px; text-align: center;
  font-family: var(--display); font-size: 26px; font-weight: 600;
  background: var(--panel); border-radius: 14px;
}
.login__pin input.is-bad { border-color: var(--bad); animation: shake .4s; }
@keyframes shake { 25%{transform:translateX(-5px)} 50%{transform:translateX(5px)} 75%{transform:translateX(-3px)} }
.login__hint { margin-top: 22px; font-size: 12px; color: var(--dim); }
.login__hint b { color: var(--accent); letter-spacing: .12em; }
.login__site { display: inline-block; margin-top: 30px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); font-weight: 600; }
.login__site:hover { color: var(--accent); }

/* ============================================================
   SHELL
   ============================================================ */
.app { display: none; min-height: 100vh; }
.app.is-in { display: flex; }

.side {
  width: 232px; flex: 0 0 auto;
  border-right: 1px solid var(--line);
  padding: 26px 16px 20px;
  display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.side__brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 24px; }
.side__mark {
  width: 38px; height: 38px; flex: 0 0 auto; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.side__mark svg { width: 20px; height: 20px; }
.side__brand b { font-family: var(--display); font-weight: 600; font-size: 15.5px; display: block; line-height: 1.15; }
.side__brand span { font-size: 9px; letter-spacing: .3em; text-transform: uppercase; color: var(--dim); }
.side__label { padding: 16px 10px 8px; font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--dim); font-weight: 600; }
.side__item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: 12px; text-align: left; width: 100%;
  font-size: 13.5px; font-weight: 500; color: var(--dim);
  transition: all .25s var(--ease);
  position: relative;
}
.side__item i { font-style: normal; font-size: 16px; width: 22px; text-align: center; }
.side__item:hover { color: var(--text); background: rgba(242,232,220,.05); }
.side__item.is-on { color: var(--text); background: var(--accent-soft); }
.side__item.is-on::before {
  content: ''; position: absolute; left: -16px; top: 20%; bottom: 20%; width: 3px;
  background: var(--accent); border-radius: 0 4px 4px 0;
}
.side__item .pill {
  margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--accent); color: #1B1410; font-size: 11px; font-weight: 700;
}
.side__foot { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); }

/* ============================================================
   MAIN
   ============================================================ */
.main { flex: 1; min-width: 0; padding: 26px clamp(18px, 3.4vw, 44px) 60px; }
.mhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 26px; }
.mhead h1 { font-family: var(--display); font-weight: 600; font-size: clamp(1.6rem, 2.6vw, 2.2rem); line-height: 1.1; }
.mhead h1 em { font-style: italic; font-weight: 400; color: var(--accent); }
.mhead__sub { margin-top: 6px; font-size: 12.5px; color: var(--dim); letter-spacing: .03em; }
.mhead__actions { display: flex; gap: 10px; flex-wrap: wrap; }

.abtn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 20px; border-radius: 999px;
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700;
  background: var(--accent); color: #1B1410;
  transition: transform .3s var(--ease), background .25s;
}
.abtn:hover { transform: translateY(-2px); background: #DE9C70; }
.abtn--ghost { background: transparent; color: var(--text); border: 1.5px solid var(--line2); }
.abtn--ghost:hover { border-color: var(--accent); color: var(--accent); background: transparent; }
.abtn--danger { background: transparent; color: var(--bad); border: 1.5px solid var(--bad-soft); }
.abtn--danger:hover { border-color: var(--bad); background: var(--bad-soft); }
.abtn--sm { padding: 8px 14px; font-size: 10.5px; }
.abtn:disabled { opacity: .4; cursor: not-allowed; transform: none; }

/* ============================================================
   PANELS / GRIDS
   ============================================================ */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.panel__head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 18px 22px 0;
}
.panel__head h3 { font-family: var(--display); font-weight: 600; font-size: 17px; }
.panel__head .more { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); font-weight: 600; }
.panel__head .more:hover { color: var(--accent); }
.panel__body { padding: 16px 22px 22px; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; position: relative; overflow: hidden; }
.kpi__label { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); font-weight: 600; }
.kpi__value { margin-top: 10px; font-family: var(--display); font-weight: 600; font-size: clamp(1.5rem, 2.2vw, 2rem); line-height: 1; }
.kpi__delta { margin-top: 10px; font-size: 11.5px; font-weight: 600; letter-spacing: .03em; color: var(--dim); }
.kpi__delta.up { color: var(--good); }
.kpi__delta.down { color: var(--bad); }
.kpi--accent { border-color: rgba(208,138,92,.35); background: linear-gradient(140deg, rgba(208,138,92,.13), var(--panel) 55%); }
.kpi--warn .kpi__value { color: var(--bad); }

.grid2 { display: grid; grid-template-columns: 1.55fr 1fr; gap: 14px; align-items: start; }
.stack { display: grid; gap: 14px; }

/* ============================================================
   CHART
   ============================================================ */
.chart { width: 100%; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .bar { fill: var(--accent); opacity: .82; transition: opacity .2s; }
.chart .bar:hover { opacity: 1; }
.chart .bar--today { fill: #E8B183; }
.chart .axis { font-size: 9.5px; fill: var(--dim); font-family: var(--ui); letter-spacing: .04em; }

/* ============================================================
   LISTS / TABLES
   ============================================================ */
.rowlist { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.row:last-child { border-bottom: 0; }
.row__ava {
  width: 40px; height: 40px; border-radius: 12px; flex: 0 0 auto;
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 600; font-size: 15px;
  background: var(--panel2); color: var(--accent);
}
.row__main { flex: 1; min-width: 0; }
.row__main b { display: block; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__main span { display: block; margin-top: 3px; font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__side { text-align: right; flex: 0 0 auto; }
.row__side b { display: block; font-size: 14px; font-weight: 700; }
.row__side span { display: block; margin-top: 3px; font-size: 11px; color: var(--dim); }
.row__acts { display: flex; gap: 8px; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; }

.tag {
  display: inline-block; padding: 5px 12px; border-radius: 999px;
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700;
}
.tag--good { background: var(--good-soft); color: var(--good); }
.tag--bad { background: var(--bad-soft); color: var(--bad); }
.tag--info { background: var(--info-soft); color: var(--info); }
.tag--accent { background: var(--accent-soft); color: var(--accent); }
.tag--dim { background: rgba(242,232,220,.08); color: var(--dim); }

.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; min-width: 560px; }
.tbl th {
  text-align: left; padding: 12px 14px;
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); font-weight: 600;
  border-bottom: 1px solid var(--line2);
}
.tbl td { padding: 13px 14px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td b { font-weight: 700; }
.tbl td .sub { display: block; margin-top: 2px; font-size: 11px; color: var(--dim); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }

/* filter chips */
.fchips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.fchip {
  padding: 9px 17px; border-radius: 999px;
  border: 1.5px solid var(--line2);
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600;
  color: var(--dim); transition: all .25s;
}
.fchip:hover { border-color: var(--accent); color: var(--accent); }
.fchip.is-on { background: var(--accent); border-color: var(--accent); color: #1B1410; }

.search { max-width: 320px; }

/* activity feed */
.feed { display: flex; flex-direction: column; }
.feed__item { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.feed__item:last-child { border-bottom: 0; }
.feed__item i { font-style: normal; font-size: 15px; flex: 0 0 auto; }
.feed__item p { color: var(--text); line-height: 1.5; }
.feed__item span { display: block; margin-top: 2px; font-size: 10.5px; color: var(--dim); }

/* ============================================================
   POS
   ============================================================ */
.pos { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; align-items: start; }
.pos__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.pos-item {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; text-align: left; transition: border-color .25s, transform .3s var(--ease);
  position: relative;
}
.pos-item:hover:not(:disabled) { border-color: var(--accent); transform: translateY(-2px); }
.pos-item:disabled { opacity: .38; cursor: not-allowed; }
.pos-item__img { height: 84px; background-size: cover; background-position: center; }
.pos-item__img--svc {
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
  font-family: var(--display); font-style: italic; font-size: 21px;
}
.pos-item__body { padding: 10px 12px 12px; }
.pos-item__body b { display: block; font-size: 12px; font-weight: 700; line-height: 1.3; min-height: 30px; }
.pos-item__body span { display: block; margin-top: 4px; font-size: 11.5px; color: var(--accent); font-weight: 600; }
.pos-item__stock {
  position: absolute; top: 8px; right: 8px;
  padding: 3px 8px; border-radius: 999px; font-size: 9px; font-weight: 700; letter-spacing: .06em;
  background: rgba(23,18,16,.8); color: var(--dim);
}
.pos-item__stock.low { color: var(--bad); }
.pos__cart { position: sticky; top: 20px; }
.pos__lines { max-height: 320px; overflow-y: auto; }
.pos-line { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.pos-line:last-child { border-bottom: 0; }
.pos-line b { flex: 1; font-weight: 600; min-width: 0; }
.pos-line .q { display: flex; align-items: center; gap: 7px; }
.pos-line .q button {
  width: 24px; height: 24px; border-radius: 999px; border: 1px solid var(--line2);
  font-size: 13px; display: grid; place-items: center;
}
.pos-line .q button:hover { border-color: var(--accent); color: var(--accent); }
.pos-line .amt { width: 84px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.pos__total {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 16px 0 4px; border-top: 1px solid var(--line2); margin-top: 8px;
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--dim);
}
.pos__total b { font-family: var(--display); font-size: 26px; letter-spacing: 0; color: var(--text); }
.pos__pay { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.pos__pay button {
  padding: 11px 6px; border-radius: 10px; border: 1.5px solid var(--line2);
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; color: var(--dim);
}
.pos__pay button.is-on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.pos__empty { text-align: center; padding: 34px 0; color: var(--dim); font-family: var(--display); font-style: italic; font-size: 15px; }

/* ============================================================
   MODAL + TOAST
   ============================================================ */
.modal { position: fixed; inset: 0; z-index: 80; display: none; }
.modal.is-open { display: block; }
.modal__veil { position: absolute; inset: 0; background: rgba(12,9,7,.66); }
.modal__card {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(480px, calc(100vw - 32px)); max-height: 86vh; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line2); border-radius: 20px;
  padding: 26px 26px 28px;
}
.modal__card h3 { font-family: var(--display); font-weight: 600; font-size: 20px; margin-bottom: 4px; }
.modal__card .sub { font-size: 12px; color: var(--dim); margin-bottom: 16px; }
.modal__x { position: absolute; top: 16px; right: 20px; font-size: 26px; color: var(--dim); }
.modal__x:hover { color: var(--accent); }
.modal .f { margin-top: 14px; }
.modal .f label { display: block; margin-bottom: 7px; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); font-weight: 600; }
.modal__acts { display: flex; gap: 10px; margin-top: 22px; justify-content: flex-end; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px);
  z-index: 90; padding: 13px 22px; border-radius: 999px;
  background: var(--accent); color: #1B1410; font-weight: 700; font-size: 13px;
  opacity: 0; pointer-events: none; transition: all .4s var(--ease);
  max-width: calc(100vw - 32px); text-align: center;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ============================================================
   REPORT CARDS
   ============================================================ */
.rep3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 14px; }
.split { display: flex; flex-direction: column; gap: 12px; }
.split__row { display: flex; align-items: center; gap: 12px; font-size: 12.5px; }
.split__row b { width: 128px; flex: 0 0 auto; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.split__bar { flex: 1; height: 8px; border-radius: 999px; background: var(--panel2); overflow: hidden; }
.split__bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.split__row span { width: 86px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; flex: 0 0 auto; }

/* staff cards */
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.team-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.team-card__top { display: flex; align-items: center; gap: 14px; }
.team-card__ava {
  width: 48px; height: 48px; border-radius: 999px; flex: 0 0 auto;
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 600; font-size: 19px; color: #1B1410;
}
.team-card__top b { display: block; font-size: 15px; font-weight: 700; }
.team-card__top span { display: block; margin-top: 2px; font-size: 11.5px; color: var(--dim); }
.team-card__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.team-card__stat { background: var(--panel2); border-radius: 12px; padding: 12px 14px; }
.team-card__stat b { display: block; font-family: var(--display); font-size: 17px; font-weight: 600; }
.team-card__stat span { display: block; margin-top: 3px; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); font-weight: 600; }

/* settings */
.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }

/* ============================================================
   RESPONSIVE — sidebar becomes a bottom tab bar
   ============================================================ */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .grid2, .pos, .set-grid { grid-template-columns: 1fr; }
  .rep3 { grid-template-columns: 1fr; }
  .pos__cart { position: static; }
}
@media (max-width: 860px) {
  .app.is-in { display: block; }
  .main { padding: 18px 16px 110px; }
  .side {
    position: fixed; bottom: 0; left: 0; right: 0; top: auto; z-index: 70;
    width: 100%; height: auto; flex-direction: row; align-items: center;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    background: rgba(23, 18, 16, .96);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-right: 0; border-top: 1px solid var(--line2);
    overflow-x: auto; overflow-y: hidden; gap: 2px;
  }
  .side::-webkit-scrollbar { display: none; }
  .side__brand, .side__label, .side__foot { display: none; }
  .side__item {
    flex-direction: column; gap: 4px; padding: 8px 10px;
    font-size: 9px; letter-spacing: .04em; flex: 0 0 auto; min-width: 62px;
    text-align: center; align-items: center;
  }
  .side__item i { font-size: 18px; width: auto; }
  .side__item.is-on::before { display: none; }
  .side__item .pill { position: absolute; top: 2px; right: 6px; margin: 0; min-width: 17px; height: 17px; font-size: 9px; padding: 0 4px; }
  .mhead { margin-bottom: 18px; }
  .mhead__actions { width: 100%; }
  .mhead__actions .abtn { flex: 1; justify-content: center; }
  .row__acts { width: 100%; justify-content: flex-start; }
  .row { flex-wrap: wrap; }
  .kpis { gap: 10px; }
  .kpi { padding: 15px 16px; }
  .login__pin input { width: 52px; height: 60px; }
}
@media (max-width: 480px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .pos__grid { grid-template-columns: repeat(2, 1fr); }
}
