@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,500;0,9..144,600;1,9..144,500&family=Work+Sans:wght@400;500;600;700&display=swap');

/* ===================== Design tokens ===================== */
/* Palette lifted directly from the Chloe Wright Hair logo:
   warm mocha background, soft stone-ivory type, a single muted
   brass accent for stamps/highlights — quiet and editorial, not shiny. */
:root{
  --ink:        #221F1C;   /* near-black text */
  --cream:      #FBF8F4;   /* page background */
  --mocha:      #83766A;   /* brand primary — sampled from the logo background */
  --mocha-dark: #675C51;   /* hover / pressed state */
  --taupe-deep: #4A423A;   /* deep neutral for dark panels (ticket, footer) */
  --stone:      #E4E1DA;   /* light neutral — tags, subtle fills, ticket text */
  --brass:      #A6875B;   /* single muted accent for stamps & highlights */
  --line:       rgba(34,31,28,0.12);
  --shadow:     0 20px 45px -25px rgba(34,31,28,0.35);
  --radius:     18px;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Work Sans', -apple-system, sans-serif;
}

*{ box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family:var(--font-body);
  color:var(--ink);
  background:var(--cream);
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
}
body.has-tabbar{ padding-bottom:calc(64px + env(safe-area-inset-bottom)); }
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
h1,h2,h3,h4{ font-family:var(--font-display); font-weight:600; margin:0 0 .4em; letter-spacing:-0.01em; }
p{ margin:0 0 1em; }
.container{ max-width:1160px; margin:0 auto; padding:0 24px; }
:focus-visible{ outline:3px solid var(--brass); outline-offset:2px; }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration:0.001ms !important; transition-duration:0.001ms !important; }
}

