:root {
  /* Omega Medical Associates palette (omegamedical.ca) */
  --navy: #132e50;
  --blue: #5183ca;
  --bg: #f1f5f7;
  --card: #ffffff;
  --line: #dbe3ec;
  --text: #132e50;
  --muted: #5f6f86;
  --cell: #e6eefa;
  --cell-hover: #d3e1f6;
  --accent: #132e50;
  --accent-text: #ffffff;
  --danger: #c0392b;
  --ok: #1f9d55;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 16px/1.45 Montserrat, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 5vh 24px 32px; justify-content: flex-start;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.card { min-height: 640px; font-size: 16px; box-shadow: 0 8px 30px rgba(19,46,80,.08); background: var(--card); border: 1px solid var(--line); border-radius: 14px; display: flex; max-width: 100%; overflow: hidden; }
.pane { padding: 36px; }
.pane + .pane { border-left: 1px solid var(--line); }
.info { width: 320px; }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: 10px; font-weight: 600; margin-bottom: 8px; }
.muted { color: var(--muted); }
.title { font-size: 28px; font-weight: 600; margin: 6px 0 24px; }
.meta { display: flex; align-items: center; gap: 10px; color: var(--muted); margin: 12px 0; font-size: 15px; }
.meta select { background: transparent; border: 0; color: var(--muted); max-width: 160px; cursor: pointer; }
.meta select option { color: #000; }

.cal { width: 560px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; font-size: 20px; }
.cal-head b { font-weight: 600; } .cal-head span { color: var(--muted); }
.nav button { background: none; border: 0; color: var(--text); font-size: 16px; padding: 4px 8px; border-radius: 6px; }
.nav button:disabled { color: var(--muted); opacity: .4; cursor: default; }
.grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; text-align: center; }
.dow { color: var(--muted); font-size: 12px; text-transform: uppercase; padding-bottom: 8px; }
.day { aspect-ratio: 1.15; font-size: 16px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); opacity: .45; font-size: 13px; position: relative; cursor: default; }
.day.avail { background: var(--cell); color: var(--blue); font-weight: 600; opacity: 1; cursor: pointer; }
.day.avail:hover { background: var(--cell-hover); }
.day.sel { background: var(--accent); color: var(--accent-text); }
.day.today::after { content: ""; position: absolute; bottom: 5px; left: 50%; width: 3px; height: 3px; margin-left: -1.5px; border-radius: 50%; background: currentColor; }

.times { width: 270px; max-height: 640px; display: flex; flex-direction: column; }
.times-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.toggle { display: flex; background: var(--cell); border-radius: 6px; padding: 2px; }
.toggle button { background: none; border: 0; padding: 2px 8px; border-radius: 4px; font-size: 12px; color: var(--muted); }
.toggle button.on { background: var(--card); color: var(--text); }
.slots { overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 4px; }
.slot { background: transparent; border: 1px solid var(--line); border-radius: 10px; padding: 14px; font-size: 16px; text-align: center; }
.slot { color: var(--blue); font-weight: 600; }
.slot:hover { border-color: var(--blue); background: var(--cell); }

.form { width: 380px; display: flex; flex-direction: column; gap: 12px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; }
.form input, .form textarea, .admin input, .admin select { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; width: 100%; }
.form input:focus, .form textarea:focus, .admin input:focus, .admin select:focus { outline: 2px solid var(--muted); outline-offset: 0; }
.hint { font-size: 12px; color: var(--muted); }
.row { display: flex; gap: 8px; align-items: center; }
.btn { background: var(--accent); color: var(--accent-text); border: 0; border-radius: 8px; padding: 10px 14px; font-weight: 600; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); font-weight: 500; }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--line); font-weight: 500; }
.btn:disabled { opacity: .5; cursor: default; }
.err { color: var(--danger); font-size: 13px; min-height: 1em; }
.done { padding: 64px 48px; text-align: center; width: 520px; }
.done .check { width: 44px; height: 44px; border-radius: 50%; background: color-mix(in srgb, var(--ok) 20%, transparent); color: var(--ok); display: grid; place-items: center; margin: 0 auto 16px; font-size: 22px; }
.done h2 { margin: 0 0 8px; }
footer { margin-top: 28px; color: var(--muted); font-size: 12px; letter-spacing: .04em; }
footer b { color: var(--text); font-weight: 600; }
.hidden { display: none !important; }

