:root {
  color-scheme: light;
  --background: #f4f6f8;
  --paper: #fff;
  --ink: #14232f;
  --muted: #526577;
  --line: #dce4eb;
  --night: #162633;
  --night-light: #233747;
  --accent: #125f66;
  --accent-dark: #0a4e54;
  --tint: #e5f3ef;
  --warm: #7a4d16;
  --danger: #8c2c29;
  --radius: 14px;
  --shadow: 0 1px 3px #18334d0e, 0 3px 11px #18334d06;
  font: 15px/1.55 "Segoe UI", Inter, system-ui, sans-serif;
  background: var(--background);
  color: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.guest-main { width: min(100%, 840px); margin-inline: auto; padding: clamp(16px, 4vw, 40px); }
.guest-main section, .guest-notice { margin-block-end: 16px; }
.guest-photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(145px, 100%), 1fr)); gap: 10px; }
.guest-meta { display: grid; gap: 6px; }
.guest-notice { padding: 12px 16px; border-radius: 8px; background: #fff3dc; color: #73461e; }
.guest-photo { display: grid; gap: 12px; }
button, input, textarea, select { color: inherit; font: inherit; }
button, summary, a { touch-action: manipulation; }
button, summary { cursor: pointer; }
button:disabled { cursor: wait; opacity: .62; }
.check-field { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; cursor: pointer; }
.check-field input { width: 18px; height: 18px; accent-color: var(--accent); }
:focus-visible { outline: 2px solid #2a8c92; outline-offset: 3px; }
:where(h1, h2, h3, p) { margin: 0; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.85rem, 4vw, 2.65rem); letter-spacing: -.045em; line-height: 1.12; font-weight: 670; }
h2 { font-size: 1.2rem; line-height: 1.28; letter-spacing: -.015em; }
h3 { font-size: 1rem; line-height: 1.38; }
a { color: var(--accent); text-underline-offset: .19em; }
small { font-size: .81rem; }
.muted { color: var(--muted); }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; white-space: nowrap; clip-path: inset(50%); }
.skip:focus { position: fixed; z-index: 20; background: var(--paper); padding: .65rem; }
.masthead {
  min-height: 69px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px clamp(16px, 3vw, 39px);
  color: #f2f7f8;
  background: var(--night);
  border-bottom: 1px solid #334755;
}
.brand { color: inherit; display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-text { display: flex; align-items: baseline; gap: 10px; }
.brand-text strong { font-size: 1.05rem; font-weight: 760; letter-spacing: .17em; }
.brand-text small { color: #c2d4da; letter-spacing: .02em; }
.radar-mark {
  position: relative;
  width: 32px; height: 32px; flex: 0 0 32px;
  border: 1px solid #8fd2c3; border-radius: 50%;
  display: grid; place-content: center;
  background: conic-gradient(from 8deg, #8fd2c336 38deg, transparent 88deg);
}
.radar-mark::before { content: ""; width: 19px; height: 19px; border: 1px solid #8fd2c3ad; border-radius: 50%; }
.radar-mark::after { content: ""; position: absolute; left: 14px; top: 14px; width: 3px; height: 3px; border-radius: 50%; background: #d0fbeb; box-shadow: 7px -6px #b0eadb; }
.masthead-actions, .actions, .row-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.masthead-actions { justify-content: flex-end; }
.status-pill { color: #e8f8f3; border: 1px solid #52706f; background: #29433f; border-radius: 999px; padding: 3px 10px; font-size: .79rem; font-weight: 600; }
.network-pill { color: #ffe5bb; background: #4c3925; border-color: #785b3d; }
.language select { min-height: 34px; padding: 2px 7px; background: var(--night-light); color: #f2f7f8; border: 1px solid #496170; border-radius: 7px; font-size: .82rem; }
.app-shell { min-height: calc(100dvh - 69px); display: grid; grid-template-columns: minmax(0, 1fr); }
.app-shell.signed-in { grid-template-columns: minmax(210px, 245px) minmax(0, 1fr); }
.sidebar { display: flex; flex-direction: column; justify-content: space-between; gap: 26px; padding: 25px 14px 18px; border-right: 1px solid var(--line); background: #edf2f5; }
.sidebar nav { display: grid; align-content: start; gap: 20px; }
.nav-group { display: grid; gap: 5px; }
.nav-label { padding: 0 9px 2px; color: var(--muted); font-size: .76rem; font-weight: 720; letter-spacing: .065em; text-transform: uppercase; }
.nav-button {
  width: 100%; min-height: 38px; display: flex; align-items: center; gap: 9px;
  padding: 7px 9px; text-align: left; background: transparent; border: 1px solid transparent;
  border-radius: 8px; color: var(--ink); font-size: .9rem; overflow-wrap: anywhere;
}
.nav-button:hover { background: #e3ebef; }
.nav-button[aria-current="page"] { color: var(--accent-dark); background: #dceeea; border-color: #c4ded8; font-weight: 700; }
.nav-button[data-subfolder] { padding-inline-start: 24px; }
.nav-button span:last-child { min-width: 0; }
.folder-icon { display: inline-block; flex: 0 0 auto; position: relative; width: 15px; height: 11px; border: 1.5px solid currentColor; border-radius: 2px; color: #8b612d; }
.folder-icon::before { position: absolute; left: 0; top: -4px; width: 6px; height: 3px; border: 1.5px solid currentColor; border-bottom: 0; border-radius: 2px 2px 0 0; content: ""; }
.identity { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px; align-items: center; border-top: 1px solid #d1dde5; padding: 14px 2px 0; }
.identity strong, .identity small { display: block; overflow-wrap: anywhere; }
.avatar { min-width: 34px; min-height: 34px; display: inline-grid; place-content: center; border-radius: 50%; background: #d8e9ec; color: #23545d; font-size: .78rem; font-weight: 720; }
#main { padding: clamp(18px, 3.8vw, 46px) clamp(16px, 4.5vw, 62px) 52px; width: 100%; max-width: 1510px; min-width: 0; margin: 0 auto; }
.app-shell:not(.signed-in) #main { max-width: 1040px; align-self: center; }
.breadcrumb { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 15px; color: var(--muted); font-size: .82rem; }
.breadcrumb :last-child { color: var(--ink); }
.breadcrumb button { padding: 0; border: 0; color: var(--accent); background: transparent; text-decoration: underline; text-underline-offset: .18em; }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; margin-bottom: 24px; }
.hero p { margin-top: 8px; color: var(--muted); max-width: 56ch; }
.hero .eyebrow, .eyebrow { color: var(--accent); font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 750; margin: 0 0 6px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 7px 13px; border: 1px solid #c7d5df; border-radius: 8px;
  color: var(--ink); text-decoration: none; background: var(--paper); font-weight: 620; font-size: .88rem;
}
.button:hover { border-color: #9eb3c1; background: #f1f6f7; }
.button.primary { color: #fff; background: var(--accent); border-color: var(--accent); }
.button.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.button.top-button { min-height: 34px; color: #f2f7f8; background: var(--night-light); border-color: #496170; }
.button.top-button:hover { background: #354f62; }
.button.danger { color: var(--danger); border-color: #e9c6c5; }
.button.danger:hover { background: #fff1f0; }
.button.small { min-height: 33px; padding: 5px 9px; font-size: .81rem; }
.icon-button { min-width: 36px; font-size: 1.1rem; }
.section-title, .card-title, .row, .dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.section-title { margin-bottom: 12px; }
.section-title p { color: var(--muted); margin-top: 4px; }
.panel, .card, .empty {
  min-width: 0; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); box-shadow: var(--shadow);
}
.panel, .empty { padding: clamp(15px, 2.8vw, 25px); }
.empty { color: var(--muted); }
.empty h3 { color: var(--ink); }
.empty h3 + p, .empty .actions { margin-top: 8px; }
section + section, .panel + .panel { margin-top: 22px; }
.folder-cards, .panel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.panel-grid > .panel { margin: 0; }
.card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 17px;
  text-align: left; color: var(--ink); text-decoration: none;
}
button.card { font: inherit; }
button.card:hover { border-color: #79aaa4; background: #fcfffe; }
.card .card-title { width: 100%; }
.card p, .card small { color: var(--muted); }
.card .folder-icon { margin: 4px 0 2px; }
.card small { margin-top: auto; }
.rows { list-style: none; padding: 0; margin: 0; }
.rows > li + li { border-top: 1px solid var(--line); }
.row { padding: 11px 0; align-items: flex-start; }
.row > div:first-child { min-width: 0; }
.row p { color: var(--muted); font-size: .86rem; margin-top: 2px; }
.row-actions { justify-content: flex-end; }
.chip { display: inline-flex; align-items: center; flex: none; padding: 2px 8px; border-radius: 999px; color: #0c4d53; background: #e3f0ec; font-size: .77rem; font-weight: 680; white-space: nowrap; }
.chip.private { color: #51358a; background: #eee7fc; }
.chip.waiting { color: #714a1b; background: #faecd6; }
.chip.revoked { color: #7d3733; background: #f6e4e3; }
.form { display: grid; gap: 13px; }
.form .actions { margin-top: 2px; }
.field { display: grid; gap: 5px; font-size: .86rem; font-weight: 620; }
.field input, .field select, .field textarea { width: 100%; min-width: 0; min-height: 42px; padding: 7px 10px; color: var(--ink); background: var(--paper); border: 1px solid #bfcfdb; border-radius: 8px; font-size: 1rem; font-weight: 400; }
.field textarea { min-height: 90px; resize: vertical; }
.field .hint { color: var(--muted); font-weight: 400; }
.compact-form { margin-top: 14px; }
.form-error { font-size: .9rem; color: var(--danger); }
.notice { margin-bottom: 16px; padding: 10px 12px; border: 1px solid #bfded5; border-radius: 9px; background: #ebf6f2; color: #1a504d; font-size: .89rem; }
.notice.error { background: #fff0ef; border-color: #efd0ce; color: var(--danger); }
.notice.info { color: #3a5570; background: #eaf2f9; border-color: #cadbea; }
.signin {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(25px, 5vw, 65px); align-items: center;
}
.signin-copy { padding: 5px 0; }
.signin-copy h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); letter-spacing: -.065em; }
.signin-copy > p:not(.eyebrow) { max-width: 32ch; margin-top: 14px; color: var(--muted); font-size: 1.04rem; }
.signin-actions { display: grid; gap: 12px; margin-top: 14px; }
.role-button { min-height: 58px; justify-content: flex-start; padding: 9px 14px; text-align: left; }
.signin .panel + .panel { margin-top: 12px; }
.signin .panel p { margin-top: 5px; }
.dialog-head { margin-bottom: 16px; }
dialog {
  width: min(550px, calc(100vw - 28px)); max-height: calc(100dvh - 34px);
  padding: 20px; border: 1px solid var(--line); border-radius: 15px;
  color: var(--ink); background: var(--paper); box-shadow: 0 16px 50px #08172230;
}
dialog::backdrop { background: #16263380; }
.photo-preview { display: block; width: 100%; max-height: 60dvh; object-fit: contain; margin-bottom: 14px; border-radius: 8px; background: #e7eef2; }
.photo-thumb { width: 52px; height: 43px; object-fit: cover; border-radius: 6px; background: #e7eef2; }
.profile-id { display: block; overflow-wrap: anywhere; font-size: .85rem; color: var(--muted); }
.job-panels { align-items: start; }
.terminal { --accent: #57438f; --accent-dark: #473575; --tint: #ede8f6; }
.terminal .hero .eyebrow { color: var(--accent); }
.upload-sample { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.upload-sample small { color: var(--muted); }
@media (max-width: 950px) {
  .app-shell.signed-in { grid-template-columns: minmax(178px, 195px) minmax(0, 1fr); }
  .panel-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .app-shell.signed-in { grid-template-columns: minmax(0, 1fr); }
  .sidebar { padding: 8px 13px; border: 0; border-bottom: 1px solid var(--line); }
  .sidebar nav { display: flex; flex-wrap: wrap; gap: 5px 12px; }
  .nav-group { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
  .nav-label, .identity { display: none; }
  .nav-button { width: auto; padding: 6px 8px; }
  .nav-button[data-subfolder] { padding-inline-start: 8px; }
  .masthead { min-height: 62px; }
  .hero { align-items: flex-start; flex-wrap: wrap; }
  .signin { grid-template-columns: 1fr; }
}
@media (max-width: 475px) {
  .brand-text { display: grid; gap: 0; line-height: 1.18; }
  .brand-text small { font-size: .72rem; }
  .masthead-actions { gap: 5px; }
  .status-pill { padding: 2px 7px; }
  .folder-cards { grid-template-columns: 1fr; }
  .row { flex-wrap: wrap; }
  .row-actions { justify-content: flex-start; }
}
@media (pointer: coarse) {
  .button, .button.small, .nav-button, .language select { min-height: 44px; }
}

.job-note { white-space: pre-wrap; overflow-wrap: anywhere; }
.job-note + .panel-grid { margin-top: 17px; }
.source-data { max-width: 100%; overflow-x: auto; padding: 10px; border-radius: 7px; background: #edf2f5; font-size: .81rem; }
@media (max-width: 475px) { #demo-shortcut { order: 1; flex-basis: auto; } }
.form fieldset {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  padding: 0.85rem;
}

.form fieldset > .field + .field {
  margin-top: 0.65rem;
}

.finance-line {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr));
  gap: 0.65rem;
  align-items: end;
  margin-bottom: 0.9rem;
}

.finance-line > :first-child {
  grid-column: 1 / -1;
}

.finance-line:only-child [data-action="finance-line-remove"] {
  display: none;
}
