* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: #090909;
  color: #f1f1f1;
  font-family: var(--font-body);
  padding: 18px;
}

.app-shell {
  max-width: 1180px;
  margin: 0 auto;
  border: 1px solid #2a2a2a;
  background: #0d0f13;
  box-shadow: 0 0 0 1px #15171d inset;
}

.layout { display: grid; grid-template-columns: 290px 1fr; min-height: 780px; }
.sidebar { border-right: 1px solid #2a2d35; background: #0c0e12; display: flex; flex-direction: column; }
.brand {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: .07em;
  padding: 24px 26px;
  border-bottom: 1px solid #24262d;
}
.brand span { color: #eb2e17; }

nav { padding: 12px 0; }
.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #d4d8e0;
  padding: 14px 20px 14px 42px;
  border-top: 1px solid transparent;
  border-bottom: 1px solid transparent;
  font-size: 1.05rem;
  font-family: var(--font-display);
  letter-spacing: .03em;
}
.nav-link::before {
  position: absolute;
  left: 16px;
  opacity: .85;
  font-size: 14px;
}
.nav-dashboard::before { content: "⌂"; }
.nav-appointments::before { content: "◫"; }
.nav-artists::before { content: "👥"; font-size: 12px; }
.nav-clients::before { content: "👤"; font-size: 12px; }
.nav-services::before { content: "▤"; }
.nav-settings::before { content: "⚙"; }

.nav-link.active {
  background: linear-gradient(90deg, rgba(111,17,14,.65), rgba(64,11,10,.3));
  border-color: #2a2d35;
}
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: #eb2e17;
}