@media (max-width: 860px) {
  body { padding-top: 16px; }
  .card { flex-direction: column; width: 100%; }
  .pane + .pane { border-left: 0; border-top: 1px solid var(--line); }
  .info, .cal, .times, .form, .done { width: 100%; }
  .times { max-height: 320px; }
}

/* admin */
.admin { width: 100%; max-width: 1200px; }
.admin h1 { font-size: 22px; margin: 0 0 4px; }
.tabs { display: flex; gap: 4px; margin: 20px 0; border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: 0; padding: 8px 14px; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs button.on { color: var(--text); border-color: var(--text); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 16px; }
.panel h3 { margin: 0 0 12px; font-size: 15px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; }
.tag { font-size: 11px; padding: 2px 8px; border-radius: 99px; background: var(--cell); }
.tag.cancelled { color: var(--danger); }
.dayrow { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: start; }
.win { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.win input { width: 110px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.fields label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.center { max-width: 360px; margin-top: 12vh; }

.slots { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }

@media (min-width: 1500px) { .info { width: 360px; } .cal { width: 640px; } .times { width: 300px; } }

/* admin calendar */
.mcal { display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.mcal .h { padding: 8px; font-size: 12px; text-transform: uppercase; color: var(--muted); background: var(--bg); border-bottom: 1px solid var(--line); }
.mcal .c { min-height: 112px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.mcal .c:nth-child(7n) { border-right: 0; }
.mcal .c.out { background: var(--bg); opacity: .55; }
.mcal .c.today { box-shadow: inset 0 0 0 2px var(--blue); }
.mcal .n { font-size: 12px; color: var(--muted); }
.chip { text-align: left; border: 0; border-radius: 6px; padding: 4px 6px; font-size: 12px; background: var(--blue); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip.cancelled { background: var(--cell); color: var(--muted); text-decoration: line-through; }
.calbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.calbar h3 { margin: 0; font-size: 18px; }
.detail { margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }

/* availability painter */
.avtop { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.avtop .row { gap: 6px; }
.range { margin: 0 0 0 10px !important; font-size: 18px !important; }
.seg { display: inline-flex; background: var(--cell); border-radius: 10px; padding: 3px; }
.seg button { background: none; border: 0; padding: 8px 14px; border-radius: 8px; color: var(--muted); font-weight: 500; }
.seg button.on { background: var(--navy); color: #fff; }
.avwrap { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; }
.avgrid { display: grid; grid-template-columns: 52px repeat(7, 1fr); user-select: none; touch-action: none; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.avh { padding: 8px 0; text-align: center; font-size: 12px; text-transform: uppercase; color: var(--navy); background: var(--cell); border-bottom: 1px solid var(--line); font-weight: 600; }
.avh .dnum { display: block; font-size: 20px; font-weight: 600; line-height: 1.2; }
.avh.today .dnum { background: var(--navy); color: #fff; border-radius: 50%; width: 32px; height: 32px; line-height: 32px; margin: 2px auto 0; }
.avh em { display: block; font-style: normal; font-size: 10px; color: var(--blue); text-transform: none; }
.avt { font-size: 11px; color: var(--muted); text-align: right; padding-right: 8px; transform: translateY(-7px); }
.avc { height: 22px; border-left: 1px solid var(--line); border-bottom: 1px dashed var(--line); cursor: crosshair; }
.avc.hr { border-top: 1px solid var(--line); }
.avc.past { background-image: linear-gradient(rgba(19,46,80,.04), rgba(19,46,80,.04)); }
.avc.locked { cursor: not-allowed; background-image: repeating-linear-gradient(45deg, transparent 0 6px, rgba(19,46,80,.06) 6px 12px); }
.avc:not(.locked):hover { background-color: var(--cell); }
.avc.on.locked { opacity: .55; }
.mini { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 16px; }
.minihead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.minihead button { background: none; border: 0; font-size: 18px; padding: 2px 10px; border-radius: 6px; color: var(--navy); }
.minihead button:hover { background: var(--cell); }
.minigrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.mh { font-size: 11px; color: var(--muted); padding: 4px 0; }
.md { position: relative; border: 0; background: transparent; border-radius: 8px; height: 32px; font-size: 13px; color: var(--navy); }
.md.out { opacity: .35; }
.md.has { background: var(--cell); font-weight: 600; }
.md:hover { background: var(--cell-hover); }
.md.inweek { box-shadow: inset 0 0 0 2px var(--blue); }
.md.today { background: var(--navy); color: #fff; }
.md i { position: absolute; bottom: 3px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--blue); }
.md.today i { background: #fff; }
.legend { display: flex; gap: 14px; margin-top: 10px; font-size: 11px; color: var(--muted); }
.legend .lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.lg.has { background: var(--cell-hover); } .lg.cust { background: var(--blue); border-radius: 50%; width: 7px; height: 7px; }
.avsum h3 { margin: 0 0 6px; font-size: 14px; }
.sumrow { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.sumrow span { text-align: right; color: var(--muted); }
@media (max-width: 1000px) { .avwrap { grid-template-columns: 1fr; } }

/* Omega header band + polish */
.brandbar { position: fixed; top: 0; left: 0; right: 0; height: 56px; background: var(--navy); color: #fff; display: flex; align-items: center; padding: 0 28px; gap: 12px; z-index: 5; box-shadow: 0 2px 10px rgba(19,46,80,.25); }
.brandbar b { font-weight: 600; letter-spacing: .02em; }
.brandbar span { opacity: .75; font-size: 13px; }
.brandbar i { width: 4px; height: 24px; background: var(--blue); border-radius: 2px; }
body { padding-top: calc(56px + 5vh); }
.panel { box-shadow: 0 4px 18px rgba(19,46,80,.06); }
.btn:hover { background: var(--blue); }
.btn.ghost:hover, .btn.danger:hover { background: var(--cell); }
.tabs button.on { color: var(--navy); border-color: var(--blue); font-weight: 600; }
.avc.on { background: var(--blue); border-bottom-color: #3f6cb0; }
.mcal .h { background: var(--cell); color: var(--navy); font-weight: 600; }
.chip { background: var(--navy); }
.tag { color: var(--navy); background: var(--cell); }
a { color: var(--blue); }

/* ---- staff shell (matches Omega's staff calendar) ---- */
body.adminpage { padding: 0; display: block; }
.shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; width: 100%; }
.side { background: #fff; border-right: 1px solid var(--line); padding: 20px 16px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.logo { font-size: 26px; letter-spacing: -.02em; line-height: 1; padding: 4px 8px 18px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.logo span { color: var(--navy); font-weight: 600; } .logo b { color: var(--blue); font-weight: 500; }
.logo small { display: block; font-size: 8px; letter-spacing: .55em; color: var(--blue); margin-top: 4px; text-align: right; }
.side nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow: auto; }
.side .sec { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 16px 12px 6px; }
.side nav button, .side nav a { text-align: left; background: none; border: 0; padding: 11px 12px; border-radius: 10px; color: var(--navy); font-size: 15px; text-decoration: none; }
.side nav button:hover, .side nav a:hover { background: var(--bg); }
.side nav button.on { background: var(--cell); font-weight: 600; }
.sidefoot { display: flex; align-items: center; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.sidefoot .av { width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.sidefoot .who { flex: 1; display: flex; flex-direction: column; line-height: 1.2; font-size: 13px; }
.sidefoot .who span { color: var(--muted); font-size: 12px; }
.sidefoot button { background: none; border: 0; font-size: 20px; color: var(--muted); }
.main { padding: 36px 44px 48px; min-width: 0; }
.pghead { margin-bottom: 22px; }
.eyebrow { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--blue); font-weight: 600; }
.pghead h1 { font-size: 40px; margin: 6px 0 4px; letter-spacing: -.02em; }
.pghead p { margin: 0; }
.tabs { display: none; }

.calwrap { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.calside { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.mini.plain { border: 0; padding: 0; margin: 0; }
.minihead span button { background: none; border: 0; font-size: 18px; color: var(--navy); padding: 2px 8px; border-radius: 6px; }
.minihead span button:hover { background: var(--cell); }
.md { height: 38px; padding-top: 4px; }
.md.sel { background: var(--navy); color: #fff; }
.md.today:not(.sel) { background: var(--cell); font-weight: 700; box-shadow: inset 0 0 0 2px var(--navy); }
.md .dots { display: flex; justify-content: center; gap: 3px; height: 6px; margin-top: 1px; }
.md .dots i { width: 5px; height: 5px; border-radius: 50%; position: static; margin: 0; }
.dots .g, .sw.g { background: #2f9e62; } .dots .b, .sw.b { background: var(--blue); } .sw.x { background: #9aa6b8; }
.chk { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 14px; cursor: pointer; }
.chk input { width: 16px; height: 16px; accent-color: var(--blue); }
.chk .sw { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.chk span { flex: 1; display: flex; flex-direction: column; line-height: 1.2; } .chk small { color: var(--muted); font-size: 12px; }
.chk em { font-style: normal; color: var(--muted); font-size: 13px; }
.calmain { padding: 22px; margin: 0; }
.calbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.calbar h2 { margin: 0; font-size: 28px; letter-spacing: -.01em; }
.mcal .h { text-align: center; }
.mcal .c { min-height: 104px; cursor: pointer; }
.mcal .c:hover { background: var(--bg); }
.mcal .n { font-size: 13px; color: var(--blue); font-weight: 500; }
.mcal .c.today .n { background: var(--navy); color: #fff; border-radius: 50%; width: 24px; height: 24px; display: inline-grid; place-items: center; }
.mcal .c.today { box-shadow: none; background: #f6f9fd; }
.pill { font-size: 12px; padding: 3px 8px; border-radius: 6px; border-left: 3px solid; }
.pill.avail { background: #e3f4ea; color: #1d6b43; border-color: #2f9e62; }
.pill.booked { background: #dfe9fa; color: var(--navy); border-color: var(--blue); }
.pill.cancelled { background: #eceff4; color: var(--muted); border-color: #9aa6b8; text-decoration: line-through; }
.wk { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.wkc { border: 1px solid var(--line); border-radius: 10px; padding: 8px; min-height: 280px; display: flex; flex-direction: column; gap: 5px; }
.wkc.today { background: #f6f9fd; box-shadow: inset 0 0 0 2px var(--blue); }
.wkh { cursor: pointer; font-size: 12px; text-transform: uppercase; color: var(--muted); padding-bottom: 4px; } .wkh b { font-size: 18px; color: var(--navy); margin-left: 4px; }
.it { font-size: 12px; padding: 5px 7px; border-radius: 6px; border-left: 3px solid; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: baseline; }
.it span { font-weight: 600; } .it small { flex-basis: 100%; color: var(--muted); }
.it.avail { background: #e3f4ea; color: #1d6b43; border-color: #2f9e62; }
.it.booked { background: #dfe9fa; color: var(--navy); border-color: var(--blue); }
.it.cancelled { background: #eceff4; color: var(--muted); border-color: #9aa6b8; }
.it em { font-style: normal; font-size: 11px; }
.it .sm { padding: 3px 8px; font-size: 11px; margin-left: auto; }
.dayl { display: flex; flex-direction: column; gap: 8px; max-width: 760px; }
.dayl .it { font-size: 15px; padding: 12px 14px; }
.none { text-align: center; }
.btn.sm { border-radius: 6px; }
@media (max-width: 1100px) { .calwrap { grid-template-columns: 1fr; } .wk { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; }
  .side nav { flex-direction: row; flex-wrap: wrap; } .side .sec { display: none; }
  .main { padding: 20px 16px; }
}

/* slot dialog + held state */
.dots .h, .sw.h { background: #e0a526; }
.pill.held { background: #fdf2d6; color: #7a5410; border-color: #e0a526; }
.it.held { background: #fdf2d6; color: #7a5410; border-color: #e0a526; background-image: repeating-linear-gradient(45deg, transparent 0 6px, rgba(224,165,38,.12) 6px 12px); }
.it[data-i] { cursor: pointer; }
.it[data-i]:hover { filter: brightness(.97); box-shadow: 0 1px 6px rgba(19,46,80,.15); }
.it .act { margin-left: auto; opacity: 0; font-size: 11px; }
.it:hover .act, .it:focus-visible .act { opacity: .8; }
.tag.held { background: #fdf2d6; color: #7a5410; } .tag.confirmed { background: #dfe9fa; }
dialog#slotDlg { border: 1px solid var(--line); border-radius: 16px; padding: 24px; width: min(440px, calc(100vw - 32px)); background: var(--card); color: var(--text); box-shadow: 0 20px 60px rgba(19,46,80,.3); }
dialog#slotDlg::backdrop { background: rgba(19,46,80,.45); }
.dhead { display: flex; justify-content: space-between; align-items: center; }
.dhead .x { background: none; border: 0; font-size: 16px; color: var(--muted); }
dialog h3 { margin: 10px 0 12px; font-size: 18px; }
.dform { display: flex; flex-direction: column; gap: 10px; }
.dform label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 500; }
.dform input { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; }
.dsep { text-align: center; color: var(--muted); font-size: 12px; margin: 14px 0; }

/* time grid (week / day) */
.tg { display: grid; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; position: relative; }
.tgh { padding: 8px 4px; text-align: center; font-size: 12px; text-transform: uppercase; color: var(--muted); background: var(--cell); border-bottom: 1px solid var(--line); cursor: pointer; grid-row: 1; }
.tgh b { display: block; font-size: 20px; color: var(--navy); line-height: 1.2; }
.tgh.today b { background: var(--navy); color: #fff; border-radius: 50%; width: 32px; height: 32px; line-height: 32px; margin: 2px auto 0; }
.tgt { font-size: 11px; color: var(--muted); text-align: right; padding-right: 8px; transform: translateY(-7px); }
.tgc { border-left: 1px solid var(--line); border-bottom: 1px dashed var(--line); }
.tgc.hr { border-top: 1px solid var(--line); }
.tgc.today { background: #f6f9fd; }
.blk { z-index: 1; margin: 1px 3px; padding: 3px 7px; border-radius: 6px; border-left: 3px solid; font-size: 12px; cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.blk span { font-weight: 600; }
.blk:hover { filter: brightness(.96); box-shadow: 0 2px 8px rgba(19,46,80,.18); }
.tg.one .blk { font-size: 14px; padding: 4px 12px; }
.blk.avail { background: #e3f4ea; color: #1d6b43; border-color: #2f9e62; }
.blk.booked { background: #dfe9fa; color: var(--navy); border-color: var(--blue); }
.blk.held { background: #fdf2d6; color: #7a5410; border-color: #e0a526; }
.blk.cancelled { background: #eceff4; color: var(--muted); border-color: #9aa6b8; margin-left: 40%; z-index: 2; }
/* month chips */
.pill.chip { border: 0; border-left: 3px solid var(--blue); text-align: left; cursor: pointer; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill.chip:hover { background: #cddcf6; }
.more { font-size: 11px; color: var(--muted); padding-left: 4px; }
/* booking detail */
.bkwrap { max-width: 820px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.bkd { width: 100%; padding: 28px; margin: 0; }
.bkhead { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.bkhead h2 { margin: 0 0 4px; font-size: 28px; }
.bkgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; }
.bkgrid .wide { grid-column: 1 / -1; }
.bkgrid label { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }

/* availability v3 */
.avpage { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 20px; align-items: start; }
.avright { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.avright .panel, .avweekly { margin: 0; }
.avbottom { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.avbottom .panel { margin: 0; }
.wrow { display: grid; grid-template-columns: 150px 1fr; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: start; }
.wrow:last-child { border-bottom: 0; }
.wname { display: flex; align-items: center; gap: 12px; padding-top: 6px; }
.wranges { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding-top: 6px; }
.rg { display: flex; align-items: center; gap: 8px; }
.rg span { color: var(--muted); font-size: 13px; }
.rg select, .fld input, .seg3 + .daybody select { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 8px; color: var(--text); }
.rg select { min-width: 92px; }
.rm { background: none; border: 0; color: var(--muted); font-size: 20px; line-height: 1; padding: 2px 8px; border-radius: 6px; }
.rm:hover { background: var(--cell); color: var(--danger); }
.wlinks { display: flex; gap: 14px; }
.lnk { background: none; border: 0; padding: 0; color: var(--blue); font-size: 13px; font-weight: 500; }
.lnk:hover { text-decoration: underline; }
.sw2 { position: relative; display: inline-block; width: 40px; height: 22px; flex: none; }
.sw2 input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.sw2 i { position: absolute; inset: 0; background: #c9d3e2; border-radius: 99px; transition: background .15s; }
.sw2 i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.sw2 input:checked + i { background: var(--blue); }
.sw2 input:checked + i::after { transform: translateX(18px); }
.sw2 input:focus-visible + i { outline: 2px solid var(--navy); outline-offset: 2px; }
.avlegend { display: flex; gap: 14px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.avlegend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.lg1 { background: #2f9e62; } .lg2 { background: var(--blue); } .lg3 { background: #9aa6b8; }
.avcal .avd { min-height: 96px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--card); padding: 6px; display: flex; flex-direction: column; gap: 4px; text-align: left; cursor: pointer; color: inherit; }
.avcal .avd:nth-child(7n+14) { border-right: 0; }
.avcal .avd:hover { background: var(--bg); }
.avcal .avd.out { background: var(--bg); opacity: .55; }
.avcal .avd.past { opacity: .5; }
.avcal .avd .n { font-size: 13px; color: var(--blue); font-weight: 500; align-self: flex-start; }
.avcal .avd.today .n { background: var(--navy); color: #fff; border-radius: 50%; width: 24px; height: 24px; display: inline-grid; place-items: center; }
.avcal .avd.sel { box-shadow: inset 0 0 0 2px var(--navy); }
.apill { font-size: 11px; line-height: 1.35; padding: 4px 7px; border-radius: 6px; border-left: 3px solid; }
.apill small { display: block; opacity: .75; font-size: 10px; }
.apill.open { background: #e3f4ea; color: #1d6b43; border-color: #2f9e62; }
.apill.custom { background: #dfe9fa; color: var(--navy); border-color: var(--blue); }
.apill.off { background: #eceff4; color: var(--muted); border-color: #9aa6b8; background-image: repeating-linear-gradient(45deg, transparent 0 6px, rgba(19,46,80,.05) 6px 12px); }
.seg3 { display: flex; background: var(--cell); border-radius: 10px; padding: 3px; margin: 8px 0 14px; }
.seg3 button { flex: 1; background: none; border: 0; padding: 8px 6px; border-radius: 8px; color: var(--muted); font-weight: 500; font-size: 13px; }
.seg3 button.on { background: var(--navy); color: #fff; }
.daybody .big { font-size: 16px; font-weight: 600; margin: 4px 0; }
.fld { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 500; }
.fld input { width: 100%; }
.offform { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.offrow { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
@media (max-width: 1250px) { .avpage { grid-template-columns: 1fr; } .avbottom { grid-template-columns: 1fr; } }

body.adminpage #login { margin: 12vh auto 0; max-width: 380px; width: 100%; }
body.adminpage #login .form { width: 100%; }
.wrow { grid-template-columns: 1fr; gap: 8px; }
.wranges { padding: 0 0 0 52px; }
.wname { padding-top: 0; }
.avpage { grid-template-columns: 420px minmax(0, 1fr); }

/* in-calendar editor */
.pop { position: fixed; z-index: 30; width: 360px; max-width: calc(100vw - 24px); background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 44px rgba(19,46,80,.28); padding: 16px 18px; }
.pop.hidden { display: none; }
.pophead { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pophead h3 { margin: 0; font-size: 16px; }
dialog#offDlg { border: 1px solid var(--line); border-radius: 16px; padding: 22px; width: min(460px, calc(100vw - 32px)); background: var(--card); color: var(--text); box-shadow: 0 20px 60px rgba(19,46,80,.3); }
dialog#offDlg::backdrop { background: rgba(19,46,80,.45); }
dialog#offDlg .offform { margin-top: 12px; }
.avcal .avd.sel { box-shadow: inset 0 0 0 2px var(--blue); background: #f6f9fd; }

/* week grid: drag to paint availability */
.gview { margin: 0; min-width: 150px; }
.gbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.gbar p { margin: 0; font-size: 13px; }
.gscope { margin: 0; min-width: 240px; }
.wgrid { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card); }
.ghead, .gbody { display: grid; grid-template-columns: 64px repeat(7, minmax(0, 1fr)); }
.ghead { border-bottom: 1px solid var(--line); padding-right: 0; }
.gh { text-align: center; padding: 8px 0; font-size: 12px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.gh b { font-size: 18px; color: var(--navy); font-weight: 500; }
.gh.today b { background: var(--navy); color: #fff; border-radius: 50%; width: 30px; height: 30px; display: grid; place-items: center; }
.gscroll { max-height: 560px; overflow-y: auto; scrollbar-color: #c3cddc var(--card); user-select: none; }
.gl { position: relative; }
.gl span { position: absolute; top: -8px; right: 8px; font-size: 11px; color: var(--muted); }
.gl:first-child span { display: none; }
.gcol { position: relative; border-left: 1px solid var(--line); cursor: crosshair; }
.gc { border-top: 1px dashed transparent; }
.gc.hr { border-top: 1px solid var(--line); }
.gc:not(.hr):nth-child(4n+3) { border-top: 1px dashed #e4eaf1; }
.gc.on { background: #cfeedd; border-left: 3px solid #2f9e62; }
.gc:hover { background: #eef3fa; }
.gc.on:hover { background: #bfe6d2; }
.gc.pv-add { background: #9ed8b9 !important; }
.gc.pv-del { background: #f4c7c7 !important; }
.gcol.past { opacity: .6; }
.gcol.off { background: repeating-linear-gradient(45deg, #eceff4 0 8px, #f4f6f9 8px 16px); cursor: not-allowed; }
.gcol.off .gc { pointer-events: none; }
.gnote { position: absolute; top: 8px; left: 0; right: 0; text-align: center; font-size: 11px; color: var(--muted); z-index: 1; }

.avpage { display: flex !important; flex-direction: column; gap: 20px; }
.avpage > .panel { margin: 0; }
.gscroll { max-height: 640px; }
.avtype summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.avtype[open] summary { margin-bottom: 8px; }

.brandbar img { height: 30px; width: auto; display: block; }
.brandbar i { display: none; }
.brandbar span { padding-left: 14px; border-left: 1px solid rgba(255,255,255,.3); }
.logoimg { display: block; width: 190px; max-width: 100%; height: auto; }
.side .logoimg { margin: 4px 0 18px 8px; }
