:root { color-scheme: light; --ink:#142a35; --muted:#60717a; --paper:#f5f7f5; --panel:#fff; --line:#dbe3e2; --navy:#102d3d; --teal:#087f76; --teal-soft:#e1f3ef; --orange:#b85e18; --orange-soft:#fff0e2; --red:#af3341; --red-soft:#fbe9eb; --blue:#1f6592; --blue-soft:#e5f1f8; }
* { box-sizing:border-box; }
[hidden] { display:none !important; }
body { margin:0; background:var(--paper); color:var(--ink); font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
button,input,select,textarea { font:inherit; }
button { cursor:pointer; }
.app-shell { min-height:100vh; }
.login-screen { min-height:100vh; display:grid; place-items:center; padding:24px; background:linear-gradient(135deg,#e7f1ef,#f8f8f4); }.login-card { width:min(410px,100%); display:flex; flex-direction:column; gap:20px; padding:30px; background:var(--panel); border:1px solid var(--line); border-radius:14px; box-shadow:0 15px 45px #1b38421a; }.login-card h1 { margin:3px 0 8px; letter-spacing:-.04em; }.login-card p { margin:0; }.login-card label { display:flex; flex-direction:column; gap:7px; font-size:13px; font-weight:750; color:#344952; }.login-card input { padding:10px; border:1px solid #c8d5d6; border-radius:7px; }.login-note { font-size:12px; color:var(--muted); line-height:1.45; }.current-role { color:#d5eaeb; font-weight:700; font-size:13px; }.button-topbar { color:#fff; border-color:#668090; background:#183b4e; }
.topbar { min-height:68px; background:var(--navy); color:#fff; display:flex; justify-content:space-between; align-items:center; gap:18px; padding:12px max(24px,calc((100vw - 1280px)/2)); }
.brand { display:flex; align-items:center; gap:10px; font-size:17px; font-weight:700; letter-spacing:.01em; }.brand-mark { display:grid; place-items:center; height:31px; width:31px; border-radius:9px; background:#69c9bf; color:var(--navy); }
.top-actions,.hero-actions,.modal-actions,.legend,.week-navigation { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }.role-picker { appearance:none; border:1px solid #668090; background:#183b4e; color:#fff; padding:9px 34px 9px 12px; border-radius:8px; }
main { width:calc(100% - 40px); max-width:none; margin:0 auto; padding:34px 0 48px; }.hero { display:flex; justify-content:space-between; gap:30px; align-items:flex-end; margin-bottom:26px; }.hero h1 { font-size:clamp(26px,4vw,40px); letter-spacing:-.04em; margin:2px 0 8px; }.hero p { margin:0; }.eyebrow { color:var(--teal); font-size:12px; letter-spacing:.1em; text-transform:uppercase; font-weight:750; }.muted { color:var(--muted); font-size:14px; }
.button { border:1px solid transparent; padding:9px 14px; border-radius:8px; font-weight:700; font-size:14px; }.button-primary { background:var(--teal); color:#fff; }.button-secondary { background:var(--panel); color:var(--navy); border-color:var(--line); }.button-ghost { background:transparent; color:var(--navy); border-color:var(--line); }
.summary-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin-bottom:22px; }.summary-card,.calendar-panel,.side-panel { background:var(--panel); border:1px solid var(--line); border-radius:12px; }.summary-card { padding:17px; display:flex; flex-direction:column; gap:4px; }.summary-label { color:var(--muted); font-size:13px; }.summary-card strong { font-size:25px; letter-spacing:-.03em; }
.work-area { display:grid; grid-template-columns:minmax(0,1.72fr) minmax(275px,.72fr); gap:18px; align-items:start; }.calendar-panel,.side-panel { overflow:hidden; }.panel-header { display:flex; justify-content:space-between; gap:12px; align-items:center; padding:18px 18px 14px; border-bottom:1px solid var(--line); }.panel-header h2 { font-size:18px; margin:2px 0 0; }.panel-header .eyebrow { margin:0; }.legend { font-size:12px; color:var(--muted); }.dot { display:inline-block; height:8px; width:8px; border-radius:50%; margin-right:4px; }.confirmed { background:var(--teal); }.tbc { background:var(--orange); }.represented { background:var(--purple,#6b4fa1); }
.calendar { display:grid; grid-template-columns:52px repeat(7,minmax(128px,1fr)); overflow-x:auto; min-width:950px; }.time-axis,.day { height:720px; position:relative; }.time-axis { border-right:1px solid var(--line); }.time-label { position:absolute; right:7px; transform:translateY(-50%); color:var(--muted); font-size:11px; }.day { border-right:1px solid var(--line); background-image:repeating-linear-gradient(to bottom,transparent 0,transparent 59px,#e8eeee 60px); }.day:last-child { border:0; }.day-head { height:50px; display:flex; justify-content:space-between; align-items:center; padding:0 10px; border-bottom:1px solid var(--line); background:#fff; position:sticky; top:0; z-index:2; }.day-head span { font-size:13px; color:var(--muted); }.day-head strong { font-size:15px; color:var(--ink); }.today .day-head strong { display:grid; place-items:center; width:29px; height:29px; border-radius:50%; color:#fff; background:var(--teal); }.day-body { position:absolute; top:50px; left:0; right:0; bottom:0; }.event { position:absolute; text-align:left; border:0; border-left:3px solid var(--teal); background:var(--teal-soft); color:var(--ink); padding:7px; border-radius:0 7px 7px 0; overflow:hidden; }.event.status-pending { border-left-color:var(--orange); background:var(--orange-soft); }.event.status-represented { border-left-color:var(--purple,#6b4fa1); background:#eee8f8; }.event-time { display:block; font-size:11px; font-weight:750; margin-bottom:3px; }.event-title { display:block; font-size:13px; line-height:1.25; font-weight:750; }.event-meta { display:block; font-size:11px; color:var(--muted); margin-top:4px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.request-list { padding:8px; }.request { padding:13px 10px; border-bottom:1px solid var(--line); }.request:last-child { border-bottom:0; }.request h3 { font-size:14px; margin:0 0 5px; }.request p { font-size:12px; color:var(--muted); margin:0 0 10px; }.request-actions { display:flex; gap:7px; }.request-actions .button { padding:6px 9px; font-size:12px; }.approve { background:var(--teal-soft); color:#075e56; }.reject { background:var(--red-soft); color:var(--red); }.empty { padding:28px 18px; text-align:center; color:var(--muted); font-size:14px; }
.modal { padding:0; width:min(680px,calc(100vw - 28px)); border:0; border-radius:13px; box-shadow:0 16px 50px #0e222a4d; }.modal::backdrop { background:#0b253680; }.modal form,.modal > div { padding:20px; }.small-modal { width:min(520px,calc(100vw - 28px)); }.modal-header { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; border-bottom:1px solid var(--line); padding-bottom:14px; margin-bottom:16px; }.modal-header h2 { font-size:22px; letter-spacing:-.03em; margin:3px 0 0; }.modal-header .eyebrow { margin:0; }.icon-button { border:0; background:transparent; font-size:28px; color:var(--muted); line-height:1; }.form-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:13px; }.form-grid label { display:flex; flex-direction:column; gap:6px; color:#344952; font-size:13px; font-weight:700; }.form-full { grid-column:1/-1; }.form-grid input,.form-grid select,.form-grid textarea { width:100%; color:var(--ink); border:1px solid #c8d5d6; border-radius:7px; background:#fff; padding:9px; font-weight:400; }.form-grid textarea { resize:vertical; }.form-check { flex-direction:row !important; align-items:center; gap:8px !important; }.form-check input { width:auto; }.form-check span { color:var(--muted); font-weight:400; }.all-day-event { position:absolute; left:3px; right:3px; height:22px; padding:3px 5px; border:0; border-left:3px solid var(--blue); border-radius:0 5px 5px 0; background:var(--blue-soft); color:var(--ink); text-align:left; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:11px; font-weight:750; }.modal-actions { justify-content:flex-end; border-top:1px solid var(--line); margin-top:20px; padding-top:16px; }.form-error { min-height:18px; color:var(--red); font-size:13px; margin:10px 0 0; }.clash-item { border-left:3px solid var(--red); background:var(--red-soft); padding:12px; margin:10px 0; border-radius:0 7px 7px 0; }.clash-item h3 { font-size:14px; margin:0 0 6px; }.clash-item p { font-size:13px; margin:3px 0; color:#4c3338; }.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }
@media (max-width:800px) { .topbar,.hero { align-items:flex-start; flex-direction:column; }.top-actions { width:100%; }.role-picker { flex:1; }.work-area { grid-template-columns:1fr; }.side-panel { order:-1; }.calendar-panel { overflow-x:auto; }.summary-grid { grid-template-columns:1fr; }.hero-actions { width:100%; }.hero-actions .button { flex:1; }.top-actions .button { flex:1; }.panel-header { align-items:flex-start; flex-direction:column; }.week-navigation { width:100%; }.week-navigation .button { flex:1; padding:8px 7px; } }
@media (max-width:480px) { main { width:min(100% - 24px,1280px); padding-top:23px; }.topbar { padding:12px; }.brand { font-size:15px; }.form-grid { grid-template-columns:1fr; }.form-full { grid-column:auto; }.legend { display:none; } }

/* Calendar refinements */
.button-danger { background:var(--red-soft); color:var(--red); margin-right:auto; }
.view-switcher { display:flex; gap:4px; padding:3px; border:1px solid var(--line); border-radius:9px; }.view-switcher .button { border:0; padding:7px 9px; }.view-switcher .is-selected { background:var(--navy); color:#fff; }
.calendar { max-height:760px; overflow:auto; }
.time-axis,.day { height:var(--calendar-height,720px); }
.all-day-strip { position:sticky; top:50px; height:var(--all-day-height,0px); background:#fff; z-index:2; }
.day-body { top:var(--timed-grid-top,50px); }
.all-day-event.status-confirmed { border-left-color:var(--teal); background:var(--teal-soft); }.all-day-event.status-pending { border-left-color:var(--orange); background:var(--orange-soft); }.all-day-event.status-represented { border-left-color:var(--purple,#6b4fa1); background:#eee8f8; }
.event.clashing,.all-day-event.clashing { box-shadow:inset 0 0 0 2px var(--red); }
.request { width:100%; border:0; background:transparent; color:var(--ink); text-align:left; cursor:pointer; }.request:hover { background:#f7faf9; }.request-detail-content { padding:2px 0 18px; font-size:14px; }.request-detail-content dl { display:grid; grid-template-columns:112px 1fr; gap:10px 14px; margin:0; }.request-detail-content dt { color:var(--muted); }.request-detail-content dd { margin:0; font-weight:600; white-space:pre-wrap; }
.calendar { grid-template-columns:52px repeat(7,minmax(145px,1fr)); }.time-selects { display:flex; align-items:center; gap:5px; }.time-selects select { flex:1; min-width:0; }
.time-field.is-hidden { display:none; }
.time-zone-note { margin:0; color:var(--muted); font-size:13px; font-weight:650; }
.agenda { padding:6px 18px 18px; }.agenda-week { margin-top:15px; }.agenda-week h3 { margin:0; padding:10px 0; color:var(--teal); font-size:13px; letter-spacing:.06em; text-transform:uppercase; }.agenda-day { display:grid; grid-template-columns:105px 1fr; gap:14px; padding:10px 0; border-top:1px solid var(--line); }.agenda-date { font-weight:750; font-size:14px; }.agenda-date span { display:block; color:var(--muted); font-size:12px; font-weight:400; margin-top:2px; }.agenda-items { display:flex; flex-direction:column; gap:7px; }.agenda-event { border-left:3px solid var(--teal); background:var(--teal-soft); padding:8px 10px; border-radius:0 7px 7px 0; font-size:13px; }.agenda-event.tbc { border-left-color:var(--orange); background:var(--orange-soft); }.agenda-event.all-day { border-left-color:var(--blue); background:var(--blue-soft); }.agenda-event strong { display:block; }.agenda-event small { display:block; color:var(--muted); margin-top:3px; }

/* Full-width calendar and plain agenda list */
.work-area { display:flex; flex-direction:column; gap:18px; }.side-panel { order:-1; width:100%; }.request-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(225px,1fr)); gap:0 14px; }.request { border-bottom:0; border-right:1px solid var(--line); }.calendar-panel { width:100%; }.agenda-row { display:grid; grid-template-columns:90px 1fr; gap:10px; width:100%; border:0; border-bottom:1px solid var(--line); background:transparent; padding:7px 0; color:var(--ink); text-align:left; font-size:14px; }.agenda-row:last-child { border-bottom:0; }.agenda-when { color:var(--muted); font-variant-numeric:tabular-nums; }
.agenda { overflow-x:auto; }.agenda-grid { display:grid; grid-template-columns:repeat(7,minmax(140px,1fr)); min-width:980px; border-top:1px solid var(--line); border-left:1px solid var(--line); }.agenda-column-head { padding:9px; background:#f7faf9; border-right:1px solid var(--line); border-bottom:1px solid var(--line); color:var(--muted); font-size:12px; font-weight:750; text-transform:uppercase; letter-spacing:.06em; }.agenda-cell { min-height:150px; padding:8px; border-right:1px solid var(--line); border-bottom:1px solid var(--line); }.agenda-cell .agenda-date { display:flex; gap:5px; align-items:baseline; margin-bottom:7px; }.agenda-cell .agenda-date span { margin:0; }.agenda-cell .agenda-items { gap:3px; }.agenda-cell .agenda-row { display:block; padding:4px 0; font-size:12px; line-height:1.3; }.agenda-cell .agenda-when { display:block; font-size:11px; }
@media (max-width:800px) { .request-list { grid-template-columns:1fr; }.request { border-right:0; border-bottom:1px solid var(--line); } }

/* Full-day time view and compact appointment blocks */
.app-shell { height:100vh; display:flex; flex-direction:column; overflow:hidden; }
.topbar { flex:0 0 auto; display:flex; flex-direction:column; align-items:stretch; gap:12px; padding:12px 20px; }
.topbar-main { display:flex; justify-content:space-between; align-items:center; gap:18px; }
.control-frame { display:grid; grid-template-columns:minmax(0,1fr) 180px; gap:12px; }
.control-card { background:#183b4e; border:1px solid #315b6d; border-radius:8px; padding:10px; color:#fff; }
.control-card .summary-label,.control-card .muted { color:#d5eaeb; }
.control-card strong { font-size:22px; line-height:1; }
.control-card-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:6px; }
main { flex:1 1 auto; min-height:0; width:100%; padding:0; overflow:hidden; }
.hero,.summary-grid,.side-panel { display:none; }
.work-area { height:100%; display:block; }
.calendar-panel { height:100%; border:0; border-radius:0; display:flex; flex-direction:column; }
.panel-header { flex:0 0 auto; }
.calendar,.agenda { flex:1 1 auto; min-height:0; }
.calendar { max-height:none; background:#fff; }
.day { background-image:repeating-linear-gradient(to bottom,transparent 0,transparent 119px,#e8eeee 120px); }
.time-axis,.day { height:var(--calendar-height,2930px); }
.event {
  padding:6px 7px;
  text-overflow:ellipsis;
  font-size:12px;
  font-weight:750;
}
.event-time,.event-title { display:block; margin:0; line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.event-time { font-variant-numeric:tabular-nums; }
.event-meta { display:none; }
.field-help { color:var(--muted); font-size:12px; font-weight:400; }
.topbar .request-list { max-height:92px; overflow:auto; padding:0; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); }
.topbar .request { color:#fff; border-right:1px solid #315b6d; padding:8px; }
.topbar .request:hover { background:#20475b; }
.topbar .request p,.topbar .request .muted { color:#d5eaeb; }
.topbar .empty { color:#d5eaeb; padding:10px; text-align:left; }
.topbar.is-collapsed .control-frame { display:none; }
.team-requests-panel { display:block; }
.team-requests-panel[hidden] { display:none !important; }
.team-request-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:8px; }
.team-request-item { border:1px solid #315b6d; border-radius:8px; padding:8px; color:#fff; background:#183b4e; }
.team-request-item h3 { margin:0 0 5px; font-size:14px; }
.team-request-item p { margin:0; color:#d5eaeb; font-size:12px; }
.status-chip { display:inline-flex; align-items:center; border-radius:999px; padding:2px 7px; font-size:11px; font-weight:800; background:#fff0e2; color:#7a3e12; margin-top:6px; }
.status-chip.approved { background:#e1f3ef; color:#075e56; }
.status-chip.rejected { background:#fbe9eb; color:#af3341; }
.top-status-cache { display:none; }
@media (max-width:800px) {
  .topbar-main { align-items:flex-start; flex-direction:column; }
  .control-frame { grid-template-columns:1fr; }
  .topbar .request-list { max-height:120px; }
}

/* Event type controls and colour categories */
.event-type-group {
  border:1px solid var(--line);
  border-radius:8px;
  padding:10px 12px;
  display:flex;
  gap:16px;
  align-items:center;
  flex-wrap:wrap;
}
.event-type-group legend { color:#344952; font-size:13px; font-weight:750; padding:0 4px; }
.event-type-group label { flex-direction:row; align-items:center; width:auto; }
.event-type-group input { width:auto; }
.attendance-field.is-hidden,.title-field.is-hidden { display:none; }
.request-attendance-field.is-hidden,.request-time-field.is-hidden { display:none; }
.location-field.is-hidden,.location-control input.is-hidden { display:none; }
.location-control { display:grid; grid-template-columns:minmax(0,1fr) 128px; gap:8px; }
#request-dialog { width:min(680px,calc(100vw - 28px)); }
.time-label { font-size:15px; font-weight:750; color:#40525b; }
.event.status-info,.all-day-event.status-info {
  border-left-color:#7c8790;
  background:#edf0f2;
  color:#27323a;
}
.agenda-row {
  border-left:3px solid transparent;
  padding-left:7px;
}
.agenda-row.status-confirmed { border-left-color:var(--teal); background:var(--teal-soft); }
.agenda-row.status-pending { border-left-color:var(--orange); background:var(--orange-soft); }
.agenda-row.status-represented { border-left-color:var(--purple,#6b4fa1); background:#eee8f8; }
.agenda-row.status-info { border-left-color:#7c8790; background:#edf0f2; }
.event.status-leave,.all-day-event.status-leave,.agenda-row.status-leave { border-left-color:#1f6592; background:#e5f1f8; }
.agenda-row.clashing { box-shadow:inset 0 0 0 2px var(--red); }
.event.overseas,.all-day-event.overseas,.agenda-row.overseas { outline:4px dotted #1f6592; outline-offset:-4px; }
.agenda-cell .agenda-row { padding:4px 6px 4px 7px; border-left-width:3px; }
.agenda-cell.is-today { box-shadow:inset 0 0 0 2px var(--teal); background:#f7fffc; }
.agenda-cell.is-today .agenda-date::after { content:"Today"; margin-left:6px; border-radius:999px; padding:2px 6px; background:var(--teal); color:#fff; font-size:10px; }
.info { background:#7c8790; }
.read-event-content { padding:0 20px 20px; }
.read-event-content dl { display:grid; grid-template-columns:145px 1fr; gap:10px 14px; margin:0; }
.read-event-content dt { color:var(--muted); font-size:13px; }
.read-event-content dd { margin:0; font-weight:650; white-space:pre-wrap; }
.outline-sample { display:inline-block; width:18px; height:12px; margin-right:4px; border-radius:3px; vertical-align:-2px; }
.clash-sample { border:2px solid var(--red); }
.overseas-sample { border:3px dotted var(--blue); }
.day-head strong { font-size:12px; white-space:nowrap; }
.today .day-head strong { width:auto; min-width:0; height:auto; padding:4px 7px; border-radius:999px; }

/* Responsive calendar toolbar and owner export */
.panel-header {
  display:grid;
  grid-template-columns:minmax(180px,1fr) auto auto;
  grid-template-areas:
    "title nav switcher"
    "legend legend legend";
  align-items:center;
  gap:12px 16px;
}
.panel-header > div:first-child { grid-area:title; min-width:0; }
.week-navigation { grid-area:nav; justify-content:center; }
.view-switcher { grid-area:switcher; justify-self:end; }
.legend {
  grid-area:legend;
  justify-content:flex-start;
  row-gap:7px;
  padding-top:3px;
}
.week-navigation .button,.view-switcher .button { white-space:nowrap; }
#week-label {
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.export-options {
  border:1px solid var(--line);
  border-radius:8px;
  padding:10px 12px;
  display:flex;
  flex-wrap:wrap;
  gap:12px 16px;
}
.export-options legend { color:#344952; font-size:13px; font-weight:750; padding:0 4px; }
.export-options label { flex-direction:row; align-items:center; width:auto; }
.export-options input { width:auto; }
.native-date-input {
  position:absolute;
  width:1px !important;
  height:1px;
  opacity:0;
  pointer-events:none;
}
.date-display-button {
  width:100%;
  color:var(--ink);
  border:1px solid #c8d5d6;
  border-radius:7px;
  background:#fff;
  padding:9px 36px 9px 9px;
  font-weight:400;
  text-align:left;
  position:relative;
}
.date-display-button::after {
  content:"▾";
  position:absolute;
  right:12px;
  top:50%;
  transform:translateY(-50%);
  color:var(--muted);
  font-size:12px;
}
.form-grid label { position:relative; }
.agenda-filters {
  display:none;
  gap:10px;
  padding:10px 18px;
  border-bottom:1px solid var(--line);
  background:#f7faf9;
  align-items:end;
  flex-wrap:wrap;
}
.agenda-filters label { display:flex; flex-direction:column; gap:5px; color:#344952; font-size:12px; font-weight:750; min-width:190px; flex:1; }
.agenda-filters input,.agenda-filters select { border:1px solid #c8d5d6; border-radius:7px; background:#fff; padding:8px; color:var(--ink); }
.agenda-filters.is-visible { display:flex; }
.export-preview { margin-top:12px; padding:10px 12px; border:1px solid var(--line); border-radius:8px; background:#f7faf9; color:var(--muted); font-size:13px; }
.clash-event-button { width:100%; margin:6px 0; border:0; border-left:3px solid var(--red); border-radius:0 7px 7px 0; padding:8px 10px; text-align:left; background:#fff; color:var(--ink); }
.clash-event-button strong { display:block; }
@media (max-width:1000px) {
  .panel-header {
    grid-template-columns:1fr;
    grid-template-areas:"title" "nav" "switcher" "legend";
    align-items:stretch;
  }
  .week-navigation,.view-switcher { justify-self:stretch; width:100%; }
  .week-navigation .button,.view-switcher .button { flex:1; }
}
@media (max-width:560px) {
  .panel-header { padding:12px; gap:10px; }
  .week-navigation,.view-switcher { gap:6px; }
  .week-navigation .button,.view-switcher .button { padding:8px 7px; font-size:12px; }
  .legend { display:flex; font-size:11px; }
  .top-actions .button { flex:1 1 calc(50% - 8px); padding:8px 9px; }
  .current-role { flex:1 1 100%; }
}

/* Where's AC2 branding and clearer calendar headers */
.brand-mark.wally-mark {
  background:
    repeating-linear-gradient(135deg,#fff 0 5px,#d8343a 5px 10px);
  color:#102d3d;
  border:2px solid #fff;
  box-shadow:inset 0 0 0 2px #102d3d33;
  font-size:17px;
}
.panel-header h2 { display:none; }
#week-label {
  font-size:18px;
  letter-spacing:.04em;
  line-height:1.25;
}
.day-head span {
  font-size:16px;
  font-weight:800;
}
.day-head strong {
  font-size:15px;
  font-weight:850;
}
@media (max-width:560px) {
  #week-label { font-size:15px; }
  .day-head span { font-size:14px; }
  .day-head strong { font-size:13px; }
}
