/* Kinlok office. Same design language as Kaveen Meet (crm.kaveenconsultants.com) and the Kaveen websites:
   logo teal #02BDB4 and deep teal #015F5A on white paper, Hanken Grotesk, a dark teal sidebar, rounded white cards,
   pill buttons with a teal sweep. The font is served from this site (no outside requests from staff pages). */

@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("fonts/hanken-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("fonts/hanken-grotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --teal: #02BDB4; --teal-2: #029A93; --deep: #015F5A; --deep-2: #014C48; --deep-3: #013A37;
  --ink: #101716; --ink-2: #39443F; --mute: #66726D;
  --paper-2: #F1F3F0; --mint: #E2F4F1; --line: #DDE2DC;
  --good: #1F8A4C; --bad: #B4402F; --warn: #B7791F;
  --r: 18px; --ease: cubic-bezier(.2,.75,.2,1);
  /* old names still used by a few pages */
  --accent: var(--deep); --muted: var(--mute); --okbg: var(--mint); --redbg: #FBE9E5; --red: var(--bad); --amberbg: #FDF1DC; --amber: var(--warn); --card: #fff;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 15.5px/1.6 "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: #fff; -webkit-font-smoothing: antialiased; min-height: 100vh; }
body.paper::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='520' height='520'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.014 .022' numOctaves='4' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .1 0 0 0 0 .2 0 0 0 0 .19 0 0 0 -1.6 1.25'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E"); }
a { color: var(--deep); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; font-weight: 750; }
h1 { font-size: 23px; margin: 0; }
h2 { font-size: 18px; margin: 26px 0 10px; }
h2:first-child { margin-top: 0; }
p { margin: 0 0 8px; }
:focus-visible { outline: 2.5px solid var(--teal); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--mute); } .small { font-size: 13.5px; }
code { font-size: 13px; word-break: break-all; background: var(--paper-2); padding: 1px 6px; border-radius: 6px; }

/* ---------- Logo */
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand svg { width: 38px; height: 29px; flex: none; overflow: visible; }
.brand rect { transform-box: fill-box; animation: bar-in .8s var(--ease) both; }
.brand rect:nth-child(2) { animation-delay: .08s; } .brand rect:nth-child(3) { animation-delay: .16s; }
@keyframes bar-in { from { transform: translateX(-40%); opacity: 0; } }
.brand b { display: block; font-size: 18px; font-weight: 750; letter-spacing: -.01em; line-height: 1.1; }
.brand small { display: block; font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); line-height: 1.3; }

