/* Paleta institucional: crema, dorado, verde agua, azul y carbón. */
:root {
    --ink: #2d2d2a;
    --forest: #406397;
    --forest-dark: #2e4d77;
    --green: #3f7775;
    --mint: #87b4b2;
    --mint-pale: #e6f1f0;
    --paper: #e9e5de;
    --sand: #e9e5de;
    --gold: #e8d390;
    --blue-pale: #e8edf4;
    --charcoal: #2d2d2a;
    --white: #ffffff;
    --line: #d7d8d2;
    --muted: #687475;
    --danger: #a93e38;
    --warning: #80661e;
    --shadow: 0 18px 55px rgba(46, 77, 119, .13);
    --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(--charcoal); }
.button.secondary { border-color: #c8d0d8; 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(--charcoal); 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(--gold); font-size: 10px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow.dark { color: var(--forest); }

.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: rgba(46, 77, 119, .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(--charcoal); 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: linear-gradient(135deg, var(--forest-dark) 0%, var(--forest) 64%, var(--green) 100%); 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(--forest); 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(--forest); 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(46, 77, 119, .055); }
.table-card { overflow: hidden; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 11px; }
th { padding: 14px 18px; background: var(--blue-pale); color: var(--forest); 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: #4e575b; 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: var(--sand); color: #5f6869; font-size: 8px; font-weight: 900; text-transform: uppercase; }
.status.open { background: var(--gold); color: #5b4a1b; }
.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; }
.claims-filter-bar { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 18px; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: white; }
.pagination > span { color: var(--muted); font-size: 10px; font-weight: 700; }
.pagination-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.pagination-links a { display: inline-flex; min-width: 34px; min-height: 34px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; background: white; color: var(--forest); font-size: 10px; font-weight: 800; }
.pagination-links a:hover, .pagination-links a.active { border-color: var(--forest); background: var(--forest); color: white; }
.pagination-links i { padding: 0 3px; color: var(--muted); font-style: normal; }
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 #c9d1d3; 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(--forest); box-shadow: 0 0 0 3px rgba(64, 99, 151, .14); }
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(--forest); 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: #56686a; 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: linear-gradient(145deg, var(--forest-dark), #355b80 72%, var(--green)); }
.party-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; color: white; }
.party-heading span { color: var(--gold); 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(63,119,117,.16); 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 #aebfc3; border-radius: 10px; background: #f4f7f7; 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: var(--sand); }
.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: var(--gold); box-shadow: 0 0 0 2px rgba(232,211,144,.24); }
.photo-card > img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--blue-pale); }
.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: linear-gradient(120deg, var(--forest-dark), var(--forest) 58%, var(--green)); color: white; }
.add-party-card p { margin: 0 0 6px; color: var(--gold); 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: linear-gradient(145deg, var(--forest-dark), var(--forest) 68%, var(--green)); color: white; }
.excel-visual > span { display: grid; width: 63px; height: 63px; place-items: center; border-radius: 15px; background: var(--mint); color: var(--charcoal); 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; }
.settings-visual > span { width: 74px; }
.settings-card .field-help { margin: -5px 0 20px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.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: var(--charcoal); color: rgba(255,255,255,.48); 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: linear-gradient(145deg, var(--forest-dark), var(--forest) 62%, var(--green)); 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: var(--blue-pale); 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(--charcoal); 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(32, 45, 60, .9); }
.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: var(--charcoal); }
.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; }
    .pagination { align-items: flex-start; flex-direction: column; }
    .pagination-links { justify-content: flex-start; }
    .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; }
}

