/* Nodd studio: shared tokens and primitives. Same light system as the landing page: hairlines, one accent (Nod orange). */
:root{
  --bg:#F7F7F9; --bg-2:#F0F0F4; --surface:#FFFFFF; --raise:#F4F4F7; --raise-2:#EBEBF0; --side:#FAFAFB; --rail:#F3F3F6;
  --line:rgba(11,12,16,.08); --line-2:rgba(11,12,16,.15);
  --text:#0B0C10; --text-2:#4A4D5C; --text-3:#7E8190;
  --nod:#FF6A2E; --nod-2:#F25A1E; --nod-ink:#C2410C; --nod-soft:#FFF1EA;
  --blue:#4F63E6; --blue-soft:#EEF0FF; --ready:#D97706; --ok:#16A34A; --ok-soft:#EAF7EF; --bad:#DC2626;
  --shadow:0 30px 80px -40px rgba(18,20,40,.38); --shadow-sm:0 12px 30px -22px rgba(18,20,40,.45); --ring:0 0 0 1px var(--line),0 1px 2px rgba(11,12,16,.06);
  --f-display:"Bricolage Grotesque","Geist",system-ui,sans-serif;
  --f-ui:"Geist",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --f-mono:"Geist Mono",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  color-scheme:light;
}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;background:var(--bg);color:var(--text);font:400 15px/1.5 var(--f-ui);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
img,video,svg{display:block;max-width:100%}
a{color:inherit}
button,input,textarea,select{font:inherit;color:inherit}
p{margin:0}
[hidden]{display:none!important}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
:focus-visible{outline:2px solid var(--nod);outline-offset:2px;border-radius:8px}
h1,h2,h3{margin:0;font-family:var(--f-display);font-weight:500;letter-spacing:-.035em;line-height:1.05;text-wrap:balance;font-variation-settings:"opsz" 96}
.label{font:500 11px var(--f-mono);letter-spacing:.06em;text-transform:uppercase;color:var(--text-3)}
.muted{color:var(--text-3)}
.small{font-size:12.5px}
.dim{color:var(--text-3)}
.pad{padding:10px 12px}
.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.row.end{justify-content:flex-end}
.row.between{justify-content:space-between}
.grow{flex:1;min-width:0}
.two{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media (max-width:560px){.two{grid-template-columns:1fr}}

/* buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:40px;padding:0 16px;border-radius:12px;border:1px solid transparent;background:transparent;
  font-weight:500;font-size:14.5px;cursor:pointer;white-space:nowrap;text-decoration:none;transition:background .15s,border-color .15s,opacity .15s,transform .1s}
.btn:active:not(:disabled){transform:translateY(1px)}
.btn:disabled{opacity:.45;cursor:default}
.btn.solid{background:var(--text);color:#fff}
.btn.solid:hover:not(:disabled){background:#262833}
.btn.line{background:var(--surface);border-color:var(--line-2)}
.btn.line:hover:not(:disabled){border-color:var(--text-3)}
.btn.nod{background:var(--nod);color:#fff;box-shadow:0 10px 24px -12px color-mix(in srgb,var(--nod) 90%,transparent)}
.btn.nod:hover:not(:disabled){background:var(--nod-2)}
.btn.ghost{color:var(--text-2)}
.btn.ghost:hover:not(:disabled){background:var(--raise)}
.btn.sm{min-height:34px;padding:0 12px;font-size:13.5px;border-radius:10px}
.btn.block{width:100%}
.btn svg{width:17px;height:17px;flex:none}
.btn kbd{font:500 10.5px var(--f-mono);padding:1px 5px;border-radius:5px;background:rgba(255,255,255,.16);margin-left:2px}
.btn.ghost kbd,.btn.line kbd{background:var(--raise)}
.ib{width:36px;height:36px;border-radius:10px;border:0;background:none;display:inline-grid;place-items:center;cursor:pointer;color:var(--text-2);flex:none}
.ib:hover:not(:disabled){background:var(--raise);color:var(--text)}
.ib svg{width:19px;height:19px}
.chip-btn{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 11px;border-radius:999px;border:1px solid var(--line-2);background:var(--surface);font-size:13px;color:var(--text-2);cursor:pointer;white-space:nowrap}
.chip-btn:hover{color:var(--text);border-color:var(--text-3)}
.chip-btn svg{width:15px;height:15px}

/* fields */
.field{display:flex;flex-direction:column;gap:7px;min-width:0}
.fl{font-size:12.5px;color:var(--text-2);font-weight:500;display:flex;align-items:center;gap:8px}
.input,.textarea,select.input{width:100%;border:1px solid var(--line-2);border-radius:12px;background:var(--surface);padding:10px 12px;font-size:15px;outline:none;transition:border-color .15s,box-shadow .15s}
.input:focus,.textarea:focus{border-color:var(--text-3);box-shadow:0 0 0 4px rgba(11,12,16,.05)}
.textarea{resize:vertical;min-height:84px;line-height:1.5}
.input::placeholder,.textarea::placeholder{color:#A3A6B3}
.err{color:var(--bad);font-size:13.5px}
.note{font-size:13px;color:var(--text-3)}

/* marks, pills, avatars */
.mark{display:inline-flex;align-items:center;gap:9px;text-decoration:none;font-family:var(--f-display);font-weight:600;font-size:19px;letter-spacing:-.03em}
.mark svg{width:24px;height:24px}
.pill,.status{display:inline-flex;align-items:center;gap:7px;height:28px;padding:0 11px;border-radius:999px;background:var(--surface);border:1px solid var(--line);font-size:12.5px;color:var(--text-2);white-space:nowrap;flex:none}
.pill i,.status i{width:7px;height:7px;border-radius:50%;background:var(--text-3);flex:none}
[data-s="in_edit"] > i,i.sd[data-s="in_edit"]{background:var(--blue)}
[data-s="ready"] > i,i.sd[data-s="ready"]{background:var(--ready)}
[data-s="notes"] > i,i.sd[data-s="notes"]{background:var(--nod)}
[data-s="approved"] > i,[data-s="delivered"] > i,i.sd[data-s="approved"],i.sd[data-s="delivered"]{background:var(--ok)}
.status select{border:0;background:transparent;font:inherit;color:var(--text);padding:0 2px;cursor:pointer;outline:none}
.av{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:var(--raise-2);font-size:11.5px;font-weight:600;color:var(--text-2);flex:none;overflow:hidden;letter-spacing:.02em}
.av img{width:100%;height:100%;object-fit:cover}
.av.you{background:var(--text);color:#fff}
.av.nodd{background:var(--surface);box-shadow:var(--ring)}
.av.nodd svg{width:60%;height:60%}
.av.crew{background:#E9ECFF;color:#3A4AC2}
.av.client{background:#FFF1EA;color:var(--nod-ink)}
.av.sm{width:28px;height:28px;font-size:11px}
.av.lg{width:44px;height:44px;font-size:14px}
.av.xl{width:64px;height:64px}

/* ---------- auth ---------- */
.auth{min-height:100vh;min-height:100dvh;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.auth-side{background:var(--surface);border-right:1px solid var(--line);padding:40px;display:flex;flex-direction:column;justify-content:space-between;gap:32px;position:relative;overflow:hidden}
.auth-side h1{font-size:clamp(40px,4.4vw,62px);letter-spacing:-.055em;margin-bottom:14px}
.auth-chat{display:flex;flex-direction:column;gap:12px;max-width:440px;padding:22px;border-radius:22px;background:var(--bg);border:1px solid var(--line)}
.auth-chat .msg{display:flex;gap:10px;align-items:flex-end}
.auth-chat .msg.me{justify-content:flex-end}
.auth-chat .b{padding:10px 14px;border-radius:16px;background:var(--surface);border:1px solid var(--line);font-size:14px;max-width:85%}
.auth-chat .msg.me .b{background:var(--text);color:#fff;border-color:var(--text);border-bottom-right-radius:6px}
.mini-take{display:inline-flex;align-items:center;gap:8px;font:500 12px var(--f-mono)}
.mini-take i{width:7px;height:7px;border-radius:50%;background:var(--ready)}
.auth-main{display:grid;place-items:center;padding:40px 16px}
.auth-card{width:min(400px,100%);display:flex;flex-direction:column;gap:16px}
.auth-h{display:flex;flex-direction:column;gap:8px}
.auth-card h2{font-size:32px}
.auth-card .btn.block{min-height:48px}
.google{display:flex;align-items:center;justify-content:center;gap:10px;min-height:48px;border-radius:12px;border:1px solid var(--line-2);background:var(--surface);font-weight:500;cursor:pointer}
.google:hover{border-color:var(--text-3)}
.google svg{width:18px;height:18px}
.or{display:flex;align-items:center;gap:12px;color:var(--text-3);font-size:13px}
.or::before,.or::after{content:"";flex:1;height:1px;background:var(--line)}
.switch{font-size:14px;color:var(--text-2)}
.switch button{border:0;background:none;padding:0;color:var(--text);text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.crewhint{border-top:1px solid var(--line);padding-top:14px;margin-top:4px}
.only-narrow{display:none!important}
@media (max-width:860px){.auth{grid-template-columns:1fr}.auth-side{display:none}.auth-card .only-narrow{display:inline-flex!important}}

/* ---------- modal, toast, loading ---------- */
.modal{position:fixed;inset:0;background:rgba(11,12,16,.32);display:grid;place-items:center;padding:16px;z-index:80;animation:fade .15s ease both}
@keyframes fade{from{opacity:0}}
.sheet{width:min(560px,100%);max-height:calc(100dvh - 32px);overflow-y:auto;background:var(--surface);border-radius:20px;box-shadow:var(--shadow);padding:22px}
.sheet form{display:flex;flex-direction:column;gap:14px}
.sheet .hd{display:flex;align-items:center;justify-content:space-between;gap:12px}
.sheet h2{font-size:26px}
.x{border:0;background:none;color:var(--text-3);cursor:pointer;padding:6px;border-radius:8px;display:grid;place-items:center}
.x svg{width:18px;height:18px}
.x:hover{background:var(--raise)}
.progress{height:4px;border-radius:2px;background:var(--raise-2);overflow:hidden}
.progress i{display:block;height:100%;background:var(--text);width:0}
.toast{position:fixed;left:50%;bottom:28px;transform:translateX(-50%);background:var(--text);color:#fff;padding:11px 16px;border-radius:12px;font-size:14px;box-shadow:var(--shadow);z-index:90;animation:rise .2s ease both;max-width:calc(100vw - 32px)}
.loading{min-height:100dvh;display:grid;place-items:center;color:var(--text-3)}
.spin{display:inline-block;width:22px;height:22px;border-radius:50%;border:2.5px solid var(--line-2);border-top-color:var(--text);animation:spin .8s linear infinite;flex:none}
.spin.sm{width:16px;height:16px;border-width:2px}
@keyframes spin{to{transform:rotate(360deg)}}
@keyframes rise{from{transform:translate(-50%,8px);opacity:0}}

/* tables */
.table-wrap{overflow-x:auto}
table{border-collapse:collapse;width:100%;font-size:14px;background:var(--surface);border:1px solid var(--line);border-radius:16px;overflow:hidden}
th,td{text-align:left;padding:12px 14px;border-bottom:1px solid var(--line);vertical-align:top}
th{font:500 11px var(--f-mono);letter-spacing:.06em;text-transform:uppercase;color:var(--text-3);background:var(--side)}
tr:last-child td{border-bottom:0}
tbody tr[data-email]{cursor:pointer}
tbody tr[data-email]:hover td{background:var(--side)}
td .clip{max-width:440px;white-space:pre-wrap;color:var(--text-2)}
@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