/* ===================== Buttons ===================== */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  font-family:var(--font-body); font-weight:600; font-size:0.95rem;
  padding:14px 26px; min-height:44px; border-radius:999px; border:1px solid transparent;
  cursor:pointer; transition:transform .18s ease, box-shadow .18s ease, background .18s ease;
  text-align:center;
}
.btn-primary{ background:var(--mocha); color:#fff; box-shadow:0 12px 24px -12px rgba(103,92,81,.45); }
.btn-primary:hover{ background:var(--mocha-dark); transform:translateY(-2px); }
.btn-brass{ background:var(--brass); color:var(--ink); box-shadow:0 12px 24px -12px rgba(166,135,91,.5); }
.btn-brass:hover{ transform:translateY(-2px); }
.btn-outline{ background:transparent; border-color:var(--ink); color:var(--ink); }
.btn-outline:hover{ background:var(--ink); color:#fff; }
.btn-ghost{ background:transparent; color:var(--mocha); padding:10px 4px; }
.btn-block{ width:100%; }
.btn-sm{ padding:9px 18px; font-size:0.85rem; }
.btn:disabled{ opacity:.45; cursor:not-allowed; transform:none !important; }

/* ===================== Header / Nav ===================== */
.site-header{
  position:sticky; top:0; z-index:50;
  background:rgba(251,248,244,0.92); backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
  padding-top:env(safe-area-inset-top);
}
.nav{ display:flex; align-items:center; justify-content:space-between; padding:14px 0; }
.brand{ display:flex; align-items:center; gap:10px; font-family:var(--font-display); font-size:1.2rem; font-weight:600; }
.brand-mark{ width:30px; height:30px; border-radius:50%; background:conic-gradient(from 210deg, var(--mocha), var(--brass), var(--mocha)); flex-shrink:0; }

/* Mobile: slim app bar — brand only. Full nav links / CTAs / hamburger
   are hidden because the bottom tab bar is the primary navigation. */
.nav-links, .nav-cta, .nav-toggle{ display:none; }

@media (min-width:860px){
  .brand{ font-size:1.35rem; }
  .brand-mark{ width:34px; height:34px; }
  .nav-links{ display:flex; align-items:center; gap:30px; list-style:none; margin:0; padding:0; font-weight:500; }
  .nav-links a{ opacity:.8; transition:opacity .15s; }
  .nav-links a:hover{ opacity:1; }
  .nav-cta{ display:flex; align-items:center; gap:14px; }
  .avatar-pill{ display:flex; align-items:center; gap:8px; font-weight:600; font-size:.9rem; }
}
.avatar-circle{ width:32px; height:32px; border-radius:50%; display:flex; align-items:center; justify-content:center; color:#fff; font-size:.75rem; font-weight:700; flex-shrink:0; }

/* ===================== Bottom app tab bar (mobile-native pattern) ===================== */
.app-tabbar{
  display:flex; position:fixed; left:0; right:0; bottom:0; z-index:60;
  background:rgba(251,248,244,0.96); backdrop-filter:blur(14px);
  border-top:1px solid var(--line);
  padding:6px 4px calc(6px + env(safe-area-inset-bottom));
}
.admin-body .app-tabbar{ background:rgba(34,31,28,0.97); border-top-color:rgba(255,255,255,0.1); }
.app-tab{
  flex:1; display:flex; flex-direction:column; align-items:center; gap:3px;
  padding:6px 2px; border-radius:12px; color:var(--ink); opacity:.55;
  font-size:.68rem; font-weight:600; letter-spacing:.01em; min-height:44px;
  transition:opacity .15s, background .15s;
}
.admin-body .app-tab{ color:var(--stone); }
.app-tab svg{ width:22px; height:22px; }
.app-tab.active{ opacity:1; color:var(--mocha); }
.admin-body .app-tab.active{ color:var(--brass); }
.app-tab:active{ background:var(--stone); }
.admin-body .app-tab:active{ background:rgba(255,255,255,0.08); }

@media (min-width:860px){
  .app-tabbar{ display:none; }
  body.has-tabbar{ padding-bottom:0; }
}

/* ===================== Hero + signature ticket ===================== */
.hero{ padding:70px 0 40px; overflow:hidden; }
.hero-grid{ display:grid; grid-template-columns:1.1fr 0.9fr; gap:60px; align-items:center; }
.eyebrow{ display:inline-flex; align-items:center; gap:8px; font-size:.8rem; letter-spacing:.14em; text-transform:uppercase; color:var(--mocha); font-weight:700; margin-bottom:18px; }
.eyebrow::before{ content:''; width:22px; height:1px; background:var(--mocha); display:inline-block; }
.hero h1{ font-size:clamp(2.4rem, 4.4vw, 3.6rem); line-height:1.05; }
.hero h1 em{ font-style:italic; color:var(--mocha); }
.hero-sub{ font-size:1.1rem; max-width:46ch; opacity:.8; }
.hero-actions{ display:flex; gap:16px; margin-top:28px; flex-wrap:wrap; }
.hero-stats{ display:flex; gap:32px; margin-top:44px; }
.hero-stats div strong{ display:block; font-family:var(--font-display); font-size:1.6rem; }
.hero-stats div span{ font-size:.8rem; opacity:.65; }

/* the signature: a torn salon appointment ticket */
.ticket-wrap{ position:relative; display:flex; justify-content:center; }
.ticket{
  position:relative; width:100%; max-width:360px;
  background:var(--ink); color:var(--cream);
  border-radius:20px; padding:30px 28px 26px;
  box-shadow:var(--shadow);
  transform:rotate(3deg);
}
.ticket::before, .ticket::after{
  content:''; position:absolute; width:26px; height:26px; background:var(--cream);
  border-radius:50%; top:50%; transform:translateY(-50%);
}
.ticket::before{ left:-13px; }
.ticket::after{ right:-13px; }
.ticket-perf{
  border-top:2px dashed rgba(250,246,239,0.3); margin:18px 0;
}
.ticket-eyebrow{ font-size:.72rem; text-transform:uppercase; letter-spacing:.16em; color:var(--brass); font-weight:700; }
.ticket h3{ color:#fff; font-size:1.5rem; margin-top:6px; }
.ticket-row{ display:flex; justify-content:space-between; font-size:.88rem; margin-bottom:8px; opacity:.9; }
.ticket-row strong{ color:#fff; font-weight:600; }
.ticket-foot{ display:flex; align-items:center; justify-content:space-between; margin-top:6px; }
.ticket-stamp{
  font-family:var(--font-display); font-style:italic; color:var(--brass);
  border:1.5px solid var(--brass); border-radius:999px; padding:6px 14px; font-size:.78rem; transform:rotate(-6deg);
}
.ticket-card2{
  position:absolute; bottom:-26px; left:34px; width:78%;
  background:var(--stone); color:var(--ink); border-radius:16px; padding:16px 20px;
  box-shadow:var(--shadow); transform:rotate(-4deg);
}
.ticket-card2 .label{ font-size:.7rem; text-transform:uppercase; letter-spacing:.1em; color:var(--mocha); font-weight:700; }
.ticket-card2 strong{ font-family:var(--font-display); font-size:1.05rem; }

@media (max-width:900px){
  .hero-grid{ grid-template-columns:1fr; }
  .ticket-wrap{ margin-top:50px; }
}

/* ===================== Section basics ===================== */
.section{ padding:90px 0; }
.section-alt{ background:#fff; }
.section-head{ max-width:640px; margin:0 auto 48px; text-align:center; }
.section-head h2{ font-size:clamp(1.8rem, 3vw, 2.5rem); }
.section-head p{ opacity:.75; }

/* ===================== Service cards ===================== */
.cat-tabs{ display:flex; gap:10px; justify-content:center; flex-wrap:wrap; margin-bottom:38px; }
.cat-tab{
  padding:9px 20px; border-radius:999px; border:1px solid var(--line); font-weight:600; font-size:.88rem; cursor:pointer;
  background:#fff; transition:all .15s;
}
.cat-tab.active, .cat-tab:hover{ background:var(--ink); color:#fff; border-color:var(--ink); }

.service-grid{ display:grid; grid-template-columns:repeat(3, 1fr); gap:22px; }
.service-card{
  background:var(--cream); border:1px solid var(--line); border-radius:var(--radius);
  padding:26px; transition:transform .2s ease, box-shadow .2s ease;
}
.service-card:hover{ transform:translateY(-4px); box-shadow:var(--shadow); }
.service-card .tag{ display:inline-block; font-size:.7rem; text-transform:uppercase; letter-spacing:.1em; font-weight:700; color:var(--mocha); background:var(--stone); padding:4px 10px; border-radius:999px; margin-bottom:14px; }
.service-card h3{ font-size:1.2rem; }
.service-card .meta{ display:flex; justify-content:space-between; align-items:center; margin-top:18px; padding-top:16px; border-top:1px solid var(--line); }
.service-card .price{ font-family:var(--font-display); font-size:1.2rem; color:var(--mocha); font-weight:600; }
.service-card .duration{ font-size:.85rem; opacity:.6; }

@media (max-width:900px){ .service-grid{ grid-template-columns:1fr 1fr; } }
@media (max-width:600px){ .service-grid{ grid-template-columns:1fr; } }

/* ===================== Stylists ===================== */
.stylist-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:24px; }
.stylist-card{ text-align:center; }
.stylist-photo{ width:100%; aspect-ratio:1; border-radius:20px; display:flex; align-items:center; justify-content:center; font-family:var(--font-display); font-size:2.4rem; color:#fff; margin-bottom:16px; }
.stylist-photo-img{ width:100%; aspect-ratio:1; border-radius:20px; object-fit:cover; margin-bottom:16px; }
.stylist-card h3{ font-size:1.15rem; margin-bottom:2px; }
.stylist-card .role{ font-size:.85rem; color:var(--mocha); font-weight:600; margin-bottom:8px; }
.stylist-card p.bio{ font-size:.88rem; opacity:.75; }
.stylist-card .stylist-services{ font-size:.78rem; opacity:.55; margin-top:10px; padding-top:10px; border-top:1px solid var(--line); }
@media (max-width:900px){ .stylist-grid{ grid-template-columns:1fr 1fr; } }
@media (max-width:600px){ .stylist-grid{ grid-template-columns:1fr; } }

/* ===================== Stepper (booking flow) ===================== */
.wizard-topbar{ display:flex; align-items:center; gap:10px; padding:calc(10px + env(safe-area-inset-top)) 16px 10px; position:sticky; top:0; background:rgba(251,248,244,0.94); backdrop-filter:blur(10px); z-index:40; border-bottom:1px solid var(--line); }
.wizard-topbar a{ display:flex; align-items:center; gap:6px; font-weight:600; font-size:.9rem; color:var(--ink); opacity:.7; min-height:44px; }
.wizard-topbar svg{ width:20px; height:20px; }

.step-actions{ margin-top:26px; }

@media (max-width:639px){
  .step-actions{
    position:fixed; left:0; right:0; bottom:0; z-index:55;
    background:rgba(251,248,244,0.97); backdrop-filter:blur(14px);
    border-top:1px solid var(--line);
    padding:12px 16px calc(12px + env(safe-area-inset-bottom));
    margin-top:0 !important;
  }
  .step-actions .btn{ flex:1; }
  .wizard-form{ padding-bottom:90px; }
}


.stepper{ display:flex; justify-content:center; gap:0; margin-bottom:50px; flex-wrap:wrap; }
.step{ display:flex; align-items:center; gap:10px; padding:0 18px; position:relative; }
.step:not(:last-child)::after{ content:''; width:44px; border-top:2px dashed var(--line); margin-left:18px; }
.step-num{ width:30px; height:30px; border-radius:50%; background:#fff; border:2px solid var(--line); display:flex; align-items:center; justify-content:center; font-weight:700; font-size:.85rem; }
.step.active .step-num{ background:var(--mocha); border-color:var(--mocha); color:#fff; }
.step.done .step-num{ background:var(--mocha-dark); border-color:var(--mocha-dark); color:#fff; }
.step-label{ font-size:.85rem; font-weight:600; opacity:.6; }
.step.active .step-label{ opacity:1; color:var(--mocha); }

.booking-panel{ background:#fff; border:1px solid var(--line); border-radius:24px; padding:40px; box-shadow:var(--shadow); }
.pick-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(230px,1fr)); gap:16px; }
.pick-card{
  border:2px solid var(--line); border-radius:16px; padding:18px; cursor:pointer; background:var(--cream);
  transition:border-color .15s, background .15s;
}
.pick-card:hover{ border-color:var(--brass); }
.pick-card.selected{ border-color:var(--mocha); background:#fff; box-shadow:0 0 0 3px rgba(103,92,81,.15); }
.pick-card h4{ margin:0 0 4px; font-family:var(--font-display); font-size:1.05rem; }
.pick-card .small{ font-size:.8rem; opacity:.65; }

.slot-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(84px,1fr)); gap:10px; }
.slot-btn{
  border:1px solid var(--line); background:#fff; border-radius:10px; padding:10px 6px; font-weight:600; font-size:.85rem; cursor:pointer;
}
.slot-btn:hover{ border-color:var(--brass); }
.slot-btn.selected{ background:var(--mocha); color:#fff; border-color:var(--mocha); }

/* ===================== Forms ===================== */
.form-group{ margin-bottom:18px; }
label{ display:block; font-weight:600; font-size:.88rem; margin-bottom:6px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], textarea, select{
  width:100%; padding:13px 14px; border:1.5px solid var(--line); border-radius:12px; font-family:var(--font-body); font-size:.95rem; background:#fff;
}
input:focus, textarea:focus, select:focus{ border-color:var(--mocha); outline:none; }
.auth-shell{ max-width:440px; margin:70px auto; background:#fff; border:1px solid var(--line); border-radius:24px; padding:44px; box-shadow:var(--shadow); }
.auth-shell h1{ font-size:1.7rem; }
.form-row{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
@media (max-width:520px){ .form-row{ grid-template-columns:1fr; } }

/* ===================== Alerts / flash ===================== */
.alert{ padding:14px 18px; border-radius:12px; font-size:.9rem; margin-bottom:16px; font-weight:500; }
.alert-success{ background:#e6f2ea; color:#245c3c; border:1px solid #b6dcc4; }
.alert-error{ background:#fbe7e9; color:#8f2530; border:1px solid #f2c1c6; }
.alert-info{ background:var(--stone); color:var(--mocha-dark); border:1px solid #e2b9b0; }

/* ===================== Dashboard / tables ===================== */
.dash-header{ display:flex; justify-content:space-between; align-items:flex-end; margin-bottom:36px; flex-wrap:wrap; gap:16px; }
.stat-row{ display:grid; grid-template-columns:repeat(4,1fr); gap:18px; margin-bottom:40px; }
.stat-card{ background:#fff; border:1px solid var(--line); border-radius:16px; padding:22px; }
.stat-card .num{ font-family:var(--font-display); font-size:1.8rem; }
.stat-card .lbl{ font-size:.8rem; opacity:.65; }
@media (max-width:800px){ .stat-row{ grid-template-columns:1fr 1fr; } }

.appt-card{
  display:flex; align-items:center; justify-content:space-between; gap:20px;
  background:#fff; border:1px solid var(--line); border-radius:16px; padding:18px 22px; margin-bottom:14px; flex-wrap:wrap;
}
.appt-when{ min-width:130px; }
.appt-when .date{ font-family:var(--font-display); font-size:1.15rem; }
.appt-when .time{ font-size:.85rem; opacity:.65; }
.appt-mid h4{ margin:0 0 2px; font-size:1.05rem; }
.appt-mid .with{ font-size:.85rem; opacity:.65; }
.status-pill{ font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; padding:5px 12px; border-radius:999px; }
.status-booked{ background:var(--stone); color:var(--mocha-dark); }
.status-completed{ background:#e6f2ea; color:#245c3c; }
.status-cancelled{ background:#f1f1f1; color:#777; }
.status-no_show{ background:#fbe7e9; color:#8f2530; }

table.data-table{ width:100%; border-collapse:collapse; background:#fff; border-radius:16px; overflow:hidden; }
table.data-table th, table.data-table td{ padding:14px 16px; text-align:left; border-bottom:1px solid var(--line); font-size:.9rem; }
table.data-table th{ background:var(--cream); font-weight:700; font-size:.78rem; text-transform:uppercase; letter-spacing:.06em; }

.empty-state{ text-align:center; padding:60px 20px; opacity:.7; }

/* ===================== Admin shell ===================== */
.admin-shell{ display:block; min-height:100vh; }
.admin-side{ display:none; }
.admin-main{ padding:20px 16px calc(20px + env(safe-area-inset-bottom)); padding-top:calc(20px + env(safe-area-inset-top)); }

@media (min-width:860px){
  .admin-shell{ display:grid; grid-template-columns:240px 1fr; }
  .admin-side{ display:block; background:var(--ink); color:var(--cream); padding:28px 20px; }
  .admin-side .brand{ color:#fff; margin-bottom:34px; }
  .admin-side nav a{ display:block; padding:11px 14px; border-radius:10px; font-weight:500; opacity:.75; margin-bottom:4px; }
  .admin-side nav a:hover, .admin-side nav a.active{ background:rgba(255,255,255,0.08); opacity:1; }
  .admin-main{ padding:36px 40px; }
}

/* ===================== App tiles (admin overview) ===================== */
.tile-grid{ display:grid; grid-template-columns:repeat(2, 1fr); gap:14px; margin-bottom:28px; }
.app-tile{
  background:#fff; border:1px solid var(--line); border-radius:20px; padding:22px 18px;
  display:flex; flex-direction:column; gap:10px; color:var(--ink); min-height:120px; justify-content:flex-end;
  position:relative; overflow:hidden; transition:transform .15s, box-shadow .15s;
}
.app-tile::before{ content:''; position:absolute; top:0; left:0; right:0; height:3px; background:var(--tile-accent, var(--mocha)); }
.app-tile svg{ width:26px; height:26px; color:var(--tile-accent, var(--mocha)); }
.app-tile:hover{ transform:translateY(-2px); box-shadow:var(--shadow); }
.app-tile:active{ transform:translateY(0); }
.tile-label{ font-family:var(--font-display); font-size:1.15rem; font-weight:600; }
.tile-sub{ font-size:.8rem; opacity:.6; }

@media (min-width:640px){
  .tile-grid{ grid-template-columns:repeat(4, 1fr); }
}

/* ===================== Diary (day / week grid) ===================== */

/* ---- Week-strip day navigator (Day view) ---- */
.week-strip{ display:flex; align-items:center; gap:6px; margin-bottom:20px; background:#fff; border:1px solid var(--line); border-radius:16px; padding:10px; }
.week-strip-nav{ flex-shrink:0; width:36px; height:36px; border-radius:50%; display:flex; align-items:center; justify-content:center; color:var(--ink); opacity:.5; }
.week-strip-nav:hover{ background:var(--cream); opacity:1; }
.week-strip-nav svg{ width:18px; height:18px; }
.week-strip-days{ flex:1; display:grid; grid-template-columns:repeat(7, 1fr); gap:4px; }
.week-strip-day{ display:flex; flex-direction:column; align-items:center; gap:4px; padding:8px 2px; border-radius:12px; color:var(--ink); position:relative; }
.week-strip-day .dow{ font-size:.65rem; font-weight:700; letter-spacing:.03em; opacity:.5; }
.week-strip-day .num{ font-family:var(--font-display); font-size:1.15rem; font-weight:600; width:30px; height:30px; display:flex; align-items:center; justify-content:center; border-radius:50%; }
.week-strip-day:hover .num{ background:var(--stone); }
.week-strip-day.selected .num{ background:var(--mocha); color:#fff; }
.week-strip-day.selected .dow{ opacity:1; color:var(--mocha); }
.week-strip-day.is-today .num{ box-shadow:0 0 0 1.5px var(--brass); }

/* ---- Floating action button ---- */
.diary-fab{
  position:fixed; right:20px; bottom:calc(20px + env(safe-area-inset-bottom)); z-index:55;
  width:56px; height:56px; border-radius:50%; background:var(--ink); color:#fff;
  display:flex; align-items:center; justify-content:center; box-shadow:0 10px 24px -8px rgba(34,31,28,0.5);
  transition:transform .15s;
}
.diary-fab:hover{ transform:scale(1.06); }
.diary-fab svg{ width:26px; height:26px; }
body.has-tabbar .diary-fab{ bottom:calc(84px + env(safe-area-inset-bottom)); }
@media (min-width:860px){ .diary-fab{ right:40px; bottom:40px; } }


.diary-scroll{ display:none; overflow-x:auto; border:1px solid var(--line); border-radius:16px; background:#fff; }
.diary-grid{ display:grid; min-width:640px; }
.diary-gutter-head, .diary-col-head{ position:sticky; top:0; z-index:5; background:#fff; border-bottom:1px solid var(--line); padding:12px 8px; font-weight:700; font-size:.85rem; text-align:center; }
.diary-col-head .sub{ display:block; font-weight:500; opacity:.55; font-size:.75rem; }
.diary-col-head.today{ color:var(--mocha); background:var(--stone); }
.diary-col-head .dot{ display:inline-block; width:9px; height:9px; border-radius:50%; margin-right:4px; }

.diary-gutter{ position:relative; border-right:1px solid var(--line); }
.diary-hour-label{ position:absolute; right:8px; transform:translateY(-50%); font-size:.72rem; opacity:.55; font-weight:600; }

.diary-col{ position:relative; overflow:hidden; border-right:1px solid var(--line); border-top:1px solid var(--line); cursor:cell; }
.diary-col:last-child{ border-right:none; }
.diary-hourline{ position:absolute; left:0; right:0; border-top:1px dashed var(--line); }
.diary-col.drop-hover{ background:var(--stone); }
.diary-now-line{ position:absolute; left:0; right:0; height:0; border-top:2px solid #d64545; z-index:2; pointer-events:none; }
.diary-now-line span{ position:absolute; left:-5px; top:-4px; width:8px; height:8px; border-radius:50%; background:#d64545; }

.diary-block{
  position:absolute; left:3px; right:3px; border-radius:8px; padding:6px 8px;
  background:repeating-linear-gradient(135deg, rgba(34,31,28,0.06), rgba(34,31,28,0.06) 6px, rgba(34,31,28,0.1) 6px, rgba(34,31,28,0.1) 12px);
  border:1px dashed rgba(34,31,28,0.35); cursor:pointer; z-index:1;
  display:flex; align-items:center; justify-content:center; text-align:center;
}
.diary-block span{ font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em; opacity:.6; }
.diary-block:hover{ background-color:rgba(179,32,47,0.08); border-color:#b3202f; }
.diary-block:hover span{ opacity:.85; }

.color-swatches{ display:flex; flex-wrap:wrap; gap:8px; }
.color-swatch{
  width:32px; height:32px; border-radius:50%; border:2px solid transparent; cursor:pointer;
  display:flex; align-items:center; justify-content:center; color:#fff; font-size:.8rem; flex-shrink:0;
  transition:transform .1s;
}
.color-swatch:hover{ transform:scale(1.1); }
.color-swatch.selected{ border-color:var(--ink); box-shadow:0 0 0 2px rgba(255,255,255,0.8), 0 0 0 3px var(--ink); }
.color-swatch-none{ background:transparent; border:2px dashed var(--mocha); color:var(--mocha); }
.color-swatch-none.selected{ border-style:solid; }

.diary-appt{
  overflow:hidden;
  font-size:.76rem; line-height:1.25;
}
.diary-appt-time{ font-weight:700; }
.diary-appt-client{ font-weight:600; }
.diary-appt-service{ opacity:.7; white-space:nowrap; text-overflow:ellipsis; overflow:hidden; }
.diary-appt.status-completed{ opacity:.55; }
.diary-appt.status-cancelled, .diary-appt.status-no_show{ opacity:.4; text-decoration:line-through; cursor:default; }

/* Positioning and floating-card visuals only apply to appointments inside
   the desktop time grid. Mobile agenda cards share the .diary-appt class
   (for click-to-open-modal JS) but must stay normal flow elements —
   giving them position:absolute here with no top/left set was collapsing
   every agenda card into the same stacked spot. */
.diary-col .diary-appt{
  position:absolute; border-radius:8px; padding:5px 8px;
  background: var(--stone);
  background: color-mix(in srgb, var(--stylist-color) 16%, #fff);
  border-left:4px solid var(--stylist-color);
  cursor:grab;
  box-shadow:0 2px 6px rgba(34,31,28,0.08);
  transition:box-shadow .15s;
}
.diary-col .diary-appt:hover{ box-shadow:0 6px 14px rgba(34,31,28,0.18); z-index:3; }
.diary-col .diary-appt:focus-visible{ z-index:4; }
.diary-col .diary-appt.dragging{ opacity:.4; }
.diary-col .diary-appt.status-cancelled, .diary-col .diary-appt.status-no_show{ cursor:default; }

/* ===================== Mobile agenda list (day / week, phones) ===================== */
.diary-agenda{ display:flex; flex-direction:column; gap:10px; }
.agenda-day-divider{ font-weight:700; font-size:.82rem; text-transform:uppercase; letter-spacing:.06em; color:var(--mocha); margin:14px 0 2px; }
.agenda-day-divider:first-child{ margin-top:0; }
.agenda-card{
  display:flex; align-items:center; gap:14px; background:#fff; border:1px solid var(--line);
  border-left:4px solid var(--stylist-color, var(--mocha)); border-radius:14px; padding:14px; min-height:44px;
}
.agenda-card:active{ background:var(--stone); }
.agenda-card.status-completed{ opacity:.6; }
.agenda-card.status-cancelled, .agenda-card.status-no_show{ opacity:.5; }
.agenda-time{ display:flex; flex-direction:column; align-items:center; min-width:52px; flex-shrink:0; }
.agenda-time strong{ font-family:var(--font-display); font-size:1.05rem; line-height:1; }
.agenda-time span{ font-size:.68rem; opacity:.55; font-weight:600; }
.agenda-mid{ flex:1; min-width:0; }
.agenda-client{ font-weight:700; font-size:.95rem; }
.agenda-service{ font-size:.82rem; opacity:.65; }
.agenda-stylist{ display:flex; align-items:center; gap:5px; font-size:.75rem; opacity:.6; margin-top:3px; }
.agenda-stylist .dot{ width:8px; height:8px; border-radius:50%; display:inline-block; }

@media (min-width:860px){
  .diary-scroll{ display:block; }
  .diary-agenda{ display:none; }
}

/* ===================== Day list (Week / Month views) ===================== */
.day-list{ display:flex; flex-direction:column; gap:8px; }
.day-row{
  display:flex; align-items:center; gap:14px; background:#fff; border:1px solid var(--line);
  border-radius:14px; padding:12px 16px; min-height:44px; color:var(--ink); transition:border-color .15s, background .15s;
}
.day-row:hover{ border-color:var(--mocha); }
.day-row:active{ background:var(--stone); }
.day-row.today{ border-color:var(--mocha); background:color-mix(in srgb, var(--mocha) 6%, #fff); }
.day-row-date{ display:flex; flex-direction:column; align-items:center; justify-content:center; width:46px; flex-shrink:0; }
.day-row-date .dow{ font-size:.68rem; text-transform:uppercase; letter-spacing:.06em; opacity:.55; font-weight:700; }
.day-row-date .num{ font-family:var(--font-display); font-size:1.4rem; line-height:1.1; }
.day-row.today .day-row-date .num{ color:var(--mocha); }
.day-row-mid{ flex:1; min-width:0; display:flex; align-items:center; gap:10px; }
.day-row-empty{ font-size:.85rem; opacity:.45; }
.day-row-avatars{ display:flex; }
.day-row-avatars .avatar-circle{ width:26px; height:26px; font-size:.65rem; margin-left:-8px; border:2px solid #fff; }
.day-row-avatars .avatar-circle:first-child{ margin-left:0; }
.day-row-summary{ font-size:.85rem; opacity:.7; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.day-row-count{ font-family:var(--font-display); font-size:1.1rem; color:var(--mocha); flex-shrink:0; }
.day-row-chevron{ width:18px; height:18px; opacity:.3; flex-shrink:0; }

/* ===================== Month view ===================== */
.month-grid{ display:grid; grid-template-columns:repeat(7,1fr); border:1px solid var(--line); border-radius:16px; overflow:hidden; background:var(--line); gap:1px; }
.month-dow{ background:#fff; text-align:center; font-weight:700; font-size:.8rem; padding:10px 0; opacity:.6; }
.month-cell{
  background:#fff; min-height:110px; padding:8px; display:flex; flex-direction:column; gap:4px;
  color:var(--ink); transition:background .15s;
}
.month-cell:hover{ background:var(--stone); }
.month-cell.outside{ opacity:.35; }
.month-cell.today .month-daynum{ background:var(--mocha); color:#fff; border-radius:50%; width:24px; height:24px; display:inline-flex; align-items:center; justify-content:center; }
.month-daynum{ font-weight:700; font-size:.85rem; }
.month-chip{ font-size:.7rem; border-left:3px solid var(--mocha); padding-left:5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; opacity:.85; }
.month-more{ font-size:.68rem; opacity:.55; }
.month-count-badge{ display:none; }

@media (max-width:639px){
  .month-cell{ min-height:64px; padding:5px; gap:2px; position:relative; }
  .month-daynum{ font-size:.75rem; }
  .month-chip, .month-more{ display:none; }
  .month-count-badge{
    display:inline-flex; align-items:center; justify-content:center;
    width:18px; height:18px; border-radius:50%; background:var(--mocha); color:#fff;
    font-size:.62rem; font-weight:700; position:absolute; top:6px; right:6px;
  }
  .month-dow{ font-size:.7rem; padding:6px 0; }
}

/* ===================== Appointment modal ===================== */
.modal-backdrop{
  position:fixed; inset:0; background:rgba(34,31,28,0.45); display:flex; align-items:flex-end; justify-content:center;
  opacity:0; pointer-events:none; transition:opacity .2s; z-index:100;
}
.modal-backdrop.open{ opacity:1; pointer-events:auto; }
.modal-card{
  position:relative; background:var(--taupe-deep); color:var(--stone);
  border-radius:22px 22px 0 0; padding:26px 22px calc(26px + env(safe-area-inset-bottom)); width:100%; max-height:88vh; overflow-y:auto;
  box-shadow:var(--shadow);
  transform:translateY(16px); transition:transform .2s;
}
.modal-backdrop.open .modal-card{ transform:translateY(0); }
.modal-card::before{ content:''; display:block; width:36px; height:4px; border-radius:2px; background:rgba(228,225,218,0.3); margin:0 auto 18px; }
.modal-card h3{ color:#fff; }
.modal-close{ position:absolute; top:14px; right:16px; background:none; border:none; color:var(--stone); font-size:1.4rem; cursor:pointer; line-height:1; padding:8px; }

@media (min-width:640px){
  .modal-backdrop{ align-items:center; padding:20px; }
  .modal-card{ border-radius:20px; max-width:380px; padding:30px 28px; }
  .modal-card::before{ display:none; }
}

/* ===================== Entity list (Services / Staff management) ===================== */
.entity-list{ display:flex; flex-direction:column; gap:10px; }
.entity-card{
  background:#fff; border:1px solid var(--line); border-radius:16px; padding:16px 18px;
  display:flex; align-items:flex-start; justify-content:space-between; gap:14px; flex-wrap:wrap;
}
.entity-card-editing{ display:block; border-color:var(--mocha); }
.entity-main{ min-width:0; flex:1 1 200px; }
.entity-avatar-row{ display:flex; align-items:center; gap:14px; min-width:0; }
.entity-main-text{ min-width:0; flex:1; }
.entity-title-row{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.entity-title-row h4{ margin:0; font-family:var(--font-display); font-size:1.05rem; overflow-wrap:anywhere; }
.entity-sub{ margin:2px 0 0; font-size:.85rem; opacity:.65; overflow-wrap:anywhere; }
.entity-desc{ margin:4px 0 0; font-size:.85rem; opacity:.6; overflow-wrap:anywhere; }
.entity-actions{ display:flex; gap:8px; flex-wrap:wrap; align-items:center; flex-shrink:0; }
.btn-danger{ color:#b3202f; border-color:#e3b3ba; }
.btn-danger:hover{ background:#b3202f; color:#fff; border-color:#b3202f; }
.entity-locked{ font-size:.78rem; opacity:.4; padding:9px 4px; cursor:not-allowed; }

/* ===================== Staff hours / services / time off ===================== */
.hours-row{ display:flex; align-items:center; gap:12px; padding:8px 0; border-bottom:1px solid var(--line); flex-wrap:wrap; }
.hours-row:last-of-type{ border-bottom:none; }
.hours-day-toggle{ display:flex; align-items:center; gap:8px; font-weight:600; width:80px; flex-shrink:0; }
.hours-row input[type=time]{ width:auto; padding:8px 10px; }
.service-check-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(180px,1fr)); gap:10px; }
.service-check{ display:flex; align-items:center; gap:8px; font-size:.9rem; background:var(--cream); border:1px solid var(--line); border-radius:10px; padding:9px 12px; }
.time-off-row{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:9px 0; border-bottom:1px solid var(--line); font-size:.88rem; flex-wrap:wrap; }
.time-off-row:last-child{ border-bottom:none; }

/* ===================== Settings list (mobile "More" page) ===================== */
.settings-list{ background:#fff; border:1px solid var(--line); border-radius:16px; overflow:hidden; }
.settings-row{
  display:flex; align-items:center; justify-content:space-between; padding:16px 18px;
  border-bottom:1px solid var(--line); font-weight:600; color:var(--ink); min-height:44px;
}
.settings-row:last-child{ border-bottom:none; }
.settings-row svg{ width:18px; height:18px; opacity:.4; }
.settings-row:active{ background:var(--stone); }

/* ===================== Footer ===================== */
footer{ background:var(--ink); color:var(--cream); padding:60px 0 30px; margin-top:60px; }
.footer-grid{ display:grid; grid-template-columns:1.4fr 1fr 1fr; gap:40px; margin-bottom:40px; }
footer h4{ color:#fff; font-size:.9rem; text-transform:uppercase; letter-spacing:.08em; margin-bottom:14px; }
footer a, footer p{ opacity:.7; font-size:.9rem; }
footer .brand{ color:#fff; }
.footer-bottom{ border-top:1px solid rgba(255,255,255,0.12); padding-top:22px; font-size:.8rem; opacity:.55; display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px; }
@media (max-width:700px){ .footer-grid{ grid-template-columns:1fr; } }
