/* Reeksy Websites: Lead Suite design system. Blue and white, matching the Reeksy logo.
   To re-colour the whole suite, change the variables below. */
:root {
  color-scheme: light;
  --bg: #eef4fc; --panel: #ffffff; --panel2: #e8f0fb; --line: #d3e0f2; --line2: #b9cbe6;
  --text: #0c1a3d; --muted: #5a6b8c; --accent: #1d6df0; --accent-ink: #ffffff; --accent-soft: #dcebff;
  --ink: #0b2272; --on-ink: #ffffff; --head: #0b2272; --field: #ffffff; --hover: #f1f6fe; --warnbg: #fdf3d8; --sky: #4cc3fa;
  --high: #1f8a5b; --medium: #b27a08; --low: #d0561f; --none: #7b88a3; --bad: #c0302a;
  --serif: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 1px 0 rgba(11, 34, 114, .04), 0 8px 24px -14px rgba(11, 34, 114, .35);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--sans); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px 72px; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; letter-spacing: -.02em; color: var(--head); }
.hint { color: var(--muted); font-size: 12px; }
.mono { font-variant-numeric: tabular-nums; }
.grow { flex: 1; }

/* ---------- app shell ---------- */
.shell { background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.shell .in { max-width: 1120px; margin: 0 auto; padding: 0 20px; height: 64px; display: flex; align-items: center; gap: 22px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo .mark { width: 30px; height: 30px; border-radius: 8px; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; font: 600 17px/1 var(--serif); }
.logo .word { font: 600 17px/1 var(--serif); letter-spacing: -.01em; }
.logo .word small { font: 600 9.5px/1 var(--sans); letter-spacing: .16em; color: var(--muted); margin-left: 3px; text-transform: uppercase; }
.logo .prod { font: 500 12px/1 var(--sans); color: var(--muted); padding-left: 10px; border-left: 1px solid var(--line2); }
.shell nav { display: flex; gap: 4px; }
.shell nav a, .shell .right a { text-decoration: none; color: var(--muted); padding: 7px 12px; border-radius: 8px; font-weight: 500; }
.shell nav a:hover, .shell .right a:hover { color: var(--text); background: var(--panel2); }
.shell nav a.on, .shell .right a.on { color: var(--text); background: var(--panel2); }
.shell .right { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.crumbs { display: flex; align-items: center; gap: 8px; color: var(--muted); padding: 18px 0 4px; font-size: 13px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.pagehead { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 6px 0 20px; }
.pagehead h1 { margin: 0; font-size: 30px; line-height: 1.15; }
.pagehead p { margin: 4px 0 0; color: var(--muted); }
.pagehead .titleinput { font: 600 28px/1.15 var(--serif); letter-spacing: -.01em; background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 2px 8px; margin-left: -8px; width: min(560px, 100%); color: var(--text); }
.pagehead .titleinput:hover { border-color: var(--line); }
.pagehead .titleinput:focus { background: var(--panel); border-color: var(--line2); outline: none; }

/* ---------- surfaces ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow); }
.panel h2 { font: 600 11px/1.2 var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 14px; }
.panel h2 .tag { text-transform: none; letter-spacing: 0; }
details.panel > summary { cursor: pointer; font: 600 11px/1.2 var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); list-style: none; display: flex; align-items: center; gap: 8px; }
details.panel > summary::before { content: "▸"; font-size: 11px; transition: transform .12s; }
details.panel[open] > summary::before { transform: rotate(90deg); }
details.panel > summary::-webkit-details-marker { display: none; }
details.panel[open] > summary { margin-bottom: 14px; }
.cols { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
@media (max-width: 880px) { .cols { grid-template-columns: 1fr; } }
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 16px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); }
.tile .k { font-size: 12px; color: var(--muted); }
.tile .v { font: 600 28px/1.2 var(--serif); font-variant-numeric: tabular-nums; margin-top: 2px; }
.tile .s { font-size: 12px; color: var(--muted); }
.meter { height: 6px; border-radius: 99px; background: var(--panel2); overflow: hidden; margin-top: 8px; }
.meter > i { display: block; height: 100%; background: var(--ink); border-radius: 99px; transition: width .2s; }
.meter.warn > i { background: var(--low); }

/* ---------- forms ---------- */
label { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 5px; }
input[type=text], input[type=password], input[type=number], input[type=time], input[type=search], select, textarea { background: var(--field); color: var(--text); border: 1px solid var(--line2); border-radius: 8px; padding: 8px 10px; font: inherit; width: 100%; }
textarea { min-height: 90px; resize: vertical; font-size: 13px; line-height: 1.5; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; }
button, a.btn { background: var(--panel); color: var(--text); border: 1px solid var(--line2); border-radius: 8px; padding: 8px 14px; font: 500 13.5px/1.2 var(--sans); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
button:hover:not(:disabled), a.btn:hover { border-color: var(--ink); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary, a.btn.primary { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
button.primary:hover:not(:disabled), a.btn.primary:hover { filter: brightness(1.12); }
button.accent, a.btn.accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button.danger { color: var(--bad); }
button.ghost { background: transparent; border-color: transparent; color: var(--muted); }
button.ghost:hover:not(:disabled) { color: var(--text); border-color: var(--line); }
button.small, a.btn.small { padding: 4px 10px; font-size: 12px; }
button.big, a.btn.big { padding: 12px 20px; font-size: 15px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.check { display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 400; color: var(--text); margin: 0; cursor: pointer; }
.field .help { font-size: 12px; color: var(--muted); margin-top: 4px; }
.switch { display: flex; gap: 10px; align-items: center; cursor: pointer; font-size: 13.5px; font-weight: 500; color: var(--text); margin: 0; }
.msg { padding: 9px 12px; border-radius: 8px; margin-top: 10px; background: var(--panel2); border-left: 3px solid var(--accent); }
.msg.err { border-left-color: var(--bad); }
.banner { padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent); font-size: 13px; }
.banner.bad { border-left-color: var(--bad); }
.banner.warn { border-left-color: var(--medium); background: var(--warnbg); }

/* ---------- tags, badges, tabs, tables ---------- */
.tag { display: inline-block; font-size: 11px; border: 1px solid var(--line2); border-radius: 99px; padding: 1px 8px; margin-left: 6px; color: var(--muted); font-weight: 500; background: var(--panel); }
.tag.ok { color: var(--high); border-color: var(--high); }
.tag.off { color: var(--low); border-color: var(--low); }
.badge { display: inline-block; border-radius: 5px; padding: 1px 7px; font-size: 11px; font-weight: 600; color: #fff; text-transform: uppercase; letter-spacing: .04em; }
.badge.high { background: var(--high); } .badge.medium { background: var(--medium); } .badge.low { background: var(--low); }
.badge.none { background: var(--none); } .badge.manual { background: var(--ink); } .badge.pending { background: var(--panel2); color: var(--muted); border: 1px solid var(--line); } .badge.error { background: var(--bad); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line2); margin-bottom: 18px; overflow-x: auto; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 10px 14px; color: var(--muted); margin-bottom: -1px; white-space: nowrap; }
.tabs button:hover { color: var(--text); border-color: transparent; }
.tabs button[aria-selected=true] { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.tabs .n { background: var(--panel2); border-radius: 99px; padding: 0 7px; font-size: 11px; margin-left: 4px; color: var(--muted); }
table.t { border-collapse: collapse; width: 100%; }
table.t th { text-align: left; font: 600 11px/1.2 var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line2); white-space: nowrap; }
table.t td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr:hover td { background: var(--hover); }
.tablewrap { overflow-x: auto; }
.empty { text-align: center; padding: 28px 12px; color: var(--muted); }
.empty b { color: var(--text); display: block; font: 600 17px/1.3 var(--serif); margin-bottom: 4px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border-radius: 99px; padding: 4px 12px; font-size: 12.5px; background: var(--panel); border: 1px solid var(--line2); cursor: pointer; color: var(--text); }
.chip[aria-pressed=true] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }

dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line2); border-radius: 14px; padding: 22px; width: 480px; max-width: calc(100vw - 32px); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45); }
dialog::backdrop { background: rgba(29, 26, 21, .5); }
dialog h3 { margin: 0 0 6px; font-size: 21px; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 28px 0 0; }
.foot a { color: var(--muted); }
@media (max-width: 640px) { .shell nav { display: none; } .logo .prod { display: none; } .pagehead h1 { font-size: 25px; } }

/* ---------- lead colour coding (the whole box shows how it went) ---------- */
.st-pending { --sb: #9db3d6; --sc: #ffffff; }
.st-opening { --sb: #d4a017; --sc: #fdf0d0; }
.st-sent { --sb: #2f6fe0; --sc: #dde9ff; }
.st-replied { --sb: #1f8a85; --sc: #d6eeed; }
.st-interested { --sb: #c28a00; --sc: #f9eab8; }
.st-won { --sb: #2c7a4b; --sc: #cfecd8; }
.st-no { --sb: #b3261e; --sc: #f6d9d5; }
.st-skipped { --sb: #8793ab; --sc: #e9edf4; }
table.t tr.lead td { background: var(--sc); }
table.t tr.lead td:first-child { box-shadow: inset 5px 0 0 var(--sb); }
table.t tr.lead:hover td { filter: brightness(.97); }
.lbox { background: var(--sc); border: 1px solid color-mix(in srgb, var(--sb) 40%, transparent); border-left: 5px solid var(--sb); border-radius: 10px; padding: 10px 12px; }
.chip[class*="st-"] { border-left: 5px solid var(--sb); }
.chip[class*="st-"][aria-pressed=true] { background: var(--sc); color: var(--text); border-color: var(--sb); font-weight: 600; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: 0 0 12px; }
.legend span::before { content: ""; display: inline-block; width: 11px; height: 11px; border-radius: 3px; background: var(--sc); border-left: 4px solid var(--sb); margin-right: 5px; vertical-align: -1px; }

/* ---------- day chart ---------- */
.days { display: flex; align-items: stretch; gap: 6px; height: 170px; }
.days .d { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; border: 0; padding: 4px 0 0; cursor: pointer; font-size: 10.5px; color: var(--muted); border-radius: 8px; }
.days .d:hover { background: var(--panel2); border: 0; }
.days .d b { color: var(--text); font-weight: 600; height: 14px; font-size: 11px; }
.days .bw { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; min-height: 0; }
.days .d i { display: block; width: 100%; max-width: 34px; background: var(--ink); border-radius: 5px 5px 0 0; min-height: 2px; }
.days .d.sel { background: var(--accent-soft); }
.days .d.sel i { background: var(--accent); }
.days .d span { white-space: nowrap; }
.days .d em { font-style: normal; font-size: 10px; opacity: .8; }

.logo img { height: 40px; width: auto; display: block; }
.shell { border-bottom: 1px solid var(--line); box-shadow: 0 6px 18px -16px rgba(11,34,114,.5); }
.logo .prod { font-weight: 600; color: var(--accent); }
button.primary, a.btn.primary { background: linear-gradient(180deg, #2f80ff, #1558d6); border-color: #1558d6; }
button.accent, a.btn.accent { background: linear-gradient(180deg, #2f80ff, #1558d6); border-color: #1558d6; }
.panel { border-color: var(--line); }

/* ---------- clean top bar ---------- */
.shell .in { gap: 28px; }
.shell nav { background: var(--panel2); border-radius: 11px; padding: 3px; gap: 2px; }
.shell nav a { padding: 6px 14px; border-radius: 8px; font-size: 13.5px; }
.shell nav a:hover { background: transparent; color: var(--text); }
.shell nav a.on { background: var(--panel); color: var(--accent); font-weight: 600; box-shadow: 0 1px 3px rgba(11,34,114,.15); }
.shell .right a { padding: 7px 10px; display: inline-flex; align-items: center; gap: 6px; }
.shell .right a.on { background: var(--panel2); }
.shell .right .site { color: var(--muted); font-size: 13px; }
@media (max-width: 760px) { .shell nav { display: none; } .shell .right .site { display: none; } }

/* ---------- dark theme ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a1226; --panel: #111b36; --panel2: #1a2748; --line: #243457; --line2: #34497a;
  --text: #e6edfb; --muted: #94a5ca; --accent: #5a9bff; --accent-soft: #172b55;
  --ink: #3f86ff; --on-ink: #ffffff; --head: #eaf1ff; --field: #0d1730; --hover: #16224a; --warnbg: #3a3010;
  --high: #3bb27a; --medium: #e0a526; --low: #ec7a3c; --none: #7f8cab; --bad: #f0605a;
  --shadow: 0 1px 0 rgba(0,0,0,.2), 0 8px 24px -14px rgba(0,0,0,.7);
}
:root[data-theme="dark"] .st-pending { --sb: #4a5f8f; --sc: #111b36; }
:root[data-theme="dark"] .st-opening { --sb: #d9a521; --sc: #3a3010; }
:root[data-theme="dark"] .st-sent { --sb: #4d8dff; --sc: #15284f; }
:root[data-theme="dark"] .st-replied { --sb: #2bb3ab; --sc: #123a3b; }
:root[data-theme="dark"] .st-interested { --sb: #e0a800; --sc: #3c3210; }
:root[data-theme="dark"] .st-won { --sb: #3bb273; --sc: #12372a; }
:root[data-theme="dark"] .st-no { --sb: #e0524a; --sc: #3d1a1a; }
:root[data-theme="dark"] .st-skipped { --sb: #7a869f; --sc: #1b2338; }
:root[data-theme="dark"] .shell nav a.on { box-shadow: none; }
:root[data-theme="dark"] .tile, :root[data-theme="dark"] .panel { border-color: var(--line); }
:root[data-theme="dark"] .days .d.sel { background: var(--accent-soft); }

/* ---------- layout fixes ---------- */
.cols > * { min-width: 0; }
.mini { grid-template-columns: minmax(0, 1fr); }
.mini .lbox { min-width: 0; overflow: hidden; }
.mini .lbox .l { min-width: 0; max-width: 100%; }
.tabs { overflow-y: hidden; scrollbar-width: none; padding-bottom: 1px; }
.tabs::-webkit-scrollbar { display: none; }
table.t td.nowrap, table.t td .nm { white-space: nowrap; }
.iconbtn { padding: 5px 8px; line-height: 1; border-color: transparent; background: transparent; color: var(--muted); font-size: 15px; }
.iconbtn:hover:not(:disabled) { background: var(--panel2); color: var(--text); border-color: var(--line); }
.iconbtn.danger:hover:not(:disabled) { color: var(--bad); }
table.t .acts { display: flex; gap: 2px; align-items: center; justify-content: flex-end; }
table.t .prog { width: 100px; }

/* ---------- daily goal ---------- */
.goal { display: grid; grid-template-columns: auto minmax(120px, 1fr) auto; gap: 16px; align-items: center; padding: 14px 18px; margin-bottom: 16px; }
.goal .g-k { font: 700 11px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.goal .g-n { font: 700 26px/1.1 var(--sans); font-variant-numeric: tabular-nums; color: var(--head); margin-top: 4px; }
.goal .g-n small { font-size: 14px; color: var(--muted); font-weight: 500; }
.goal .g-bar { height: 12px; border-radius: 99px; background: var(--panel2); overflow: hidden; }
.goal .g-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--sky), var(--accent)); transition: width .4s; }
.goal.done .g-bar i { background: linear-gradient(90deg, #35c98b, #1f8a5b); }
.goal .g-msg { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.goal .g-act { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) { .goal { grid-template-columns: 1fr; } .goal .g-act { justify-content: flex-start; } }
canvas.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 9999; }
.toast { position: fixed; left: 50%; top: 84px; transform: translateX(-50%); background: var(--ink); color: var(--on-ink); padding: 12px 22px; border-radius: 99px; font-weight: 600; box-shadow: 0 14px 40px -12px rgba(11,34,114,.6); z-index: 10000; animation: tin .35s ease-out; }
@keyframes tin { from { opacity: 0; transform: translate(-50%, -12px); } }

/* ---------- no number spinners, contained charts ---------- */
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; appearance: none; margin: 0; }
.days { overflow: hidden; max-width: 100%; }
.days .d { padding-left: 0; padding-right: 0; border-radius: 4px; }
.days .d span { display: flex; justify-content: center; width: 100%; overflow: visible; white-space: nowrap; }
.days .d span:empty { height: 12px; }
.days.dense .d i { min-width: 1px; border-radius: 2px 2px 0 0; }
.days.dense .d { border-radius: 2px; }
dialog.celebrate { text-align: center; max-width: 440px; padding: 28px 30px; border-radius: 20px; z-index: 10001; background: radial-gradient(500px 200px at 50% -10%, color-mix(in srgb, var(--sky) 30%, transparent), transparent 70%), var(--panel); }
dialog.celebrate .c-emoji { font-size: 44px; line-height: 1; }
dialog.celebrate h2 { font-size: 26px; margin: 10px 0 6px; text-transform: none; letter-spacing: -.02em; }
dialog.celebrate .c-big { font-weight: 700; font-size: 16px; color: var(--accent); margin: 0 0 10px; }
dialog.celebrate p { margin: 6px 0; }
dialog.celebrate .c-push { font-weight: 600; margin-top: 14px; }
dialog.celebrate::backdrop { background: rgba(5, 12, 40, .55); }
canvas.confetti { z-index: 10002; }