/* Versión 1.2: compañías, revisión, reportes y visor */
.user-menu form { margin: 0; }
.user-menu form button { border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: 8px 12px; background: rgba(255,255,255,.08); color: white; cursor: pointer; font-size: 9px; font-weight: 850; }
.status.review { background: var(--blue-pale); color: #365989; }
.status.incomplete { background: #f8e7e5; color: var(--danger); }
.form-grid.three { grid-template-columns: repeat(3, 1fr); }
.centered { display: block; margin-top: 14px; text-align: center; }

.company-choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.company-choice-grid > .button { grid-column: 1 / -1; margin-top: 10px; }
.company-choice { position: relative; display: grid; min-height: 190px; align-content: center; border: 2px solid var(--line); border-radius: 18px; padding: 25px; background: white; cursor: pointer; transition: .18s ease; }
.company-choice:hover, .company-choice.selected, .company-choice:has(input:checked) { border-color: var(--forest); box-shadow: 0 0 0 4px rgba(64,99,151,.1); transform: translateY(-2px); }
.company-choice input { position: absolute; top: 16px; right: 16px; width: 19px; height: 19px; accent-color: var(--green); }
.company-choice > span { color: var(--green); font-size: 9px; font-weight: 900; letter-spacing: .13em; }
.company-choice strong { margin: 8px 0 12px; color: var(--forest); font-family: Georgia, serif; font-size: 26px; font-weight: 400; }
.company-choice small { color: var(--muted); font-size: 9px; line-height: 1.6; }

.companies-admin-grid { grid-template-columns: .9fr 1.1fr; }
.company-list { display: grid; gap: 12px; }
.company-card { border: 1px solid var(--line); border-radius: 15px; padding: 20px; background: white; }
.company-card.inactive { opacity: .58; }
.company-card > div:first-child > span { color: var(--green); font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.company-card h3 { margin: 6px 0 3px; font-family: Georgia, serif; font-size: 24px; font-weight: 400; }
.company-card small { color: var(--muted); font-size: 8px; }
.company-costs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; margin: 16px 0; }
.company-costs span { border-radius: 8px; padding: 9px; background: var(--mint-pale); color: var(--muted); font-size: 7px; font-weight: 800; }
.company-costs b { display: block; margin-top: 4px; color: var(--forest); font-size: 9px; }
.inline-actions { display: flex; align-items: center; gap: 12px; }

.claim-settings form > fieldset { grid-column: 1 / -1; }
.admin-review-fields { border: 1px solid var(--line); border-radius: 12px; padding: 22px; background: #f5f8fa; }
.admin-review-fields legend { padding: 0 8px; }
.admin-review-fields label { margin-bottom: 15px; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; border: 1px solid #e5bfbb; border-radius: 13px; padding: 18px 22px; background: #fff7f6; }
.danger-zone strong { color: var(--danger); font-size: 11px; }
.danger-zone p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.admin-photo-toolbar select { width: auto; min-width: 205px; padding: 9px 11px; }
.party-heading-actions { display: flex; align-items: center; gap: 14px; }
.party-heading-actions b { color: rgba(255,255,255,.5); font-size: 10px; }
.danger-text { color: var(--danger) !important; }
.party-heading .danger-text { color: #ffaaa3 !important; }

.photo-preview { position: relative; display: block; width: 100%; overflow: hidden; background: var(--blue-pale) !important; }
.photo-preview img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .2s ease; }
.photo-preview > span { position: absolute; right: 8px; bottom: 8px; border-radius: 999px; padding: 5px 8px; background: rgba(45,45,42,.82); color: white; font-size: 7px; opacity: 0; transition: opacity .18s ease; }
.photo-preview:hover img { transform: scale(1.025); }
.photo-preview:hover > span { opacity: 1; }

.document-section { margin-top: 55px; }
.document-upload { display: flex; align-items: end; gap: 14px; padding: 20px; }
.document-upload label { flex: 1; }
.document-list { display: grid; gap: 8px; margin-top: 12px; }
.document-list article { display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid var(--line); border-radius: 11px; padding: 12px 15px; background: white; }
.document-list article > a { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; min-width: 0; }
.document-list article > a > span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 9px; background: #f8e7e5; color: var(--danger); font-size: 8px; font-weight: 900; }
.document-list strong { overflow: hidden; color: var(--forest); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.document-list small { color: var(--muted); font-size: 8px; }

.company-assignment { margin-top: 12px; }
.company-assignment summary { color: var(--green); cursor: pointer; font-size: 9px; font-weight: 850; }
.company-assignment form { margin-top: 10px; border-radius: 9px; padding: 12px; background: var(--mint-pale); }
.checkbox-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-bottom: 10px; }
.checkbox-list label { display: flex; align-items: center; gap: 7px; font-size: 8px; }
.checkbox-list input, .report-fields input { width: 15px; height: 15px; margin: 0; accent-color: var(--green); }

.report-page { width: min(1120px, calc(100% - 44px)); }
.report-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-height: 310px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 13px; }
.report-fields label { display: flex; align-items: center; gap: 7px; margin: 0; border-radius: 7px; padding: 8px; background: #f4f7f7; font-size: 8px; }
.report-fields .select-all-field { grid-column: 1 / -1; background: var(--mint-pale); color: var(--forest); }

.viewer-modal { position: fixed; z-index: 220; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(32,45,60,.94); }
.viewer-dialog { display: grid; width: min(1180px, 100%); height: min(900px, calc(100vh - 40px)); grid-template-rows: auto 1fr auto; overflow: hidden; border-radius: 18px; background: white; }
.viewer-heading { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 16px 22px; }
.viewer-heading p { margin: 0 0 3px; color: var(--green); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.viewer-heading h2 { margin: 0; font-family: Georgia, serif; font-size: 22px; font-weight: 400; }
.viewer-heading button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 28px; }
.viewer-stage { display: grid; place-items: center; overflow: hidden; background: var(--charcoal); cursor: grab; touch-action: none; }
.viewer-stage:active { cursor: grabbing; }
.viewer-stage img { max-width: calc(100% - 30px); max-height: calc(100% - 30px); transform-origin: center; transition: transform .08s linear; user-select: none; }
.viewer-controls { display: flex; align-items: center; justify-content: center; gap: 10px; border-top: 1px solid var(--line); padding: 13px; }
.viewer-controls button { border: 1px solid var(--line); border-radius: 999px; padding: 8px 13px; background: white; color: var(--green); cursor: pointer; font-size: 9px; font-weight: 850; }
.viewer-controls input { width: min(300px, 40vw); border: 0; padding: 0; box-shadow: none; }

@media (max-width: 1050px) {
    .companies-admin-grid { grid-template-columns: 1fr; }
    .company-costs { grid-template-columns: repeat(3, 1fr); }
    .report-fields { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
    .topbar { grid-template-columns: 1fr auto auto; gap: 8px; }
    .user-menu { display: flex; }
    .user-menu > span, .user-menu > a { display: none; }
    .user-menu form button { padding: 7px 9px; font-size: 8px; }
    .company-choice-grid, .form-grid.three { grid-template-columns: 1fr; }
    .company-costs { grid-template-columns: repeat(2, 1fr); }
    .danger-zone, .document-upload { align-items: stretch; flex-direction: column; }
    .admin-photo-toolbar select { width: 100%; }
    .party-heading-actions { align-items: flex-end; flex-direction: column; }
    .checkbox-list, .report-fields { grid-template-columns: 1fr; }
    .document-list article > a { grid-template-columns: auto 1fr; }
    .document-list small { grid-column: 2; }
    .viewer-modal { padding: 0; }
    .viewer-dialog { height: 100vh; border-radius: 0; }
    .viewer-controls { flex-wrap: wrap; }
    .viewer-controls input { order: -1; width: 100%; }
}

/* Versión 1.2.2: lectura sencilla para ajustadores y fotografía completa */
.eyebrow { font-size: 12px; }
.button { min-height: 52px; padding: 0 24px; font-size: 15px; }
.button.small { min-height: 43px; padding: 0 16px; font-size: 13px; }
.app-brand strong { font-size: 20px; }
.app-brand small { font-size: 11px; }
.topbar nav a { font-size: 14px; }
.user-menu > span { font-size: 13px; }
.user-menu small { font-size: 11px; }
.user-menu form button { min-height: 42px; padding: 8px 14px; font-size: 13px; }
.menu-toggle { min-height: 42px; font-size: 14px; }
.page-hero > div > span, .page-heading > div > span { font-size: 16px; }
.stat-grid span, .stat-grid small { font-size: 13px; }
.section-heading p, .card-heading p { font-size: 12px; }
.section-heading a { font-size: 14px; }
table { font-size: 14px; }
th { font-size: 11px; }
td { font-size: 15px; line-height: 1.45; }
.claim-link strong { font-size: 16px; }
.claim-link span { font-size: 13px; }
.text-link { font-size: 14px; }
.status { padding: 7px 11px; font-size: 11px; }
.empty-state p, .empty-page p { font-size: 15px; }
label { font-size: 15px; }
label small { font-size: 12px; }
input, select, textarea { min-height: 50px; padding: 13px 14px; font-size: 17px; }
textarea { min-height: 110px; }
legend { font-size: 23px; }
.back-link { font-size: 14px; }
.form-intro p:not(.eyebrow) { font-size: 16px; }
.tip-card strong, .tip-card span { font-size: 14px; }
.claim-meta span { font-size: 14px; }
.claim-meta b { font-size: 11px; }
.workflow-note strong { font-size: 22px; }
.workflow-note p { font-size: 14px; }
.admin-photo-toolbar > span { font-size: 13px; }
.party-heading span { font-size: 11px; }
.party-heading > b, .party-heading-actions b { font-size: 13px; }
.bulk-upload-copy h3, .classification-heading h3 { font-size: 26px; }
.bulk-upload-copy p, .classification-heading p { font-size: 13px; }
.classification-heading > small { font-size: 12px; }
.party-empty span { font-size: 13px; }
.upload-zone { min-height: 145px; padding: 18px; }
.upload-zone strong { font-size: 15px; }
.upload-zone small { font-size: 12px; }
.upload-progress span { font-size: 12px; }
.photo-card > div > span { font-size: 12px; }
.photo-card button { font-size: 13px; }
.photo-preview > span { font-size: 12px; }
.photo-selector span { font-size: 11px; }
.photo-category-label { font-size: 12px; }
.photo-category-label select { font-size: 14px; }
.add-party-card p { font-size: 12px; }
.add-party-card span { font-size: 14px; }
.user-info h3 { font-size: 23px; }
.user-info span, .user-info small { font-size: 13px; }
.user-actions > a, .user-actions summary, .text-button { font-size: 13px; }
.password-row button { min-height: 50px; font-size: 13px; }
.excel-visual p { font-size: 14px; }
.password-page > div > p:not(.eyebrow) { font-size: 15px; }
.flash { font-size: 14px; }
.site-footer { font-size: 12px; }
.site-footer span { font-size: 18px; }
.login-visual > p:not(.eyebrow), .install-intro > p:not(.eyebrow) { font-size: 17px; }
.login-trust { font-size: 13px; }
.login-card .card-heading span { font-size: 14px; }
.login-card > small { font-size: 12px; }
.feature-list li { font-size: 14px; }
.requirements span { font-size: 12px; }
.alert { font-size: 13px; }
.success-panel p { font-size: 15px; }
.editor-heading p, .editor-buttons button, .editor-workspace aside p { font-size: 13px; }
.company-card > div:first-child > span, .company-card small { font-size: 12px; }
.company-costs span { font-size: 11px; }
.company-costs b { font-size: 13px; }
.danger-zone strong { font-size: 15px; }
.danger-zone p { font-size: 13px; }
.document-list strong { font-size: 14px; }
.document-list small { font-size: 12px; }
.document-list article > a > span { font-size: 11px; }
.company-assignment summary, .checkbox-list label, .report-fields label { font-size: 13px; }

.viewer-dialog { min-height: 0; height: min(900px, calc(100dvh - 40px)); }
.viewer-stage { min-width: 0; min-height: 0; overflow: hidden; padding: 18px; }
.viewer-stage img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer-heading p { font-size: 11px; }
.viewer-heading h2 { font-size: 26px; }
.viewer-controls button { min-height: 44px; padding: 9px 15px; font-size: 14px; }

@media (max-width: 760px) {
    .topbar nav a { font-size: 16px; }
    .user-menu form button { padding: 7px 10px; font-size: 12px; }
    .page-hero > div > span, .page-heading > div > span { font-size: 15px; }
    .stat-grid span, .stat-grid small { font-size: 12px; }
    .viewer-dialog { height: 100dvh; }
    .viewer-stage { padding: 8px; }
    .viewer-controls button { flex: 1 1 auto; }
}
