/* PayCaptain Admin home. Brand: Figtree, teal #1F7A76, light grey page. No red or coral except error/alert states. */
@font-face {
  font-family: "Figtree";
  src: url("/assets/figtree.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}
:root {
  --teal: #1F7A76; --teal-dark: #17605D; --teal-tint: #E7F2F1; --teal-soft: #CFE5E3; --logo: #4CBFBE;
  --yellow: #F6CB4A; --orange: #E9A250;
  --bg: #F3F6F6; --surface: #FFFFFF; --ink: #1D2B2F; --muted: #5C6B70; --line: #DDE6E6;
  --accent: var(--teal);
  --red: #C62828; --red-bg: #FDECEA; --green: #2E7D32; --amber: #A86400; --amber-bg: #FFF4DF;
  --warn-bg: #FFF4DF; --warn-ink: #6B4A00;
  --shadow: 0 1px 2px rgba(16, 40, 40, .06), 0 6px 18px rgba(16, 40, 40, .07);
  --radius: 20px;
  /* Type scale */
  --fs-xs: 12px; --fs-sm: 14px; --fs-md: 16px; --fs-lg: 18px; --fs-xl: 22px; --fs-2xl: 30px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; font: var(--fs-md)/1.5 "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--ink); }
a { color: var(--teal); }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[data-icon] { display: inline-flex; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 8px; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; padding: 10px var(--page-pad); background: var(--surface); border-bottom: 1px solid var(--line); }
.logo { display: flex; }
.logo img { display: block; }
.env-badge { padding: 2px 9px; border-radius: 999px; background: var(--warn-bg); color: var(--warn-ink); font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.mainnav { display: flex; gap: 2px; margin-left: 12px; flex-wrap: nowrap; }
.navlink { padding: 9px 15px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: var(--fs-md); white-space: nowrap; }
.navlink:hover { background: var(--teal-tint); }
.navlink.active { background: var(--teal); color: #fff; font-weight: 700; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: none; }
.search { position: relative; }
.search input { width: 260px; padding: 9px 14px 9px 40px; border: 1px solid var(--line); border-radius: 999px; font: inherit; font-size: var(--fs-sm); background: var(--surface); }
.search input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-icon .ic { width: 18px; height: 18px; }
.search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; min-width: 340px; list-style: none; margin: 0; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.result { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: none; text-align: left; text-decoration: none; color: var(--ink); cursor: pointer; font-size: var(--fs-sm); }
.result:hover, .result:focus-visible { background: var(--teal-tint); }
.result .ic { color: var(--teal); width: 18px; height: 18px; }
.result-area { margin-left: auto; color: var(--muted); font-size: var(--fs-xs); white-space: nowrap; }
.result-none { padding: 10px; color: var(--muted); font-size: var(--fs-sm); }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; border: 0; background: none; color: var(--ink); cursor: pointer; }
.icon-btn:hover { background: var(--teal-tint); }
.icon-btn.solid { background: var(--teal); color: #fff; }
.icon-btn.solid:hover { background: var(--teal-dark); }
.icon-btn.outline { border: 1px solid var(--line); color: var(--teal); }
.count { position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--teal); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; }
.usermenu { position: relative; }
.user-btn { white-space: nowrap; display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 20px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer; font-weight: 500; }
.user-btn .ic { width: 18px; height: 18px; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 240px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.menu [role="menuitem"] { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: none; text-align: left; color: var(--ink); text-decoration: none; cursor: pointer; font-size: var(--fs-sm); }
.menu [role="menuitem"]:hover { background: var(--teal-tint); }
.menu .ic { width: 18px; height: 18px; color: var(--teal); }

/* Layout */
/* Content and header edges both sit on a 1,400px column, matching the experience site. */
:root { --page-max: 1400px; --page-pad: max(28px, calc((100% - var(--page-max)) / 2)); }
main { max-width: calc(var(--page-max) + 56px); margin: 0 auto; padding: 20px 28px 104px; }
.center { text-align: center; padding: 96px 0; }
.center p { color: var(--muted); max-width: 440px; margin: 0 auto 24px; }
.signin h1 { margin: 16px 0 8px; }
.spinner { width: 36px; height: 36px; margin: 0 auto 16px; border-radius: 50%; border: 4px solid var(--teal-soft); border-top-color: var(--teal); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; border: 1px solid var(--teal); border-radius: 999px; background: var(--teal); color: #fff; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--teal-dark); }
.btn.ghost { background: none; color: var(--teal); }
.btn.small { padding: 7px 16px; font-size: var(--fs-sm); }
.notice, .warnings { background: var(--warn-bg); color: var(--warn-ink); border-radius: 12px; padding: 12px 16px; margin: 0 0 16px; font-size: var(--fs-sm); }
.warnings { padding-left: 32px; }
.pill-soon, .pill-live { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 700; white-space: nowrap; }
.pill-soon { background: #FFF1C9; color: #7A5600; }
.pill-live { background: var(--teal-tint); color: var(--teal-dark); }

/* Hero and quick links */
.hero { text-align: center; padding: 18px 0 22px; }
.customer-logo { width: 180px; height: auto; }
.hero h1 { margin: 10px 0 2px; font-size: var(--fs-2xl); font-weight: 600; }
.welcome { margin: 0; font-size: var(--fs-lg); color: var(--muted); }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 28px; }
.quick-tile { display: flex; flex-direction: column; align-items: center; overflow: hidden; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); text-decoration: none; color: inherit; transition: transform .15s ease, box-shadow .15s ease; }
.quick-tile:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(16,40,40,.08), 0 14px 30px rgba(16,40,40,.12); }
.quick-head { align-self: stretch; padding: 16px 12px; background: var(--teal); color: #fff; font-size: var(--fs-lg); font-weight: 500; text-align: center; }
.quick-tile img { width: 96px; height: auto; margin: 16px 0 18px; }

/* Dashboard */
.dash { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; margin-bottom: 36px; }
.panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.side { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: var(--fs-xl); font-weight: 600; }
.panel-head h2 .ic { color: var(--teal); width: 22px; height: 22px; }
.panel-link { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 0; color: var(--teal); font-weight: 600; font-size: var(--fs-sm); text-decoration: none; cursor: pointer; }
.panel-link .ic { width: 16px; height: 16px; }
.flash { animation: flash 1.4s ease; }
@keyframes flash { 0%, 100% { box-shadow: var(--shadow); } 30% { box-shadow: 0 0 0 4px var(--teal-soft), var(--shadow); } }

/* Florence */
.florence { position: fixed; z-index: 35; right: 24px; bottom: 96px; width: min(400px, calc(100vw - 32px)); max-height: calc(100vh - 140px); overflow: auto; box-shadow: 0 20px 50px rgba(16,40,40,.25); }
.fl-actions { display: flex; align-items: center; gap: 4px; }
.fab { position: fixed; z-index: 36; right: 24px; bottom: 24px; display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 22px 0 18px; border: 0; border-radius: 999px;
  background: var(--teal); color: #fff; font-weight: 700; box-shadow: 0 8px 24px rgba(16,40,40,.3); cursor: pointer; }
.fab:hover { background: var(--teal-dark); }
.fab .ic { width: 24px; height: 24px; }
.fab.on { background: var(--teal-dark); }
@media (max-width: 640px) { .fab { right: 16px; bottom: 16px; padding: 0 16px; } .fab-label { display: none; } .florence { right: 16px; bottom: 84px; } }
.chat { display: flex; flex-direction: column; gap: 8px; max-height: 240px; overflow-y: auto; padding: 4px 2px 8px; }
.msg { max-width: 88%; padding: 9px 13px; border-radius: 16px; font-size: var(--fs-sm); line-height: 1.45; }
.msg.them { align-self: flex-start; background: var(--teal-tint); border-bottom-left-radius: 4px; }
.msg.me { align-self: flex-end; background: var(--teal); color: #fff; border-bottom-right-radius: 4px; }
.msg.typing { color: var(--muted); letter-spacing: 2px; }
.prompts { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.prompt { padding: 6px 12px; border: 1px solid var(--teal-soft); border-radius: 999px; background: var(--surface); color: var(--teal-dark); font-size: var(--fs-xs); font-weight: 600; cursor: pointer; }
.prompt:hover { background: var(--teal-tint); }
.chat-form { display: flex; gap: 8px; align-items: center; }
.chat-form input { flex: 1; min-width: 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; font: inherit; font-size: var(--fs-sm); }
.chat-form input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.call { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; background: var(--teal-tint); }
.call p { margin: 0; flex: 1; font-size: var(--fs-sm); }
.bars { display: flex; gap: 3px; align-items: center; height: 28px; }
.bars i { width: 4px; border-radius: 2px; background: var(--teal); animation: bar 1s ease-in-out infinite; }
.bars i:nth-child(2) { animation-delay: .15s; } .bars i:nth-child(3) { animation-delay: .3s; } .bars i:nth-child(4) { animation-delay: .45s; } .bars i:nth-child(5) { animation-delay: .6s; }
@keyframes bar { 0%, 100% { height: 6px; } 50% { height: 26px; } }

/* Notifications */
.notes { list-style: none; margin: 0; padding: 0; }
.note { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.note:first-child { border-top: 0; padding-top: 0; }
.note-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--teal-tint); color: var(--teal); flex: none; }
.note-icon .ic { width: 18px; height: 18px; }
.note-payment .note-icon { background: #FFF1C9; color: #8A6200; }
.note-kyc .note-icon { background: #FCE9D4; color: #9A5A12; }
.note-text { min-width: 0; font-size: var(--fs-sm); }
.note-text strong { display: block; margin: 1px 0 2px; }
.note-text p { margin: 0; color: var(--muted); }
.note-top { display: flex; justify-content: space-between; gap: 8px; font-size: var(--fs-xs); color: var(--muted); }
.note-type { font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tab { padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: var(--fs-sm); cursor: pointer; }
.tab.on { background: var(--teal); border-color: var(--teal); color: #fff; font-weight: 600; }

/* Areas */
.areas { margin: 0 0 28px; }
.area-tabs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.area-tab { display: flex; flex-direction: column; align-items: center; padding: 0; overflow: hidden; border: 0; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.area-tab:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(16,40,40,.08), 0 14px 30px rgba(16,40,40,.12); }
.area-tab-head { align-self: stretch; padding: 13px 8px; background: var(--teal); color: #fff; font-size: var(--fs-md); font-weight: 500; text-align: center; white-space: nowrap; }
.area-tab img { width: 72px; height: 72px; margin: 14px 0 16px; }
.area-tab.on { box-shadow: 0 0 0 3px var(--teal), var(--shadow); }
.area-tab.on .area-tab-head { background: var(--teal-dark); font-weight: 700; }
.area-panel { margin-top: 18px; padding: 18px 20px 14px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.area-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.area-panel-head h2 { margin: 0; font-size: var(--fs-xl); font-weight: 600; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 4px 12px; }
.feature-list { padding: 8px; }
.feature { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 12px; background: none; text-align: left; cursor: pointer; }
.feature:hover { background: var(--teal-tint); }
.feature-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--teal-tint); color: var(--teal); flex: none; }
.feature:hover .feature-icon { background: var(--surface); }
.feature-icon .ic { width: 18px; height: 18px; }
.feature-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.feature-title { font-weight: 600; font-size: var(--fs-md); }
.feature-desc { color: var(--muted); font-size: var(--fs-sm); line-height: 1.35; }
.foot { display: flex; justify-content: space-between; gap: 12px; padding-top: 12px; color: var(--muted); font-size: var(--fs-sm); }

/* Modal and drawer */
.scrim { position: fixed; inset: 0; z-index: 30; background: rgba(15, 35, 35, .35); }
.modal { position: fixed; z-index: 40; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto; padding: 28px; border-radius: var(--radius); background: var(--surface); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.cal { display: grid; gap: 14px; }
.cal-bar { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; }
.cal-bar .btn { margin-left: auto; }
.cal-bar .btn .ic { width: 16px; height: 16px; }
.cal-note { color: var(--muted); font-size: var(--fs-sm); }
.cal-seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
.cal-seg-btn { padding: 6px 16px; border: 0; border-radius: 999px; background: none; font-size: var(--fs-sm); font-weight: 600; color: var(--muted); cursor: pointer; }
.cal-seg-btn.on { background: var(--teal); color: #fff; }
.cal-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.cal-table { width: 100%; min-width: 1100px; border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); }
.cal-table th, .cal-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; white-space: nowrap; }
.cal-table thead th { position: sticky; top: 0; z-index: 1; background: var(--bg); font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.cal-table thead th > span { display: block; }
.cal-emoji { font-size: 18px; letter-spacing: 0; margin-bottom: 2px; }
.cal-table tbody tr:last-child > * { border-bottom: 0; }
.cal-table tbody tr:hover > * { background: color-mix(in srgb, var(--teal) 4%, var(--surface)); }
.cal-period { position: sticky; left: 0; z-index: 1; background: var(--surface); border-right: 1px solid var(--line); }
.cal-period-h { position: sticky; left: 0; z-index: 2 !important; border-right: 1px solid var(--line); }
.cal-period strong { margin-right: 6px; }
.cal-range { display: block; color: var(--muted); font-size: var(--fs-xs); font-weight: 400; }
.pill-current { padding: 1px 8px; font-size: 11px; background: var(--teal-tint); color: var(--teal-dark); border-color: transparent; }
.cal-current > * { background: color-mix(in srgb, var(--teal) 5%, var(--surface)); }
.cal-date { display: block; font-weight: 600; }
.cal-time { display: block; color: var(--muted); font-size: var(--fs-xs); }
.cal-table .cal-payday { background: color-mix(in srgb, var(--yellow) 14%, var(--surface)); }
.cal-table thead .cal-payday { background: color-mix(in srgb, var(--yellow) 30%, var(--bg)); color: var(--ink); }
.cal-table td.past { color: #9aa7ab; }
.cal-table td.past .cal-date { font-weight: 400; }
.cal-table td.next { box-shadow: inset 0 0 0 2px var(--teal); border-radius: 8px; }
.cal-table td.moved .cal-date::after { content: " ●"; color: var(--amber); font-size: 10px; vertical-align: 2px; }
.cal-moved { display: inline-block; margin-top: 2px; padding: 0 6px; border-radius: 999px; background: var(--amber-bg); color: var(--amber); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; cursor: help; }
.cal-none { color: #b6c1c4; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: var(--fs-xs); color: var(--muted); }
.lg::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -2px; border-radius: 3px; }
.lg-next::before { box-shadow: inset 0 0 0 2px var(--teal); }
.lg-moved::before { background: var(--amber-bg); border: 1px solid var(--amber); }
.lg-past::before { background: #e3e9ea; }
.lede { margin: 0; color: var(--muted); }
/* Procedures manual: same pattern as the Activation app's Processing step */
.manual { display: grid; gap: 14px; }
.manual-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px 20px; flex-wrap: wrap; }
.manual-top > div:first-child { max-width: 760px; }
.manual-meta { margin: 6px 0 0; font-size: var(--fs-xs); color: var(--muted); }
.manual-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.manual-actions .ic { width: 16px; height: 16px; }
.manual-sent { margin: 0; padding: 10px 14px; border-radius: 10px; background: var(--teal-tint); color: var(--teal-dark); font-weight: 600; font-size: var(--fs-sm); }
.manual-list { border: 1px solid var(--line); border-radius: 14px; padding: 0 18px; }
.policy { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; gap: .2rem .9rem; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.policy:last-child { border-bottom: 0; }
.policy .emoji { font-size: 1.35rem; line-height: 1.3; }
.policy h4 { margin: 0; font-size: var(--fs-md); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.policy .body p { margin: .3rem 0 0; max-width: 72ch; color: var(--muted); font-size: var(--fs-sm); }
.policy.custom .body p { color: var(--ink); }
.pol-tag { padding: 1px 8px; border-radius: 999px; background: var(--teal-tint); color: var(--teal-dark); font-size: 11px; font-weight: 700; }
.pol-input { width: 100%; margin-top: .4rem; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: var(--fs-sm); }
.pol-input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.pol-btns { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.btn.quiet { background: none; border-color: transparent; color: var(--teal); padding-left: 10px; padding-right: 10px; }
.btn.quiet:hover { background: var(--teal-tint); }
@media (max-width: 700px) { .policy { grid-template-columns: 2rem minmax(0, 1fr); } .pol-btns { grid-column: 2; justify-content: flex-start; } }
/* Secure file sharing */
.files { display: grid; gap: 14px; }
.files-note { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); font-size: var(--fs-sm); }
.files-note .ic { width: 16px; height: 16px; color: var(--teal); }
.files-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.files-box { border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: var(--surface); }
.files-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.files-head h3 { margin: 0; font-size: var(--fs-lg); }
.files-head p { margin: 0; color: var(--muted); font-size: var(--fs-sm); }
.files-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--teal); color: #fff; flex: none; }
.files-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 12px; padding: 16px; border: 2px dashed var(--teal-soft); border-radius: 12px; color: var(--teal-dark); font-weight: 600; font-size: var(--fs-sm); cursor: pointer; text-align: center; }
.files-drop:hover, .files-drop.over { background: var(--teal-tint); border-color: var(--teal); }
.files-drop small { color: var(--muted); font-weight: 400; }
.files-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.files-drop .ic { width: 24px; height: 24px; }
.folder { border: 1px solid var(--line); border-radius: 12px; margin-top: 8px; overflow: hidden; }
.folder-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; background: var(--bg); cursor: pointer; text-align: left; }
.folder-head .ic { color: var(--teal); }
.folder-head .ic:last-child { margin-left: 4px; color: var(--muted); width: 18px; height: 18px; transform: rotate(-90deg); transition: transform .15s; }
.folder.open .folder-head .ic:last-child { transform: none; }
.folder-name { font-weight: 700; }
.folder-count { margin-left: auto; color: var(--muted); font-size: var(--fs-xs); }
.file-list { list-style: none; margin: 0; padding: 4px 8px; }
.file { display: flex; align-items: center; gap: 12px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.file:last-child { border-bottom: 0; }
.file.fresh { background: color-mix(in srgb, var(--teal) 6%, transparent); border-radius: 8px; }
.file-type { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; font-size: 10px; font-weight: 800; letter-spacing: .04em; background: var(--teal-tint); color: var(--teal-dark); }
.file-type.t-pdf { background: #fdeedd; color: #9a4a00; }
.file-type.t-csv, .file-type.t-xlsx { background: #e6f4ea; color: #1e7b34; }
.file-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.file-meta strong { font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta span { color: var(--muted); font-size: var(--fs-xs); }
.file-dl { color: var(--teal); flex: none; }
.file-dl.done { background: var(--teal-tint); }
@media (max-width: 900px) { .files-cols { grid-template-columns: minmax(0, 1fr); } }
.files-box, .folder { min-width: 0; }
@media (max-width: 640px) { .files-box { padding: 12px; } .files-note { align-items: flex-start; } }
.late { width: min(560px, calc(100vw - 32px)); }
.late-warn { display: flex; gap: 12px; align-items: flex-start; margin: 12px 0 16px; padding: 12px 14px; border-radius: 12px; background: var(--warn-bg); color: var(--warn-ink); font-size: var(--fs-sm); font-weight: 600; }
.late-warn p { margin: 0; }
.late-warn .ic { flex: none; margin-top: 1px; color: var(--amber); }
.late-back { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px; padding: 0; border: 0; background: none; color: var(--teal); font-weight: 600; font-size: var(--fs-sm); cursor: pointer; }
.late-back .ic { width: 16px; height: 16px; }
.late-options { display: grid; gap: 4px; }
.late-option { border: 1px solid var(--line); }
.late-form { display: grid; gap: 14px; }
.fld { display: grid; gap: 5px; }
.fld-label { font-weight: 600; font-size: var(--fs-sm); }
.fld-hint { color: var(--muted); font-size: var(--fs-xs); }
.fld input:not([type=checkbox]), .fld select, .fld textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: var(--fs-sm); background: var(--surface); }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.fld-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.late-total { margin: -4px 0 0; font-weight: 700; }
.late-template { font-size: var(--fs-sm); font-weight: 600; }
.late-ok { margin: 0; color: var(--green); font-weight: 600; font-size: var(--fs-sm); }
.late-err { margin: 0; color: var(--red); font-weight: 600; font-size: var(--fs-sm); }
.late-ack { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-sm); }
.late-ack input { margin-top: 3px; accent-color: var(--teal); }
.late .modal-actions { gap: 10px; }
.late-done { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; color: var(--green); font-weight: 700; }
.late-done p { margin: 0; color: var(--ink); }
.late dl { margin: 0 0 12px; padding: 12px 14px; border-radius: 12px; background: var(--bg); }
@media (max-width: 640px) { .fld-row { grid-template-columns: 1fr; } }
.modal .close { position: absolute; top: 14px; right: 14px; }
.modal-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--teal-tint); color: var(--teal); }
.modal-icon .ic { width: 26px; height: 26px; }
.modal h2 { margin: 2px 0 6px; font-size: var(--fs-xl); }
.modal h3 { margin: 18px 0 6px; font-size: var(--fs-md); }
.modal ul { margin: 0; padding-left: 20px; }
.modal li { margin: 4px 0; }
.eyebrow { margin: 14px 0 0; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.mock-skeleton { display: grid; gap: 8px; margin: 18px 0 10px; padding: 14px; border: 1px dashed var(--teal-soft); border-radius: 12px; }
.mock-skeleton i { height: 10px; border-radius: 6px; background: var(--teal-tint); }
.mock-skeleton i:nth-child(2) { width: 75%; } .mock-skeleton i:nth-child(3) { width: 55%; }
.modal-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
.drawer { position: fixed; z-index: 40; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); overflow: auto; padding: 22px; background: var(--bg); box-shadow: -10px 0 40px rgba(0,0,0,.18); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.drawer-head h2 { margin: 0; font-size: var(--fs-xl); }
.drawer .notes { background: var(--surface); border-radius: 16px; padding: 14px 16px; }
.details { display: grid; gap: 14px; }
.card { background: var(--surface); border-radius: 16px; padding: 16px 18px; }
.card h3 { margin: 0 0 10px; font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
dl { margin: 0; }
dt { font-size: var(--fs-xs); color: var(--muted); }
dd { margin: 0 0 10px; overflow-wrap: anywhere; white-space: pre-line; font-size: var(--fs-sm); }
dd:last-child { margin-bottom: 0; }
.empty { color: var(--muted); margin: 0; font-size: var(--fs-sm); }

/* Responsive */
@media (max-width: 1380px) { .search input { width: 180px; } }
@media (max-width: 1240px) {
  .topbar { flex-wrap: wrap; padding: 10px 16px; row-gap: 6px; }
  .mainnav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; flex-wrap: nowrap; }
}
@media (max-width: 980px) {
  .quick { grid-template-columns: repeat(2, 1fr); }
  .area-tabs { grid-template-columns: repeat(3, 1fr); }
  .side { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  main { padding: 14px 14px 40px; }
  .search { display: none; }
  .panel { padding: 16px; }
  .tl-head-top { padding: 12px; }
  .tl-nextup { flex: 1 1 100%; flex-wrap: wrap; padding: 8px 12px 10px 8px; }
  .tl-nextup .tl-countdown { flex-basis: 100%; flex-direction: row; align-items: baseline; gap: 6px; margin: 2px 0 0; padding: 8px 0 0 54px; border-left: 0; border-top: 1px solid var(--line); }
  .countdown { font-size: 19px; }
  .quick { gap: 12px; }
  .quick-head { font-size: var(--fs-md); padding: 12px 8px; }
  .quick-tile img { width: 72px; }
  .area-tabs { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .feature-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Pay period timeline */
.tl-head { border-radius: 12px; background: var(--bg); overflow: hidden; }
.is-red .tl-head { background: var(--red-bg); }
.tl-head-top { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; padding: 14px 16px 14px 18px; }
.tl-title { flex: 1 1 260px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-width: 0; }
.tl-nextup { flex: 0 1 auto; display: flex; align-items: center; gap: 12px; min-width: 0; padding: 8px 16px 8px 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.is-red .tl-nextup { border-color: color-mix(in srgb, var(--red) 35%, transparent); }
.tl-next-emoji { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--teal-tint); font-size: 21px; line-height: 1; }
.tl-next-what { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.tl-next-what .eyebrow { font-size: 11px; }
.tl-next-label { font-size: 16px; }
.tl-next-when { color: var(--muted); font-size: var(--fs-sm); }
.tl-countdown { display: flex; flex-direction: column; align-items: flex-end; margin-left: 8px; padding-left: 16px; border-left: 1px solid var(--line); line-height: 1.15; }
.countdown { font-size: 22px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl-togo { color: var(--muted); font-size: var(--fs-xs); }
.tl-title > p { flex-basis: 100%; margin: 0; }
.tl-title h3 { margin: 0; font-size: 20px; }
.tl-name { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); text-decoration: none; }
.tl-name .ic { width: 16px; height: 16px; color: var(--teal); }
.tl-name:hover { color: var(--teal-dark); text-decoration: underline; text-underline-offset: 3px; }
.late-btn { flex: none; }
.late-btn .ic { width: 16px; height: 16px; }
.timeline-card { padding: 0 0 8px; }
.timeline-card + .timeline-card { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.timeline-card.is-red { margin: -8px; padding: 8px 8px 16px; border: 2px solid var(--red); border-radius: 14px; background: linear-gradient(var(--red-bg), var(--surface) 140px); }
.muted { color: var(--muted); font-size: 14px; margin: 2px 0 0; }
.tl-badges { display: flex; gap: 8px; align-items: center; }
.pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; border: 1px solid var(--line); }
.pill-test { background: var(--amber-bg); color: var(--amber); border-color: transparent; font-weight: 600; }
.status-approved, .status-finalised { background: #e8f5e9; color: var(--green); border-color: transparent; }
.status-open, .status-pending-approval { background: var(--teal-tint); color: var(--teal-dark); border-color: transparent; }
.status-closed { background: var(--amber-bg); color: var(--amber); border-color: transparent; }
.is-red .status { background: var(--red); color: #fff; }
.tl-alert { margin: 14px 0 0; padding: 10px 14px; border-radius: 8px; background: var(--red); color: #fff; font-weight: 600; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tl-track-wrap { overflow-x: auto; overflow-y: visible; margin: 8px -4px 0; padding: 0 4px 6px; }
.tl-inner { position: relative; min-width: 720px; padding: 0 14px; }
.tl-track { position: relative; margin-top: 26px; }
.tl-grid { position: absolute; inset: 0; }
.tl-col { position: absolute; top: 0; bottom: 0; border-left: 1px solid rgba(29, 43, 47, .07); }
.tl-col.weekend { background: rgba(31, 122, 118, .055); }
.tl-col.after { background-image: repeating-linear-gradient(135deg, rgba(29,43,47,.035) 0 6px, transparent 6px 12px); }
.tl-col.weekend.after { background-color: rgba(31, 122, 118, .055); }
.tl-break { position: absolute; top: 0; bottom: 0; display: flex; align-items: flex-end; justify-content: center;
  background: repeating-linear-gradient(90deg, transparent 0 3px, rgba(29,43,47,.05) 3px 4px); border-left: 1px solid rgba(29,43,47,.07); cursor: help; }
.tl-break::before, .tl-break::after { content: ""; position: absolute; top: 52px; width: 10px; height: 26px; border-left: 2px solid var(--muted); transform: skewX(-18deg); background: var(--surface); }
.tl-break::before { left: calc(50% - 7px); }
.tl-break::after { left: calc(50% + 1px); }
.tl-break-label { position: relative; z-index: 1; margin-bottom: 4px; font-size: 11px; font-weight: 700; color: var(--muted); }
.tl-line { position: absolute; left: 0; right: 0; top: 63px; height: 4px; border-radius: 2px; background: var(--teal-soft); }
.is-red .tl-line { background: var(--red); opacity: .45; }
.tl-enddiv { position: absolute; top: -22px; bottom: 0; border-left: 2px solid var(--teal); z-index: 1; }
.tl-enddiv span { position: absolute; bottom: 4px; left: 6px; white-space: nowrap; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--teal-dark); }
.tl-stack { position: absolute; transform: translateX(-50%); display: flex; align-items: center; z-index: 3; }
.tl-stack.multi .tl-mark + .tl-mark { margin-left: -12px; }
.tl-mark { position: relative; flex: none; width: 36px; height: 36px; padding: 0; border-radius: 50%; display: grid; place-items: center;
  font-size: 18px; line-height: 1; background: var(--surface); border: 2px solid var(--teal-soft); box-shadow: 0 1px 3px rgba(16,40,40,.15); cursor: pointer; z-index: 3; transition: transform .12s ease; }
.tl-mark:hover, .tl-mark:focus-visible { transform: scale(1.15); z-index: 30 !important; }
.tl-mark.done { opacity: .55; filter: grayscale(.6); border-color: var(--line); }
.tl-mark.done:hover, .tl-mark.done:focus-visible { opacity: 1; filter: none; }
.tl-mark.next { border-color: var(--teal); box-shadow: 0 0 0 5px color-mix(in srgb, var(--teal) 22%, transparent); }
.is-red .tl-mark.next { border-color: var(--red); box-shadow: 0 0 0 5px color-mix(in srgb, var(--red) 22%, transparent); }
.tl-mark.warn { border-color: var(--amber); }
.tl-mark.warn::after { content: "⚠"; position: absolute; top: -10px; right: -8px; font-size: 12px; color: var(--amber); }
.tl-period { position: absolute; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 8px; overflow: hidden;
  border: 1px solid var(--teal); border-radius: 8px; background: color-mix(in srgb, var(--teal) 14%, var(--surface)); color: var(--teal-dark); font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.tl-period:hover, .tl-period:focus-visible { background: color-mix(in srgb, var(--teal) 22%, var(--surface)); }
.tl-period-label { overflow: hidden; text-overflow: ellipsis; min-width: 0; font-weight: 600; color: var(--ink); }
.tl-period-edge { flex: none; text-transform: uppercase; letter-spacing: .04em; }
.is-red .tl-period { border-color: var(--red); }
.tl-stem { position: absolute; width: 2px; transform: translateX(-50%); background: var(--teal-soft); z-index: 2; }
.tl-now { position: absolute; top: -22px; bottom: 0; width: 0; border-left: 2px dashed var(--ink); z-index: 4; pointer-events: none; }
.tl-now-label { position: absolute; top: 0; left: 6px; white-space: nowrap; font-size: 12px; font-weight: 700; color: var(--ink); background: var(--surface); padding: 0 4px; border-radius: 4px; }
.tl-now-label.flip { left: auto; right: 6px; }
.tl-days { position: relative; height: 34px; }
.tl-day { position: absolute; top: 4px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; line-height: 1.1; font-size: 11px; color: var(--muted); }
.tl-day b { font-weight: 600; font-size: 10px; }
.tl-day.we { color: var(--teal-dark); }
.tl-day i { font-style: normal; font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--ink); }
.tl-tip { position: fixed; z-index: 50; width: 270px; padding: 12px 14px; border-radius: 12px; background: var(--ink); color: #fff;
  font-size: 13px; line-height: 1.4; box-shadow: 0 10px 30px rgba(0,0,0,.25); pointer-events: none; }
.tl-tip::before { content: ""; position: absolute; top: -6px; left: var(--arrow, 50%); width: 12px; height: 12px; background: var(--ink); transform: translateX(-50%) rotate(45deg); }
.tl-tip.above::before { top: auto; bottom: -6px; }
.tip-head { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.tip-emoji { font-size: 20px; }
.tip-when { margin-top: 4px; font-weight: 600; }
.tip-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; color: #C9D6D8; }
.tip-state { padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: rgba(255,255,255,.15); color: #fff; }
.tip-state.next, .tip-state.today { background: var(--teal); }
.tip-note { margin-top: 6px; color: #DCE6E7; }
.tip-warn { margin-top: 6px; color: #FFD27A; font-weight: 600; }
.tip-src { margin-top: 8px; font-size: 11px; color: #9FB1B4; }
.tl-unset { margin: 8px 0 0; font-size: 13px; color: var(--muted); }

