/* Blondify Team Portal: shared look.
   Colors and fonts follow the approved "Blondify Portal Look" design.
   Brand-specific colors live in the --brand-* variables so a second
   brand (Brunettify) can re-theme them later. */

:root {
  --ground: #FBF7FD;
  --ink: #3B2A55;
  --ink-2: #4A3968;
  --muted: #6B5A86;
  --line: #EADFF6;
  --line-strong: #DCCFF0;
  --card: rgba(255, 255, 255, 0.86);

  --brand-primary: #6E57A8;
  --brand-primary-ink: #FFFFFF;
  --brand-blush: #F7D5E8;
  --brand-blush-ink: #6B4A62;
  --brand-blush-icon: #8C3F6E;
  --brand-sky: #D9E8F8;
  --brand-lilac: #E3D9F7;
  --brand-gold: #C9A55C;

  --tint-pink: #FCEAF3;
  --tint-blue: #E9F1FB;
  --tint-lilac: #F1ECFA;

  --danger: #A33A5E;
  --ok: #1F7A63;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-primary); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #C9B6F1; outline-offset: 2px; }

.glow { position: fixed; border-radius: 50%; filter: blur(90px); pointer-events: none; z-index: 0; }
.glow-pink  { top: -220px; right: -160px; width: 560px; height: 480px; background: var(--brand-blush); opacity: .6; }
.glow-blue  { top: 240px; left: -260px; width: 520px; height: 480px; background: var(--brand-sky); opacity: .7; }
.glow-lilac { bottom: -240px; right: 10%; width: 520px; height: 420px; background: var(--brand-lilac); opacity: .6; }

.app { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 20px 16px 64px; }
@media (min-width: 720px) { .app { padding: 24px 32px 72px; } }
.loading { color: var(--muted); padding: 40px 0; text-align: center; }

/* ---------- type ---------- */
.eyebrow { font-size: 12px; letter-spacing: 3px; text-transform: uppercase; font-weight: 600; color: #7D6C98; margin: 0; }
.display { font-family: var(--font-display); font-weight: 400; margin: 0; line-height: 1.06; }
.display em { font-style: italic; color: var(--brand-primary); }
h1.display { font-size: clamp(34px, 6vw, 52px); }
h2.display { font-size: 24px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 28px; }
.topbar .logo { width: 132px; height: auto; display: block; }
@media (min-width: 720px) { .topbar .logo { width: 170px; } }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.avatar-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid #E2D4F3; background: #fff;
  color: var(--brand-primary); font-weight: 600; font-size: 14px; cursor: pointer;
}
.segmented { display: flex; background: #fff; border: 1px solid #E2D4F3; border-radius: 999px; padding: 4px; gap: 2px; }
.seg {
  min-height: 36px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent;
  color: var(--muted); font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.seg[aria-pressed="true"] { background: var(--brand-blush); color: var(--ink); font-weight: 600; }
@media (min-width: 720px) { .seg { padding: 0 16px; font-size: 14px; } }
@media (max-width: 520px) {
  .topbar { gap: 8px; }
  .topbar .logo { width: 104px; }
  .topbar-right { gap: 6px; }
  .segmented { padding: 3px; }
  .seg { padding: 0 10px; font-size: 12.5px; min-height: 38px; }
}
@media (max-width: 380px) {
  /* Smallest phones: the view switch gets its own row under the logo. */
  .topbar { flex-wrap: wrap; }
  .topbar-right { display: contents; }
  .topbar .menu { order: 2; }
  .segmented { order: 3; width: 100%; }
  .seg { flex: 1; }
}
.menu { position: relative; }
.menu-panel {
  position: absolute; right: 0; top: 52px; min-width: 220px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: 0 18px 40px rgba(110, 87, 168, .14); padding: 8px; z-index: 20;
}
.menu-panel p { margin: 6px 10px 10px; }
.menu-panel button { width: 100%; text-align: left; }

.demo-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted);
  background: #fff; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); padding: 8px 12px; margin-bottom: 18px;
}

/* ---------- buttons & pills ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px;
  border-radius: 999px; border: 1px solid transparent; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none;
}
.btn-primary { background: var(--brand-primary); color: var(--brand-primary-ink); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: #fff; color: var(--ink-2); border-color: #E2D4F3; }
.btn-ghost:hover { border-color: var(--brand-primary); }
.btn-danger { background: #fff; color: var(--danger); border-color: #EBC5D3; }
.btn-plain { background: transparent; border: 0; color: var(--ink-2); padding: 0 12px; font-weight: 500; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid #E2D4F3; background: #fff;
  color: var(--ink-2); font-size: 14px; font-weight: 500; cursor: pointer;
}
.pill[aria-pressed="true"] { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; font-weight: 600; }

.chip { display: inline-flex; align-items: center; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; font-weight: 600;
  color: var(--muted); background: var(--tint-lilac); border-radius: 999px; padding: 4px 9px; }

/* ---------- cards & layout ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.spread { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px; }
.split { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.split > .main { flex: 999 1 540px; min-width: 0; }
.split > .side { flex: 1 1 300px; min-width: 0; }

/* ---------- sign in ---------- */
.signin { min-height: calc(100vh - 90px); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 30px; }
.signin .logo { width: min(320px, 82vw); height: auto; }
.signin-tag { display: flex; align-items: center; gap: 10px; }
.signin-tag span.rule { width: 28px; height: 1px; background: var(--brand-gold); }
.signin form, .signin .sent { width: min(420px, 100%); background: rgba(255,255,255,.86); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 28px 24px; display: flex; flex-direction: column; gap: 16px;
  box-shadow: 0 18px 40px rgba(110, 87, 168, .12); }
.signin h1 { font-size: 30px; }
.signin-foot { text-align: center; font-size: 12px; color: var(--muted); }
.signin-foot .eyebrow { font-size: 11px; margin-top: 4px; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input, select.input, textarea.input {
  min-height: 48px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); padding: 10px 14px;
  background: #fff; font-size: 16px; width: 100%;
}
textarea.input { min-height: 96px; resize: vertical; }
.input[readonly], .input:disabled { background: #F7F3FB; color: var(--muted); }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 12px;
  background: #FAF6FE; border: 1px solid var(--line); font-size: 14px; cursor: pointer;
}
.check input { width: 18px; height: 18px; accent-color: var(--brand-primary); margin: 0; }
.check:has(input:disabled) { cursor: not-allowed; opacity: .7; }
.error { color: var(--danger); font-size: 14px; margin: 0; }
.hint { font-size: 12px; color: var(--muted); margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 20px; }
.form-section { display: flex; flex-direction: column; gap: 16px; padding: 22px 0; border-top: 1px solid #F0E8F7; }
.form-section:first-of-type { border-top: 0; padding-top: 0; }
.form-section h3 { font-family: var(--font-display); font-weight: 400; font-size: 20px; margin: 0; }

/* ---------- homepage ---------- */
.hero { margin-bottom: 30px; }
.hero .stack { gap: 8px; }
.scope { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
@media (min-width: 900px) { .scope { align-items: flex-end; } }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; } }
.tile {
  border-radius: 24px; padding: 18px 16px; min-height: 140px; display: flex; flex-direction: column; justify-content: space-between;
  background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none;
}
.tile .tile-top { display: flex; justify-content: space-between; align-items: flex-start; color: var(--brand-primary); }
.tile .name { font-family: var(--font-display); font-size: 20px; display: block; }
.tile .desc { font-size: 13px; color: var(--muted); }
a.tile.live { background: var(--brand-blush); border-color: var(--brand-blush); }
a.tile.live .tile-top { color: var(--brand-blush-icon); }
a.tile.live .desc { color: var(--brand-blush-ink); }
a.tile.live:hover { box-shadow: 0 12px 28px rgba(140, 63, 110, .16); }
.big-number { font-family: var(--font-display); font-size: 56px; line-height: 1; color: var(--brand-primary); }
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.stat b { font-size: 20px; }
.stat span { font-size: 12px; }
.stat.pink { background: var(--tint-pink); } .stat.pink span { color: var(--brand-blush-ink); }
.stat.blue { background: var(--tint-blue); } .stat.blue span { color: #3F5878; }
.stat.lilac { background: var(--tint-lilac); } .stat.lilac span { color: #5A4878; }
.people { max-height: 320px; overflow-y: auto; border-top: 1px solid #F0E8F7; }
.person-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #F0E8F7; font-size: 14px; }
.person-row .meta { color: var(--muted); font-size: 12px; text-align: right; }

/* ---------- employees ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 18px 0; }
.search { position: relative; flex: 1 1 240px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search .input { padding-left: 42px; }
.list { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.list-row {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px; border: 0; border-bottom: 1px solid #F0E8F7;
  background: transparent; text-align: left; width: 100%; color: inherit; text-decoration: none; min-height: 64px;
}
.list-row:last-child { border-bottom: 0; }
a.list-row:hover { background: #FDF6FB; }
.list-row .who { flex: 1 1 auto; min-width: 0; }
.list-row .who b { display: block; font-weight: 600; }
.list-row .who span { font-size: 13px; color: var(--muted); }
.list-row .right { font-size: 13px; color: var(--muted); text-align: right; flex-shrink: 0; }
.face {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: var(--tint-lilac); color: var(--brand-primary); font-weight: 600; font-size: 14px;
}
.face.ev { background: var(--tint-pink); color: #8C3F6E; }
.face.wb { background: var(--tint-blue); color: #3F5878; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); text-decoration: none; font-weight: 500; min-height: 44px; }
.sticky-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; padding-top: 20px; border-top: 1px solid #F0E8F7; }
.confirm { background: #FFF5F8; border: 1px solid #EBC5D3; border-radius: var(--radius-sm); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.history { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; transition: .25s;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-size: 14px; z-index: 50; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-error { background: var(--danger); }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- photos ---------- */
.face-img { object-fit: cover; display: block; padding: 0; background: var(--tint-lilac); }
.avatar-btn { overflow: hidden; padding: 0; display: grid; place-items: center; }
.avatar-btn .face-img { width: 100%; height: 100%; }
.person-row { align-items: center; }
.photo-box { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.photo-box.busy { opacity: .6; pointer-events: none; }
.photo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 6px; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13px; }

/* ---------- work hours ---------- */
.hours-card { display: flex; flex-direction: column; gap: 16px; margin-bottom: 18px; }
.week-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.week-label { font-weight: 600; color: var(--ink-2); min-width: 170px; text-align: center; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 12px; border: 1px solid #E2D4F3; background: #fff; color: var(--ink-2);
  display: inline-grid; place-items: center; cursor: pointer; flex-shrink: 0;
}
.icon-btn.flip svg { transform: scaleX(-1); }
.days { display: flex; flex-direction: column; gap: 8px; }
.day { display: grid; grid-template-columns: 54px 1fr; gap: 10px; align-items: center; }
.day-label { display: flex; flex-direction: column; line-height: 1.2; font-size: 14px; }
.day-label span { color: var(--muted); font-size: 13px; }
.shift {
  display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 6px 0 16px; border-radius: 16px;
  background: var(--tint-lilac); font-size: 15px;
}
.shift > span:first-child { flex: 1 1 auto; }
.shift.none { background: #F6F3F9; color: var(--muted); }
.shift .tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.shift .icon-btn { border: 0; background: transparent; }
.chip-changed { background: #FCEAF3; color: #8C3F6E; }
.day-editor {
  grid-column: 1 / -1; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px;
  display: flex; flex-direction: column; gap: 14px;
}
.time-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.time-row > .input { width: auto; flex: 1 1 130px; }
@media (max-width: 520px) {
  .shift { font-size: 14px; padding-left: 12px; }
  .shift .tags .chip { font-size: 10px; padding: 3px 7px; }
}

/* ---------- pop-up dialogs ---------- */
.hours-section { gap: 14px; }
.dialog {
  border: 0; border-radius: 24px; padding: 0; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
  box-shadow: 0 30px 80px rgba(59, 42, 85, .25); color: var(--ink); background: #fff;
}
.dialog::backdrop { background: rgba(43, 32, 58, .45); }
.dialog-x { position: absolute; top: 12px; right: 12px; border: 0; background: transparent; }
.dialog-body { padding: 36px 28px 28px; display: flex; flex-direction: column; gap: 18px; }
.dialog-title { font-family: var(--font-display); font-weight: 400; font-size: 24px; margin: 0; text-align: center; padding: 0 24px; }
.dialog-sub { margin: 0; text-align: center; color: var(--muted); font-size: 14px; }
.choices { display: flex; flex-direction: column; gap: 12px; }
.choice {
  display: flex; flex-direction: column; gap: 4px; align-items: center; padding: 22px 16px; min-height: 88px;
  border: 1.5px solid var(--line-strong); border-radius: 18px; background: #fff; cursor: pointer; font-size: 16px; color: var(--ink);
}
.choice b { font-size: 17px; }
.choice span { color: var(--muted); font-size: 14px; }
.choice:hover { border-color: var(--brand-primary); background: #FDF8FF; }
.dialog-actions { display: flex; gap: 10px; justify-content: center; }
.dialog-actions .btn { min-width: 130px; }
.switch-row { display: flex; align-items: center; justify-content: center; gap: 12px; font-weight: 500; }
.switch {
  width: 52px; height: 30px; border-radius: 999px; border: 0; background: #DCD3EA; position: relative; cursor: pointer; padding: 0; flex-shrink: 0;
}
.switch .knob { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch[aria-checked="true"] { background: var(--brand-primary); }
.switch[aria-checked="true"] .knob { left: 25px; }
.time-row .field { flex: 1 1 140px; }