/* ---------- Shell: dark sidebar + main */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--deep-3); color: #CFE6E3; padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.side .brand { color: #fff; padding: 4px 8px 16px; }
.side .brand small { color: #8FC2BC; }
.side nav { display: grid; gap: 2px; }
.side h4 { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #6FA9A2; margin: 16px 10px 6px; font-weight: 700; }
.side nav a { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 11px; color: #D7ECE9; text-decoration: none; font-weight: 550; font-size: 14.5px; transition: background .2s; }
.side nav a svg { width: 18px; height: 18px; flex: none; opacity: .85; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side nav a:hover { background: rgba(255,255,255,.06); }
.side nav a.on { background: rgba(2,189,180,.18); color: #fff; box-shadow: inset 3px 0 0 var(--teal); }
.side .count { margin-left: auto; background: var(--teal); color: var(--deep-3); font-size: 11.5px; font-weight: 800; border-radius: 999px; padding: 1px 8px; }
.side .count.alert { background: #F2A28F; }
.side .me { margin-top: auto; padding: 14px 10px 4px; border-top: 1px solid rgba(255,255,255,.1); font-size: 13.5px; }
.side .me a { color: #fff; text-decoration: none; display: block; }
.side .me a b { display: block; font-weight: 650; }
.side .me a span { color: #8FC2BC; font-size: 12.5px; text-transform: capitalize; }
.side .me a:hover b { text-decoration: underline; }
.side .me button { all: unset; color: #8FC2BC; cursor: pointer; font-size: 13px; text-decoration: underline; margin-top: 8px; display: inline-block; }
.side .me button:hover { color: #fff; }
.burger { display: none; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 18px 32px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.9); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 15; }
.content { padding: 26px 32px 64px; max-width: 1180px; width: 100%; }

/* ---------- Pages without a sign-in (sign-in, set-up, customer confirmation) */
.solo { min-height: 100vh; display: grid; place-content: center; gap: 20px; padding: 32px 16px; justify-items: center; }
.solo .panel { width: min(460px, calc(100vw - 32px)); background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 30px; box-shadow: 0 30px 70px -50px rgba(1,58,55,.5); }
.solo .panel h1 { margin-bottom: 18px; }
.solo .panel .card { border: 0; padding: 0; margin: 0; box-shadow: none; }

/* ---------- Buttons: pill with a teal sweep */
button, .btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 22px; border-radius: 999px; border: 0;
  background: var(--deep); color: #fff; font: inherit; font-weight: 650; font-size: 14.5px; text-decoration: none; cursor: pointer; overflow: hidden; isolation: isolate;
  transition: color .3s, box-shadow .3s, opacity .2s; box-shadow: 0 10px 22px -14px rgba(1,95,90,.7); white-space: nowrap; margin-top: 6px; }
button::before, .btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--teal); transform: translateY(101%); transition: transform .45s var(--ease); border-radius: inherit; }
button:hover::before, .btn:hover::before { transform: translateY(0); }
button:hover, .btn:hover { color: var(--ink); }
button.secondary { background: #fff; color: var(--deep); box-shadow: inset 0 0 0 1.5px var(--line); }
button.secondary::before { background: var(--mint); }
button.danger { background: #fff; color: var(--bad); box-shadow: inset 0 0 0 1.5px #EBC9C2; }
button.danger::before { background: #FBE9E5; }
button:disabled { opacity: .55; cursor: not-allowed; } button:disabled::before { display: none; }

/* ---------- Forms */
label { display: grid; gap: 6px; margin: 0 0 14px; font-size: 13.5px; font-weight: 650; color: var(--ink-2); }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=search], input[type=date], input:not([type]), select, textarea {
  width: 100%; max-width: 460px; padding: 10px 13px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font: inherit; font-weight: 400; font-size: 15px; color: var(--ink);
  transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(2,189,180,.14); }
textarea { max-width: 100%; min-height: 96px; resize: vertical; }
input[type=checkbox], input[type=radio], input.tick { accent-color: var(--deep); width: 17px; height: 17px; margin: 0 8px 0 0; vertical-align: -3px; display: inline-block; }
label:has(> input[type=checkbox]) { display: block; font-weight: 550; }
form.inline { display: inline; }
form.inline label { display: inline-grid; margin-right: 10px; vertical-align: bottom; }
form.filters { display: flex; flex-wrap: wrap; gap: 0 14px; align-items: flex-end; }
form.filters label { flex: 1 1 170px; margin-bottom: 8px; } form.filters button { margin: 0 0 8px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

/* ---------- Cards, grids, tiles */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; margin: 0 0 16px; }
.card > h2 { font-size: 17px; margin: 0 0 12px; }
.card.small, .card.note { padding: 14px 18px; }
.card.note { border-style: dashed; background: #FCFDFC; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 16px; }
.grid > .card, .grid > form.card, .grid > section.card { margin: 0; }
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.stats .big { font-size: 21px; white-space: nowrap; }
.stats .card { padding: 16px 18px; border-radius: 16px; }
.stats .card .small { font-weight: 600; }
.big { display: block; font-size: 26px; letter-spacing: -.02em; line-height: 1.15; font-weight: 750; margin-top: 2px; }
.stats .card:first-child { background: var(--deep); border-color: transparent; color: #fff; }
.stats .card:first-child .muted { color: #BFE3DF; }

/* ---------- Tables */
.wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 6px 14px; margin-bottom: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th { text-align: left; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); font-weight: 700; padding: 10px; border-bottom: 1.5px solid var(--line); white-space: nowrap; }
td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td, table tr:hover td { background: #F7FAF8; }
td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.dense td { padding: 7px 10px; }
td a { font-weight: 650; text-decoration: none; } td a:hover { text-decoration: underline; }

/* ---------- Messages, badges */
.msg { display: block; padding: 12px 16px; border-radius: 14px; margin: 0 0 16px; font-weight: 550; border: 1px solid transparent; }
.msg.ok { background: var(--mint); color: var(--deep-2); }
.msg.error { background: #FBE9E5; color: var(--bad); border-color: #F2D2CB; }
.msg.warn { background: #FDF1DC; color: #8A5A10; border-color: #F3E0B8; }
.badge { display: inline-block; min-width: 20px; padding: 0 7px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 12px; font-weight: 750; text-align: center; }
.state, .lvl { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--mint); color: var(--deep); white-space: nowrap; }
.s-due, .s-ending, .l-warn { background: #FDF1DC; color: var(--warn); }
.s-readonly, .s-paused, .l-high { background: #FBE9E5; color: var(--bad); }
.l-info { background: var(--paper-2); color: var(--ink-2); }

/* ---------- Tabs (admin panel, lists) */
.tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; background: var(--paper-2); border-radius: 999px; padding: 4px; margin: 0 0 18px; }
.tabs a { padding: 7px 15px; border-radius: 999px; font-weight: 650; font-size: 14px; color: var(--ink-2); text-decoration: none; }
.tabs a.on { background: #fff; color: var(--deep); box-shadow: 0 2px 6px -2px rgba(0,0,0,.15); }
.tabs a:hover { color: var(--deep); }

/* ---------- Change requests (folding boxes) */
details.req-box { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 0 20px; margin: 0 0 10px; }
details.req-box[open] { padding-bottom: 16px; }
details.req-box summary { cursor: pointer; font-weight: 650; padding: 14px 0; list-style: none; display: flex; align-items: center; gap: 10px; }
details.req-box summary::-webkit-details-marker { display: none; }
details.req-box summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--deep); border-bottom: 2px solid var(--deep); transform: rotate(-45deg); transition: transform .2s; flex: none; }
details.req-box[open] summary::before { transform: rotate(45deg); }
details summary { cursor: pointer; font-weight: 650; color: var(--deep); }

/* ---------- Call check */
.pin { font-size: 46px; font-weight: 800; letter-spacing: .1em; color: var(--deep); margin: 8px 0 16px; font-variant-numeric: tabular-nums; }
.qr { background: #fff; padding: 12px; display: inline-block; border-radius: 12px; border: 1px solid var(--line); }

/* ---------- Help search (same class names as the public help page) */
.kh-label { display: grid; gap: 6px; font-weight: 650; }
.kh-input { max-width: 100% !important; }
.kh-item { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px 18px; margin: 10px 0; }
.kh-title { cursor: pointer; font-weight: 650; }
.kh-code { display: inline-block; padding: 1px 9px; border-radius: 999px; background: var(--mint); color: var(--deep); font-size: 12px; font-weight: 750; }
.kh-steps { margin: 10px 0 4px; padding-left: 22px; } .kh-steps li { margin: 4px 0; }
.kh-support, .kh-none { color: var(--mute); font-size: 13.5px; }

/* ---------- Phones and small screens: the sidebar becomes a top bar with a Menu button */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px 16px; gap: 0; }
  .side .brand { padding: 0; flex: 1; }
  .burger { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 650; font-size: 14px; cursor: pointer; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.1); }
  .side nav, .side .me { display: none; width: 100%; }
  #navtoggle:checked ~ nav, #navtoggle:checked ~ .me { display: grid; }
  .side nav { padding-top: 10px; }
  .topbar { padding: 14px 16px; position: static; }
  .content { padding: 18px 16px 48px; }
  .pin { font-size: 38px; }
}
