/* PetalHours admin — warm, calm salon aesthetic */
:root {
  --accent: #8c4a64;
  --accent-ink: #713a51;
  --accent-soft: #f6eaee;
  --accent-tint: #fbf3f5;
  --sage: #6f8a72;
  --sage-soft: #ecf1ea;
  --sand: #c9a27e;
  --bg: #f7f2ec;
  --panel: #fffdfa;
  --text: #2b2225;
  --text-2: #54484b;
  --muted: #8d8079;
  --line: #ebe2d8;
  --line-soft: #f3ece4;
  --danger: #b4423f;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(74, 48, 40, .04), 0 2px 10px rgba(74, 48, 40, .05);
  --shadow-lg: 0 24px 60px -18px rgba(74, 40, 50, .28);
  --sidebar: 248px;
  --serif: "Fraunces", "Cormorant Garamond", Georgia, serif;
  font-family: "DM Sans", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
a { color: var(--accent); }
h1, h2, h3 { margin: 0; font-weight: 600; }
h1, .serif { font-family: var(--serif); font-weight: 500; letter-spacing: -.01em; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.hidden { display: none !important; }
::selection { background: var(--accent-soft); }

/* ---------- buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel); cursor: pointer; font-weight: 500; white-space: nowrap; text-decoration: none; color: var(--text);
  transition: background .2s, border-color .2s, box-shadow .2s, transform .1s;
}
.btn:hover { background: #fff; border-color: #dccfc3; box-shadow: var(--shadow); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 6px 16px -6px rgba(140, 74, 100, .55); }
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: #fbefee; border-color: #efcfcd; }
.btn-ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--line-soft); border-color: transparent; box-shadow: none; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-icon { width: 38px; padding: 0; }
.btn-sm.btn-icon { width: 32px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

label { display: block; font-weight: 500; font-size: 13px; margin-bottom: 16px; color: var(--text-2); }
label > input, label > select, label > textarea, .input { display: block; width: 100%; margin-top: 7px; }
input[hidden], [hidden] { display: none !important; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=url],
input[type=date], input[type=time], input[type=datetime-local], input:not([type]), select, textarea {
  height: 42px; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus { border-color: #d7b9c4; box-shadow: 0 0 0 4px var(--accent-tint); outline: none; }
textarea { height: auto; min-height: 90px; padding: 11px 13px; resize: vertical; line-height: 1.5; }
input[type=color] { width: 46px; height: 42px; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: #fff; cursor: pointer; }
input[type=checkbox], input[type=radio] { width: 17px; height: 17px; accent-color: var(--accent); }
.check { display: flex; align-items: center; gap: 9px; font-weight: 400; margin-bottom: 9px; cursor: pointer; color: var(--text); }
.row { display: flex; gap: 14px; }
.row > * { flex: 1; min-width: 0; }
.hint { font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 5px; }
.form-error { color: var(--danger); font-size: 13px; min-height: 18px; margin-bottom: 6px; }
.input-group { display: flex; align-items: stretch; margin-top: 7px; }
.input-group .prefix { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--line); border-right: 0; border-radius: 11px 0 0 11px; background: var(--line-soft); color: var(--muted); white-space: nowrap; font-weight: 400; }
.input-group input { border-radius: 0 11px 11px 0; flex: 1; margin: 0; min-width: 0; }

/* ---------- logo ---------- */
.ph-logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 22px; font-weight: 500; color: var(--text); text-decoration: none; }
.ph-logo svg { width: 34px; height: 34px; }

/* ---------- auth ---------- */
.auth-page { min-height: 100vh; background: var(--bg); }
.auth-split { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }
.auth-art {
  position: relative; overflow: hidden; color: #fff; padding: 44px 56px; display: flex; flex-direction: column;
  background:
    radial-gradient(60% 50% at 20% 20%, rgba(244, 196, 186, .55), transparent 70%),
    radial-gradient(50% 45% at 85% 75%, rgba(201, 162, 126, .5), transparent 70%),
    radial-gradient(70% 60% at 70% 10%, rgba(140, 74, 100, .9), transparent 70%),
    linear-gradient(160deg, #6b3a50 0%, #8c4a64 45%, #a8706f 100%);
}
.auth-art .ph-logo { color: #fff; }
.auth-art::before, .auth-art::after { content: ""; position: absolute; border-radius: 50%; filter: blur(2px); opacity: .18; background: #fff; }
.auth-art::before { width: 420px; height: 420px; right: -140px; top: -120px; }
.auth-art::after { width: 260px; height: 260px; left: -90px; bottom: -80px; }
.auth-copy { margin-top: auto; position: relative; z-index: 1; max-width: 460px; }
.auth-copy h1 { font-size: 46px; line-height: 1.08; margin-bottom: 16px; color: #fff; }
.auth-copy h1 em { font-style: italic; color: #f8dcd3; }
.auth-copy p { font-size: 16.5px; line-height: 1.6; opacity: .9; margin: 0 0 26px; }
.auth-points { padding: 0; list-style: none; margin: 0; }
.auth-points li { padding: 8px 0 8px 32px; position: relative; opacity: .95; }
.auth-points li::before { content: "✿"; position: absolute; left: 4px; top: 7px; color: #f8dcd3; }
.auth-quote { margin-top: 34px; padding: 18px 20px; border-radius: 16px; background: rgba(255,255,255,.12); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.2); font-size: 14px; line-height: 1.55; position: relative; z-index: 1; max-width: 460px; }
.auth-form-side { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 410px; }
.auth-card h2 { font-family: var(--serif); font-weight: 500; font-size: 30px; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); margin-bottom: 26px; }
.auth-tabs { display: flex; background: var(--line-soft); border-radius: 999px; padding: 4px; margin-bottom: 26px; }
.auth-tabs button { flex: 1; border: 0; background: none; height: 36px; border-radius: 999px; cursor: pointer; font-weight: 600; color: var(--muted); transition: all .2s; }
.auth-tabs button.active { background: #fff; color: var(--text); box-shadow: var(--shadow); }
.auth-card .btn-primary { height: 48px; font-size: 15px; margin-top: 4px; }
.signup-only { display: none; }
body.signup .signup-only { display: block; }
@media (max-width: 880px) { .auth-split { grid-template-columns: 1fr; } .auth-art { padding: 28px; min-height: 260px; } .auth-copy h1 { font-size: 32px; } .auth-points, .auth-quote { display: none; } }

/* ---------- app shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar); flex-shrink: 0; display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 20;
  background: linear-gradient(180deg, #fbf7f2 0%, #f6efe8 100%); border-right: 1px solid var(--line);
}
.sidebar .ph-logo { padding: 22px 22px 6px; font-size: 21px; }
.sidebar .ph-logo svg { width: 30px; height: 30px; }
.biz-switch { margin: 14px 14px 6px; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.biz-switch .logo-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--accent) center/cover no-repeat; color: #fff; display: grid; place-items: center; font-family: var(--serif); font-size: 17px; flex-shrink: 0; }
.biz-switch .brand-name { font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.biz-switch .brand-sub { font-size: 12px; color: var(--muted); }
.nav { padding: 8px 12px; flex: 1; overflow-y: auto; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 13px; border-radius: 12px; color: var(--text-2);
  text-decoration: none; font-weight: 500; margin-bottom: 2px; transition: background .2s, color .2s;
}
.nav a svg { width: 19px; height: 19px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nav a:hover { background: rgba(140, 74, 100, .06); color: var(--text); }
.nav a.active { background: var(--panel); color: var(--accent); box-shadow: var(--shadow); font-weight: 600; }
.nav .nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: #b2a59c; padding: 18px 13px 7px; font-weight: 600; }
.sidebar-foot { padding: 14px; }
.booking-link-card { border-radius: 14px; padding: 14px; margin-bottom: 12px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(80% 90% at 100% 0%, rgba(248, 220, 211, .45), transparent 60%), linear-gradient(140deg, #7a4058, #a5686d); }
.booking-link-card .t { font-family: var(--serif); font-size: 15px; margin-bottom: 4px; }
.booking-link-card a { color: #fff; opacity: .85; font-size: 12px; word-break: break-all; text-decoration: none; }
.booking-link-card a:hover { opacity: 1; text-decoration: underline; }
.user-row { display: flex; align-items: center; gap: 10px; padding: 4px; }
.main { margin-left: var(--sidebar); flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; }
.page { padding: 30px 34px 48px; flex: 1; min-width: 0; max-width: 1640px; }
.page-head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 30px; line-height: 1.15; }
.page-head .sub { color: var(--muted); margin-top: 5px; font-size: 14px; }
.eyebrow { font-size: 11.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--sand); font-weight: 700; margin-bottom: 6px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.card-pad { padding: 22px 24px; }
.card h2 { font-size: 17px; margin-bottom: 4px; font-family: var(--serif); font-weight: 500; }
.card .card-sub { color: var(--muted); margin-bottom: 18px; font-size: 13.5px; line-height: 1.5; }
.section-gap > * + * { margin-top: 20px; }

.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; flex-shrink: 0;
  color: #fff; font-weight: 600; font-size: 12.5px; background: #b9aaa2 center/cover no-repeat; box-shadow: 0 0 0 2px rgba(255,255,255,.9);
}
.avatar.lg { width: 60px; height: 60px; font-size: 20px; font-family: var(--serif); font-weight: 500; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { width: 26px; height: 26px; font-size: 10.5px; margin-left: -7px; }
.avatar-stack .avatar:first-child { margin-left: 0; }

.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--line-soft); color: var(--text-2); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.confirmed { background: var(--accent-soft); color: var(--accent); }
.badge.completed { background: var(--sage-soft); color: #4e6a51; }
.badge.cancelled { background: #f1ede9; color: #948780; }
.badge.no_show { background: #f9e7e5; color: var(--danger); }
.badge.pending_payment { background: #f8eedd; color: #9a6a2c; }
.badge.plain::before { display: none; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat { padding: 18px 20px; position: relative; overflow: hidden; }
.stat::after { content: ""; position: absolute; right: -26px; top: -26px; width: 90px; height: 90px; border-radius: 50%; background: var(--tint, var(--accent-tint)); }
.stat:nth-child(2) { --tint: #f2f5ef; }
.stat:nth-child(3) { --tint: #f8f1e8; }
.stat:nth-child(4) { --tint: #f3eef6; }
.stat .label { color: var(--muted); font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; position: relative; z-index: 1; }
.stat .value { font-family: var(--serif); font-size: 30px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; margin-top: 6px; position: relative; z-index: 1; }
.stat .foot { font-size: 12.5px; color: var(--muted); margin-top: 2px; position: relative; z-index: 1; }

/* ---------- calendar ---------- */
.cal-card { display: flex; flex-direction: column; overflow: hidden; }
.cal-toolbar { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; background: var(--panel); }
.cal-title { font-family: var(--serif); font-size: 20px; font-weight: 500; margin: 0 10px; min-width: 160px; }
.segmented { display: inline-flex; background: var(--line-soft); border-radius: 999px; padding: 3px; }
.segmented button { border: 0; background: none; padding: 0 14px; height: 30px; border-radius: 999px; cursor: pointer; font-weight: 500; color: var(--muted); transition: all .2s; }
.segmented button.active { background: #fff; color: var(--text); box-shadow: var(--shadow); }
.cal-toolbar select { height: 32px; width: auto; border-radius: 999px; padding: 0 12px; font-size: 13px; }
.spacer { flex: 1; }
.cal-body { position: relative; overflow: auto; max-height: calc(100vh - 250px); min-height: 540px; background: var(--panel); }

.tgrid { display: grid; min-width: 100%; position: relative; }
.tgrid .corner, .tgrid .colhead { position: sticky; top: 0; z-index: 6; background: rgba(255, 253, 250, .96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.tgrid .corner { left: 0; z-index: 7; }
.colhead { padding: 10px 6px; text-align: center; border-left: 1px solid var(--line-soft); min-width: 0; }
.colhead .dow { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.colhead .dnum { font-family: var(--serif); font-size: 22px; line-height: 1.35; }
.colhead.today .dow { color: var(--accent); }
.colhead.today .dnum { color: #fff; background: var(--accent); border-radius: 50%; width: 34px; height: 34px; display: inline-grid; place-items: center; font-size: 17px; margin-top: 2px; }
.colhead .staff-head { display: flex; align-items: center; justify-content: center; gap: 9px; font-weight: 600; white-space: nowrap; overflow: hidden; }
.colhead .staff-head .avatar { width: 28px; height: 28px; font-size: 11px; }
.colhead .count { font-size: 11.5px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.colhead.clickable { cursor: pointer; }
.colhead.clickable:hover { background: #fff; }
.time-axis { position: sticky; left: 0; z-index: 5; background: var(--panel); border-right: 1px solid var(--line-soft); }
.time-axis div { position: relative; font-size: 11px; color: #a89b93; text-align: right; padding-right: 10px; }
.time-axis div span { position: relative; top: -8px; }
.daycol { position: relative; border-left: 1px solid var(--line-soft); cursor: copy; }
.daycol .hline { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line-soft); pointer-events: none; }
.daycol .hline.half { border-top-style: dotted; border-color: #f4eee8; }
.daycol .off { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, #f8f4ef, #f8f4ef 7px, #f3ede6 7px, #f3ede6 14px); pointer-events: none; }
.daycol .timeoff { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, #fbf1e6, #fbf1e6 7px, #f6e6d4 7px, #f6e6d4 14px); border-left: 3px solid var(--sand); font-size: 11px; color: #8a6440; padding: 4px 7px; pointer-events: none; overflow: hidden; font-weight: 600; }
.daycol .hover-slot { position: absolute; left: 4px; right: 4px; border-radius: 10px; background: var(--accent-tint); border: 1.5px dashed #d6a9b9; color: var(--accent); font-size: 11.5px; font-weight: 600; padding: 3px 8px; pointer-events: none; display: none; }
.daycol:hover .hover-slot.show { display: block; }
.now-line { position: absolute; left: 0; right: 0; border-top: 2px solid var(--accent); z-index: 4; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

.event {
  position: absolute; border-radius: 10px; padding: 5px 8px; font-size: 12px; overflow: hidden; cursor: pointer; z-index: 3;
  background: var(--ev-bg); border-left: 3px solid var(--ev); color: var(--text); line-height: 1.35;
  transition: box-shadow .2s, transform .2s;
}
.event:hover { box-shadow: 0 10px 24px -8px rgba(74, 40, 50, .35); z-index: 8; transform: translateY(-1px); }
.event .ev-time { font-weight: 500; font-size: 11px; color: var(--text-2); }
.event .ev-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event .ev-sub { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event.cancelled { opacity: .55; text-decoration: line-through; background: #f6f2ee; border-left-color: #d6ccc4; }
.event.no_show { background: #f9e9e7; border-left-color: var(--danger); }
.event.completed { opacity: .72; }
.event.pending_payment { background: repeating-linear-gradient(135deg, #fbf4e8, #fbf4e8 6px, #f6e9d3 6px, #f6e9d3 12px); border-left-color: var(--sand); }

.mgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mgrid .mhead { padding: 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); text-align: center; background: var(--panel); position: sticky; top: 0; z-index: 2; }
.mcell { min-height: 122px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); padding: 7px; cursor: pointer; overflow: hidden; transition: background .15s; }
.mcell:nth-child(7n) { border-right: 0; }
.mcell:hover { background: var(--accent-tint); }
.mcell.other { background: #faf7f3; color: #c0b3aa; }
.mcell .mnum { font-family: var(--serif); font-size: 15px; margin-bottom: 4px; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; }
.mcell.today .mnum { background: var(--accent); color: #fff; }
.mchip { display: flex; gap: 6px; align-items: center; font-size: 11.5px; padding: 3px 6px; border-radius: 7px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mchip:hover { background: #fff; }
.mchip .dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.mchip.cancelled { text-decoration: line-through; color: #b6aaa2; }
.mmore { font-size: 11.5px; color: var(--accent); font-weight: 600; padding: 2px 6px; }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 20px; align-items: start; }
.agenda { position: sticky; top: 24px; }
.agenda-item { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-soft); cursor: pointer; }
.agenda-item:first-child { border-top: 0; }
.agenda-item:hover .ag-title { color: var(--accent); }
.agenda-item .ag-time { width: 56px; flex-shrink: 0; font-weight: 600; font-size: 13px; padding-top: 1px; }
.agenda-item .ag-bar { width: 3px; border-radius: 3px; flex-shrink: 0; }
.agenda-item .ag-title { font-weight: 600; transition: color .2s; }
.empty { text-align: center; color: var(--muted); padding: 34px 14px; }
.empty .big { font-size: 30px; margin-bottom: 8px; opacity: .8; }

/* ---------- lists / grids ---------- */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.svc-card { overflow: hidden; display: flex; flex-direction: column; cursor: pointer; transition: box-shadow .25s, transform .25s; }
.svc-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.svc-img { height: 168px; background: radial-gradient(80% 90% at 100% 0%, rgba(255,255,255,.35), transparent 60%), linear-gradient(140deg, var(--c, #8c4a64), color-mix(in srgb, var(--c, #8c4a64) 45%, #f3dfd8)) center/cover no-repeat; display: grid; place-items: center; color: rgba(255,255,255,.95); font-family: var(--serif); font-size: 42px; position: relative; }
.svc-img .badge { position: absolute; top: 12px; left: 12px; }
.svc-body { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.svc-body h3 { font-size: 17px; font-family: var(--serif); font-weight: 500; }
.svc-cat { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--sand); font-weight: 700; }
.svc-desc { color: var(--muted); font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.svc-meta { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 10px; }
.svc-meta .price { font-family: var(--serif); font-size: 18px; margin-left: auto; }
.pill { display: inline-flex; align-items: center; gap: 4px; background: var(--line-soft); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.add-card { border: 1.5px dashed #dccbbd; border-radius: 18px; display: grid; place-items: center; min-height: 260px; color: var(--muted); cursor: pointer; font-weight: 600; background: transparent; transition: all .2s; }
.add-card:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-tint); }
.add-card .plus { font-size: 32px; display: block; text-align: center; font-family: var(--serif); font-weight: 400; }

.team-card { padding: 20px; cursor: pointer; transition: box-shadow .25s, transform .25s; }
.team-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.team-card .top { display: flex; gap: 14px; align-items: center; }
.team-card h3 { font-size: 17px; font-family: var(--serif); font-weight: 500; }
.team-card .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.team-card .hours-mini { margin-top: 14px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.inactive { opacity: .6; }

table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fbf8f4; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--accent-tint); }
.table tr:last-child td { border-bottom: 0; }
.cust-cell { display: flex; gap: 11px; align-items: center; }
.search { position: relative; }
.search input { padding-left: 38px; width: 290px; border-radius: 999px; }
.search svg { position: absolute; left: 14px; top: 13px; width: 16px; height: 16px; stroke: var(--muted); fill: none; stroke-width: 2; }

.hours-table { width: 100%; border-collapse: collapse; }
.hours-table td { padding: 5px 8px 5px 0; }
.hours-table td:first-child { width: 130px; }
.hours-table input[type=time] { width: 124px; height: 38px; }

.upload-box { display: flex; align-items: center; gap: 16px; margin: 7px 0 16px; }
.upload-preview { width: 104px; height: 76px; border-radius: 12px; border: 1px solid var(--line); background: var(--line-soft) center/cover no-repeat; display: grid; place-items: center; color: #b4a79f; font-size: 11px; flex-shrink: 0; }
.upload-preview.round { width: 68px; height: 68px; border-radius: 50%; }

.code-box { position: relative; background: #2d2327; color: #f3e6e0; border-radius: 14px; padding: 16px 18px; padding-right: 80px; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; white-space: pre-wrap; word-break: break-all; line-height: 1.6; }
.code-box .btn { position: absolute; top: 10px; right: 10px; background: #43363b; color: #f3e6e0; border-color: #574850; box-shadow: none; }
.link-row { display: flex; gap: 8px; align-items: center; }
.link-row input { flex: 1; font-family: ui-monospace, Consolas, monospace; font-size: 13px; background: var(--line-soft); }
.preview-frame { width: 100%; height: 720px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabs button { border: 0; background: none; padding: 11px 15px; cursor: pointer; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .2s; }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }

.status-line { display: flex; align-items: flex-start; gap: 8px; padding: 12px 14px; border-radius: 12px; font-size: 13px; margin-bottom: 16px; line-height: 1.5; }
.status-line.ok { background: var(--sage-soft); color: #45604a; }
.status-line.warn { background: #f9f0e2; color: #855a26; }

/* ---------- modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(43, 30, 34, .38); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 100; padding: 20px; animation: fade .2s; }
.modal { background: var(--panel); border-radius: 22px; box-shadow: var(--shadow-lg); width: 100%; max-width: 580px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; animation: pop .25s cubic-bezier(.2, .9, .3, 1.2); }
.modal.wide { max-width: 780px; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 20px 26px 16px; border-bottom: 1px solid var(--line-soft); }
.modal-head h2 { font-size: 22px; flex: 1; font-family: var(--serif); font-weight: 500; }
.modal-body { padding: 22px 26px; overflow-y: auto; }
.modal-foot { display: flex; gap: 8px; padding: 16px 26px; border-top: 1px solid var(--line-soft); align-items: center; background: #fcf9f5; border-radius: 0 0 22px 22px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }

.status-pick { display: flex; gap: 7px; flex-wrap: wrap; margin: 7px 0 16px; }
.status-pick button { border: 1px solid var(--line); background: #fff; border-radius: 99px; height: 32px; padding: 0 13px; cursor: pointer; font-weight: 500; font-size: 13px; transition: all .15s; }
.status-pick button:hover { border-color: #d7b9c4; }
.status-pick button.active { border-color: var(--accent); background: var(--accent); color: #fff; }
.cust-pick { position: relative; }
.cust-results { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 5; max-height: 230px; overflow-y: auto; margin-top: 6px; padding: 4px; }
.cust-results div { padding: 9px 12px; cursor: pointer; border-radius: 8px; }
.cust-results div:hover { background: var(--accent-tint); }
.selected-cust { display: flex; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-top: 7px; background: #fff; }
.booking-summary { display: flex; gap: 12px; align-items: center; background: var(--accent-tint); border: 1px solid var(--accent-soft); border-radius: 14px; padding: 14px; margin-bottom: 18px; }

.toast-wrap { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: #2d2327; color: #fff; padding: 11px 18px; border-radius: 999px; box-shadow: var(--shadow-lg); font-weight: 500; animation: pop .25s; }
.toast::before { content: "✿ "; color: #f0c7d4; }
.toast.error { background: var(--danger); }
.toast.error::before { content: "! "; color: #fff; }

.welcome { position: relative; overflow: hidden; color: #fff; border-radius: 22px; padding: 26px 28px; margin-bottom: 22px; display: flex; gap: 22px; align-items: center; flex-wrap: wrap;
  background: radial-gradient(60% 120% at 0% 0%, rgba(248, 220, 211, .45), transparent 60%), radial-gradient(50% 120% at 100% 100%, rgba(201, 162, 126, .45), transparent 60%), linear-gradient(120deg, #7a4058, #9b5f6f); }
.welcome h2 { font-family: var(--serif); font-weight: 500; font-size: 23px; margin-bottom: 4px; }
.welcome p { margin: 0; opacity: .88; }
.welcome .steps { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.welcome .btn { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.3); color: #fff; box-shadow: none; }
.welcome .btn:hover { background: rgba(255,255,255,.26); }
.welcome .btn.done { opacity: .62; }

@media (max-width: 1240px) { .dash-grid { grid-template-columns: 1fr; } .agenda { position: static; } }
@media (max-width: 980px) { .stats { grid-template-columns: repeat(2, 1fr); } .two-col { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s; }
  body.nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .main { margin-left: 0; }
  .topbar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
  .page { padding: 18px 16px; }
  .page-head h1 { font-size: 25px; }
  .search input { width: 100%; }
  .row { flex-direction: column; gap: 0; }
}
