/* klein studio hub: login, home screen and the app switcher.
   Colours: black, blues and oranges on light grey. */
@font-face { font-family: "Open Sans"; src: url("/assets/fonts/OpenSans-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("/assets/fonts/OpenSans-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --h-black: #14141F; --h-gray: #5C5C66; --h-line: #E2E5EB;
  --h-bg: #F2F3F5; --h-white: #fff;
  --h-blue: #0D4EF0; --h-blue-dark: #0A3ECC; --h-blue-soft: #E7EEFE;
  --h-orange: #FF5A1F; --h-orange-dark: #C2410C; --h-orange-soft: #FFE8DE;
  --h-font: "Open Sans", "Avenir Next", Arial, sans-serif;
}

/* ---------- shared buttons ---------- */
.hub-btn { font: 700 14px/1 var(--h-font); border-radius: 10px; padding: 12px 18px; border: 1px solid var(--h-line); background: var(--h-white); color: var(--h-black); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.hub-btn:hover { border-color: var(--h-black); }
.hub-btn-primary { background: var(--h-blue); border-color: var(--h-blue); color: #fff; }
.hub-btn-primary:hover { background: var(--h-blue-dark); border-color: var(--h-blue-dark); }
.hub-btn:focus-visible, .hub-tile:focus-visible, .hub-switch a:focus-visible, .hub-switch button:focus-visible { outline: 3px solid var(--h-orange); outline-offset: 2px; }

/* ---------- home ---------- */
.home-body { margin: 0; min-height: 100vh; background: var(--h-bg); font-family: var(--h-font); color: var(--h-black); border-top: 6px solid var(--h-blue); }
.home-wrap { max-width: 1040px; margin: 0 auto; padding: 32px 28px 60px; }
.home-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 40px; }
.home-head img { width: 160px; }
.home-head form { margin: 0; }
.home-hello h1 { font-size: 30px; margin: 0 0 6px; }
.home-hello p { color: var(--h-gray); margin: 0 0 28px; }
.home-note { margin-top: 26px; background: var(--h-white); border-left: 4px solid var(--h-orange); border-radius: 10px; padding: 16px 20px; font-size: 14px; line-height: 1.6; }
.home-note h3 { margin: 0 0 6px; font-size: 15px; }
.home-note ol { margin: 6px 0 0; padding-left: 20px; }
.home-settings { margin-top: 26px; background: var(--h-white); border-radius: 12px; padding: 4px 20px; font-size: 14px; }
.home-settings summary { cursor: pointer; font-weight: 700; padding: 14px 0; }
.home-settings form { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 10px; align-items: end; padding-bottom: 18px; }
.home-settings label { font-size: 12.5px; font-weight: 700; display: grid; gap: 5px; }
.home-settings input { font: 14px var(--h-font); padding: 10px 12px; border: 1px solid #D3D7DF; border-radius: 9px; }
.pw-msg { grid-column: 1 / -1; font-size: 13.5px; }
.pw-msg.bad { color: var(--h-orange-dark); } .pw-msg.good { color: var(--h-blue); }
@media (max-width: 760px) {
  .home-settings form { grid-template-columns: 1fr; }
  .home-head img { width: 130px; }
  .home-hello h1 { font-size: 24px; }
}

/* ---------- switcher inside each app's sidebar (both sidebars are dark) ---------- */
.hub-switch { padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.14); font-family: var(--h-font); }
.hub-switch-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.hub-switch-top a, .hub-switch-top button { font: 700 12.5px var(--h-font); color: rgba(255,255,255,.85); text-decoration: none; background: none; border: 0; padding: 4px 2px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.hub-switch-top a:hover, .hub-switch-top button:hover { color: #fff; text-decoration: underline; }
.hub-switch-top form { margin: 0; }
.hub-seg { display: grid; grid-template-columns: 1fr 1fr; background: rgba(255,255,255,.14); border-radius: 10px; padding: 3px; gap: 3px; }
.hub-seg a { text-align: center; font: 700 13px var(--h-font); padding: 8px 6px; border-radius: 8px; text-decoration: none; color: rgba(255,255,255,.9); }
.hub-seg a:hover { background: rgba(255,255,255,.12); color: #fff; }
.hub-seg a.on { background: #fff; color: var(--h-black); }
.hub-seg a.on.c { box-shadow: inset 0 -3px 0 var(--h-blue); }
.hub-seg a.on.j { box-shadow: inset 0 -3px 0 var(--h-orange); }
.hub-fab { display: none; }
@media screen and (max-width: 720px) {
  .hub-fab { display: flex; position: fixed; left: 14px; bottom: 14px; z-index: 300; width: 48px; height: 48px; border-radius: 50%; background: var(--h-black); color: #fff; align-items: center; justify-content: center; box-shadow: 0 4px 16px rgba(20,20,31,.3); text-decoration: none; }
}
@media print { .hub-switch, .hub-fab { display: none !important; } }

/* ---------- bring data across ---------- */
.home-import { margin-top: 26px; background: var(--h-white); border-radius: 12px; padding: 4px 20px; font-size: 14px; border-left: 4px solid var(--h-orange); }
.home-import summary { cursor: pointer; font-weight: 700; padding: 14px 0; }
.imp-body { padding-bottom: 18px; line-height: 1.6; }
.imp-body p { margin: 0 0 8px; }
.imp-body ol { margin: 0 0 16px; padding-left: 20px; }
.imp-body code { background: var(--h-bg); padding: 1px 6px; border-radius: 5px; font-size: 13px; }
.imp-pick { cursor: pointer; }
#imp-list { display: grid; gap: 10px; margin-top: 14px; }
.imp-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 1px solid var(--h-line); border-radius: 10px; }
.imp-row span { color: var(--h-gray); font-size: 13px; }
.imp-row.good { border-color: var(--h-blue); background: var(--h-blue-soft); }
.imp-row.bad { border-color: var(--h-orange); background: var(--h-orange-soft); }
.imp-warn { color: var(--h-orange-dark) !important; font-weight: 700; }
@media (max-width: 760px) { .imp-row { flex-direction: column; align-items: flex-start; } }

/* ---------- home: two choices in each app's own colours ---------- */
.home-head-actions { display: flex; gap: 10px; align-items: center; }
.hub-btn-quiet { border-color: transparent; background: transparent; }
.hub-btn-quiet:hover { border-color: var(--h-line); background: var(--h-white); }
.home-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.choice {
  --c-bg: #14141F; --c-accent: #0D4EF0; --c-accent-ink: #fff; --c-glow: rgba(13,78,240,.3);
  position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: 380px;
  padding: 40px 38px 34px; border-radius: 22px; background: var(--c-bg); color: #fff; text-decoration: none;
  box-shadow: 0 18px 40px -18px rgba(20,20,31,.55); transition: transform .2s ease, box-shadow .2s ease;
}
.choice-jobs { --c-bg: #0D4EF0; --c-accent: #FF5A3C; --c-glow: rgba(255,255,255,.13); }
.choice::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: var(--c-accent); }
.choice::after { content: ""; position: absolute; right: -90px; top: -90px; width: 260px; height: 260px; border-radius: 50%; background: var(--c-glow); transition: transform .35s ease, opacity .35s ease; }
.choice:hover, .choice:focus-visible { transform: translateY(-4px); box-shadow: 0 26px 50px -18px rgba(20,20,31,.6); }
.choice:hover::after, .choice:focus-visible::after { transform: scale(1.3); }
.choice:focus-visible { outline: 4px solid var(--h-orange); outline-offset: 4px; }
.choice-jobs:focus-visible { outline-color: #14141F; }
.choice-mark { position: absolute; right: 26px; bottom: 18px; width: 170px; height: 170px; fill: #fff; opacity: .06; pointer-events: none; }
.choice-icon { position: relative; z-index: 1; width: 64px; height: 64px; border-radius: 18px; background: var(--c-accent); display: flex; align-items: center; justify-content: center; margin-bottom: 30px; }
.choice-icon svg { width: 32px; height: 32px; fill: var(--c-accent-ink); }
.choice-title { position: relative; z-index: 1; font-size: 32px; font-weight: 700; line-height: 1.15; margin-bottom: 12px; }
.choice-text { position: relative; z-index: 1; font-size: 15.5px; line-height: 1.55; color: rgba(255,255,255,.78); max-width: 360px; }
.choice-go { position: relative; z-index: 1; margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 10px;
  background: #fff; color: #14141F; font-weight: 700; font-size: 15px; padding: 13px 22px; border-radius: 999px; box-shadow: inset 0 -3px 0 var(--c-accent); }
.choice-go .arrow { transition: transform .2s ease; color: var(--c-accent); font-size: 18px; line-height: 1; }
.choice-jobs .choice-go .arrow { color: #C2410C; }
.choice:hover .choice-go .arrow { transform: translateX(5px); }
.home-hint { margin-top: 22px; color: var(--h-gray); font-size: 14px; }
.home-hint a { color: var(--h-blue); font-weight: 700; }
.home-import h2, .home-settings h2 { font-size: 16px; margin: 18px 0 10px; }
.home-settings { padding-bottom: 4px; }
@media (max-width: 760px) {
  .home-choices { grid-template-columns: 1fr; gap: 16px; }
  .choice { min-height: 260px; padding: 30px 26px 26px; }
  .choice-title { font-size: 26px; }
  .choice-icon { width: 54px; height: 54px; margin-bottom: 22px; }
  .choice-mark { width: 120px; height: 120px; }
}
@media (prefers-reduced-motion: reduce) { .choice, .choice::after, .choice-go .arrow { transition: none; } }

/* ================= new look (from Michael's mock-ups) ================= */
:root { --n-blue: #173FA8; --n-navy: #022778; --n-bright: #0300F5; --n-coral: #FF4D4E; --n-coral-dark: #E03A3B; }

/* ---------- log in: photo left, blue panel right ---------- */
.login-body { margin: 0; min-height: 100vh; font-family: var(--h-font); background: var(--n-blue); color: #fff; }
.login-split { display: grid; grid-template-columns: 44fr 56fr; min-height: 100vh; }
.login-photo { background-color: #F05144; background-size: cover; background-position: center; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 60px 6vw; box-sizing: border-box; }
.login-inner { width: 100%; max-width: 480px; margin: 0 auto; }
.login-logo { width: 190px; display: block; margin: 0 0 54px; }
.login-hello { margin: 0 0 46px; font-size: 52px; line-height: 1.05; font-weight: 700; }
.login-hello span { display: block; font-size: 38px; font-weight: 400; margin-top: 6px; }
.login-lead { font-size: 26px; margin: 0 0 34px; }
.login-lead.small { font-size: 16px; opacity: .85; margin-top: 18px; }
.login-steps { font-size: 17px; line-height: 1.7; padding-left: 22px; margin: 0 0 8px; }
.login-form { display: grid; }
.line-field { display: block; margin-bottom: 22px; }
.line-field span { display: block; font-size: 21px; margin-bottom: 6px; }
.line-field input { width: 100%; box-sizing: border-box; background: transparent; border: 0; border-bottom: 1.5px solid rgba(255,255,255,.35); color: #fff; font: 20px var(--h-font); padding: 10px 0 12px; border-radius: 0; }
.line-field input:focus { outline: none; border-bottom-color: #fff; box-shadow: 0 2px 0 0 #fff; }
.line-field input:-webkit-autofill { -webkit-text-fill-color: #fff; -webkit-box-shadow: 0 0 0 1000px var(--n-blue) inset; caret-color: #fff; }
.login-forgot { justify-self: end; color: #fff; font-size: 16px; text-decoration: none; margin: -6px 0 30px; opacity: .9; }
.login-forgot:hover { text-decoration: underline; opacity: 1; }
.login-btn { justify-self: center; display: inline-block; background: var(--n-coral); color: #fff; border: 0; font: 400 28px var(--h-font); padding: 10px 38px 11px; border-radius: 0 24px 0 0; cursor: pointer; text-decoration: none; margin-top: 8px; transition: background .15s, transform .15s; }
.login-btn:hover { background: var(--n-coral-dark); transform: translateY(-1px); }
.login-btn:focus-visible, .login-forgot:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.login-error { background: rgba(255,77,78,.16); border-left: 4px solid var(--n-coral); padding: 10px 14px; margin: -14px 0 26px; font-size: 16px; }
@media (max-width: 900px) {
  .login-split { grid-template-columns: 1fr; grid-template-rows: 34vh auto; }
  .login-panel { padding: 36px 26px 48px; }
  .login-logo { width: 150px; margin-bottom: 30px; }
  .login-hello { font-size: 38px; margin-bottom: 28px; } .login-hello span { font-size: 26px; }
  .login-lead { font-size: 20px; margin-bottom: 24px; }
  .line-field span { font-size: 17px; } .line-field input { font-size: 17px; }
  .login-btn { font-size: 22px; }
}

/* ---------- navigation (home) ---------- */
.nav-body { margin: 0; min-height: 100vh; background: var(--n-blue); color: #fff; font-family: var(--h-font); }
.nav-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 44px 5vw 0; }
.nav-logo { width: 200px; }
.nav-actions { display: flex; gap: 6px; align-items: center; }
.nav-actions form { margin: 0; }
.nav-link { background: none; border: 1px solid transparent; color: rgba(255,255,255,.88); font: 700 14px var(--h-font); padding: 9px 14px; border-radius: 999px; cursor: pointer; text-decoration: none; }
.nav-link:hover { border-color: rgba(255,255,255,.45); color: #fff; }
.nav-link[aria-pressed="true"] { background: #fff; color: var(--n-blue); }
.nav-link:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.nav-main { max-width: 900px; margin: 0 auto; padding: 0 24px 70px; text-align: center; }
.nav-hello { margin: 4px 0 64px; font-weight: 400; }
.nav-hello b { display: block; font-size: 54px; line-height: 1.1; }
.nav-hello span { display: block; font-size: 38px; margin-top: 12px; }
.nav-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 344px)); justify-content: center; gap: 40px; }
.card { position: relative; background: #fff; color: #14141F; border-radius: 26px; padding: 44px 32px 24px; min-height: 490px; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; cursor: pointer;
  box-shadow: 0 24px 50px -24px rgba(2,15,60,.55); transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-6px); box-shadow: 0 34px 60px -24px rgba(2,15,60,.7); }
.card-icon { height: 110px; display: flex; align-items: center; justify-content: center; color: var(--n-bright); margin-bottom: 40px; }
.card-icon-svg { width: 96px; height: 96px; }
.card-icon-img { max-width: 120px; max-height: 110px; object-fit: contain; }
.card-title { color: var(--n-bright); font-size: 29px; line-height: 1.2; margin: 0 0 24px; min-height: 70px; display: flex; align-items: flex-start; justify-content: center; text-align: center; }
.card-text { font-size: 18px; line-height: 1.3; margin: 0 0 18px; }
.card-go { margin-top: auto; width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff;
  background: #14141F; box-shadow: 4px 6px 12px rgba(0,0,0,.25); transition: transform .2s ease; }
.card-jobs .card-go { background: var(--n-bright); }
.card-go svg { width: 30px; height: 30px; }
.card:hover .card-go { transform: translateX(6px); }
.card-go:focus-visible { outline: 3px solid var(--n-coral); outline-offset: 4px; }
.card-change { display: none; position: absolute; top: 18px; right: 18px; background: var(--n-coral); color: #fff; border: 0; border-radius: 999px; font: 700 13px var(--h-font); padding: 8px 14px; cursor: pointer; }
.editing .card { cursor: default; outline: 3px dashed rgba(255,255,255,.7); outline-offset: 8px; }
.editing .card:hover { transform: none; }
.editing .card-change { display: block; }
.editing .card-icon { outline: 2px dashed var(--n-coral); outline-offset: 10px; border-radius: 12px; }
.edit-note { margin: -36px auto 36px; max-width: 620px; font-size: 15px; background: rgba(255,255,255,.12); border-radius: 12px; padding: 12px 16px; }
.edit-note a, .nav-hint a { color: #fff; }
.nav-hint { margin-top: 40px; font-size: 15px; opacity: .9; }
@media (max-width: 1240px) { .nav-hello { margin-top: 36px; } }
@media (max-width: 900px) {
  .nav-head { padding: 24px 20px 0; flex-wrap: wrap; gap: 10px; } .nav-logo { width: 140px; }
  .nav-hello { margin: 26px 0 36px; } .nav-hello b { font-size: 34px; } .nav-hello span { font-size: 22px; }
  .nav-cards { grid-template-columns: 1fr; gap: 24px; }
  .card { min-height: 0; padding: 36px 26px 26px; border-radius: 24px; }
  .card-icon { height: 90px; margin-bottom: 26px; } .card-icon-svg { width: 80px; height: 80px; }
  .card-title { font-size: 26px; min-height: 0; margin-bottom: 16px; }
  .card-text { font-size: 17px; margin-bottom: 14px; }
  .card-go { margin-top: 14px; }
}
@media (prefers-reduced-motion: reduce) { .card, .card-go, .login-btn { transition: none; } }

/* ---------- icon picker ---------- */
.look-modal { position: fixed; inset: 0; background: rgba(5,12,40,.55); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 1000; font-family: var(--h-font); }
.look-dialog { background: #fff; color: #14141F; border-radius: 20px; width: 100%; max-width: 640px; max-height: 90vh; overflow: auto; padding: 22px 24px; box-shadow: 0 30px 80px rgba(0,0,0,.35); text-align: left; }
.look-dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.look-dialog-head h3 { margin: 0; font-size: 19px; }
.look-x { background: none; border: 0; font-size: 28px; line-height: 1; cursor: pointer; color: var(--h-gray); }
.look-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.look-icon { display: flex; flex-direction: column; align-items: center; gap: 6px; background: #F2F3F5; border: 2px solid transparent; border-radius: 14px; padding: 14px 6px 10px; cursor: pointer; color: var(--n-bright); font: 12.5px var(--h-font); }
.look-icon span { color: #14141F; }
.look-icon .card-icon-svg { width: 46px; height: 46px; }
.look-icon:hover, .look-icon:focus-visible { border-color: var(--n-bright); outline: none; }
.look-icon.on { border-color: var(--n-coral); background: #FFF0EE; }
.look-dialog-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }
.look-msg { font-size: 14px; color: var(--h-orange-dark); }

/* ---------- settings: look section ---------- */
.look-box { margin-top: 26px; background: var(--h-white); border-radius: 12px; padding: 4px 20px 20px; font-size: 14px; }
.look-box h2 { font-size: 16px; margin: 18px 0 14px; }
.look-box h3 { margin: 0 0 6px; font-size: 15px; }
.look-box p { margin: 0 0 12px; line-height: 1.55; color: var(--h-gray); }
.look-row { display: grid; grid-template-columns: 150px 1fr; gap: 20px; align-items: start; }
.look-photo { width: 150px; height: 190px; border-radius: 10px; background: #F05144 center / cover no-repeat; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.look-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.look-actions label { cursor: pointer; }
.look-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.look-card { display: flex; gap: 16px; align-items: center; border: 1px solid var(--h-line); border-radius: 12px; padding: 14px; }
.look-card b { display: inline-block; margin-bottom: 8px; }
.look-card-icon { width: 76px; height: 76px; border-radius: 14px; background: #F2F3F5; display: flex; align-items: center; justify-content: center; color: var(--n-bright); flex-shrink: 0; }
.look-card-icon .card-icon-svg { width: 50px; height: 50px; }
.look-card-icon .card-icon-img { max-width: 60px; max-height: 60px; }
.look-who { margin-top: 16px !important; }
@media (max-width: 760px) { .look-row, .look-cards { grid-template-columns: 1fr; } }

/* ---------- save status (server storage) ---------- */
.store-pill { position: fixed; right: 16px; bottom: 16px; z-index: 900; background: #14141F; color: #fff; font: 700 12.5px var(--h-font); padding: 8px 14px; border-radius: 999px; box-shadow: 0 6px 18px rgba(0,0,0,.25); transition: opacity .4s; }
.store-pill.ok { opacity: .75; }
.store-pill.busy { background: #173FA8; }
.store-pill.bad { background: #FF4D4E; max-width: min(520px, calc(100vw - 32px)); border-radius: 12px; }
.store-pill button, .store-pill a { margin-left: 6px; background: #fff; color: #14141F; border: 0; border-radius: 999px; padding: 4px 10px; font: 700 12px var(--h-font); cursor: pointer; text-decoration: none; }
@media print { .store-pill { display: none !important; } }
.bk-note { color: var(--h-gray); margin: 0 0 12px; line-height: 1.55; }
.bk-list { display: grid; gap: 12px; padding-bottom: 18px; }
.bk-app span { color: var(--h-gray); }
.bk-days { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bk-days .hub-btn { padding: 7px 12px; font-size: 13px; }
.bk-none { font-size: 13px; }
