:root {
  color-scheme: light;
  --ink: #202a30;
  --ink-soft: #344148;
  --paper: #f5f6f2;
  --white: #fff;
  --red: #bd333e;
  --red-dark: #992b34;
  --muted: #59676e;
  --line: #e2e7e2;
  --green: #20754e;
  --amber: #8a5a0a;
  --shadow: 0 18px 48px rgba(24, 36, 40, .08);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
.icon { display: inline-block; flex: 0 0 auto; width: 1em; height: 1em; background-color: currentColor; -webkit-mask: var(--icon-image) center / contain no-repeat; mask: var(--icon-image) center / contain no-repeat; }
.icon--arrow { --icon-image: url("assets/icons/arrow.png"); }
.icon--auto { --icon-image: url("assets/icons/auto.png"); }
.icon--check { --icon-image: url("assets/icons/check.png"); }
.icon--custom-solution { --icon-image: url("assets/icons/custom-solution.png"); }
.icon--document { --icon-image: url("assets/icons/document.png"); }
.icon--menu { --icon-image: url("assets/icons/menu.png"); }
.icon--nfc-phone { --icon-image: url("assets/icons/nfc-phone.png"); }
.icon--nfc-symbol { --icon-image: url("assets/icons/nfc-symbol.png"); }
.icon--nfc-waves { --icon-image: url("assets/icons/nfc-waves.png"); }
.icon--paw { --icon-image: url("assets/icons/paw.png"); }
.icon--profile-nfc { --icon-image: url("assets/icons/profile-nfc.png"); }
html { scroll-behavior: smooth; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: radial-gradient(ellipse at 78% 17%, rgba(184,225,207,.2), transparent 28%), radial-gradient(ellipse at 9% 85%, rgba(198,56,66,.055), transparent 29%), var(--paper); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
[hidden] { display: none !important; }
.app-header { display: flex; min-height: 70px; align-items: center; justify-content: space-between; gap: 20px; padding: 12px max(24px, calc((100vw - 1160px) / 2)); background: var(--ink); color: #fff; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; font-size: 17px; font-weight: 850; letter-spacing: -.045em; text-decoration: none; }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: var(--red); color: #fff; }
.brand-mark .icon { width: 19px; height: 19px; }
.header-note { color: rgba(255,255,255,.77); font-size: 12px; font-weight: 650; }
.app-main { width: min(1160px, calc(100% - 40px)); margin: 45px auto 72px; }
.eyebrow { color: var(--red-dark); font-size: 10px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { letter-spacing: -.045em; }
h1 { margin-bottom: 8px; font-size: clamp(30px, 4vw, 43px); line-height: 1.05; }
h2 { margin-bottom: 7px; font-size: clamp(22px, 2.8vw, 29px); }
h3 { margin-bottom: 7px; font-size: 18px; letter-spacing: -.025em; }
.intro-copy { max-width: 680px; margin-bottom: 26px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.setup-alert, .notice, .status { padding: 14px 16px; border-radius: 11px; font-size: 13px; line-height: 1.6; }
.setup-alert { margin: 20px 0; border: 1px solid #eacb88; background: #fff8e9; color: #69470d; }
.notice { border: 1px solid #ebd9b5; background: #fff9ef; color: #634815; }
.status { margin: 14px 0 0; border: 1px solid #d3e8dc; background: #eff8f2; color: #245d40; }
.status.error { border-color: #edcaca; background: #fff1f1; color: #8a2630; }
.muted { color: var(--muted); }
.small { font-size: 12px; line-height: 1.6; }
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 9px; padding: 0 18px; border: 1px solid transparent; border-radius: 10px; background: var(--red); color: #fff; font-size: 14px; font-weight: 780; text-decoration: none; cursor: pointer; transition: background .18s ease, transform .18s ease; }
.button:hover { background: var(--red-dark); transform: translateY(-1px); }
.button:disabled { opacity: .55; cursor: wait; transform: none; }
.button.secondary { border-color: #ccd5d0; background: #fff; color: var(--ink); }
.button.secondary:hover { background: #f2f5f1; }
.button.quiet { min-height: 44px; padding-inline: 12px; border-color: #d8dfda; background: transparent; color: var(--ink); font-size: 13px; }
.button.danger { border-color: #e9c3c6; background: #fff; color: #982d36; }
.button.danger:hover { background: #fff1f1; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #992b34; outline-offset: 3px; }
.app-header :focus-visible, .dashboard-heading :focus-visible, .auth-story :focus-visible { outline-color: #ffd4d7; }
.auth-card { width: min(480px, 100%); margin: 8vh auto 0; padding: 32px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); box-shadow: var(--shadow); }
.auth-card .intro-copy { margin-bottom: 22px; font-size: 13px; }
.auth-fields { min-width: 0; margin: 0; padding: 0; border: 0; }
.auth-fields:disabled { opacity: .66; }
.mfa-qr-wrap { display: grid; width: min(240px, 100%); min-height: 220px; margin: 18px auto; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.mfa-qr-wrap img { width: 210px; height: 210px; }
.mfa-secret { display: block; overflow-wrap: anywhere; margin: 10px 0 20px; padding: 12px; border-radius: 8px; background: #f1f4f0; color: var(--ink); font-size: 13px; user-select: all; }
.form-stack { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field label { color: #39474d; font-size: 12px; font-weight: 760; }
.field input, .field select, .field textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #cdd6d1; border-radius: 9px; background: #fff; color: var(--ink); font-size: 16px; }
.field textarea { min-height: 86px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #66747a; opacity: 1; }
.field-hint { color: #59676e; font-size: 12px; line-height: 1.5; }
.app-header { position: relative; z-index: 2; min-height: 78px; padding-inline: max(28px, calc((100vw - 1220px) / 2)); background: linear-gradient(105deg, #172126, #24343a); box-shadow: 0 7px 24px rgba(22,33,38,.14); }
.brand { font-size: 16px; letter-spacing: .02em; }
.brand-mark { width: 39px; height: 39px; border-radius: 12px; box-shadow: 0 6px 14px rgba(198,56,66,.25); }
.brand-mark .icon { width: 21px; height: 21px; }
.header-actions { display: flex; align-items: center; gap: 18px; }
.header-secure { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 999px; background: rgba(255,255,255,.05); color: rgba(255,255,255,.78); font-size: 12px; font-weight: 700; }
.header-secure-dot, .auth-card-access-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #90d4b5; box-shadow: 0 0 0 4px rgba(144,212,181,.12); }
.header-back { display: inline-flex; min-height: 40px; align-items: center; gap: 8px; padding: 0 13px; border-radius: 10px; color: #fff; font-size: 12px; font-weight: 750; text-decoration: none; transition: background .18s ease; }
.header-back:hover { background: rgba(255,255,255,.09); }
.header-back .icon { width: 14px; height: 14px; }
.app-main--admin { width: min(1220px, calc(100% - 48px)); margin: 44px auto 72px; }
.auth-layout { display: grid; width: min(1120px, 100%); min-height: 600px; grid-template-columns: minmax(0, 1.16fr) minmax(390px, .84fr); align-items: stretch; gap: 18px; margin: 0 auto; }
.auth-story { position: relative; isolation: isolate; display: flex; min-width: 0; flex-direction: column; overflow: hidden; padding: clamp(30px, 4vw, 48px); border: 1px solid rgba(255,255,255,.11); border-radius: 25px; background: radial-gradient(ellipse at 77% 28%, rgba(184,225,207,.13), transparent 35%), linear-gradient(145deg, #26363c 0%, #1b272c 65%, #172126 100%); color: #fff; box-shadow: 0 24px 65px rgba(27,39,43,.17); }
.auth-story::before { position: absolute; z-index: -1; top: -120px; right: -110px; width: 380px; height: 380px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; content: ""; box-shadow: 0 0 0 38px rgba(255,255,255,.018), 0 0 0 78px rgba(255,255,255,.013), 0 0 0 120px rgba(255,255,255,.009); }
.auth-story-top { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.77); font-size: 11px; font-weight: 850; letter-spacing: .1em; }
.auth-story-mark { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid rgba(255,255,255,.15); border-radius: 11px; background: rgba(198,56,66,.19); color: #ff9298; }
.auth-story-mark .icon { width: 20px; height: 20px; }
.auth-story-top i { color: #ff858c; font-style: normal; }
.auth-story-version { margin-left: auto; color: rgba(255,255,255,.48); font-size: 9px; letter-spacing: .13em; }
.auth-story-copy { max-width: 560px; margin: auto 0 30px; padding-top: 55px; }
.auth-story-eyebrow { color: #ff959b; font-size: 10px; font-weight: 850; letter-spacing: .17em; text-transform: uppercase; }
.auth-story-copy h2 { max-width: 520px; margin: 13px 0 14px; color: #fff; font-size: clamp(36px, 4.15vw, 56px); line-height: 1.02; letter-spacing: -.065em; }
.auth-story-copy h2 span { color: #a9dcc4; }
.auth-story-copy p { max-width: 430px; margin: 0; color: rgba(255,255,255,.71); font-size: 14px; line-height: 1.75; }
.auth-feature-list { display: grid; gap: 9px; }
.auth-feature { display: grid; grid-template-columns: 40px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid rgba(255,255,255,.09); border-radius: 13px; background: rgba(255,255,255,.045); }
.auth-feature-icon { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid rgba(255,133,140,.14); border-radius: 11px; background: rgba(198,56,66,.13); color: #ff9298; }
.auth-feature-icon .icon { width: 20px; height: 20px; }
.auth-feature strong, .auth-feature small, .auth-story-footer strong, .auth-story-footer small { display: block; }
.auth-feature strong { color: #fff; font-size: 14px; font-weight: 780; }
.auth-feature small { margin-top: 3px; color: rgba(255,255,255,.72); font-size: 13px; line-height: 1.45; }
.auth-feature-index { color: rgba(255,255,255,.36); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.auth-story-footer { position: relative; display: flex; align-items: center; gap: 11px; margin-top: 23px; padding-top: 19px; border-top: 1px solid rgba(255,255,255,.1); }
.auth-story-check { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 10px; background: rgba(169,220,196,.13); color: #a9dcc4; }
.auth-story-check .icon { width: 16px; height: 16px; }
.auth-story-footer strong { color: rgba(255,255,255,.9); font-size: 13px; }
.auth-story-footer small { margin-top: 3px; color: rgba(255,255,255,.72); font-size: 12px; }
.auth-story-footer-orbit { width: 48px; height: 48px; margin-left: auto; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; box-shadow: 0 0 0 8px rgba(255,255,255,.025), 0 0 0 16px rgba(255,255,255,.018); }
.auth-card { position: relative; display: flex; width: 100%; min-width: 0; flex-direction: column; justify-content: center; margin: 0; padding: clamp(28px, 3.3vw, 43px); border: 1px solid rgba(32,42,48,.08); border-radius: 25px; background: rgba(255,255,255,.94); box-shadow: 0 24px 65px rgba(30,43,47,.09); }
.auth-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 28px; }
.auth-card-mark { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 13px; background: #fff0f0; color: var(--red); }
.auth-card-mark .icon { width: 23px; height: 23px; }
.auth-card-access { display: inline-flex; align-items: center; gap: 8px; color: #59666a; font-size: 12px; font-weight: 760; }
.auth-card-access-dot { width: 6px; height: 6px; background: #bd333e; box-shadow: 0 0 0 4px rgba(189,51,62,.09); }
.auth-card .eyebrow { display: block; margin-bottom: 11px; color: var(--red-dark); }
.auth-card h1 { margin: 0 0 10px; font-size: clamp(30px, 3.1vw, 38px); letter-spacing: -.06em; }
.auth-card .intro-copy { margin-bottom: 22px; color: #68757a; font-size: 14px; line-height: 1.7; }
.auth-card .setup-alert { position: relative; margin: 0 0 15px; padding: 13px 14px 13px 40px; border: 1px solid #ecd19a; border-radius: 12px; background: #fff8e9; color: #765318; font-size: 12px; line-height: 1.55; }
.auth-card .setup-alert::before { position: absolute; top: 13px; left: 13px; display: grid; width: 18px; height: 18px; place-items: center; border-radius: 50%; background: #f3dfb8; color: #765318; content: "!"; font-size: 11px; font-weight: 900; }
.login-unavailable { display: flex; align-items: center; gap: 11px; margin: 0 0 18px; padding: 13px; border: 1px solid #e9e5d8; border-radius: 12px; background: #fbfaf5; }
.login-unavailable-mark { display: grid; width: 28px; height: 28px; flex: 0 0 auto; place-items: center; border-radius: 9px; background: #f4e8ca; color: #835f1f; font-size: 13px; font-weight: 900; }
.login-unavailable strong, .login-unavailable small { display: block; }
.login-unavailable strong { color: #3c4749; font-size: 13px; }
.login-unavailable small { margin-top: 3px; color: #687579; font-size: 12px; line-height: 1.5; }
.auth-fields { gap: 17px; padding: 0; border: 0; }
.auth-fields:disabled { opacity: 1; }
.auth-card .field { gap: 8px; }
.auth-card .field label { color: #344248; font-size: 13px; font-weight: 780; }
.auth-card .field input { min-height: 50px; padding-inline: 14px; border-color: #dce2dd; border-radius: 11px; background: #fcfdfb; font-size: 16px; transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
.auth-card .field input:focus { border-color: #c63842; background: #fff; box-shadow: 0 0 0 4px rgba(198,56,66,.09); }
.auth-card .field input:focus-visible { outline: 3px solid #992b34; outline-offset: 3px; }
.auth-card .field input::placeholder { color: #9ba5a1; }
.auth-card .button { width: 100%; min-height: 50px; border-radius: 11px; box-shadow: 0 9px 20px rgba(173,41,52,.15); }
.auth-card .button.quiet { margin-top: 10px; box-shadow: none; }
.auth-card-footer { display: flex; align-items: center; gap: 9px; margin-top: 25px; padding-top: 17px; border-top: 1px solid #edf0ed; color: #66736f; font-size: 12px; line-height: 1.5; }
.auth-card-footer-lock { display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; border-radius: 8px; background: #edf5ef; color: #36805f; }
.auth-card-footer-lock .icon { width: 13px; height: 13px; }
.auth-card--mfa { grid-column: 2; align-self: center; min-height: 470px; }
.dashboard-heading { position: relative; isolation: isolate; min-height: 185px; align-items: center; overflow: hidden; margin-bottom: 20px; padding: 30px 34px; border: 1px solid rgba(255,255,255,.09); border-radius: 22px; background: radial-gradient(ellipse at 78% 25%, rgba(184,225,207,.15), transparent 30%), linear-gradient(115deg, #26363c, #182328); box-shadow: 0 17px 40px rgba(27,39,43,.14); }
.dashboard-heading::after { position: absolute; z-index: -1; top: -135px; right: 10%; width: 360px; height: 360px; border: 1px solid rgba(255,255,255,.07); border-radius: 50%; content: ""; box-shadow: 0 0 0 37px rgba(255,255,255,.02), 0 0 0 76px rgba(255,255,255,.014); }
.dashboard-heading > div:first-child { position: relative; z-index: 1; }
.dashboard-heading .eyebrow { color: #ff9298; }
.dashboard-heading h1 { margin: 10px 0 9px; color: #fff; font-size: clamp(32px, 3.5vw, 43px); }
.dashboard-heading p { max-width: 680px; color: rgba(255,255,255,.68); font-size: 13px; }
.dashboard-heading .button.secondary { position: relative; z-index: 1; min-height: 42px; border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff; }
.dashboard-heading .button.secondary:hover { background: rgba(255,255,255,.14); }
.admin-layout { grid-template-columns: minmax(250px, 310px) minmax(0, 1fr); gap: 17px; }
.panel { border-color: #e1e6e1; border-radius: 18px; box-shadow: 0 12px 32px rgba(24,36,40,.055); }
.profile-rail { position: sticky; top: 18px; }
.rail-header { min-height: 62px; padding: 15px 17px; background: #fbfcfa; }
.rail-header strong { color: #2a383d; font-size: 13px; }
.rail-header .button.quiet { border-color: #ecd2d4; background: #fff3f3; color: #a72e38; }
.rail-header .button.quiet:hover { background: #ffe7e8; }
.profile-list { gap: 5px; padding: 8px; }
.profile-row { position: relative; gap: 5px; padding: 12px 13px 12px 15px; border: 1px solid transparent; }
.profile-row:hover { background: #f5f7f4; }
.profile-row.selected { border-color: #f0d9da; background: #fff4f4; }
.profile-row.selected::before { position: absolute; top: 10px; bottom: 10px; left: 0; width: 3px; border-radius: 0 3px 3px 0; background: var(--red); content: ""; }
.profile-row-name { color: #26343a; font-size: 12px; }
.profile-row-meta { color: #73807d; font-size: 10px; }
.empty-rail { padding: 20px 14px; border-radius: 10px; background: #fafbf9; font-size: 11px; }
.detail-panel { min-height: 610px; padding: clamp(21px, 3vw, 32px); }
.profile-empty { min-height: 540px; }
.link-box { padding: 19px; border-color: #e6ebe6; border-radius: 14px; background: linear-gradient(145deg, #fbfcfa, #f7f9f6); }
.section-divider { margin-top: 26px; }
.section-head h3 { color: #26343a; font-size: 18px; }
.section-head p { color: #7a8581; }
.document-row { border-radius: 12px; background: #fff; }
.document-row:hover { border-color: #d5ddd6; box-shadow: 0 5px 16px rgba(24,36,40,.04); }
.dashboard-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.dashboard-heading p { max-width: 610px; margin-bottom: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.heading-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.admin-layout { display: grid; grid-template-columns: minmax(230px, .72fr) minmax(0, 1.6fr); align-items: start; gap: 20px; }
.panel { border: 1px solid var(--line); border-radius: 15px; background: var(--white); box-shadow: 0 10px 30px rgba(24, 36, 40, .045); }
.profile-rail { overflow: hidden; }
.rail-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 17px; border-bottom: 1px solid var(--line); }
.rail-header strong { font-size: 13px; }
.profile-list { display: grid; gap: 1px; max-height: 70vh; overflow-y: auto; padding: 6px; }
.profile-row { display: grid; gap: 4px; width: 100%; padding: 13px 12px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.profile-row:hover, .profile-row.selected { background: #f1f4f0; }
.profile-row-name { overflow: hidden; font-size: 13px; font-weight: 760; text-overflow: ellipsis; white-space: nowrap; }
.profile-row-meta { color: var(--muted); font-size: 11px; }
.empty-rail { padding: 21px 16px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.detail-panel { min-height: 550px; padding: clamp(20px, 3vw, 30px); }
.profile-empty { display: grid; min-height: 490px; place-items: center; padding: 26px; color: var(--muted); text-align: center; }
.profile-empty .icon { width: 43px; height: 43px; margin: 0 auto 14px; color: #86958e; }
.profile-empty p { max-width: 350px; margin-bottom: 0; font-size: 13px; line-height: 1.65; }
.profile-head { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: 16px; padding-bottom: 21px; border-bottom: 1px solid var(--line); }
.profile-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.type-badge, .state-badge { display: inline-flex; min-height: 28px; align-items: center; padding: 0 10px; border-radius: 999px; background: #edf2ee; color: #43554c; font-size: 12px; font-weight: 780; }
.state-badge.inactive { background: #f3e8e8; color: #83343a; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-retention-notice { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 18px; }
.profile-retention-notice p { margin: 4px 0 0; }
.link-box { margin-top: 20px; padding: 17px; border: 1px solid #e3e8e3; border-radius: 11px; background: #f8faf7; }
.link-box p { margin-bottom: 11px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.link-hosting-notice { margin-top: 12px; }
.copy-row { display: flex; align-items: center; gap: 8px; }
.copy-row input { min-width: 0; flex: 1; min-height: 44px; padding: 0 11px; border: 1px solid #ccd6cf; border-radius: 8px; background: #fff; color: #3d4a50; font-size: 16px; }
.nfc-instructions { margin-top: 12px; color: #536169; font-size: 13px; line-height: 1.65; }
.nfc-instructions a { color: var(--red-dark); font-weight: 700; }
.privacy-note { margin-top: 15px; padding: 12px 14px; border-left: 3px solid #c38c2b; border-radius: 0 8px 8px 0; background: #fff8e9; color: #674a16; font-size: 13px; line-height: 1.6; }
.section-divider { margin: 24px 0 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-head p { margin: 0; color: var(--muted); font-size: 11px; }
.upload-hint { margin: -4px 0 14px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.upload-grid .field:first-child { grid-column: 1 / -1; }
.upload-grid .field:last-of-type { grid-column: 1 / -1; }
.upload-grid .button { grid-column: 1 / -1; justify-self: start; }
.document-list { display: grid; gap: 9px; margin-top: 15px; }
.document-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px; border: 1px solid #e5e9e5; border-radius: 10px; }
.document-name { font-size: 14px; font-weight: 750; }
.document-meta { margin-top: 4px; color: var(--muted); font-size: 12px; }
.document-meta.expired, .doc-subtitle.expired { color: var(--red-dark); font-weight: 750; }
.activity-list { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.activity-item { display: grid; gap: 5px; padding: 13px 14px; border: 1px solid #e5e9e5; border-radius: 10px; background: #fbfcfa; }
.activity-item strong { color: #344148; font-size: 13px; font-weight: 750; }
.activity-item span { color: #59676e; font-size: 12px; line-height: 1.5; }
.activity-empty { padding: 15px; border: 1px dashed #cdd7d0; border-radius: 10px; color: #59676e; font-size: 13px; line-height: 1.55; }
.document-row .button { flex: 0 0 auto; }
.public-main { width: min(760px, calc(100% - 36px)); margin: 42px auto 70px; }
.public-card { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.public-cover { padding: clamp(24px, 5vw, 42px); background: linear-gradient(130deg, #202a30, #33454b); color: #fff; }
.public-cover .eyebrow { color: #ff959b; }
.public-cover h1 { margin-top: 12px; }
.public-cover p { max-width: 550px; margin-bottom: 0; color: rgba(255,255,255,.78); font-size: 13px; line-height: 1.65; }
.public-content { padding: clamp(22px, 5vw, 38px); }
.doc-heading { margin-bottom: 16px; }
.doc-heading p { margin-bottom: 0; color: var(--muted); font-size: 12px; }
.public-documents { display: grid; gap: 11px; }
.public-document { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px; border: 1px solid #e3e8e3; border-radius: 12px; }
.doc-left { display: flex; min-width: 0; align-items: center; gap: 12px; }
.doc-icon { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border-radius: 11px; background: #f1f4f0; color: var(--red-dark); }
.doc-icon .icon { width: 20px; height: 20px; }
.doc-title { overflow-wrap: anywhere; font-size: 14px; font-weight: 760; }
.doc-subtitle { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.public-notice { margin-top: 22px; padding: 14px 16px; border: 1px solid #ebd9b5; border-radius: 10px; background: #fff9ef; color: #614718; font-size: 13px; line-height: 1.65; }
.public-empty { padding: 22px; border: 1px dashed #cdd7d0; border-radius: 12px; color: var(--muted); font-size: 13px; line-height: 1.6; text-align: center; }
.public-footer { margin-top: 15px; color: #657279; text-align: center; font-size: 12px; }
.public-footer a { font-weight: 700; }
.loading { padding: 22px; color: var(--muted); font-size: 13px; text-align: center; }
@media (max-width: 760px) {
  .app-main { margin-top: 30px; }
  .dashboard-heading { align-items: start; flex-direction: column; }
  .admin-layout { grid-template-columns: 1fr; }
  .profile-list { max-height: 240px; }
  .profile-empty { min-height: 220px; }
}
@media (max-width: 520px) {
  .app-header { min-height: 62px; padding-inline: 16px; }
  .header-note { font-size: 10px; }
  .app-main { width: calc(100% - 28px); margin-top: 24px; }
  .auth-card { padding: 23px 18px; }
  .heading-actions { width: 100%; }
  .heading-actions .button { flex: 1; }
  .detail-panel { min-height: 0; padding: 18px 14px; }
  .profile-head { flex-direction: column; }
  .profile-actions { width: 100%; }
  .profile-actions .button { flex: 1; }
  .profile-retention-notice { align-items: stretch; flex-direction: column; }
  .copy-row { align-items: stretch; flex-direction: column; }
  .upload-grid { grid-template-columns: 1fr; }
  .upload-grid .field, .upload-grid .field:first-child, .upload-grid .field:last-of-type { grid-column: auto; }
  .upload-grid .button { width: 100%; }
  .document-row, .public-document { align-items: stretch; flex-direction: column; }
  .document-row .button, .public-document .button { width: 100%; }
  .public-main { width: calc(100% - 24px); margin-top: 20px; }
  .public-cover { padding: 24px 20px; }
  .public-content { padding: 20px 15px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
@media (max-width: 980px) {
  .auth-layout { grid-template-columns: minmax(0, 1fr) minmax(360px, .9fr); gap: 14px; }
  .auth-story { padding: 28px; }
  .auth-story-copy h2 { font-size: clamp(34px, 4vw, 47px); }
  .auth-feature { grid-template-columns: 36px minmax(0,1fr); gap: 9px; padding: 9px; }
  .auth-feature-icon { width: 35px; height: 35px; }
  .auth-feature-index { display: none; }
  .admin-layout { grid-template-columns: minmax(220px, 280px) minmax(0,1fr); }
}
@media (max-width: 760px) {
  .app-main--admin { width: min(700px, calc(100% - 36px)); margin-top: 28px; }
  .auth-layout { grid-template-columns: 1fr; min-height: 0; }
  .auth-story { min-height: 0; padding: 27px; }
  .auth-story-copy { margin: 38px 0 22px; padding-top: 0; }
  .auth-story-copy h2 { max-width: 560px; font-size: clamp(36px, 7vw, 51px); }
  .auth-feature-list { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
  .auth-feature { min-height: 120px; align-content: start; grid-template-columns: 1fr; gap: 10px; padding: 12px; }
  .auth-feature small { line-height: 1.45; }
  .auth-feature-index { display: none; }
  .auth-story-footer { margin-top: 17px; }
  .auth-card, .auth-card--mfa { grid-column: 1; min-height: 0; }
  .admin-layout { grid-template-columns: 1fr; }
  .profile-rail { position: static; }
  .dashboard-heading { align-items: flex-start; flex-direction: column; gap: 18px; padding: 25px; }
}
@media (max-width: 520px) {
  .app-header { min-height: 68px; padding: 10px 17px; }
  .brand { gap: 8px; font-size: 14px; }
  .brand-mark { width: 35px; height: 35px; border-radius: 11px; }
  .brand-mark .icon { width: 19px; height: 19px; }
  .header-actions { gap: 4px; }
  .header-secure { gap: 6px; padding: 8px 9px; font-size: 11px; }
  .header-back { min-height: 36px; gap: 5px; padding: 0 8px; font-size: 10px; }
  .header-back .icon { width: 12px; height: 12px; }
  .app-main--admin { width: calc(100% - 26px); margin-top: 18px; }
  .auth-layout { gap: 11px; }
  .auth-story { padding: 21px; border-radius: 19px; }
  .auth-story-top { gap: 8px; font-size: 11px; }
  .auth-story-mark { width: 31px; height: 31px; border-radius: 9px; }
  .auth-story-mark .icon { width: 18px; height: 18px; }
  .auth-story-version { font-size: 9px; }
  .auth-story-copy { margin: 30px 0 18px; }
  .auth-story-eyebrow { font-size: 11px; }
  .auth-story-copy h2 { margin: 10px 0; font-size: clamp(32px, 9vw, 42px); }
  .auth-story-copy p { font-size: 12px; line-height: 1.65; }
  .auth-feature-list { grid-template-columns: 1fr; gap: 7px; }
  .auth-feature { min-height: 0; align-content: center; grid-template-columns: 34px minmax(0,1fr); gap: 9px; padding: 9px; }
  .auth-feature-icon { width: 33px; height: 33px; border-radius: 9px; }
  .auth-feature-icon .icon { width: 18px; height: 18px; }
  .auth-feature strong { font-size: 13px; }
  .auth-feature small { margin-top: 2px; font-size: 12px; }
  .auth-story-footer { gap: 8px; margin-top: 14px; padding-top: 14px; }
  .auth-story-check { width: 28px; height: 28px; }
  .auth-story-footer-orbit { width: 35px; height: 35px; }
  .auth-card { padding: 24px 21px; border-radius: 19px; }
  .auth-card-top { margin-bottom: 21px; }
  .auth-card-mark { width: 39px; height: 39px; }
  .auth-card-mark .icon { width: 20px; height: 20px; }
  .auth-card-access { font-size: 11px; }
  .auth-card h1 { font-size: 32px; }
  .auth-card .intro-copy { margin-bottom: 18px; font-size: 13px; }
  .auth-card .setup-alert { font-size: 12px; }
  .auth-card-footer { margin-top: 19px; }
  .dashboard-heading { min-height: 0; padding: 23px 20px; border-radius: 18px; }
  .dashboard-heading h1 { font-size: 32px; }
  .dashboard-heading p { font-size: 12px; }
  .dashboard-heading .heading-actions, .dashboard-heading .heading-actions .button { width: 100%; }
  .detail-panel { min-height: 0; padding: 18px; }
  .profile-empty { min-height: 260px; }
}

/* A dedicated, always-visible area for recoverable profiles. */
.trash-section { margin-top: 8px; border-top: 1px solid var(--line); }
.trash-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 18px 9px; }
.trash-header strong { color: #2a383d; font-size: 13px; }
.trash-header p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.trash-count { display: inline-grid; min-width: 26px; height: 26px; place-items: center; border-radius: 999px; background: #f3e8e8; color: #83343a; font-size: 12px; font-weight: 750; }
.trash-list { max-height: 32vh; }
@media (max-width: 760px) { .trash-list { max-height: 200px; } }

.privacy-reminder { border-left: 3px solid #d29646; background: #fff9ef; padding: 12px 14px; color: #604b2f; font-size: 13px; line-height: 1.55; }
.privacy-confirm { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 10px; color: #4b5855; font-size: 12px; line-height: 1.5; }
.privacy-confirm input { flex: 0 0 auto; width: 18px; height: 18px; margin: 2px 0 0; }
.privacy-page { width: min(800px, calc(100% - 36px)); margin: 36px auto 70px; padding: clamp(22px, 5vw, 42px); }
.privacy-page h1 { margin-bottom: 12px; font-size: clamp(28px, 5vw, 40px); }
.privacy-page h2 { margin-top: 30px; font-size: 19px; }
.privacy-page p, .privacy-page li { color: #4b5855; line-height: 1.7; font-size: 14px; }
.privacy-page a { color: #a72e38; overflow-wrap: anywhere; }

.cleanup-section { border-top: 1px solid var(--line); padding: 15px 18px; }
.cleanup-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cleanup-heading strong { font-size: 12px; color: #2a383d; }
.cleanup-heading .button { padding: 5px 8px; font-size: 11px; }
.cleanup-section p { margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }

/* Two distinct navigation choices keep the trash separate from profile creation. */
.rail-navigation { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px; background: #f5f7f5; border-bottom: 1px solid var(--line); }
.rail-nav-button { display: flex; align-items: center; justify-content: center; gap: 7px; min-width: 0; min-height: 46px; padding: 8px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: #596964; font: inherit; font-size: 12px; font-weight: 750; cursor: pointer; }
.rail-nav-button svg { width: 19px; height: 19px; flex: 0 0 auto; }
.rail-nav-button:hover { background: #fff; }
.rail-nav-button[aria-pressed="true"] { border-color: #e9d4d5; background: #fff; color: #a72e38; box-shadow: 0 2px 8px rgba(24,36,40,.06); }
.rail-nav-button:focus-visible { outline: 3px solid #bb4049; outline-offset: 2px; }
.rail-nav-button .trash-count { min-width: 21px; height: 21px; font-size: 11px; }
.rail-header p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.rail-header .button { flex: 0 0 auto; }
.trash-section { margin-top: 0; border-top: 0; }
.dashboard-heading p { color: rgba(255,255,255,.78); }
