:root {
    -ink: #17211d;
    --forest: #0c092f;
    --forest-dark: #4c5c93;
    --green: #1f3072;
    --mint: #c2c8ea;
    --mint-pale: #eaedf6;
    --paper: #f6f5f0;
    --white: #ffffff;
    --line: #d1d7ec;
    --muted: #6d7973;
    --danger: #a93e38;
    --warning: #9b6818;
    --shadow: 0 18px 55px rgba(11, 43, 34, .09);
    --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.button { display: inline-flex; min-height: 45px; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 999px; padding: 0 20px; cursor: pointer; font-size: 12px; font-weight: 850; transition: .18s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--forest); color: white; }
.button.primary:hover { background: var(--green); }
.button.mint { background: var(--mint); color: var(--forest-dark); }
.button.secondary { border-color: #c9d3ce; background: white; color: var(--forest); }
.button.danger { background: var(--danger); color: white; }
.button.wide { width: 100%; }
.button.small { min-height: 35px; padding: 0 13px; font-size: 10px; }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.brand-mark { display: grid; width: 45px; height: 45px; place-items: center; border-radius: 13px; background: var(--mint); color: var(--forest); font-size: 12px; font-weight: 900; letter-spacing: .05em; }
.brand-mark.large { width: 60px; height: 60px; border-radius: 17px; font-size: 15px; }
.eyebrow { margin: 0 0 15px; color: var(--mint); font-size: 10px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow.dark { color: var(--green); }

.topbar { position: sticky; z-index: 50; top: 0; display: grid; min-height: 76px; grid-template-columns: auto 1fr auto; align-items: center; gap: 44px; border-bottom: 1px solid rgba(255, 255, 255, .1); padding: 0 max(24px, calc((100vw - 1280px) / 2)); background: rgb(16 35 96 / 97%); color: white; backdrop-filter: blur(12px); }
.app-brand { display: flex; align-items: center; gap: 12px; }
.app-brand > span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; background: var(--mint); color: var(--forest); font-size: 10px; font-weight: 900; }
.app-brand strong { font-family: Georgia, serif; font-size: 17px; font-weight: 400; line-height: 1.1; }
.app-brand small { display: block; margin-top: 3px; color: rgba(255, 255, 255, .46); font-family: Inter, sans-serif; font-size: 8px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.topbar nav { display: flex; align-items: center; gap: 27px; }
.topbar nav a { position: relative; color: rgba(255, 255, 255, .6); font-size: 11px; font-weight: 750; }
.topbar nav a:hover, .topbar nav a.active { color: white; }
.topbar nav a.active::after { content: ""; position: absolute; right: 0; bottom: -27px; left: 0; height: 2px; background: var(--mint); }
.user-menu { display: flex; align-items: center; gap: 16px; }
.user-menu > span { text-align: right; font-size: 10px; font-weight: 800; }
.user-menu small { display: block; margin-top: 2px; color: rgba(255, 255, 255, .45); font-size: 8px; font-weight: 500; }
.user-menu > a { border: 1px solid rgba(255, 255, 255, .24); border-radius: 999px; padding: 7px 11px; color: rgba(255, 255, 255, .7); font-size: 9px; font-weight: 800; }
.menu-toggle { display: none; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: 8px 12px; background: transparent; color: white; font-size: 10px; font-weight: 800; }

.page-shell { width: min(1280px, calc(100% - 44px)); min-height: calc(100vh - 156px); margin: 0 auto; padding: 54px 0 90px; }
.page-shell.narrow { width: min(1000px, calc(100% - 44px)); }
.page-hero { display: flex; min-height: 285px; align-items: center; justify-content: space-between; gap: 35px; border-radius: 24px; padding: 55px 60px; background: var(--forest-dark); color: white; overflow: hidden; }
.page-hero.compact { min-height: 260px; }
.page-hero h1, .page-heading h1, .claim-top h1, .form-intro h1, .password-page h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(45px, 6vw, 72px); font-weight: 400; letter-spacing: -.045em; line-height: .95; }
.page-hero > div > span, .page-heading > div > span { display: block; max-width: 600px; margin-top: 18px; color: rgba(255,255,255,.56); font-size: 13px; line-height: 1.6; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 35px; margin: 15px 0 42px; }
.page-heading > div > span { color: var(--muted); }
.page-heading h1, .claim-top h1, .form-intro h1, .password-page h1 { color: var(--forest-dark); }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-top: 15px; }
.stat-grid article { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: white; }
.stat-grid span, .stat-grid small { display: block; color: var(--muted); font-size: 9px; font-weight: 700; }
.stat-grid strong { display: block; margin: 10px 0 5px; color: var(--forest); font-family: Georgia, serif; font-size: 38px; font-weight: 400; }
.content-section { margin-top: 72px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; margin-bottom: 24px; }
.section-heading p, .card-heading p { margin: 0 0 8px; color: var(--green); font-size: 9px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.section-heading h2, .card-heading h2 { margin: 0; font-family: Georgia, serif; font-size: 34px; font-weight: 400; }
.section-heading a { color: var(--green); font-size: 11px; font-weight: 850; }

.panel, .table-card, .filter-bar, .report-card { border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 10px 30px rgba(10, 42, 34, .035); }
.table-card { overflow: hidden; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 11px; }
th { padding: 14px 18px; background: #edf4f0; color: var(--green); font-size: 8px; letter-spacing: .1em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { border-top: 1px solid var(--line); padding: 17px 18px; color: #48534e; vertical-align: middle; }
.claim-link strong, .claim-link span { display: block; }
.claim-link strong { color: var(--forest); font-size: 12px; }
.claim-link span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.text-link { color: var(--green); font-size: 10px; font-weight: 900; white-space: nowrap; }
.status { display: inline-flex; border-radius: 999px; padding: 6px 9px; background: #e9eeeb; color: #63706a; font-size: 8px; font-weight: 900; text-transform: uppercase; }
.status.open { background: #fff2d9; color: var(--warning); }
.status.complete { background: var(--mint-pale); color: var(--green); }
.empty-state, .empty-page { display: grid; min-height: 330px; place-items: center; align-content: center; padding: 45px; color: var(--muted); text-align: center; }
.empty-state > span, .empty-page > span { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 50%; background: var(--mint-pale); color: var(--green); font-size: 11px; font-weight: 900; }
.empty-state h3, .empty-page h1 { margin: 15px 0 6px; color: var(--forest); font-family: Georgia, serif; font-size: 28px; font-weight: 400; }
.empty-state p, .empty-page p { max-width: 420px; margin: 0 0 22px; font-size: 11px; line-height: 1.6; }

.filter-bar { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; align-items: end; gap: 13px; margin-bottom: 18px; padding: 18px; }
label { display: block; color: #3e4a44; font-size: 10px; font-weight: 800; }
label small { float: right; color: #87918c; font-size: 8px; font-weight: 500; }
label b { color: var(--danger); }
input, select, textarea { width: 100%; border: 1px solid #cfd8d3; border-radius: 9px; outline: none; padding: 12px 13px; background: white; color: var(--ink); font-size: 12px; font-weight: 600; }
label > input, label > select, label > textarea { margin-top: 7px; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(31, 114, 87, .1); }
textarea { resize: vertical; line-height: 1.5; }
fieldset { margin: 0 0 28px; border: 0; border-top: 1px solid var(--line); padding: 22px 0 0; }
legend { padding: 0 10px 0 0; color: var(--forest); font-family: Georgia, serif; font-size: 19px; }
.form-grid { display: grid; gap: 13px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
.form-panel { padding: clamp(23px, 4vw, 38px); }
.form-panel label { margin-bottom: 18px; }
.back-link { display: inline-block; margin-bottom: 24px; color: var(--green); font-size: 10px; font-weight: 850; }
.form-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: 70px; align-items: start; }
.form-intro { padding-top: 35px; }
.form-intro p:not(.eyebrow) { max-width: 420px; color: var(--muted); font-size: 13px; line-height: 1.75; }
.tip-card { margin-top: 35px; border-left: 3px solid var(--mint); padding: 5px 0 5px 19px; }
.tip-card strong, .tip-card span { display: block; }
.tip-card strong { color: var(--green); font-size: 10px; }
.tip-card span { margin-top: 6px; color: var(--muted); font-size: 10px; line-height: 1.55; }

.claim-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 28px; }
.claim-top .eyebrow { margin-top: 20px; }
.claim-meta { display: flex; flex-wrap: wrap; gap: 12px 30px; margin-top: 25px; }
.claim-meta span { color: var(--muted); font-size: 10px; }
.claim-meta b { display: block; margin-bottom: 4px; color: var(--forest); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
.claim-actions { display: flex; gap: 9px; }
.claim-settings { margin-bottom: 18px; padding: 24px; }
.claim-settings form { display: grid; grid-template-columns: repeat(4, 1fr); align-items: end; gap: 14px; }
.claim-settings .settings-notes { grid-column: 1 / 4; }
.workflow-note { display: flex; align-items: center; gap: 25px; border-radius: 12px; padding: 18px 22px; background: var(--mint-pale); color: var(--forest); }
.workflow-note strong { flex: 0 0 auto; font-family: Georgia, serif; font-size: 18px; font-weight: 400; }
.workflow-note p { margin: 0; color: #53645c; font-size: 10px; line-height: 1.55; }
.admin-photo-toolbar { position: sticky; z-index: 20; top: 86px; display: flex; align-items: center; gap: 18px; margin-top: 15px; border: 1px solid #e3c1be; border-radius: 12px; padding: 13px 16px; background: #fff8f7; box-shadow: 0 10px 28px rgba(73, 23, 19, .08); }
.admin-photo-toolbar label { display: flex; align-items: center; gap: 8px; margin-right: auto; color: var(--forest); cursor: pointer; }
.admin-photo-toolbar input { width: 17px; height: 17px; margin: 0; accent-color: var(--danger); }
.admin-photo-toolbar > span { color: var(--muted); font-size: 9px; font-weight: 800; }
.party-list { margin-top: 24px; }
.party-section { margin-bottom: 28px; border-radius: 20px; padding: 27px; background: var(--forest-dark); }
.party-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; color: white; }
.party-heading span { color: var(--mint); font-size: 8px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.party-heading h2 { margin: 6px 0 0; font-family: Georgia, serif; font-size: 35px; font-weight: 400; }
.party-heading > b { color: rgba(255,255,255,.5); font-size: 10px; }
.category-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.category-card { min-width: 0; border-radius: 13px; padding: 18px; background: white; }
.bulk-upload-card, .classification-section { border-radius: 13px; padding: 20px; background: white; }
.bulk-upload-copy, .classification-heading, .classification-heading > div { display: flex; align-items: center; gap: 13px; }
.bulk-upload-copy { margin-bottom: 15px; }
.bulk-upload-copy > span, .classification-heading > div > span { display: grid; width: 37px; height: 37px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--mint-pale); color: var(--green); font-size: 9px; font-weight: 900; }
.bulk-upload-copy h3, .classification-heading h3 { margin: 0; font-family: Georgia, serif; font-size: 21px; font-weight: 400; }
.bulk-upload-copy p, .classification-heading p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.bulk-upload-zone { min-height: 160px; }
.bulk-upload-zone.dragging { border-color: var(--green); background: var(--mint); box-shadow: inset 0 0 0 3px rgba(31,114,87,.13); transform: scale(.995); }
.classification-section { margin-top: 12px; }
.classification-heading { justify-content: space-between; margin-bottom: 17px; }
.classification-heading > small { color: var(--muted); font-size: 8px; }
.party-empty { display: grid; min-height: 120px; place-items: center; align-content: center; margin-top: 12px; border: 1px dashed rgba(255,255,255,.22); border-radius: 12px; color: rgba(255,255,255,.5); text-align: center; }
.party-empty strong { color: white; font-family: Georgia, serif; font-size: 18px; font-weight: 400; }
.party-empty span { margin-top: 5px; font-size: 8px; }
.category-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.category-heading > span { display: grid; width: 35px; height: 35px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--mint-pale); color: var(--green); font-size: 9px; font-weight: 900; }
.category-heading h3 { margin: 0; font-family: Georgia, serif; font-size: 19px; font-weight: 400; }
.category-heading small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; }
.upload-zone { position: relative; display: grid; min-height: 115px; place-items: center; align-content: center; border: 1.5px dashed #b9c8c0; border-radius: 10px; background: #f7faf8; cursor: pointer; text-align: center; transition: .18s ease; }
.upload-zone:hover { border-color: var(--green); background: var(--mint-pale); }
.upload-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-zone > span { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: var(--forest); color: white; font-size: 16px; }
.upload-zone strong { margin-top: 7px; color: var(--forest); font-size: 10px; }
.upload-zone small { margin-top: 3px; color: var(--muted); font-size: 7px; font-weight: 500; }
.upload-progress { margin-top: 10px; }
.upload-progress i { display: block; height: 6px; overflow: hidden; border-radius: 99px; background: #e3e9e5; }
.upload-progress i b { display: block; width: var(--upload-progress, 0%); height: 100%; border-radius: inherit; background: var(--green); transition: width .2s ease; }
.upload-progress span { display: block; margin-top: 5px; color: var(--muted); font-size: 8px; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.photo-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: white; }
.photo-card.unclassified { border-color: #dca854; box-shadow: 0 0 0 2px rgba(220,168,84,.12); }
.photo-card > img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #edf1ef; }
.photo-card > div { padding: 8px; }
.photo-card > div > span { display: block; overflow: hidden; color: var(--muted); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.photo-card > div > div { display: flex; justify-content: space-between; gap: 6px; margin-top: 7px; }
.photo-card button { border: 0; padding: 0; background: none; color: var(--green); cursor: pointer; font-size: 8px; font-weight: 850; }
.photo-card button.danger-link { color: var(--danger); }
.unified-photo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.photo-selector { position: absolute; z-index: 3; top: 7px; left: 7px; display: flex; align-items: center; gap: 4px; border-radius: 999px; padding: 5px 8px; background: rgba(255,255,255,.94); box-shadow: 0 3px 12px rgba(0,0,0,.16); cursor: pointer; }
.photo-selector input { width: 15px; height: 15px; margin: 0; padding: 0; accent-color: var(--danger); }
.photo-selector span { color: var(--forest); font-size: 7px; font-weight: 850; }
.photo-category-label { margin-top: 8px; color: var(--muted); font-size: 7px; }
.photo-category-label select { margin-top: 4px; padding: 7px 8px; border-radius: 6px; font-size: 8px; }
.add-party-card { display: grid; grid-template-columns: 1fr 1fr; gap: 45px; align-items: center; border-radius: 20px; padding: 38px; background: var(--forest); color: white; }
.add-party-card p { margin: 0 0 6px; color: var(--mint); font-size: 9px; font-weight: 800; }
.add-party-card h2 { margin: 0; font-family: Georgia, serif; font-size: 34px; font-weight: 400; }
.add-party-card span { display: block; margin-top: 8px; color: rgba(255,255,255,.56); font-size: 10px; }
.add-party-card form { display: flex; align-items: end; gap: 10px; }
.add-party-card label { flex: 1; color: rgba(255,255,255,.68); }

.admin-grid { display: grid; grid-template-columns: .7fr 1.3fr; gap: 20px; align-items: start; }
.user-list { display: grid; gap: 10px; }
.user-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 15px; border: 1px solid var(--line); border-radius: 13px; padding: 18px; background: white; }
.user-card.inactive { opacity: .56; }
.avatar { display: grid; width: 43px; height: 43px; place-items: center; border-radius: 50%; background: var(--mint-pale); color: var(--green); font-family: Georgia, serif; font-size: 20px; }
.user-info h3 { margin: 0; font-family: Georgia, serif; font-size: 19px; font-weight: 400; }
.user-info span, .user-info small { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; }
.user-actions { display: flex; align-items: center; gap: 10px; }
.user-actions > a, .user-actions summary, .text-button { border: 0; background: none; color: var(--green); cursor: pointer; font-size: 8px; font-weight: 850; }
.user-actions details { position: relative; }
.user-actions details[open] form { position: absolute; z-index: 4; right: 0; top: 24px; width: 290px; border: 1px solid var(--line); border-radius: 11px; padding: 14px; background: white; box-shadow: var(--shadow); }
.password-row { display: flex; gap: 6px; margin-top: 7px; }
.password-row input { margin: 0; }
.password-row button { border: 0; border-radius: 8px; padding: 0 10px; background: var(--mint-pale); color: var(--green); cursor: pointer; font-size: 8px; font-weight: 850; }
.report-card { display: grid; grid-template-columns: .9fr 1.1fr; gap: 60px; padding: 42px; }
.excel-visual { min-height: 310px; display: flex; flex-direction: column; justify-content: center; border-radius: 14px; padding: 35px; background: var(--forest-dark); color: white; }
.excel-visual > span { display: grid; width: 63px; height: 63px; place-items: center; border-radius: 15px; background: var(--mint); color: var(--forest); font-size: 11px; font-weight: 900; }
.excel-visual strong { margin-top: 22px; font-family: Georgia, serif; font-size: 29px; font-weight: 400; }
.excel-visual p { color: rgba(255,255,255,.56); font-size: 11px; line-height: 1.65; }
.report-card form { align-self: center; }
.report-card label { margin-bottom: 18px; }
.password-page { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; padding-top: 45px; }
.password-page > div > p:not(.eyebrow) { color: var(--muted); font-size: 12px; line-height: 1.7; }

.flash-stack { position: fixed; z-index: 100; top: 90px; right: 20px; display: grid; gap: 8px; width: min(380px, calc(100% - 40px)); }
.flash { border-radius: 10px; padding: 14px 17px; background: var(--forest); color: white; box-shadow: var(--shadow); font-size: 10px; font-weight: 750; animation: flash-in .25s ease; }
.flash.danger { background: var(--danger); }
.flash.success { background: var(--green); }
@keyframes flash-in { from { opacity: 0; transform: translateY(-8px); } }

.site-footer { display: flex; justify-content: space-between; gap: 30px; padding: 28px max(24px, calc((100vw - 1280px) / 2)); background: #071e18; color: rgba(255,255,255,.4); font-size: 8px; }
.site-footer span { color: var(--mint); font-family: Georgia, serif; font-size: 14px; }
.site-footer p { margin: 0; }

.login-page, .install-shell { display: grid; min-height: 100vh; grid-template-columns: 1fr 1fr; }
.login-visual, .install-intro { display: flex; flex-direction: column; justify-content: center; padding: 8vw; background: var(--forest-dark); color: white; }
.login-visual .eyebrow, .install-intro .eyebrow { margin-top: 35px; }
.login-visual h1, .install-intro h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(60px, 7vw, 100px); font-weight: 400; letter-spacing: -.06em; line-height: .86; }
.login-visual h1 em, .install-intro h1 em { color: var(--mint); font-weight: 400; }
.login-visual > p:not(.eyebrow), .install-intro > p:not(.eyebrow) { max-width: 520px; color: rgba(255,255,255,.6); font-size: 14px; line-height: 1.7; }
.login-trust { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 35px; color: rgba(255,255,255,.42); font-size: 9px; }
.login-trust span::before { content: "✓"; margin-right: 6px; color: var(--mint); }
.login-form-wrap, .install-card { display: grid; place-items: center; padding: 7vw; background: var(--paper); }
.login-card { width: min(430px, 100%); }
.login-card .card-heading { margin-bottom: 30px; }
.login-card .card-heading h2 { font-size: 42px; }
.login-card .card-heading span { display: block; margin-top: 10px; color: var(--muted); font-size: 11px; }
.login-card label { margin-bottom: 18px; }
.login-card > small { display: block; margin-top: 18px; color: var(--muted); font-size: 8px; line-height: 1.5; text-align: center; }

.install-card { display: block; overflow-y: auto; }
.install-card > form, .install-card > .card-heading, .install-card > .requirements, .install-card > .alert { width: min(560px, 100%); margin-right: auto; margin-left: auto; }
.install-intro .feature-list { margin: 30px 0 0; padding: 0; list-style: none; }
.feature-list li { margin: 12px 0; color: rgba(255,255,255,.62); font-size: 10px; }
.feature-list li::before { content: "✓"; margin-right: 9px; color: var(--mint); }
.requirements { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 20px 0 28px; }
.requirements span { border-radius: 7px; padding: 8px 10px; background: #edf2ef; color: var(--muted); font-size: 8px; }
.requirements b { margin-right: 6px; color: var(--green); }
.requirements .bad { background: #f8e7e5; color: var(--danger); }
.requirements .bad b { color: var(--danger); }
.alert { margin-bottom: 18px; border-radius: 9px; padding: 14px 17px; font-size: 9px; line-height: 1.5; }
.alert.danger { background: #f8e7e5; color: #7f2e29; }
.alert ul { margin: 7px 0 0; padding-left: 18px; }
.success-panel { display: grid; min-height: 80vh; place-items: center; align-content: center; text-align: center; }
.success-panel > span { display: grid; width: 68px; height: 68px; place-items: center; border-radius: 50%; background: var(--mint); color: var(--forest); font-size: 25px; }
.success-panel h2 { margin: 20px 0 5px; font-family: Georgia, serif; font-size: 40px; font-weight: 400; }
.success-panel p { margin: 0 0 25px; color: var(--muted); font-size: 11px; }

.editor-modal { position: fixed; z-index: 200; inset: 0; display: grid; place-items: center; padding: 22px; background: rgba(3, 20, 15, .88); }
.editor-dialog { width: min(1120px, 100%); max-height: calc(100vh - 44px); overflow: auto; border-radius: 18px; background: white; }
.editor-heading { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 20px 25px; }
.editor-heading p { margin: 0 0 4px; color: var(--green); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.editor-heading h2 { margin: 0; font-family: Georgia, serif; font-size: 25px; font-weight: 400; }
.editor-heading > button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 27px; }
.editor-workspace { display: grid; grid-template-columns: 1fr 270px; gap: 20px; padding: 20px; }
.canvas-wrap { display: grid; min-height: 500px; place-items: center; overflow: auto; border-radius: 12px; padding: 15px; background: #15221d; }
.canvas-wrap canvas { max-width: 100%; max-height: 68vh; cursor: crosshair; box-shadow: 0 12px 40px rgba(0,0,0,.35); }
.editor-workspace aside { padding: 16px; }
.editor-workspace aside label { margin-bottom: 20px; }
.editor-workspace input[type="range"] { border: 0; padding: 0; box-shadow: none; }
.editor-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 20px; }
.editor-buttons button { border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: white; color: var(--green); cursor: pointer; font-size: 9px; font-weight: 800; }
.editor-workspace aside p { margin: 20px 0; color: var(--muted); font-size: 9px; line-height: 1.6; }

@media (max-width: 1050px) {
    .topbar { gap: 22px; }
    .topbar nav { gap: 17px; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .category-grid { grid-template-columns: 1fr; }
    .unified-photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .admin-grid { grid-template-columns: 1fr; }
    .editor-workspace { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .topbar { min-height: 68px; grid-template-columns: 1fr auto; padding: 0 16px; }
    .app-brand small, .user-menu { display: none; }
    .menu-toggle { display: block; }
    .topbar nav { position: absolute; top: 61px; right: 14px; display: none; min-width: 220px; flex-direction: column; align-items: stretch; gap: 0; overflow: hidden; border-radius: 11px; background: white; box-shadow: var(--shadow); }
    .topbar nav.open { display: flex; }
    .topbar nav a { padding: 14px 17px; color: var(--forest); }
    .topbar nav a.active { background: var(--mint-pale); color: var(--forest); }
    .topbar nav a.active::after { display: none; }
    .page-shell, .page-shell.narrow { width: min(100% - 28px, 1280px); padding: 32px 0 65px; }
    .page-hero, .page-heading, .claim-top { align-items: flex-start; flex-direction: column; }
    .page-hero { min-height: 340px; padding: 35px 25px; }
    .page-hero h1, .page-heading h1, .claim-top h1, .form-intro h1, .password-page h1 { font-size: 47px; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .stat-grid article { padding: 17px; }
    .stat-grid strong { font-size: 31px; }
    .filter-bar, .form-layout, .report-card, .password-page, .add-party-card { grid-template-columns: 1fr; }
    .filter-bar { align-items: stretch; }
    .form-layout { gap: 25px; }
    .form-intro { padding-top: 0; }
    .claim-actions { width: 100%; flex-wrap: wrap; }
    .claim-actions .button { flex: 1; }
    .claim-settings form { grid-template-columns: 1fr; }
    .claim-settings .settings-notes { grid-column: auto; }
    .workflow-note { align-items: flex-start; flex-direction: column; gap: 8px; }
    .admin-photo-toolbar { top: 76px; flex-wrap: wrap; }
    .admin-photo-toolbar label { width: 100%; }
    .admin-photo-toolbar > span { margin-right: auto; }
    .party-section { padding: 17px 10px 10px; }
    .party-heading { padding: 0 7px; }
    .party-heading h2 { font-size: 29px; }
    .category-card { padding: 14px; }
    .photo-grid, .unified-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .add-party-card { gap: 24px; padding: 25px; }
    .add-party-card form { align-items: stretch; flex-direction: column; }
    .user-card { grid-template-columns: auto 1fr; }
    .user-actions { grid-column: 1 / -1; flex-wrap: wrap; }
    .user-actions details[open] form { right: auto; left: 0; width: min(290px, calc(100vw - 55px)); }
    .report-card { gap: 25px; padding: 18px; }
    .excel-visual { min-height: 240px; }
    .login-page, .install-shell { grid-template-columns: 1fr; }
    .login-visual, .install-intro { min-height: 44vh; padding: 65px 25px; }
    .login-visual h1, .install-intro h1 { font-size: 61px; }
    .login-form-wrap, .install-card { min-height: 56vh; padding: 50px 25px; }
    .requirements { grid-template-columns: 1fr; }
    .form-grid.two { grid-template-columns: 1fr; }
    .site-footer { align-items: flex-start; flex-direction: column; }
    .editor-modal { padding: 0; }
    .editor-dialog { max-height: 100vh; border-radius: 0; }
    .canvas-wrap { min-height: 360px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