.profile-chip {
  margin-top: auto;
  border-top: 1px solid #24262d;
  padding: 18px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1f232b;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: #b5bdc9;
  border: 1px solid #2d313a;
}
.profile-chip strong { display: block; font-size: .95rem; }
.profile-chip small { color: #808896; text-transform: uppercase; font-size: .62rem; letter-spacing: .08em; }

.content { padding: 24px; background: #14171d; }
.dash-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #2a2d35;
  padding-bottom: 16px;
}
.dash-head h1 {
  margin: 0;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 2rem;
}
.dash-head p { margin: 6px 0 0; color: #7f8794; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.head-actions { display: flex; gap: 10px; }
.btn {
  border: 1px solid #323743;
  background: #14171d;
  color: #e8ebf1;
  text-transform: uppercase;
  letter-spacing: .07em;
  font-family: var(--font-display);
  font-size: 1rem;
  padding: 10px 22px;
  text-decoration: none;
  display: inline-block;
}
.btn-primary { background: #eb2e17; border-color: #eb2e17; color: #fff; }
.btn-gold { background: #f0b82d; border-color: #f0b82d; color: #111; }
.btn-block { width: 100%; text-align: center; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.kpi {
  border: 1px solid #2b2f38;
  background: #1b1f26;
  padding: 16px;
  min-height: 130px;
  display: grid;
  align-content: start;
  gap: 6px;
  position: relative;
}
.kpi::before { content: ""; position: absolute; left: 0; top: 0; width: 3px; height: 100%; background: #60666f; }
.kpi.kpi-red::before { background: #d63a2b; }
.kpi.kpi-yellow::before { background: #d5b440; }
.kpi.kpi-green::before { background: #31c665; }
.kpi.kpi-neutral::before { background: #7c818b; }
.kpi .value { font-family: var(--font-display); font-size: 3rem; line-height: .9; }
.kpi .sub { color: #4bc86c; font-size: .9rem; font-family: var(--font-display); letter-spacing: .02em; }
.kpi .label { color: #a4acb8; text-transform: uppercase; letter-spacing: .09em; font-size: .68rem; }

.board-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.panel { border: 1px solid #2b2f38; background: #20242c; padding: 12px; min-height: 390px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.panel-head h2 { margin: 0; font-family: var(--font-display); text-transform: uppercase; font-size: 1.7rem; }
.panel-head a { color: #d35449; text-decoration: none; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }

.booking-row, .status-row {
  background: #171a21;
  border: 1px solid #2a2d35;
  padding: 12px;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  position: relative;
}
.booking-row::before { content: ""; position: absolute; left: 0; top: 0; width: 3px; height: 100%; }
.booking-row.tone-0::before { background: #e13f30; }
.booking-row.tone-1::before { background: #d5b440; }
.booking-row.tone-2::before { background: #8aa3d3; }
.dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #333844;
  display: grid;
  place-items: center;
  color: #aab2be;
  font-size: .72rem;
  background: #20242d;
  font-family: var(--font-display);
}
.booking-main strong { display: block; font-family: var(--font-display); font-size: 1.25rem; letter-spacing: .02em; }
.booking-main small { color: #868e9b; text-transform: uppercase; font-size: .64rem; letter-spacing: .08em; }
.booking-time { text-align: right; color: #aeb6c1; font-size: .85rem; }
.booking-time b { display: block; color: #e0b54c; font-family: var(--font-display); font-size: 2rem; line-height: .9; margin-top: 4px; }

.pill { font-family: var(--font-display); font-size: .92rem; text-transform: uppercase; }
.pill.green { color: #44d37a; }
.pill.yellow { color: #d8bc5d; }
.pill.muted { color: #9097a3; }

.skeleton-list div { height: 48px; margin: var(--space-3) 0; background: linear-gradient(90deg,#1b1d27,#262a37,#1b1d27); border-radius: var(--radius-sm); }

.top-meta { text-align: right; color: #97a0af; font-size: .8rem; margin-bottom: 8px; }
.top-meta a { color: #e26d5e; text-decoration: none; }
.flash-wrap { margin: 8px 0 12px; display: grid; gap: 8px; }
.flash { border: 1px solid #2b2f38; background: #181c24; padding: 8px 10px; font-size: .85rem; }
.flash.success { border-left: 3px solid #31c665; }
.flash.error { border-left: 3px solid #eb2e17; }

.grid-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.grid-form input, .grid-form select, .auth-form input, .auth-form select {
  background: #10131a;
  border: 1px solid #2c323d;
  color: #e5e9ef;
  padding: 10px;
}

.auth-page { display: grid; place-items: center; padding: 24px; }
.auth-shell { width: min(560px, 100%); }
.auth-card {
  width: 100%;
  background: #11151c;
  border: 1px solid #2d323d;
  padding: 22px;
}
.auth-card.wide { width: min(900px, 100%); }
.auth-card h1 { margin: 0 0 10px; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .04em; text-align: center; }
.auth-form { display: grid; gap: 10px; margin: 12px 0; }
.auth-form.inline { grid-template-columns: 1fr auto; align-items: center; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: 10px; margin: 14px 0; }
.plan-card { border: 1px solid #2d323d; background: #181d26; padding: 12px; }
.plan-grid.selectable .plan-card { cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease, transform .08s ease; }
.plan-grid.selectable .plan-card:hover { border-color: #5a6270; }
.plan-grid.selectable .plan-card.selected { border-color: #f0b82d; box-shadow: 0 0 0 1px rgba(240,184,45,.4) inset; }
.plan-grid.selectable .plan-card:focus-visible { outline: 2px solid #f0b82d; outline-offset: 2px; }
.plan-card h3 { margin: 0; font-family: var(--font-display); font-size: 1.5rem; }
.plan-card .price { color: #eb2e17; font-family: var(--font-display); font-size: 1.8rem; margin: 4px 0; }
.google-wrap { margin: 10px 0 16px; }
.auth-logo { font-family: var(--font-display); letter-spacing: .08em; }
.auth-logo span { color: #eb2e17; }
.auth-logo-large { text-align: center; font-size: clamp(3rem, 8vw, 4.6rem); margin: 0 0 14px; line-height: .9; }

.auth-page-centered { min-height: 100vh; }
.magic-card { text-align: center; }
.magic-card h1 { margin-bottom: 14px; }
.magic-card p { color: #d3dae6; line-height: 1.5; margin-bottom: 18px; }
.magic-actions { display: grid; gap: 10px; width: min(420px, 100%); margin: 0 auto; }

@media (max-width: 1024px) {
  body { padding: 0; }
  .app-shell { border: 0; max-width: 100%; }
  .layout { grid-template-columns: 1fr; }
  .board-grid, .kpi-grid { grid-template-columns: 1fr; }
}

.public-page { background: var(--ink-bg); }
.public-container { max-width: 1100px; margin: 0 auto; padding: var(--space-6); }
.studio-hero h1 { font-family: var(--font-display); font-size: clamp(2.5rem, 7vw, 5rem); margin: 0; text-transform: uppercase; }
.eyebrow { color: var(--ink-accent); text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; margin: 0 0 var(--space-3) 0; }
.studio-meta { display: flex; gap: var(--space-4); color: var(--ink-muted); margin: var(--space-3) 0 var(--space-5); flex-wrap: wrap; }
.cta { display: inline-block; background: var(--ink-primary); color: #fff; text-decoration: none; padding: var(--space-3) var(--space-5); text-transform: uppercase; letter-spacing: .07em; border-radius: var(--radius-sm); }
.public-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); gap: var(--space-4); margin-top: var(--space-4); }
.row-item { display: flex; justify-content: space-between; align-items: center; padding: var(--space-3) 0; border-bottom: 1px solid var(--ink-border); gap: var(--space-3); }
.row-item:last-child { border-bottom: 0; }
.row-item small { display: block; color: var(--ink-muted); margin-top: 4px; }

.admin-page { background: #080a0f; color: #eef2f8; padding: 20px; }
.admin-shell { max-width: 1200px; margin: 0 auto; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.admin-header .auth-logo small { font-size: .8rem; letter-spacing: .1em; margin-left: 8px; color: #f0b82d; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th, .admin-table td { border-bottom: 1px solid #2a2d35; padding: 10px; text-align: left; }
.admin-table th { color: #95a0b0; text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; }
.admin-inline-form { display: flex; gap: 8px; margin-bottom: 6px; align-items: center; }
.admin-inline-form select { background: #10131a; border: 1px solid #2c323d; color: #e5e9ef; padding: 8px; min-width: 120px; }
