@font-face {
    font-family: "DM Sans";
    src: url("fonts/dm-sans.ttf") format("truetype");
    font-weight: 100 1000;
    font-display: swap;
}
@font-face {
    font-family: "Source Serif 4";
    src: url("fonts/source-serif-4.ttf") format("truetype");
    font-weight: 200 900;
    font-display: swap;
}
@font-face {
    font-family: "Clash Display";
    src: url("fonts/clash-display-regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Clash Display";
    src: url("fonts/clash-display-medium.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Clash Display";
    src: url("fonts/clash-display-bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ============ Tokens ============ */
:root {
    --wine: #800437;
    --wine-dark: #580727;
    --wine-deep: #2f0614;
    --gold: #b98725;
    --champagne: #e7cf9f;
    --paper: #faf7f3;
    --cream: #f5ede4;
    --ink: #24181e;
    --muted: #6b5a62;
    --line: #ebe0d8;
    --line-strong: #dccbc0;
    --white: #fffdfb;
    --success: #23673a;
    --success-bg: #e6f2e5;
    --warning: #7a5207;
    --warning-bg: #fbefcf;
    --danger: #8f1d3b;
    --danger-bg: #fae3e7;
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 1px 2px #3d0a1e0d, 0 2px 8px #3d0a1e08;
    --shadow: 0 2px 4px #3d0a1e0a, 0 12px 32px #3d0a1e12;
    --shadow-lg: 0 24px 60px #2f061429;
    --display: "Source Serif 4", Georgia, serif;
    --display-large: "Clash Display", "Source Serif 4", Georgia, sans-serif;
    --body: "DM Sans", system-ui, sans-serif;
    --ease: cubic-bezier(.2, .7, .2, 1);
    --bs-body-font-family: var(--body);
    --bs-body-color: var(--ink);
    --bs-link-color-rgb: 128, 4, 55;
    --bs-border-color: var(--line);
}
* { min-width: 0; }
html { scroll-behavior: smooth; }
body { background: var(--paper); color: var(--ink); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; }
a { color: var(--wine); transition: color .2s var(--ease); }
a:hover { color: var(--wine-dark); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
::selection { background: var(--champagne); color: var(--wine-deep); }
button, input, select, textarea { font: inherit; }
h1, h2, h3 { color: var(--wine-dark); font-family: var(--display); font-weight: 650; line-height: 1.1; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); letter-spacing: -.02em; }
h3 { font-size: 1.25rem; }
p { line-height: 1.65; }
.muted, .text-muted { color: var(--muted) !important; }
.site-wrap { width: min(1200px, calc(100% - 96px)); margin-inline: auto; }
.site-wrap.narrow { max-width: 660px; }
.site-wrap.form-width { max-width: 860px; }
.section-space { padding-block: clamp(36px, 6vw, 80px); }
[hidden] { display: none !important; }
.skip-link { position: fixed; z-index: 50; top: -4rem; left: 1rem; background: white; padding: .65rem 1rem; border-radius: 8px; box-shadow: var(--shadow); }
.skip-link:focus { top: 1rem; }
.eyebrow, .event-edition { display: block; color: #8a6420; font-size: .9rem; font-weight: 700; margin: 0 0 .5rem; }

/* ============ Buttons ============ */
.btn { --bs-btn-focus-shadow-rgb: 185, 135, 37; display: inline-flex; align-items: center; justify-content: center; gap: .55rem; font-weight: 700; white-space: normal; border-radius: 999px; padding: .68rem 1.2rem; text-decoration: none; letter-spacing: .005em; transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s, color .2s, border-color .2s; }
.btn:active { transform: translateY(1px); }
.btn-lg { font-size: 1rem; min-height: 54px; padding-inline: 1.6rem; }
.btn-sm { font-size: .84rem; padding: .4rem .85rem; gap: .4rem; }
.btn-wine { --bs-btn-color: #fff; --bs-btn-bg: var(--wine); --bs-btn-border-color: var(--wine); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--wine-dark); --bs-btn-hover-border-color: var(--wine-dark); --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--wine-dark); --bs-btn-active-border-color: var(--wine-dark); --bs-btn-disabled-bg: var(--wine); --bs-btn-disabled-border-color: var(--wine); box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--wine) 70%, transparent); }
.btn-wine:hover { box-shadow: 0 10px 22px -8px color-mix(in srgb, var(--wine) 80%, transparent); transform: translateY(-1px); }
.btn-outline-wine { --bs-btn-color: var(--wine); --bs-btn-bg: var(--white); --bs-btn-border-color: var(--line-strong); --bs-btn-hover-color: var(--wine-dark); --bs-btn-hover-bg: #f8eef0; --bs-btn-hover-border-color: color-mix(in srgb, var(--wine) 40%, white); --bs-btn-active-color: var(--wine-dark); --bs-btn-active-bg: #f3e3e7; --bs-btn-active-border-color: var(--wine); }
.btn-gold { box-shadow: none; --bs-btn-color: var(--wine-deep); --bs-btn-bg: var(--champagne); --bs-btn-border-color: var(--champagne); --bs-btn-hover-color: var(--wine-deep); --bs-btn-hover-bg: #f2dfb6; --bs-btn-hover-border-color: #f2dfb6; --bs-btn-active-color: var(--wine-deep); --bs-btn-active-bg: #dcbf85; --bs-btn-active-border-color: #dcbf85; }
.btn-gold:hover { transform: translateY(-1px); }
.btn-glass { --bs-btn-color: #fff; --bs-btn-bg: #ffffff14; --bs-btn-border-color: #ffffff40; --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #ffffff26; --bs-btn-hover-border-color: #ffffff80; --bs-btn-active-color: #fff; --bs-btn-active-bg: #ffffff33; --bs-btn-active-border-color: #fff; backdrop-filter: blur(8px); }
.btn-outline-danger { border-radius: 999px; }
.btn-danger { border-radius: 999px; }

/* ============ Alerts ============ */
.notice-wrap { padding-top: 20px; }
.notice-wrap .alert { margin-bottom: 0; border-radius: var(--radius-sm); border: 1px solid transparent; display: flex; align-items: center; gap: .65rem; font-weight: 550; box-shadow: var(--shadow-sm); animation: rise .35s var(--ease); }
.alert-success { background: var(--success-bg); color: var(--success); border-color: #cfe4cd !important; }
.alert-danger { background: var(--danger-bg); color: var(--danger); border-color: #f1c9d1 !important; }
.alert-warning { background: var(--warning-bg); color: var(--warning); border-color: #f0dca5 !important; }
.alert-info { background: #f1ebf6; color: #4d2a63; border-color: #e1d4ea !important; }
@keyframes rise { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ============ Public header ============ */
.public-body { display: flex; flex-direction: column; min-height: 100vh; }
.public-body > main { flex: 1; }
.public-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--white) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); transition: background-color .3s, border-color .3s, box-shadow .3s; }
.header-inner { min-height: 84px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.public-brand { display: inline-flex; align-items: center; gap: 16px; text-decoration: none; flex-shrink: 0; }
.public-brand img { height: 58px; width: auto; object-fit: contain; mix-blend-mode: multiply; }
.public-brand span { border-left: 1px solid var(--line-strong); padding-left: 16px; color: var(--muted); font-weight: 600; line-height: 1.05; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; }
.public-brand strong { font-family: var(--display); font-size: 1.4rem; display: inline-block; margin-top: .2rem; letter-spacing: -.03em; text-transform: none; color: var(--wine-dark); font-weight: 650; }
.public-header nav { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 32px); }
.public-header nav > a:not(.btn) { position: relative; padding-block: .5rem; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .93rem; }
.public-header nav > a:not(.btn):hover, .public-header nav > a:not(.btn)[aria-current] { color: var(--wine); }
.track-header { font-size: .9rem; padding: .6rem 1.05rem; }
.menu-toggle { display: none; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--wine); font-size: 1.4rem; width: 46px; height: 46px; padding: 0; }

/* Overlay header on the home hero */
.is-home .public-header { position: absolute; inset: 0 0 auto; background: linear-gradient(#1c030c99, transparent); border-bottom: 0; backdrop-filter: none; }
.is-home .public-header.is-scrolled { position: fixed; background: color-mix(in srgb, var(--wine-deep) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 0; box-shadow: none; animation: drop .35s var(--ease); }
@keyframes drop { from { transform: translateY(-100%); } to { transform: none; } }
.is-home .public-brand img { mix-blend-mode: normal; filter: brightness(0) invert(1); background: none; border-radius: 0; padding: 0; height: 78px; }
.is-home .public-brand span { color: #f4e3d4; border-color: #ffffff40; }
.is-home .public-brand strong { color: #fff; }
.is-home .public-header nav > a:not(.btn) { color: #f6e9e0; }
.is-home .public-header nav > a:not(.btn):hover { color: #fff; }
.is-home .public-header .track-header { --bs-btn-color: #fff; --bs-btn-bg: #ffffff14; --bs-btn-border-color: #ffffff4d; --bs-btn-hover-color: var(--wine-deep); --bs-btn-hover-bg: var(--champagne); --bs-btn-hover-border-color: var(--champagne); backdrop-filter: blur(6px); }
.is-home .menu-toggle { background: #ffffff1a; color: #fff; border-color: #ffffff40; }

/* ============ Hero ============ */
.hero { position: relative; isolation: isolate; overflow: hidden; border-radius: 0 0 50% 50% / 0 0 110px 110px; background: #3d0518; color: #fff; min-height: min(860px, 100svh); display: flex; align-items: center; }
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 78% 18%; animation: heroZoom 18s var(--ease) both; }
@keyframes heroZoom { from { transform: scale(1.06); } to { transform: scale(1); } }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
    linear-gradient(90deg, #2c0412 0%, #3a0517e6 26%, #4a061d99 48%, #4a061d00 68%),
    linear-gradient(0deg, #22030ecc 0%, #22030e00 34%); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(1100px 600px at 12% 40%, #b9872520, transparent 60%); }
.hero-inner { position: relative; padding-block: 150px 150px; width: min(1200px, calc(100% - 96px)); margin-inline: auto; }
.hero-copy { max-width: 760px; animation: heroIn .9s var(--ease) both .1s; }
@keyframes heroIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero-edition { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; margin-bottom: 26px; }
.hero .event-edition { color: var(--champagne); margin: 0; }
.enrollment-state { display: inline-flex; align-items: center; gap: .45rem; padding: .32rem .75rem; border: 1px solid #dbc9b7; border-radius: 999px; background: #fbf6ef; color: #65452f; font-size: .8rem; font-weight: 750; }
.enrollment-state::before { content: ''; display: block; width: .45rem; height: .45rem; flex: 0 0 .45rem; border-radius: 50%; background: #977046; }
.enrollment-state.is-open { background: var(--success-bg); color: var(--success); border-color: #c9dfc7; }
.enrollment-state.is-open::before { background: #3f9a52; box-shadow: 0 0 0 0 #3f9a5266; animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px #3f9a5200; } 100% { box-shadow: 0 0 0 0 #3f9a5200; } }
.hero .enrollment-state { background: #ffffff14; color: #fff; border-color: #ffffff38; backdrop-filter: blur(6px); }
.hero .enrollment-state.is-open { background: #3f9a5229; border-color: #7fcf8f66; color: #e3f7e6; }
.hero .enrollment-state.is-open::before { background: #7fe093; }
.hero h1 { color: #fff; font-size: clamp(3.2rem, 6.6vw, 6.2rem); font-weight: 600; letter-spacing: -.035em; line-height: .98; margin: 0 0 12px; text-wrap: balance; text-shadow: 0 2px 30px #0004; }
.hero h1 em { display: block; font-style: italic; font-weight: 400; color: var(--champagne); letter-spacing: -.03em; }
.hero-description { max-width: 52ch; text-wrap: balance; margin: 0 0 30px; font-size: clamp(1.02rem, 1.35vw, 1.17rem); color: #f3e2dc; line-height: 1.65; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.hero-note { display: flex; align-items: center; gap: .5rem; margin-top: 22px; color: #e9d3c9; font-size: .9rem; }
.hero-note .bi { color: var(--champagne); }
.hero-scroll { position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); color: #ffffffa0; font-size: 1.3rem; animation: bob 2.4s ease-in-out infinite; text-decoration: none; }
.hero-scroll:hover { color: #fff; }
@keyframes bob { 50% { transform: translate(-50%, 6px); } }

/* Facts strip overlapping hero */
.facts { position: relative; z-index: 2; margin-top: -76px; }
.fact-grid { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 10px; }
.fact { display: flex; align-items: center; gap: 15px; padding: 18px clamp(14px, 2.2vw, 28px); }
.fact + .fact { border-left: 1px solid var(--line); }
.fact .bi, .feature-icon, .reference-icon { display: inline-grid; place-items: center; flex: 0 0 auto; width: 48px; height: 48px; border-radius: 14px; background: linear-gradient(145deg, #f8ecee, #f2e2d3); color: var(--wine); font-size: 1.25rem; }
.fact strong, .fact span { display: block; }
.fact strong { color: var(--wine-dark); line-height: 1.2; font-weight: 700; }
.fact span { font-size: .92rem; color: var(--muted); line-height: 1.4; margin-top: .2rem; }

/* How it works */
.section-head { max-width: 640px; margin-bottom: clamp(26px, 4vw, 44px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); letter-spacing: -.035em; margin-bottom: .7rem; }
.section-head p { color: var(--muted); font-size: 1.05rem; margin: 0; }
.steps-section { padding-block: clamp(56px, 8vw, 104px) clamp(32px, 4vw, 56px); }
.how-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: how; }
.how-steps li { position: relative; counter-increment: how; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px 24px; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s; }
.how-steps li:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.how-steps li::after { display: none; } .how-steps li::after-disabled { content: "0" counter(how); position: absolute; top: 18px; right: 20px; font-family: var(--display); font-size: 2rem; font-weight: 300; color: #ead9cc; line-height: 1; }
.how-steps .feature-icon { margin-bottom: 18px; }
.how-steps h3 { font-size: 1.15rem; margin-bottom: .4rem; color: var(--wine-dark); }
.how-steps p { color: var(--muted); font-size: .94rem; margin: 0; line-height: 1.55; }

.reference-section { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(20px, 3vw, 32px); align-items: stretch; padding-block: clamp(24px, 4vw, 48px) clamp(56px, 8vw, 104px); }
.reference-block { scroll-margin-top: 100px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(24px, 3.5vw, 40px); }
.reference-block h2 { margin-bottom: 16px; }
.reference-block p { color: var(--muted); margin-bottom: 1.1rem; }
.reference-block p:last-child { margin-bottom: 0; }
.regulation { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 22px; background: linear-gradient(150deg, var(--wine-dark), var(--wine-deep)); border-color: transparent; color: #f6e8e2; }
.regulation::after { content: ""; position: absolute; width: 340px; height: 340px; right: -120px; bottom: -160px; border-radius: 50%; border: 1px solid #e7cf9f33; box-shadow: 0 0 0 40px #e7cf9f0a, 0 0 0 80px #e7cf9f08; }
.regulation h2 { color: #fff; }
.regulation p { color: #ecd8d0; }
.regulation .reference-icon { background: #ffffff14; color: var(--champagne); border: 1px solid #ffffff22; }
.regulation .btn { position: relative; z-index: 1; }
.requirements { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.requirements li { display: flex; align-items: baseline; gap: .75rem; padding: .7rem 0; border-top: 1px solid var(--line); line-height: 1.5; }
.requirements li:first-child { border-top: 0; }
.requirements .bi { display: inline-grid; place-items: center; flex: 0 0 22px; height: 22px; border-radius: 50%; background: var(--success-bg); color: var(--success); font-size: .8rem; transform: translateY(3px); }

/* CTA band */
.cta-band { background: var(--cream); border-top: 1px solid var(--line); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: clamp(30px, 4vw, 48px); }
.cta-inner h2 { margin: 0 0 .3rem; }
.cta-inner p { margin: 0; color: var(--muted); }

/* ============ Footer ============ */
.public-footer { background: var(--wine-deep); color: #f3e4dd; position: relative; }
.public-footer::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.footer-content { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 32px; align-items: start; padding-block: 44px 36px; }
.footer-brand { display: flex; align-items: center; gap: 1rem; font-family: var(--display); font-size: 1.2rem; font-weight: 600; line-height: 1.2; color: #fff; }
.footer-brand img { height: 56px; width: auto; background: #fffdfb; border-radius: 10px; padding: 4px 6px; }
.footer-links, .footer-contact { display: grid; gap: .5rem; font-size: .92rem; overflow-wrap: anywhere; }
.footer-links a, .footer-contact a { display: inline-flex; align-items: center; gap: .5rem; }
.public-footer a { color: #f3e4dd; text-decoration: none; opacity: .88; }
.public-footer a:hover { opacity: 1; color: #fff; }
.public-footer strong { color: var(--champagne); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: .2rem; }
.footer-bottom { border-top: 1px solid #ffffff14; padding-block: 16px; font-size: .82rem; color: #c9b0a8; }

/* ============ Panels & forms ============ */
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.form-panel { padding: clamp(24px, 4.5vw, 44px); box-shadow: var(--shadow); }
.form-panel h1 { margin-bottom: 14px; }
.form-panel h2 { margin-bottom: 10px; }
.form-panel > p { color: var(--muted); }
.access-layout { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 7vw, 96px); align-items: center; max-width: none; margin-block: auto; padding-block: clamp(40px, 8vw, 110px); }
.access-intro h1 { margin: 18px 0 14px; max-width: 14ch; font-size: clamp(2.3rem, 4.8vw, 3.6rem); }
.access-intro p { color: var(--muted); max-width: 36ch; font-size: 1.1rem; margin-bottom: 0; }
.access-intro .event-edition { margin-top: 22px; margin-bottom: 0; }
.access-intro .event-edition + h1 { margin-top: 2px; }
.access-perks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.access-perks li { display: flex; align-items: center; gap: .7rem; color: var(--ink); font-weight: 550; }
.access-perks .bi { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: #f5e9ea; color: var(--wine); }
.back-link { display: inline-flex; width: fit-content; align-items: center; gap: .45rem; font-size: .9rem; font-weight: 650; text-decoration: none; color: var(--muted); padding: .35rem .75rem .35rem .55rem; border-radius: 999px; border: 1px solid var(--line); background: var(--white); }
.back-link:hover { color: var(--wine); border-color: var(--line-strong); }
.access-panel { position: relative; overflow: hidden; }
.access-panel .panel-icon { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: linear-gradient(145deg, #f8ecee, #f2e2d3); color: var(--wine); font-size: 1.4rem; margin-bottom: 18px; }
.access-panel .form-grid > div:last-child .btn { width: 100%; margin-top: .3rem; }
.password-field { position: relative; }
.password-field > label { display: block; }
.password-field > input { padding-right: 3rem; }
.password-toggle { position: absolute; inset: auto 5px 5px auto; width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); font-size: 1.1rem; border-radius: 8px; }
.password-toggle:hover { background: #f7eeeb; color: var(--wine); }
.form-grid { display: grid; gap: 18px 18px; }
.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-all { grid-column: 1 / -1; }
label, legend { font-size: .88rem; font-weight: 650; color: var(--ink); }
.form-text, label small { font-weight: 450; color: var(--muted); }
.form-control, .form-select { margin-top: 7px; background-color: #fff; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--ink); min-height: 50px; padding-inline: .95rem; box-shadow: 0 1px 0 #3d0a1e05; transition: border-color .2s, box-shadow .2s, background-color .2s; }
.form-control:hover, .form-select:hover { border-color: #c9b2a6; }
textarea.form-control { padding-block: .8rem; line-height: 1.55; }
.form-control::placeholder { color: #9a8a90; opacity: 1; }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: var(--wine); box-shadow: 0 0 0 4px color-mix(in srgb, var(--wine) 13%, transparent); }
.form-control:user-invalid, .form-select:user-invalid { border-color: #c2405f; }
.form-control-color { width: 100%; padding: .4rem; }
input[type="file"].form-control { padding: .55rem; min-height: 50px; }
input[type="file"].form-control::file-selector-button { border: 0; border-radius: 8px; background: #f5e9ea; color: var(--wine); font-weight: 700; padding: .45rem .8rem; margin-right: .75rem; }
.form-check-input:checked { background-color: var(--wine); border-color: var(--wine); }
.form-check-input { flex: 0 0 1.25em; width: 1.25em; height: 1.25em; margin: .15em 0 0; border-color: #bfa9a0; cursor: pointer; }
.form-actions, .decision-bar, .button-group { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
.form-actions { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); justify-content: flex-end; }
.form-actions .btn:first-child:not(:only-child) { margin-right: auto; }
.btn[aria-busy="true"] { pointer-events: none; opacity: .8; }
.btn[aria-busy="true"]::after { content: ""; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ Registration flow ============ */
.flow-heading { margin-bottom: 30px; }
.flow-heading .event-edition { margin-bottom: .5rem; }
.flow-heading h1 { margin: 0; }
.flow-heading p.lead-note { color: var(--muted); margin: .6rem 0 0; }
.registration-flow .flow-heading { text-align: center; }
.registration-flow .flow-heading .event-edition { text-align: center; }
.stepper { isolation: isolate; list-style: none; padding: 0; margin: 0 0 28px; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; text-align: center; }
.stepper li { position: relative; color: var(--muted); }
.stepper li + li::before { content: ""; position: absolute; background: var(--line-strong); height: 2px; width: 100%; left: -50%; top: 1.3rem; z-index: -1; }
.stepper li.step-done + li::before, .stepper li.step-done + li.step-current::before { background: linear-gradient(90deg, var(--gold), var(--wine)); }
.stepper a { display: block; color: inherit; text-decoration: none; border-radius: 10px; }
.stepper a:hover b { color: var(--wine); }
.stepper span { width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--white); display: grid; place-items: center; margin-inline: auto; border: 1.5px solid var(--line-strong); font-weight: 700; font-size: .95rem; transition: all .3s var(--ease); }
.stepper b { display: block; font-size: .86rem; font-weight: 650; line-height: 1.25; margin-top: 9px; }
.stepper .step-current { color: var(--wine-dark); }
.stepper .step-current span { background: var(--wine); border-color: var(--wine); color: #fff; box-shadow: 0 0 0 5px color-mix(in srgb, var(--wine) 14%, transparent); }
.stepper .step-done span { background: var(--champagne); border-color: var(--champagne); color: var(--wine-deep); }
.flow-card-heading { display: flex; align-items: center; gap: 15px; margin-bottom: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.flow-card-heading p { font-size: .78rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: #8a6420; margin: 0 0 .2rem; }
.flow-card-heading h2 { margin: 0; }
.flow-progress { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; margin: -10px 0 26px; }
.flow-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--wine)); border-radius: inherit; transition: width .6s var(--ease); }
.verified-email, .saved-note { margin-top: 20px; color: var(--muted); overflow-wrap: anywhere; font-size: .92rem; }
.verified-email { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; background: var(--success-bg); color: var(--success); padding: .75rem 1rem; border-radius: 12px; }
.verified-email strong { color: var(--success); }
.saved-note { text-align: center; display: flex; align-items: center; justify-content: center; gap: .45rem; }
.document-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-top: 16px; }
.upload-box { position: relative; display: grid; gap: .35rem; align-content: start; border: 1.5px dashed #d3bdb1; border-radius: 16px; padding: 20px; background: #fdf9f5; transition: border-color .2s, background-color .2s, box-shadow .2s; }
.upload-box:hover { border-color: color-mix(in srgb, var(--wine) 45%, white); background: #fff; }
.upload-box.is-dragover { border-color: var(--wine); background: #fbf1f3; box-shadow: 0 0 0 4px color-mix(in srgb, var(--wine) 10%, transparent); }
.upload-box.has-file { border-style: solid; border-color: #b9d6b9; background: #f7fbf6; }
.upload-box > .bi { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #f5e9ea; color: var(--wine); font-size: 1.25rem; margin-bottom: .3rem; }
.upload-box small, .file-current { font-size: .86rem; color: var(--muted); overflow-wrap: anywhere; }
.file-current { display: inline-flex; align-items: center; gap: .35rem; color: var(--success); font-weight: 600; text-decoration: none; }
.upload-box input { font-size: .9rem; }
.upload-control.is-enhanced { position: relative; width: fit-content; max-width: 100%; margin-top: .4rem; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; color: var(--wine); transition: background-color .2s, border-color .2s; }
.upload-control.is-enhanced:hover { background: #f9f1ed; border-color: #c9b2a6; }
.upload-control.is-enhanced:focus-within { outline: 3px solid var(--gold); outline-offset: 3px; }
.upload-select { display: inline-flex; align-items: center; gap: .45rem; min-height: 42px; padding: .4rem 1rem; font-size: .88rem; font-weight: 700; }
.upload-control.is-enhanced input { position: absolute; inset: 0; width: 100%; min-height: 100%; padding: 0; margin: 0; cursor: pointer; opacity: 0; border-radius: 999px; }
.upload-control.is-enhanced input::file-selector-button { cursor: pointer; }
.upload-preview img { max-height: 140px; max-width: 100%; width: auto; border-radius: 10px; margin-top: .5rem; box-shadow: var(--shadow-sm); }
.upload-message { margin: 4px 0 0; font-size: .88rem; color: var(--danger); font-weight: 600; }
.term-checks { display: grid; gap: 10px; }
.term-check { display: flex; gap: .8rem; padding: 1rem 1.1rem; background: #fdf9f5; border: 1px solid var(--line); border-radius: 14px; transition: border-color .2s, background-color .2s; cursor: pointer; }
.term-check:hover { border-color: var(--line-strong); }
.term-check:has(input:checked) { background: #f9f0f2; border-color: color-mix(in srgb, var(--wine) 35%, white); }
.term-check label { cursor: pointer; }
.term-check a { display: inline-flex; align-items: center; gap: .3rem; font-size: .86rem; margin-top: .2rem; font-weight: 600; }
.term-body { max-width: 72ch; margin-top: 1.5rem; font-size: 1.02rem; line-height: 1.8; color: #3a2c33; }
.callout { display: flex; gap: .7rem; align-items: flex-start; background: var(--warning-bg); color: var(--warning); padding: 14px 16px; border-radius: 12px; border: 1px solid #f0dca5; line-height: 1.55; }
.callout.check-row { cursor: pointer; }
.callout-success { background: var(--success-bg); color: var(--success); border-color: #cfe4cd; }

/* ============ Pills ============ */
.pill { display: inline-flex; align-items: center; gap: .4rem; border-radius: 999px; padding: .3rem .72rem; background: #f2eaed; font-size: .8rem; font-weight: 700; color: #65354a; white-space: nowrap; line-height: 1.2; }
.pill::before { content: ""; width: .42rem; height: .42rem; border-radius: 50%; background: currentColor; opacity: .75; }
.pill-review, .pill-pending, .pill-waiting { background: var(--warning-bg); color: var(--warning); }
.pill-approved, .pill-accepted, .pill-sent { background: var(--success-bg); color: var(--success); }
.pill-correction, .pill-rejected, .pill-declined, .pill-failed { background: var(--danger-bg); color: var(--danger); }
.pill-unneeded, .pill-draft { background: #efecee; color: #5e5459; }

/* ============ Candidate area ============ */
.candidate-hero { position: relative; overflow: hidden; display: flex; gap: 24px; align-items: center; padding: clamp(20px, 3vw, 34px); margin-bottom: 20px; background: linear-gradient(135deg, var(--wine-dark), var(--wine-deep)); color: #f6e8e2; border: 0; box-shadow: var(--shadow); }
.candidate-hero::after { content: ""; position: absolute; width: 380px; height: 380px; right: -140px; top: -200px; border-radius: 50%; border: 1px solid #e7cf9f2e; box-shadow: 0 0 0 46px #e7cf9f08, 0 0 0 92px #e7cf9f06; pointer-events: none; }
.candidate-hero h2 { color: #fff; font-size: clamp(1.5rem, 2.8vw, 2.1rem); margin-bottom: .5rem; }
.candidate-hero .candidate-name p { color: #ecd8d0; }
.candidate-hero .candidate-name .bi { color: var(--champagne); }
.candidate-hero .candidate-photo { border: 3px solid #ffffff2e; box-shadow: 0 10px 30px #0004; }
.candidate-hero .protocol { background: #ffffff12; border: 1px solid #ffffff22; backdrop-filter: blur(6px); }
.candidate-hero .protocol small { color: #e2c9c0; }
.candidate-hero .protocol strong { color: #fff; }
.candidate-hero .btn-outline-wine { --bs-btn-color: #fff; --bs-btn-bg: transparent; --bs-btn-border-color: #ffffff4d; --bs-btn-hover-color: var(--wine-deep); --bs-btn-hover-bg: var(--champagne); --bs-btn-hover-border-color: var(--champagne); }
.candidate-header { display: flex; gap: 22px; align-items: center; padding: clamp(18px, 2.8vw, 28px); margin-bottom: 18px; }
.candidate-photo { border-radius: 16px; object-fit: cover; flex: 0 0 auto; }
.candidate-name p { margin-bottom: .75rem; }
.candidate-name p span { display: inline-block; margin-left: .7rem; }
.candidate-name .bi { color: var(--wine); }
.candidate-states { display: flex; flex-wrap: wrap; gap: .4rem; }
.protocol { position: relative; z-index: 1; margin-left: auto; display: grid; justify-items: start; gap: .4rem; background: #f6eee8; border-radius: 14px; padding: 16px 18px; overflow-wrap: anywhere; }
.protocol strong { color: var(--wine); font-size: 1.15rem; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.protocol small, .portal-table small, .clean-list small { color: var(--muted); display: block; }
.status-track { list-style: none; margin: 0 0 20px; padding: 18px clamp(16px, 3vw, 28px); display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.status-track li { position: relative; display: flex; align-items: center; gap: .7rem; color: var(--muted); font-weight: 600; font-size: .92rem; }
.status-track li + li::before { content: ""; position: absolute; left: -10px; width: 10px; top: 50%; }
.status-track .bi { display: inline-grid; place-items: center; flex: 0 0 36px; height: 36px; border-radius: 50%; background: #f1e9e4; color: #9c8a92; font-size: 1rem; }
.status-track small { display: block; font-weight: 500; font-size: .8rem; color: var(--muted); }
.status-track .is-done .bi { background: var(--champagne); color: var(--wine-deep); }
.status-track .is-done { color: var(--ink); }
.status-track .is-current .bi { background: var(--wine); color: #fff; box-shadow: 0 0 0 5px color-mix(in srgb, var(--wine) 14%, transparent); }
.status-track .is-current { color: var(--wine-dark); }
.status-track .is-alert .bi { background: var(--danger); color: #fff; }
.details-grid, .overview-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
@media (min-width: 591px) {
    .candidate-next { grid-column: 2; grid-row: 1; }
    .candidate-history { grid-column: 1; grid-row: 1; }
}
.detail-panel { padding: clamp(18px, 2.6vw, 28px); margin-bottom: 20px; }
.detail-panel h2 { display: flex; align-items: center; gap: .55rem; font-size: clamp(1.2rem, 1.9vw, 1.45rem); margin-bottom: 16px; }
.detail-panel h2 > .bi { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; background: #f6ecec; color: var(--wine); font-size: 1rem; }
.detail-panel p:last-child { margin-bottom: 0; }
.attention-panel { border-color: #ecd38f; background: #fffaf0; box-shadow: 0 0 0 4px #fbefcf80; }
.attention-panel h2 > .bi { background: var(--warning-bg); color: var(--warning); }
.clean-list, .city-list { list-style: none; margin: 0; padding: 0; }
.clean-list li { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .8rem 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.clean-list li:first-child { border-top: 0; padding-top: .2rem; }
.clean-list li > a { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; text-decoration: none; }
.clean-list li > a:hover { text-decoration: underline; }
.clean-list li > .bi { color: var(--success); font-size: 1.1rem; }
.timeline { list-style: none; border-left: 2px solid var(--line); margin: 6px 0 6px 8px; padding: 0 0 0 22px; }
.timeline li { position: relative; padding: 0 0 18px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -29px; top: .3rem; width: 12px; height: 12px; border-radius: 50%; background: var(--white); border: 3px solid var(--wine); }
.timeline li:first-child::before { background: var(--wine); box-shadow: 0 0 0 4px color-mix(in srgb, var(--wine) 15%, transparent); }
.timeline strong { font-weight: 700; color: var(--ink); }
.timeline time { display: block; color: var(--muted); font-size: .82rem; margin-top: .1rem; }
.timeline p { margin: .35rem 0 0; overflow-wrap: anywhere; background: #faf5f1; padding: .55rem .75rem; border-radius: 10px; font-size: .92rem; }

/* ============ Admin shell ============ */
.admin-body { background: #f6f2ee; }
.admin-shell { display: grid; min-height: 100vh; grid-template-columns: 268px minmax(0, 1fr); }
.admin-sidebar { position: sticky; top: 0; align-self: start; height: 100vh; height: 100dvh; overflow-y: auto; display: flex; flex-direction: column; background: linear-gradient(180deg, #3f0b22 0%, #2a0615 100%); color: #f3e4dd; padding: 22px 14px 18px; border-radius: 0 28px 28px 0; scrollbar-width: thin; scrollbar-color: #ffffff22 transparent; }
.admin-sidebar a { color: inherit; text-decoration: none; }
.admin-brand { display: flex; align-items: center; justify-content: flex-start; padding: 4px 10px 18px; margin: 0 0 8px; border-bottom: 1px solid #ffffff14; }
.admin-brand img { width: 110px; height: auto; object-fit: contain; flex: 0 0 auto; filter: brightness(0) invert(1); }
.admin-brand span { font-family: var(--display); color: #fff; font-weight: 600; font-size: .95rem; line-height: 1.2; }
.admin-brand small { display: block; font-family: var(--body); font-size: .8rem; color: #d9c3b8; font-weight: 500; margin-top: .15rem; }
.admin-sidebar nav { display: grid; gap: 2px; flex: 1; align-content: start; }
.nav-group { font-size: .68rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #c9a9a0; opacity: .7; padding: 18px 12px 6px; }
.admin-sidebar nav a, .sign-out { position: relative; display: flex; align-items: center; gap: 12px; font-weight: 550; padding: 9px 12px; min-height: 42px; font-size: .9rem; border-radius: 10px; color: #ecdad3; transition: background-color .2s, color .2s; }
.admin-sidebar nav a .bi, .sign-out .bi { font-size: 1.1rem; opacity: .85; }
.admin-sidebar nav a:hover, .sign-out:hover { background: #ffffff10; color: #fff; }
.admin-sidebar nav a.current { color: var(--wine-deep); background: var(--champagne); font-weight: 700; box-shadow: 0 6px 18px -8px #e7cf9f80; }
.admin-sidebar nav a.current .bi { opacity: 1; }
.nav-count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 999px; background: #ffffff1f; font-size: .72rem; font-weight: 800; }
.current .nav-count { background: var(--wine-deep); color: #fff; }
.sidebar-foot { margin-top: 18px; padding-top: 14px; border-top: 1px solid #ffffff14; }
.sign-out { width: 100%; border: 0; background: transparent; }
.admin-top { position: sticky; top: 0; z-index: 10; min-height: 70px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: .65rem clamp(16px,3vw,36px); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--white) 90%, transparent); backdrop-filter: saturate(1.4) blur(12px); }
.back-public { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; font-size: .88rem; text-decoration: none; color: var(--muted); padding: .45rem .8rem; border-radius: 999px; border: 1px solid var(--line); background: var(--white); }
.back-public:hover { color: var(--wine); border-color: var(--line-strong); }
.admin-top-right, .admin-profile { display: flex; align-items: center; gap: 12px; }
.admin-profile { gap: .6rem; border-radius: 999px; padding: .25rem .9rem .25rem .25rem; text-decoration: none; border: 1px solid var(--line); background: var(--white); }
.admin-profile:hover { background: #fbf4f1; border-color: var(--line-strong); }
.admin-profile strong { font-size: .88rem; color: var(--ink); display: block; line-height: 1.15; }
.admin-profile small { display: block; color: var(--muted); line-height: 1.1; font-size: .76rem; }
.account-avatar { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; object-fit: cover; }
.admin-profile .account-avatar { width: 34px; height: 34px; flex-basis: 34px; font-size: .78rem; }
.avatar-initials { color: #fff; background: linear-gradient(135deg, var(--wine), #b23a62); font-size: .88rem; font-weight: 750; }
.account-list li, .account-identity, .account-photo-field { align-items: center; }
.account-identity, .account-photo-field { display: flex; gap: .8rem; }
.account-identity strong { display: block; }
.account-list li > .button-group { flex-shrink: 0; }
.account-photo-field .account-avatar { width: 60px; height: 60px; flex-basis: 60px; font-size: 1.1rem; }
.account-photo-field > div { flex: 1; }
.admin-notify { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); color: var(--muted); font-size: 1.1rem; text-decoration: none; }
.admin-notify:hover { color: var(--wine); border-color: var(--line-strong); }
.admin-notify span { position: absolute; top: -3px; right: -3px; color: #fff; background: var(--wine); border: 2px solid var(--white); border-radius: 999px; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 4px; font-size: .68rem; font-weight: 800; }
.admin-content { width: 100%; max-width: none; margin-inline: 0; padding: clamp(24px, 3vw, 40px) clamp(16px,3vw,40px) 60px; animation: fadeIn .35s var(--ease); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.admin-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 26px; }
.admin-heading h1 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); margin-bottom: .35rem; letter-spacing: -.035em; }
.admin-heading p { color: var(--muted); margin: 0; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.admin-heading .crumb { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); font-weight: 600; font-size: .88rem; text-decoration: none; margin-bottom: .55rem; }
.admin-heading .crumb:hover { color: var(--wine); }

/* Metrics */
.metric-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-bottom: 22px; }
.metric { position: relative; overflow: hidden; display: flex; gap: 14px; align-items: center; padding: 18px; min-height: 104px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); color: var(--wine); box-shadow: var(--shadow-sm); text-decoration: none; transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s; }
a.metric:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong); color: var(--wine); }
.metric .bi { display: grid; place-items: center; flex: 0 0 44px; height: 44px; background: #f6ecec; border-radius: 12px; font-size: 1.2rem; }
.metric span { display: block; color: var(--muted); font-size: .84rem; font-weight: 600; line-height: 1.2; }
.metric strong { font-family: var(--display); font-weight: 600; font-size: 2.1rem; line-height: 1; margin-top: .3rem; display: block; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.metric.primary-metric { background: linear-gradient(140deg, var(--wine), var(--wine-deep)); color: var(--champagne); border-color: transparent; box-shadow: 0 14px 30px -14px color-mix(in srgb, var(--wine) 80%, transparent); }
.metric.primary-metric span { color: #ecd3cb; }
.metric.primary-metric strong { color: #fff; }
.metric.primary-metric .bi { background: #ffffff1a; }
.metric.primary-metric::after { content: ""; position: absolute; right: -40px; bottom: -60px; width: 150px; height: 150px; border-radius: 50%; border: 1px solid #e7cf9f2e; box-shadow: 0 0 0 24px #e7cf9f08; }
.metric-gold { color: #8a5d0c; }
.metric-gold .bi { background: var(--warning-bg); }
.metric-green { color: var(--success); }
.metric-green .bi { background: var(--success-bg); }
.metric-rose { color: var(--danger); }
.metric-rose .bi { background: var(--danger-bg); }
.metric-neutral { color: #6b5f65; }
.metric-neutral .bi { background: #efecee; }
.overview-grid { grid-template-columns: minmax(0,1.6fr) minmax(0,1fr); }
.section-heading, .edition-status { display: flex; justify-content: space-between; align-items: center; gap: .8rem; }
.section-heading h2, .edition-status p { margin-bottom: 0; }
.section-heading { margin-bottom: 14px; }
.section-heading > a { font-weight: 650; font-size: .88rem; text-decoration: none; display: inline-flex; align-items: center; gap: .3rem; }
.section-heading > a:hover { text-decoration: underline; }
.edition-status { background: linear-gradient(120deg, var(--white), #fbf3ee); }
.edition-status h2 { margin-bottom: .3rem; }
.edition-status p { color: var(--muted); }
.empty-state { display: grid; justify-items: center; gap: .4rem; text-align: center; background: #fbf8f5; padding: 32px 18px; margin: 12px 0 0; border: 1.5px dashed var(--line-strong); border-radius: 14px; color: var(--muted); }
.empty-state::before { content: "\F4B5"; font-family: "bootstrap-icons"; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #f3e8e6; color: var(--wine); font-size: 1.25rem; }
.city-list li { display: grid; grid-template-columns: minmax(0,1.2fr) auto; align-items: center; gap: .3rem .8rem; border-top: 1px solid var(--line); padding: .7rem 0; }
.city-list li:first-child { border-top: 0; }
.city-list strong { font-variant-numeric: tabular-nums; }
.city-list meter { grid-column: 1 / -1; width: 100%; height: 6px; appearance: none; border: 0; border-radius: 6px; background: #f2e8e3; overflow: hidden; }
.city-list meter::-webkit-meter-bar { background: #f2e8e3; border: 0; border-radius: 6px; height: 6px; }
.city-list meter::-webkit-meter-optimum-value { background: linear-gradient(90deg, var(--gold), var(--wine)); border-radius: 6px; }
.city-list meter::-moz-meter-bar { background: linear-gradient(90deg, var(--gold), var(--wine)); border-radius: 6px; }

/* Tables */
.table-responsive { border: 1px solid var(--line); border-radius: 14px; }
.portal-table { --bs-table-bg: transparent; --bs-table-border-color: var(--line); font-size: .9rem; margin-bottom: 0; }
.portal-table thead th { color: var(--muted); background: #faf5f1; font-weight: 700; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; border-bottom: 1px solid var(--line); white-space: nowrap; }
.portal-table td, .portal-table th { vertical-align: middle; padding: .85rem .9rem; }
.portal-table tbody tr { transition: background-color .15s; }
.portal-table tbody tr:hover { background: #fcf7f3; }
.portal-table tbody tr:last-child td { border-bottom: 0; }
.portal-table td a strong { color: var(--ink); }
.portal-table td a:hover strong { color: var(--wine); }
.candidate-cell { display: flex; align-items: center; gap: 12px; }
.candidate-cell img { border-radius: 50%; object-fit: cover; flex-shrink: 0; background: #f2e8e3; box-shadow: 0 0 0 2px var(--white), 0 0 0 3px var(--line); }
.candidate-cell strong { display: block; }
.filter-form { align-items: end; }
.filter-bar { padding: 16px; background: #faf6f2; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 18px; }
.list-filters { grid-template-columns: 1.3fr 1fr 1fr .9fr auto; }
.mail-filters { grid-template-columns: 1.2fr 1.2fr .85fr auto; }
.filter-bar .form-control, .filter-bar .form-select { min-height: 44px; }
.filter-bar .btn { min-height: 44px; }
.search-field { position: relative; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-top: 18px; color: var(--muted); font-size: .86rem; }
.pager span { margin-inline: auto; }
.form-section-title { margin-top: 30px; }
.form-section { padding-top: 26px; margin-top: 26px; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(180px, 280px) minmax(0, 1fr); gap: 18px 40px; }
.form-section:first-of-type { padding-top: 0; margin-top: 0; border-top: 0; }
.form-section-intro h2 { font-size: 1.2rem; margin-bottom: .35rem; }
.form-section-intro p { color: var(--muted); font-size: .9rem; margin: 0; line-height: 1.55; }
.check-group { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 14px; }
.check-group .check-row { padding: .65rem .9rem; border: 1px solid var(--line); border-radius: 12px; background: #fdfaf7; cursor: pointer; transition: border-color .2s, background-color .2s; }
.check-group .check-row:has(input:checked) { border-color: color-mix(in srgb, var(--wine) 35%, white); background: #f9f0f2; }
.check-row { display: flex; align-items: start; gap: .6rem; }
.block-label { display: block; }
.decision-bar { margin-bottom: 20px; padding: 14px 16px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.decision-bar > p { margin: 0 auto 0 0; color: var(--muted); font-weight: 600; font-size: .9rem; }
.record-list { margin: 0; overflow-wrap: anywhere; }
.record-list > div { display: grid; grid-template-columns: minmax(120px, .8fr) 1.4fr; gap: .8rem; border-top: 1px solid var(--line); padding: .65rem 0; }
.record-list > div:first-child { border-top: 0; padding-top: 0; }
.record-list dt { font-weight: 600; color: var(--muted); font-size: .88rem; }
.record-list dd { margin: 0; font-weight: 550; }
.portal-dialog { width: min(580px,calc(100% - 30px)); max-height: calc(100% - 40px); padding: 28px; overflow: auto; border: 0; border-radius: 22px; background: var(--white); box-shadow: var(--shadow-lg); }
.portal-dialog[open] { animation: pop .28s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
.portal-dialog::backdrop { background: #1c030cb3; backdrop-filter: blur(4px); }
.portal-dialog legend { float: none; margin: 0 0 .6rem; }
.portal-dialog .check-group { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
.dialog-close { width: 38px; height: 38px; padding: 0; border-radius: 50%; }
.mail-preview { min-height: 360px; width: 100%; border: 1px solid var(--line); padding: 10px; border-radius: 14px; background: #f6f1ec; overflow-wrap: anywhere; }
.template-vars { display: flex; flex-wrap: wrap; gap: 8px; }
.template-vars code { display: block; color: var(--wine); background: #f6ebec; padding: .25rem .55rem; border-radius: 8px; font-size: .82rem; }
details summary { cursor: pointer; font-weight: 650; color: var(--wine); margin-top: 14px; }
.sticky-actions { position: sticky; bottom: 0; z-index: 5; margin: 26px calc(-1 * clamp(18px, 2.6vw, 28px)) calc(-1 * clamp(18px, 2.6vw, 28px)); padding: 16px clamp(18px, 2.6vw, 28px); background: color-mix(in srgb, var(--white) 92%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); display: flex; justify-content: flex-end; gap: .6rem; }
.color-swatch { display: flex; align-items: center; gap: .6rem; }

/* Admin login */
.login-body { background: var(--wine-deep); }
.login-split { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.login-visual { position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: clamp(28px, 4vw, 56px); color: #fff; isolation: isolate; }
.login-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 80% 20%; z-index: -2; }
.login-visual::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, #1c030ce6 0%, #1c030c40 55%, #1c030c10 100%); }
.login-visual h2 { color: #fff; font-size: clamp(1.8rem, 3vw, 2.6rem); max-width: 16ch; }
.login-visual p { color: #ecd8d0; max-width: 40ch; margin: 0; }
.login-visual .eyebrow { color: var(--champagne); }
.login-pane { background: var(--paper); display: grid; place-items: center; padding: clamp(24px, 5vw, 64px); }
.login-card { width: min(420px, 100%); }
.login-card .login-logo { height: 64px; width: auto; margin-bottom: 28px; mix-blend-mode: multiply; }
.login-card h1 { font-size: clamp(2rem, 3.4vw, 2.6rem); margin-bottom: .5rem; }
.login-card > p { color: var(--muted); margin-bottom: 28px; }
.login-card .form-grid .btn { width: 100%; min-height: 52px; }
.login-card .back-link { margin-top: 28px; }

@media (min-width: 1450px) {
    .metric-grid:not(.three) { grid-template-columns: repeat(6,minmax(0,1fr)); }
}
@media (max-width: 1100px) {
    .how-steps { grid-template-columns: repeat(2, 1fr); }
    .form-section { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 1000px) {
    .site-wrap, .hero-inner { width: calc(100% - 64px); }
    .overview-grid { grid-template-columns: minmax(0,1fr); }
    .list-filters, .mail-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .admin-shell { grid-template-columns: 232px minmax(0, 1fr); }
    .admin-profile .account-profile-text { display: none; }
    .admin-profile { padding: .2rem; }
    .hero::before { background: linear-gradient(90deg, #2c0412 0%, #3a0517e6 36%, #4a061d80 70%, #4a061d33 100%), linear-gradient(0deg, #22030ecc 0%, #22030e00 34%); }
    .login-split { grid-template-columns: 1fr; }
    .login-visual { display: none; }
}
@media (max-width: 800px) {
    .menu-toggle { display: inline-grid; place-items: center; }
    .header-inner { min-height: 72px; }
    .public-brand img { height: 50px; }
    .public-header nav { display: none; position: absolute; inset: calc(100% + 8px) 16px auto; padding: 14px; background: var(--white); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); align-items: stretch; flex-direction: column; gap: 2px; }
    .public-header nav.is-open { display: flex; animation: rise .25s var(--ease); }
    .public-header nav > a:not(.btn) { padding: .7rem .8rem; border-radius: 10px; color: var(--ink) !important; }
    .public-header nav > a:not(.btn):hover { background: #f8f0ec; }
    .public-header nav > a:not(.btn)::after { display: none; }
    .public-header nav .track-header { margin-top: 6px; --bs-btn-color: #fff !important; --bs-btn-bg: var(--wine) !important; --bs-btn-border-color: var(--wine) !important; }
    .hero { min-height: auto; align-items: flex-end; }
    .hero-media img { object-position: 74% 10%; }
    .hero::before { background: linear-gradient(0deg, #2c0412 0%, #2c0412f2 36%, #3a051799 62%, #3a051726 100%); }
    .hero-inner { padding-block: 46vh 120px; }
    .hero-scroll { display: none; }
    .access-layout { gap: 32px; }
    .fact-grid { grid-template-columns: 1fr; padding: 6px 18px; }
    .fact { padding: 16px 0; }
    .fact + .fact { border-left: 0; border-top: 1px solid var(--line); }
    .reference-section { grid-template-columns: 1fr; }
    .cta-inner { flex-direction: column; align-items: flex-start; }
    .admin-shell { display: block; }
    .admin-sidebar { display: none; position: fixed; z-index: 40; left: 0; top: 0; width: min(300px, 86vw); height: 100dvh; box-shadow: 20px 0 60px #1c030c66; }
    .admin-sidebar.is-open { display: flex; animation: slideIn .28s var(--ease); }
    @keyframes slideIn { from { transform: translateX(-100%); } to { transform: none; } }
    .menu-toggle.admin-toggle { display: inline-grid; position: relative; z-index: 41; }
    .admin-toggle[aria-expanded="true"] { position: fixed; left: calc(min(300px, 86vw) + 10px); top: 14px; background: var(--white); }
    .back-public { margin-right: auto; }
    .admin-top { min-height: 66px; }
    .status-track { grid-template-columns: 1fr; }
}
@media (max-width: 590px) {
    .site-wrap, .hero-inner { width: calc(100% - 36px); }
    .hero-inner { padding-block: 40vh 110px; }
    .hero-edition { gap: .5rem; margin-bottom: 16px; }
    .hero h1 { font-size: clamp(2.6rem, 12vw, 3.6rem); margin-bottom: 14px; }
    .hero-description { margin-bottom: 24px; font-size: 1rem; }
    .hero-actions { align-items: stretch; flex-direction: column; }
    .hero-actions .btn { width: 100%; }
    .facts { margin-top: -64px; }
    .how-steps { grid-template-columns: 1fr; }
    .reference-section, .details-grid, .document-grid { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr; gap: 22px; padding-block: 34px 26px; }
    .public-brand { gap: 10px; }
    .public-brand span { padding-left: 10px; font-size: .66rem; }
    .public-brand strong { font-size: 1.15rem; }
    .two-col, .three-col, .access-layout { grid-template-columns: 1fr; }
    .access-layout { gap: 24px; padding-block: 28px 44px; }
    .access-intro h1 { margin-block: 14px 10px; }
    .access-perks { display: none; }
    .stepper b { font-size: .74rem; overflow-wrap: anywhere; }
    .form-actions { justify-content: stretch; }
    .form-actions > * { flex: 1 1 auto; }
    .form-actions .btn:first-child:not(:only-child) { margin-right: 0; }
    .candidate-hero, .candidate-header { flex-wrap: wrap; align-items: flex-start; gap: 14px; }
    .candidate-photo { width: 80px; height: 88px; }
    .candidate-name { flex: 1 1 150px; }
    .candidate-name p span { display: block; margin: .3rem 0 0; }
    .protocol { margin-left: 0; width: 100%; }
    .admin-top-right { gap: 8px; }
        .admin-notify { display: none; }
    .accounts-grid { grid-template-columns: 1fr; }
    .account-list li { align-items: start; flex-wrap: wrap; }
    .back-public { font-size: .8rem; }
    .back-public span { display: none; }
    .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
    .metric { gap: 10px; padding: 14px; min-height: 0; flex-direction: column; align-items: flex-start; }
    .metric .bi { flex-basis: 36px; width: 36px; height: 36px; font-size: 1rem; }
    .metric strong { font-size: 1.7rem; }
    .admin-heading, .section-heading, .edition-status { align-items: flex-start; flex-direction: column; }
    .list-filters, .mail-filters { grid-template-columns: 1fr; }
    .portal-dialog .check-group { grid-template-columns: 1fr; }
    .record-list > div { grid-template-columns: 1fr; gap: .1rem; }
    .registration-table, .registration-table tbody { display: block; }
    .registration-flow .table-responsive, .table-responsive:has(.registration-table) { border: 0; }
    .registration-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .registration-table tr { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .5rem .85rem; margin-block: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
    .registration-table td { display: block; padding: 0; border: 0; overflow-wrap: anywhere; }
    .registration-table td:first-child, .registration-table td:last-child { grid-column: 1 / -1; padding-block: .28rem; }
    .registration-table td[data-label]::before { content: attr(data-label); display: block; color: var(--muted); font-size: .76rem; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; }
    .registration-table td:last-child .btn { width: 100%; }
}
@media (max-width: 360px) {
    .site-wrap, .hero-inner { width: calc(100% - 28px); }
    .hero h1 { font-size: clamp(2.2rem,11vw,2.6rem); }
    .stepper b { font-size: .68rem; }
    .stepper span { width: 2.3rem; height: 2.3rem; }
    .stepper li + li::before { top: 1.15rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
    .admin-shell { display: block; }
    .admin-sidebar, .admin-top, .print-hide, .skip-link { display: none !important; }
    .admin-body, .panel { background: white; box-shadow: none; }
    .admin-content { padding: 0; }
    .table-responsive { overflow: visible; border: 0; }
}
.login-notice, .is-home .notice-wrap { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 60; width: min(560px, calc(100% - 32px)); padding: 0; }
.is-home .notice-wrap { position: absolute; top: 100px; }

.notify-wrap { position: relative; }
.notify-panel { position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; width: min(340px, calc(100vw - 32px)); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 14px; animation: rise .2s var(--ease); }
.notify-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.notify-head small { color: var(--muted); }
.notify-empty { color: var(--muted); margin: 10px 0; font-size: .92rem; }
.notify-list { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow-y: auto; }
.notify-list li + li { border-top: 1px solid var(--line); }
.notify-list a { display: grid; gap: .15rem; padding: .65rem .4rem; border-radius: 8px; text-decoration: none; color: var(--ink); }
.notify-list a:hover { background: #faf4f0; }
.notify-list small { color: var(--muted); font-size: .8rem; }
.notify-all { display: flex; align-items: center; justify-content: center; gap: .4rem; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); font-weight: 650; text-decoration: none; font-size: .9rem; }

.edition-switch { position: relative; }
.edition-trigger { display: inline-flex; align-items: center; gap: .6rem; min-height: 42px; padding: .35rem .95rem; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--ink); font-weight: 700; font-size: .92rem; cursor: pointer; transition: border-color .2s, background-color .2s; }
.edition-trigger:hover { border-color: var(--line-strong); }
.edition-trigger small { color: var(--muted); font-weight: 600; font-size: .78rem; }
.edition-trigger .bi { color: var(--wine); font-size: .8rem; transition: transform .2s var(--ease); }
.edition-trigger[aria-expanded="true"] .bi { transform: rotate(180deg); }
.edition-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 240px; display: grid; gap: 2px; padding: 8px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); animation: rise .2s var(--ease); margin: 0; }
.edition-menu-title { margin: 4px 10px 6px; font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.edition-option { display: flex; align-items: center; justify-content: space-between; gap: .6rem; width: 100%; padding: .6rem .75rem; border: 0; border-radius: 9px; background: transparent; color: var(--ink); font-weight: 600; text-align: left; cursor: pointer; }
.edition-option:hover { background: #f8f0ec; }
.edition-option.is-current { color: var(--wine-dark); background: #f6ecec; font-weight: 750; }
.edition-option .bi { color: var(--wine); }

/* Custom select menus */
.select-field { position: relative; margin-top: 7px; }
.select-trigger { width: 100%; min-height: 50px; display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .6rem .95rem; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.select-trigger:hover { border-color: #c9b2a6; }
.select-trigger[aria-expanded="true"], .select-trigger:focus-visible { border-color: var(--wine); box-shadow: 0 0 0 4px color-mix(in srgb, var(--wine) 13%, transparent); outline: none; }
.select-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.select-trigger .bi { color: var(--wine); font-size: .8rem; flex: 0 0 auto; transition: transform .2s var(--ease); }
.select-trigger[aria-expanded="true"] .bi { transform: rotate(180deg); }
.select-menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 70; margin: 0; padding: 6px; list-style: none; max-height: 290px; overflow-y: auto; background: var(--white); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); animation: rise .18s var(--ease); }
.select-menu li + li { margin-top: 2px; }
.select-option { display: flex; align-items: center; justify-content: space-between; gap: .6rem; width: 100%; padding: .6rem .75rem; border: 0; border-radius: 9px; background: transparent; color: var(--ink); font: inherit; font-weight: 550; text-align: left; cursor: pointer; }
.select-option:hover, .select-option:focus-visible { background: #f8f0ec; outline: none; }
.select-option.is-selected { color: var(--wine-dark); background: #f6ecec; font-weight: 750; }
.select-option .bi { color: var(--wine); }
.select-option:disabled { color: var(--muted); cursor: default; }
.select-field > select.visually-hidden { background-image: none; }

/* Títulos grandes */
body.public-body h1 { font-family: var(--display-large); font-weight: 700; letter-spacing: -.02em; }
.hero h1 { font-family: var(--display-large); font-weight: 500; letter-spacing: -.02em; }
.hero h1 em { font-style: normal; font-weight: 500; letter-spacing: -.02em; }

/* Títulos do site público, peso leve */
.public-body :is(h1, h2, h3, .public-brand strong, .footer-brand, .detail-panel h2, .section-head h2, .access-intro h1, .flow-heading h1) {
    font-family: var(--display-large);
    font-weight: 500;
}
.public-body :is(h1, h2) { letter-spacing: -.02em; }
.public-body .public-brand strong { font-weight: 400; }
.hero h1 { margin-bottom: 0; }
.hero h1 em { line-height: .86; }
.hero-description { margin-top: 14px; }
.btn-gold, .btn-gold:hover, .btn-gold:focus { box-shadow: none; }
/* Sem sombras em botões */
.btn, .btn:hover, .btn:focus, .btn:active, .btn-wine, .btn-wine:hover, .btn-outline-wine, .btn-gold, .btn-glass, .btn-danger { box-shadow: none !important; }

/* Painel e login: fonte nativa do sistema operacional */
.admin-body, .login-body {
    --display: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --display-large: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --bs-body-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.admin-body h1, .admin-body h2, .admin-body h3, .login-body h1, .login-body h2, .login-body h3 { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
.code-input { font-size: 1.6rem; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; font-weight: 700; }
.code-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.code-actions form { margin: 0; }

/* Avisos flutuantes modernos */
.toast-stack { position: fixed; top: 20px; right: 20px; z-index: 80; display: grid; gap: 10px; width: min(400px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 12px; padding: 14px 12px 14px 14px; background: var(--white); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); animation: toastIn .4s var(--ease) both; --tone: var(--wine); --tone-bg: #f6ecec; }
.toast::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: var(--tone); }
.toast { position: relative; }
.toast-success { --tone: #2f7a43; --tone-bg: #e6f2e5; }
.toast-warning { --tone: #a86f0a; --tone-bg: #fbefcf; }
.toast-danger { --tone: #a3203f; --tone-bg: #fae3e7; }
.toast-info { --tone: #4d2a63; --tone-bg: #f1ebf6; }
.toast-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--tone-bg); color: var(--tone); font-size: 1rem; }
.toast-text { margin: 0; padding-top: 6px; font-size: .94rem; font-weight: 550; line-height: 1.45; color: var(--ink); }
.toast-close { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: .8rem; }
.toast-close:hover { background: #f4eeea; color: var(--ink); }
.toast.is-leaving { animation: toastOut .3s var(--ease) both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-8px) scale(.98); } }
@media (max-width: 590px) { .toast-stack { left: 16px; right: 16px; top: 14px; width: auto; } }

/* Código de confirmação: alinhamento dos botões */
.code-form { display: grid; gap: 16px; }
.code-form .btn-lg { width: 100%; }
.code-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.code-actions form { margin: 0; display: contents; }
.code-actions .btn { width: 100%; min-height: 44px; }
@media (max-width: 420px) { .code-actions { grid-template-columns: 1fr; } }
.access-intro .event-edition + h1 { margin-top: 2px; }
/* Logo do rodapé: branca, sem cartão */
.public-footer .footer-brand img { background: none; border-radius: 0; padding: 0; height: 64px; filter: brightness(0) invert(1); }

/* Avisos: refinamento visual */
.toast-stack { top: 22px; right: 22px; gap: 12px; }
.toast { align-items: center; gap: 14px; padding: 14px 14px 14px 18px; border-color: #ebe2dc; border-radius: 14px; box-shadow: 0 1px 2px #3d0a1e0d, 0 12px 28px -10px #3d0a1e26; min-height: 64px; }
.toast::before { top: 12px; bottom: 12px; width: 3px; }
.toast-icon { width: 36px; height: 36px; flex: 0 0 36px; font-size: 1.05rem; }
.toast-text { padding-top: 0; font-size: .92rem; line-height: 1.5; color: #3a2c33; }
.toast-close { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; font-size: .72rem; color: #8c7b82; }
.toast-close:hover { background: #f5efeb; color: var(--wine-dark); }
.toast.is-leaving { animation-duration: .25s; }
/* Avisos: sem faixa lateral colorida */
.toast::before { display: none; }
/* Avisos: entrada suave sem deslocamento */
@keyframes toastIn { from { opacity: 0; } to { opacity: 1; } }
.wide-dialog { width: min(860px, calc(100% - 30px)); }

/* Documentos: lista e editor */
.term-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: 18px; }
.term-card { display: flex; flex-direction: column; gap: 14px; }
.term-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.term-card-head h2 { font-size: clamp(1.2rem, 2vw, 1.5rem); margin: 4px 0 6px; }
.term-card-head .muted { margin: 0; font-size: .9rem; }
.term-sub { font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 4px 0 0; }
.term-card .clean-list li { flex-wrap: wrap; }
.term-card .clean-list li small { display: block; }
.term-history { border-top: 1px solid var(--line); padding-top: 12px; }
.term-history summary { cursor: pointer; font-weight: 650; color: var(--wine); list-style: none; }
.term-history summary::-webkit-details-marker { display: none; }
.term-history summary::before { content: "+ "; }
.term-history[open] summary::before { content: "− "; }
.term-duplicate { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 12px 0; }
.term-duplicate label { flex: 1 1 180px; margin: 0; }
.term-duplicate .form-control { margin-top: 6px; }
.term-editor { display: grid; gap: 16px; }
.term-editor-head .check-row { margin-top: 14px; }
.term-editor-foot { display: flex; flex-direction: column; gap: 12px; }
.term-editor-foot > label { font-weight: 650; }
.term-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.rte { border: 1px solid var(--line-strong); border-radius: 16px; background: var(--white); overflow: hidden; box-shadow: var(--shadow-sm); }
.rte:focus-within { border-color: var(--wine); box-shadow: 0 0 0 4px color-mix(in srgb, var(--wine) 12%, transparent); }
.rte-toolbar { position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 8px 10px; background: #fbf7f4; border-bottom: 1px solid var(--line); }
.rte-group { display: inline-flex; align-items: center; gap: 2px; padding: 0 6px; border-right: 1px solid var(--line); }
.rte-group:first-child { padding-left: 0; }
.rte-end { margin-left: auto; border-right: 0; }
.rte-btn { display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 8px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); font-size: .95rem; cursor: pointer; transition: background-color .15s, color .15s; }
.rte-btn:hover { background: #f1e6e3; color: var(--wine); }
.rte-btn.is-active { background: var(--wine); color: #fff; }
.rte-btn.rte-text { font-weight: 800; }
.rte-linkbar { display: flex; gap: 8px; align-items: center; padding: 10px; background: #fff7ef; border-bottom: 1px solid var(--line); }
.rte-linkbar .form-control { margin-top: 0; min-height: 40px; flex: 1; }
.rte-surface { min-height: 360px; max-height: 70vh; overflow-y: auto; padding: 26px clamp(18px, 3vw, 40px); font-size: 1.02rem; line-height: 1.75; color: #3a2c33; outline: none; }
.rte-surface:empty::before { content: "Comece a escrever o texto do documento…"; color: #a79aa0; }
.rte-surface h2 { font-size: 1.6rem; margin: 1.2em 0 .5em; color: var(--wine-dark); }
.rte-surface h3 { font-size: 1.25rem; margin: 1.1em 0 .4em; color: var(--wine-dark); }
.rte-surface p { margin: 0 0 .9em; }
.rte-surface ul, .rte-surface ol { padding-left: 1.4em; margin: 0 0 1em; }
.rte-surface blockquote { margin: 1em 0; padding: .6em 1em; border-left: 3px solid var(--gold); background: #fbf6ef; color: #5a4a52; border-radius: 0 10px 10px 0; }
.rte-surface a { color: var(--wine); text-decoration: underline; text-underline-offset: 3px; }
.rte-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 16px; border-top: 1px solid var(--line); background: #fbf7f4; font-size: .82rem; color: var(--muted); }
.term-body h2 { font-size: 1.5rem; margin: 1.2em 0 .5em; color: var(--wine-dark); }
.term-body h3 { font-size: 1.2rem; margin: 1em 0 .4em; color: var(--wine-dark); }
.term-body ul, .term-body ol { padding-left: 1.4em; }
.term-body blockquote { margin: 1em 0; padding: .6em 1em; border-left: 3px solid var(--gold); background: #fbf6ef; border-radius: 0 10px 10px 0; }
.term-body a { color: var(--wine); }

/* Edições: abas e organização */
.edition-status-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 20px; margin-bottom: 16px; }
.edition-status-bar strong { display: block; }
.edition-status-bar .muted { font-size: .9rem; }
.edition-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 5px; margin-bottom: 18px; background: #efe7e1; border-radius: 14px; width: fit-content; max-width: 100%; }
.edition-tabs a { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .95rem; border-radius: 10px; color: var(--muted); font-weight: 650; font-size: .92rem; text-decoration: none; transition: background-color .15s, color .15s; }
.edition-tabs a:hover { color: var(--wine); background: #f8f2ee; }
.edition-tabs a.is-active { background: var(--white); color: var(--wine-dark); box-shadow: var(--shadow-sm); }
.edition-section { margin-bottom: 0; padding-bottom: 0; }
.edition-section .form-section { padding-bottom: 26px; }
.edition-section .sticky-actions { margin-bottom: calc(-1 * clamp(18px, 2.6vw, 28px)); }
/* Alinhamento do campo de versão e do botão */
.term-duplicate { align-items: flex-end; }
.term-duplicate label { margin: 0; }
.term-duplicate .form-control { margin-top: 6px; min-height: 50px; }
.term-duplicate .btn { min-height: 50px; margin-bottom: 0; }
/* Menu ativo: pílula suave, sem sombra */
.admin-sidebar nav a.current { color: #fff; background: #e7cf9f2e; border-radius: 999px; box-shadow: none; font-weight: 700; }
.admin-sidebar nav a.current .bi { color: var(--champagne); opacity: 1; }
.admin-sidebar nav a { border-radius: 999px; }
.admin-sidebar nav a:hover { background: #ffffff0d; }

/* Prévia de arquivos */
.preview-dialog { width: min(980px, calc(100% - 30px)); height: min(82vh, 900px); }
.preview-dialog[open] { display: flex; flex-direction: column; }
.preview-dialog:not([open]) { display: none; }
.preview-stage { flex: 1; min-height: 0; display: grid; place-items: center; background: #f3ede8; border-radius: 12px; overflow: hidden; }
.preview-stage iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.preview-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.file-preview-link { display: inline-flex; align-items: center; gap: .5rem; border: 0; background: transparent; padding: 0; color: var(--wine); font-weight: 650; text-align: left; cursor: pointer; }
.file-preview-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.file-actions { display: inline-flex; align-items: center; gap: .7rem; white-space: nowrap; }
.file-actions small { color: var(--muted); }
.clean-list li > .file-actions { margin-left: auto; }
/* Foto da candidata em círculo */
.candidate-photo { border-radius: 50%; width: 140px; height: 140px; aspect-ratio: 1 / 1; object-fit: cover; }
@media (max-width: 590px) { .candidate-photo { width: 84px; height: 84px; } }

/* Configurações e edições */
.config-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 5px; margin-bottom: 22px; background: #efe7e1; border-radius: 14px; width: fit-content; max-width: 100%; }
.config-tabs a { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .95rem; border-radius: 999px; color: var(--muted); font-weight: 650; font-size: .92rem; text-decoration: none; }
.config-tabs a:hover { color: var(--wine); }
.config-tabs a.is-active { background: var(--white); color: var(--wine-dark); box-shadow: var(--shadow-sm); }
.edition-table-wrap { padding: 0; overflow: hidden; }
.edition-table-wrap .table-responsive { border: 0; border-radius: 0; }
.edition-table td small { display: block; color: var(--muted); font-size: .8rem; margin-top: 2px; }
.edition-table .row-actions { display: flex; flex-wrap: nowrap; justify-content: flex-end; align-items: center; gap: 6px; }
.edition-table .row-actions .btn { white-space: nowrap; border-radius: 999px; min-height: 36px; padding: .4rem .9rem; }
.edition-table .row-actions form { margin: 0; }
.edition-table td:last-child { min-width: 470px; }
.edition-table td:last-child .row-actions form { flex: 0 0 auto; }
.edition-table td:nth-child(2), .edition-table td:nth-child(3) { white-space: nowrap; }
.edition-table .enrollment-state { white-space: nowrap; }
/* Todos os botões de ação em formato de pílula */
.btn, .btn-sm, .btn-lg, .btn-wine, .btn-outline-wine, .btn-gold, .btn-glass, .btn-danger, .btn-outline-danger, .edition-table .btn, .config-tabs a, .edition-tabs a { border-radius: 999px !important; }
.viewas-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 10px clamp(16px, 4vw, 48px); background: #fbefcf; color: #6b4a06; font-weight: 650; font-size: .92rem; border-bottom: 1px solid #f0dca5; }
.viewas-bar form { margin: 0; }
.inline-form { display: inline; margin: 0; }

/* Andamento da inscrição: linha do tempo */
.status-track { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0 0 22px; padding: clamp(20px, 3vw, 28px) clamp(18px, 3vw, 32px); list-style: none; }
.status-track li { position: relative; display: flex; align-items: center; gap: 14px; min-width: 0; padding-right: 18px; }
.status-track li > .bi { position: relative; z-index: 1; flex: 0 0 44px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--white); border: 1.5px solid var(--line-strong); color: #a0939a; font-size: 1.05rem; }
.status-track li > div { min-width: 0; font-size: .95rem; font-weight: 700; color: #a0939a; line-height: 1.3; }
.status-track li > div small { display: block; margin-top: 2px; font-size: .84rem; font-weight: 500; color: var(--muted); }
.status-track li:not(:last-child)::after { content: ""; position: absolute; top: 21px; left: 58px; right: 10px; height: 2px; background: var(--line-strong); border-radius: 2px; }
.status-track li.is-done > .bi { background: var(--champagne); border-color: var(--champagne); color: var(--wine-deep); }
.status-track li.is-done > div { color: var(--ink); }
.status-track li.is-done:not(:last-child)::after { background: linear-gradient(90deg, var(--gold), var(--wine)); }
.status-track li.is-current > .bi { background: var(--wine); border-color: var(--wine); color: #fff; box-shadow: 0 0 0 6px color-mix(in srgb, var(--wine) 14%, transparent); }
.status-track li.is-current > div { color: var(--wine-dark); }
.status-track li.is-alert > .bi { background: var(--danger); border-color: var(--danger); color: #fff; }
.status-track li.is-alert > div { color: var(--danger); }
@media (max-width: 680px) {
    .status-track { grid-template-columns: 1fr; gap: 18px; padding: 20px; }
    .status-track li { padding-right: 0; }
    .status-track li:not(:last-child)::after { top: 46px; left: 21px; right: auto; width: 2px; height: 22px; }
}
.status-track li::before { display: none; }
/* Linha do tempo: círculo no topo, texto abaixo, linha só entre os círculos */
.status-track li { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding-right: 0; }
.status-track li > .bi { flex: 0 0 44px; }
.status-track li > div { padding-right: 16px; }
.status-track li:not(:last-child)::after { top: 21px; left: 54px; right: 6px; }
@media (max-width: 680px) {
    .status-track li { flex-direction: row; align-items: center; gap: 14px; }
    .status-track li > div { padding-right: 0; }
}

/* Acompanhamento: acabamento e animação */
.status-track { background: linear-gradient(180deg, #fffdfb, #fbf7f3); border-radius: 20px; padding: clamp(22px, 3vw, 34px) clamp(20px, 3.4vw, 40px); }
.status-track li { animation: stepIn .55s var(--ease) both; }
.status-track li:nth-child(2) { animation-delay: .12s; }
.status-track li:nth-child(3) { animation-delay: .24s; }
.status-track li > .bi { width: 54px; height: 54px; flex-basis: 54px; font-size: 1.3rem; box-shadow: 0 2px 6px #3d0a1e0d; transition: transform .3s var(--ease); }
.status-track li:not(:last-child)::after { height: 3px; border-radius: 3px; top: 24px; left: 62px; right: 8px; background: #ece2db; transform-origin: left center; }
.status-track li.is-done:not(:last-child)::after, .status-track li.is-current:not(:last-child)::after { animation: drawLine .8s var(--ease) both; }
.status-track li:nth-child(1)::after { animation-delay: .35s; }
.status-track li:nth-child(2)::after { animation-delay: .75s; }
.status-track li.is-done > .bi { background: linear-gradient(145deg, #f3e3b8, #e7cf9f); box-shadow: 0 6px 14px -6px #b9872580; }
.status-track li.is-current > .bi { background: linear-gradient(145deg, #9a1247, var(--wine)); }
.status-track li.is-current > .bi::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--wine) 45%, transparent); animation: pulseRing 1.9s ease-out infinite; }
.status-track li > div { font-size: .98rem; }
.status-track li > div small { font-size: .86rem; }
@keyframes stepIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes drawLine { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes pulseRing { 0% { transform: scale(.9); opacity: .9; } 80%, 100% { transform: scale(1.35); opacity: 0; } }
@media (max-width: 680px) { .status-track li:not(:last-child)::after { top: 56px; left: 26px; } }
.status-track li:not(:last-child)::after { top: 25px; left: 64px; right: 8px; }

/* Acompanhamento: nota do próximo passo ocupa a lateral */
.status-track { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(200px, .9fr); align-items: start; }
.status-track li:not(:nth-child(-n+2))::after { content: none !important; animation: none !important; display: none; }
.status-track li:nth-child(3) { animation-delay: .24s; }
.track-note { display: flex; flex-direction: column; justify-content: center; gap: 4px; align-self: stretch; padding: 4px 0 4px 26px; border-left: 1px solid var(--line-strong); animation: stepIn .6s var(--ease) .36s both; }
.track-note::before { display: none; }
.track-note-title { display: inline-flex; align-items: center; gap: .45rem; font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #8a6420; }
.track-note strong { font-size: .98rem; color: var(--wine-dark); font-weight: 700; }
.track-note small { font-size: .86rem; color: var(--muted); line-height: 1.5; }
@media (max-width: 680px) {
    .status-track { grid-template-columns: 1fr; }
    .track-note { border-left: 0; border-top: 1px solid var(--line); padding: 16px 0 0; }
}

/* Impressão: ficha da candidata em uma folha */
@media print {
    @page { size: A4; margin: 10mm; }
    html, body, .admin-body { background: #fff !important; color: #000 !important; font-size: 9.5pt; }
    .admin-sidebar, .admin-top, .toast-stack, .skip-link, .viewas-bar, .print-hide-head .btn, .print-hide-head .crumb,
    .admin-content form, .admin-content .btn, .admin-content button, .decision-bar, dialog, .sticky-actions, .section-heading button { display: none !important; }
    .admin-shell { display: block !important; }
    .admin-main, .admin-content { padding: 0 !important; margin: 0 !important; max-width: none !important; }
    .admin-content { animation: none !important; }
    .admin-heading { margin: 0 0 6px; }
    .admin-heading h1 { font-size: 15pt; margin: 0; }
    .candidate-hero { background: #fff !important; color: #000 !important; box-shadow: none !important; border: 1px solid #999; padding: 8px 12px; margin-bottom: 8px; }
    .candidate-hero::after { display: none; }
    .candidate-hero h2 { color: #000 !important; font-size: 13pt; margin: 0 0 4px; }
    .candidate-hero .candidate-name p, .candidate-hero .candidate-name .bi, .candidate-hero .muted { color: #222 !important; }
    .candidate-hero .candidate-photo { width: 84px !important; height: 84px !important; border: 1px solid #999 !important; box-shadow: none !important; }
    .candidate-hero .protocol { background: #f3f3f3 !important; border: 1px solid #bbb !important; padding: 6px 8px; }
    .candidate-hero .protocol strong { color: #000 !important; }
    .candidate-hero .pill { border: 1px solid #999; background: #fff !important; color: #000 !important; }
    .candidate-states .pill { padding: 1px 6px; font-size: 8pt; }
    .candidate-states .pill::before { display: none; }
    .details-grid { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 6px !important; }
    .details-grid > div { display: contents; }
    .detail-panel, .panel { box-shadow: none !important; border: 1px solid #bbb !important; border-radius: 6px !important; background: #fff !important; padding: 6px 9px !important; margin: 0 !important; break-inside: avoid; }
    .detail-panel h2 { font-size: 10pt !important; margin: 0 0 4px !important; color: #000 !important; }
    .detail-panel h2 > .bi { display: none; }
    .record-list > div { padding: 2px 0 !important; grid-template-columns: 0.9fr 1.3fr !important; gap: 6px !important; border-top: 1px solid #ddd !important; }
    .record-list dt { color: #444 !important; font-size: 8.5pt; }
    .record-list dd { font-size: 9pt; }
    .clean-list li { padding: 3px 0 !important; }
    .clean-list small { color: #444 !important; }
    .timeline p { background: #f7f7f7 !important; font-size: 8.5pt; }
    .timeline li { padding-bottom: 4px; }
    .timeline time { font-size: 8pt; }
    .file-preview-link { color: #000 !important; text-decoration: none; }
    .file-actions small { color: #444 !important; }
    .details-grid > div:first-child, .details-grid > div:last-child { min-width: 0; }
    a { color: #000 !important; text-decoration: none !important; }
    .print-sheet-foot { display: block !important; margin-top: 8px; font-size: 8pt; color: #555; }
}
.print-sheet-foot { display: none; }
.heading-actions { flex-wrap: wrap; justify-content: flex-end; }
.heading-actions form { margin: 0; }
.heading-actions .btn-gold { --bs-btn-bg: #f3e6cc; --bs-btn-border-color: #e7cf9f; --bs-btn-color: var(--wine-deep); --bs-btn-hover-bg: #ecd7ab; --bs-btn-hover-border-color: #e0c48b; --bs-btn-hover-color: var(--wine-deep); }
@media print {
    .print-hide { display: none !important; }
    .print-keep { display: block !important; }
}
/* Aproximar a linha de edição do título da hero */
.hero-edition { margin-bottom: 10px; }
.hero h1 { margin-top: 0; }
@media (max-width: 590px) { .hero-edition { margin-bottom: 8px; } }

/* Área da candidata: botão e impressão do resumo da inscrição */
.flow-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.flow-heading-row h1 { margin: 0; }
@media print {
    @page { size: A4; margin: 10mm; }
    html, body, .public-body { background: #fff !important; color: #000 !important; }
    .public-header, .public-footer, .viewas-bar, .notice-wrap, .toast-stack, .skip-link, .print-hide, .candidate-next .btn,
    .candidate-history form, .saved-note, .protocol .btn, .candidate-hero .btn, .btn, button, .candidate-states .pill::before { display: none !important; }
    .candidate-area, .candidate-area > * { max-width: none !important; }
    .candidate-hero { background: #fff !important; color: #000 !important; box-shadow: none !important; border: 1px solid #999; }
    .candidate-hero::after { display: none; }
    .candidate-hero h2, .candidate-hero .candidate-name p, .candidate-hero .candidate-name .bi, .candidate-hero .protocol strong, .candidate-hero .protocol small { color: #000 !important; }
    .candidate-hero .candidate-photo { border: 1px solid #999 !important; box-shadow: none !important; width: 84px !important; height: 84px !important; }
    .candidate-hero .protocol { background: #f3f3f3 !important; border: 1px solid #bbb !important; }
    .status-track { box-shadow: none !important; border: 1px solid #bbb; }
    .status-track li > .bi { animation: none !important; }
    .status-track li::after { animation: none !important; }
    .track-note { display: none !important; }
    .panel, .detail-panel { box-shadow: none !important; border: 1px solid #bbb !important; background: #fff !important; break-inside: avoid; }
    .details-grid { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 6px !important; }
    .details-grid > div { display: contents; }
    .detail-panel h2 { font-size: 10pt; color: #000 !important; }
    .detail-panel h2 > .bi { display: none; }
    .protocol { position: static; }
    .attention-panel { border-color: #bbb !important; background: #fff !important; box-shadow: none !important; }
    .callout { background: #f6f6f6 !important; color: #000 !important; border-color: #bbb !important; }
    a { color: #000 !important; text-decoration: none !important; }
    .clean-list li { padding: 3px 0 !important; }
    .timeline p { background: #f7f7f7 !important; }
    .candidate-area .flow-heading { margin-bottom: 8px; }
    .candidate-area .flow-heading h1 { font-size: 15pt; }
    .flow-heading .event-edition { font-size: 9pt; }
}
.report-photo-cell { width: 56px; }
.report-photo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--white), 0 0 0 3px var(--line); display: block; }
/* Menus de seleção: barra de rolagem e espaçamento do site */
.select-menu { scrollbar-width: thin; scrollbar-color: #d8c6bb transparent; padding: 8px; border-radius: 16px; }
.select-menu::-webkit-scrollbar { width: 6px; }
.select-menu::-webkit-scrollbar-track { background: transparent; }
.select-menu::-webkit-scrollbar-thumb { background: #d8c6bb; border-radius: 999px; }
.select-menu li + li { margin-top: 3px; }
.select-option { border-radius: 10px; padding: .65rem .8rem; line-height: 1.3; }
.select-option.is-selected { background: #f6ecec; }
.select-option .bi { flex: 0 0 auto; }

/* Chamada final: cartão robusto dentro da largura do site */
.cta-band { background: none; border-top: 0; padding-block: clamp(28px, 4vw, 56px); }
.cta-inner { position: relative; overflow: hidden; isolation: isolate; border-radius: 24px; padding: clamp(28px, 4vw, 44px) clamp(24px, 4vw, 48px); background: linear-gradient(135deg, var(--wine-dark) 0%, var(--wine-deep) 100%); box-shadow: 0 24px 50px -24px #2f061499; color: #f6e8e2; gap: 28px; }
.cta-inner::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(520px 220px at 100% 0%, #e7cf9f2e, transparent 70%); }
.cta-inner::after { content: ""; position: absolute; right: -90px; bottom: -120px; width: 320px; height: 320px; border-radius: 50%; border: 1px solid #e7cf9f33; box-shadow: 0 0 0 36px #e7cf9f0a; z-index: -1; }
.cta-inner h2 { color: #fff; font-size: clamp(1.6rem, 2.8vw, 2.2rem); margin: 0 0 .45rem; }
.cta-inner p { color: #ecd8d0; font-size: 1.02rem; margin: 0; }
.cta-inner .event-edition, .cta-inner .eyebrow { color: var(--champagne); }
.cta-inner .hero-actions { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 720px) { .cta-inner { flex-direction: column; align-items: flex-start; } .cta-inner .hero-actions { justify-content: flex-start; width: 100%; } .cta-inner .hero-actions .btn { width: 100%; } }
.cta-inner .hero-actions { flex-wrap: nowrap; }
.cta-inner .hero-actions .btn { white-space: nowrap; }
@media (max-width: 720px) { .cta-inner .hero-actions { flex-wrap: wrap; } }

/* Rodapé: grade com bloco de confiança */
.footer-grid { display: grid; grid-template-columns: 1.1fr 1fr .8fr 1.25fr; gap: clamp(22px, 3vw, 40px); padding-block: clamp(40px, 5vw, 60px) clamp(30px, 4vw, 44px); align-items: start; }
.footer-logo { width: 120px; height: auto; background: #fffdfb; border-radius: 14px; padding: 8px 10px; }
.footer-lead { margin: 16px 0 0; color: #d8bfb6; font-size: .92rem; line-height: 1.6; max-width: 34ch; }
.footer-title { margin: 0 0 14px; font-family: var(--body); font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--champagne); }
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-list a { display: inline-flex; align-items: center; gap: .55rem; color: #f3e4dd; text-decoration: none; font-size: .95rem; opacity: .9; }
.footer-list a:hover { color: #fff; opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.footer-list .bi { color: var(--champagne); }
.footer-muted { color: #c9b0a8; font-size: .92rem; margin: 0; }
.footer-trust { position: relative; background: #ffffff0a; border: 1px solid #ffffff17; border-radius: 20px; padding: 22px 22px 20px; }
.trust-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: #e7cf9f1f; color: var(--champagne); font-size: 1.25rem; margin-bottom: 12px; }
.footer-trust .footer-title { margin-bottom: 12px; }
.trust-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.trust-list li { display: flex; gap: .6rem; align-items: flex-start; color: #ecdbd3; font-size: .9rem; line-height: 1.5; }
.trust-list .bi { flex: 0 0 auto; margin-top: .2rem; width: 18px; height: 18px; display: inline-grid; place-items: center; border-radius: 50%; background: #3f9a5229; color: #7fe093; font-size: .7rem; }
.footer-bottom { border-top: 1px solid #ffffff14; }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; padding-block: 16px; font-size: .84rem; color: #c9b0a8; }
.footer-bottom-note { display: inline-flex; align-items: center; gap: .45rem; }
.footer-bottom-note .bi { color: var(--champagne); }
@media (max-width: 980px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 590px) { .footer-grid { grid-template-columns: 1fr; } .footer-bottom-inner { flex-direction: column; align-items: flex-start; } }
.footer-grid { grid-template-columns: minmax(0,1fr) minmax(0,1.35fr) minmax(0,.9fr) minmax(0,1.2fr); }
.footer-col, .footer-list, .footer-list a { min-width: 0; }
.footer-list a { overflow-wrap: anywhere; word-break: break-word; line-height: 1.45; align-items: flex-start; }
.footer-list a .bi { margin-top: .2rem; flex: 0 0 auto; }
/* Hero com borda inferior reta */
.hero { border-radius: 0; }
/* Logo do rodapé: branca, sem cartão */
.public-footer .footer-logo { background: none; border-radius: 0; padding: 0; filter: brightness(0) invert(1); width: 130px; }
/* Links do rodapé: ícones em quadrados e área de toque confortável */
.footer-list { gap: 4px; }
.footer-list a { display: flex; align-items: center; gap: 12px; padding: .5rem .6rem .5rem .5rem; margin-left: -.5rem; border-radius: 12px; font-weight: 600; font-size: .94rem; opacity: .95; transition: background-color .2s, color .2s; }
.footer-list a .bi { display: inline-grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px; background: #ffffff10; color: var(--champagne); font-size: 1rem; margin-top: 0; transition: background-color .2s; }
.footer-list a:hover { background: #ffffff0d; text-decoration: none; }
.footer-list a:hover .bi { background: #e7cf9f26; }
.footer-list a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
/* Rodapé responsivo (regras no fim para prevalecer) */
@media (max-width: 980px) { .footer-grid { grid-template-columns: repeat(2, minmax(0,1fr)) !important; } }
@media (max-width: 590px) {
    .footer-grid { grid-template-columns: 1fr !important; gap: 26px; padding-block: 36px 28px; }
    .footer-list a { white-space: normal; }
    .footer-bottom-inner { flex-direction: column; align-items: flex-start; }
}
.footer-list a { overflow-wrap: normal; word-break: normal; }
.footer-list a[href^="mailto:"] span { font-size: .9rem; }
@media (max-width: 590px) { .footer-list a[href^="mailto:"] span { font-size: .84rem; letter-spacing: -.005em; } }

/* Vídeo de apresentação na página inicial */
.video-section { padding-block: clamp(40px, 6vw, 80px) 0; }
.video-frame { max-width: 980px; margin: 0 auto; border-radius: 24px; overflow: hidden; background: #2a0614; box-shadow: 0 30px 60px -28px #2f061480; border: 1px solid var(--line); }
.video-frame video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.video-current { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; color: var(--muted); margin: 0 0 14px; }
.video-current a { font-weight: 700; }
.video-frame video { background: #2a0614; object-fit: contain; }
/* Vídeo em formato de story (vertical), capa é o primeiro quadro do próprio vídeo */
.video-frame { max-width: 360px; border-radius: 28px; background: #1c0410; border: 6px solid #2a0614; box-shadow: 0 30px 60px -26px #2f061499; padding: 0; }
.video-frame video { aspect-ratio: 9 / 16; width: 100%; height: auto; object-fit: cover; background: #1c0410; }
@media (max-width: 590px) { .video-frame { max-width: 100%; border-width: 4px; border-radius: 22px; } }
/* Story: barra de progresso no topo e controle central */
.story { position: relative; }
.story-bars { position: absolute; top: 12px; left: 12px; right: 12px; z-index: 3; pointer-events: none; }
.story-bar { display: block; height: 4px; border-radius: 999px; background: #ffffff4d; overflow: hidden; }
.story-bar i { display: block; height: 100%; width: 100%; background: #fff; border-radius: inherit; transform-origin: left center; transform: scaleX(0); }
.story video { cursor: pointer; }
.story-toggle { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 64px; height: 64px; border-radius: 50%; border: 0; background: #2a0614b3; color: #fff; font-size: 1.6rem; display: grid; place-items: center; opacity: 0; transition: opacity .25s; pointer-events: none; }
.story.is-paused .story-toggle { opacity: 1; pointer-events: auto; }
.story-toggle:hover { background: #2a0614d9; }
.story:hover .story-toggle { opacity: 1; pointer-events: auto; }
.story video::-webkit-media-controls { display: none !important; }
/* Mini player no canto inferior direito */
.story-mini-close { display: none; position: absolute; top: 22px; right: 10px; z-index: 4; width: 30px; height: 30px; border-radius: 50%; border: 0; background: #2a0614cc; color: #fff; font-size: .8rem; place-items: center; }
.story.is-mini { position: fixed; right: 18px; bottom: 18px; width: 180px; max-width: calc(100vw - 36px); margin: 0; z-index: 80; border-width: 4px; border-radius: 22px; box-shadow: 0 24px 50px -16px #1c0410cc; animation: miniIn .35s var(--ease) both; }
.story.is-mini .story-mini-close { display: grid; }
.story.is-mini .story-toggle { width: 48px; height: 48px; font-size: 1.1rem; opacity: 1; pointer-events: auto; }
@keyframes miniIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }

/* Brilhos dourados sutis na hero, longe do rosto */
.hero-sparkles { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.hero-sparkles i { position: absolute; width: 14px; height: 14px; background: radial-gradient(circle, #fff6d8 0%, #e7cf9f 35%, transparent 70%); clip-path: polygon(50% 0%, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0% 50%, 39% 39%); opacity: 0; animation: sparkle 3.6s ease-in-out infinite; filter: drop-shadow(0 0 6px #e7cf9f88); }
.hero-sparkles i:nth-child(1) { left: 8%; top: 22%; animation-delay: 0s; }
.hero-sparkles i:nth-child(2) { left: 26%; top: 14%; width: 9px; height: 9px; animation-delay: .9s; }
.hero-sparkles i:nth-child(3) { left: 16%; top: 62%; width: 11px; height: 11px; animation-delay: 1.8s; }
.hero-sparkles i:nth-child(4) { left: 40%; top: 40%; width: 8px; height: 8px; animation-delay: 2.6s; }
.hero-sparkles i:nth-child(5) { left: 4%; top: 78%; width: 12px; height: 12px; animation-delay: 1.3s; }
.hero-sparkles i:nth-child(6) { left: 33%; top: 84%; width: 8px; height: 8px; animation-delay: 3.1s; }
.hero-sparkles i:nth-child(7) { left: 52%; top: 18%; width: 10px; height: 10px; animation-delay: .4s; }
.hero-sparkles i:nth-child(8) { left: 22%; top: 36%; width: 7px; height: 7px; animation-delay: 2.1s; }
@keyframes sparkle { 0%, 100% { opacity: 0; transform: scale(.4) rotate(0deg); } 50% { opacity: 1; transform: scale(1.15) rotate(45deg); } }
@media (max-width: 800px) { .hero-sparkles i:nth-child(n+6) { display: none; } }
@media (prefers-reduced-motion: reduce) { .hero-sparkles { display: none; } }

/* Brilhos dourados: mais presentes */
.hero-sparkles i { width: 26px; height: 26px; background: radial-gradient(circle, #ffffff 0%, #fff1c9 25%, #e7cf9f 45%, transparent 72%); filter: drop-shadow(0 0 10px #e7cf9fcc) drop-shadow(0 0 22px #e7cf9f66); animation-duration: 3.2s; }
.hero-sparkles i:nth-child(2) { width: 18px; height: 18px; }
.hero-sparkles i:nth-child(3) { width: 30px; height: 30px; }
.hero-sparkles i:nth-child(4) { width: 16px; height: 16px; }
.hero-sparkles i:nth-child(5) { width: 34px; height: 34px; }
.hero-sparkles i:nth-child(6) { width: 16px; height: 16px; }
.hero-sparkles i:nth-child(7) { width: 22px; height: 22px; }
.hero-sparkles i:nth-child(8) { width: 14px; height: 14px; }
.hero-sparkles i:nth-child(9) { left: 12%; top: 48%; width: 20px; height: 20px; animation-delay: 1.1s; }
.hero-sparkles i:nth-child(10) { left: 30%; top: 70%; width: 24px; height: 24px; animation-delay: 2.4s; }
.hero-sparkles i:nth-child(11) { left: 46%; top: 8%; width: 18px; height: 18px; animation-delay: .6s; }
.hero-sparkles i:nth-child(12) { left: 2%; top: 8%; width: 16px; height: 16px; animation-delay: 2.9s; }
@media (max-width: 800px) { .hero-sparkles i:nth-child(n+9) { display: none; } }

/* Emblema animado: coroa e bandeira do Brasil */
.footer-badge { position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 18px; }
.badge-crown { width: 92px; height: auto; filter: drop-shadow(0 0 12px #e7cf9f99); animation: crownBob 2.8s ease-in-out infinite; transform-origin: center bottom; }
.badge-flag { width: 74px; height: auto; border-radius: 5px; box-shadow: 0 8px 18px -8px #000a; transform-origin: left center; animation: flagWave 3.2s ease-in-out infinite; }
.badge-sparkle { position: absolute; top: -6px; width: 12px; height: 12px; background: radial-gradient(circle, #fff 0%, #e7cf9f 40%, transparent 70%); clip-path: polygon(50% 0%, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0% 50%, 39% 39%); animation: sparkle 2.4s ease-in-out infinite; }
.badge-sparkle.s1 { left: 6px; top: 4px; }
.badge-sparkle.s2 { right: 10px; top: -2px; width: 9px; height: 9px; animation-delay: .8s; }
.badge-sparkle.s3 { left: 50%; top: 58px; width: 8px; height: 8px; animation-delay: 1.5s; }
@keyframes crownBob { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-4px) rotate(-2deg); } }
@keyframes flagWave { 0%, 100% { transform: skewY(0deg) scaleX(1); } 50% { transform: skewY(-3deg) scaleX(1.03); } }
@media (prefers-reduced-motion: reduce) { .badge-crown, .badge-flag, .badge-sparkle { animation: none; } }
.cta-inner .btn-lg { gap: .5rem; padding-inline: 1.25rem; }
.cta-inner .btn-lg .bi { flex: 0 0 auto; }
/* Selo de situação: simples, sem efeitos */
.hero .enrollment-state, .hero .enrollment-state.is-open { background: rgba(127, 224, 147, .14); border: 0; color: #d9f2de; backdrop-filter: none; box-shadow: none; padding: .3rem .7rem; font-weight: 650; }
.hero .enrollment-state.is-open::before { animation: none; box-shadow: none; background: #7fe093; }
/* Emblema: bandeira em círculo, coroa menor no alto e inclinada */
.footer-badge { margin-top: 20px; display: inline-flex; }
.badge-stage { position: relative; width: 96px; height: 96px; }
.badge-flag { position: absolute; left: 0; bottom: 0; width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid #e7cf9f; box-shadow: 0 10px 24px -10px #000c, inset 0 0 0 2px #ffffff22; transform-origin: center; animation: flagWave 4s ease-in-out infinite; }
.badge-crown { position: absolute; top: -26px; right: -18px; width: 52px; height: auto; transform: rotate(16deg); transform-origin: center bottom; filter: drop-shadow(0 0 8px #e7cf9fb3); animation: crownBob 2.8s ease-in-out infinite; }
.badge-sparkle { top: -4px; }
.badge-sparkle.s1 { left: -10px; top: 14px; }
.badge-sparkle.s2 { right: -6px; top: -8px; }
.badge-sparkle.s3 { left: 40px; top: 100px; }
@keyframes flagWave { 0%, 100% { transform: rotate(0deg) scale(1); } 50% { transform: rotate(-3deg) scale(1.03); } }
@keyframes crownBob { 0%, 100% { transform: translateY(0) rotate(16deg); } 50% { transform: translateY(-4px) rotate(12deg); } }
.footer-badge { margin-top: 44px; }
/* Emblema em SVG único: bandeira circular com coroa encaixada na borda */
.footer-badge { position: relative; display: inline-block; margin-top: 18px; }
.badge-emblem { display: block; width: 120px; height: 120px; overflow: visible; filter: drop-shadow(0 12px 20px #0009); }
.emblem-crown { transform-box: fill-box; transform-origin: 50% 100%; animation: emblemCrown 3s ease-in-out infinite; filter: drop-shadow(0 0 6px #e7cf9fb3); }
@keyframes emblemCrown { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-3px) rotate(-3deg); } }
.footer-badge .badge-sparkle.s1 { left: 4px; top: 26px; }
.footer-badge .badge-sparkle.s2 { left: 112px; top: 74px; width: 9px; height: 9px; animation-delay: 1.2s; }
@media (prefers-reduced-motion: reduce) { .emblem-crown { animation: none; } }
/* Emblema minimalista, pequeno e no canto direito */
.footer-badge { display: block; width: 64px; margin: 22px 0 0 auto; }
.badge-emblem { width: 64px; height: 64px; filter: none; }
.footer-badge .badge-sparkle { display: none; }

/* QR Code de inscrição no rodapé */
.footer-qr { display: flex; align-items: center; gap: 14px; margin-top: 20px; padding: 10px 14px 10px 10px; width: fit-content; max-width: 100%; border-radius: 18px; background: #ffffff0a; border: 1px solid #ffffff14; text-decoration: none; color: #f3e4dd; transition: background-color .2s, border-color .2s, transform .2s var(--ease); }
.footer-qr:hover { background: #ffffff12; border-color: #e7cf9f55; color: #fff; transform: translateY(-2px); }
.footer-qr-code { flex: 0 0 auto; width: 104px; height: 104px; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 3px #e7cf9f55; }
.footer-qr-code svg { display: block; width: 100%; height: 100%; }
.footer-qr-text { display: grid; gap: 4px; max-width: 18ch; }
.footer-qr-text strong { font-size: .92rem; color: var(--champagne); line-height: 1.3; }
.footer-qr-text small { font-size: .8rem; color: #d8bfb6; line-height: 1.4; }
.footer-qr-text strong { text-transform: none; letter-spacing: 0; margin: 0; font-weight: 700; }
/* Cabeçalho: aproximar "PORTAL DE" de "Inscrições" */
.public-brand span { line-height: 1; }
.public-brand strong { margin-top: 0; line-height: 1.05; display: block; }
/* Menu do cabeçalho: destinos visíveis e interação clara */
[id] { scroll-margin-top: 110px; }
.public-header nav > a:not(.btn)::after { transform: scaleX(0); }
.public-header nav > a:not(.btn):hover::after, .public-header nav > a:not(.btn).is-section::after { transform: scaleX(1); }
.public-header nav > a:not(.btn).is-section { color: var(--wine); }

/* Regulamento e contato */
.rules-page { max-width: 900px; }
.rules-head { margin-bottom: 26px; }
.rules-head h1 { margin: 6px 0 6px; }
.rules-card { padding: clamp(24px, 4vw, 44px); }
.rules-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.contact-layout { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 5vw, 72px); align-items: start; max-width: 1080px; }
.contact-intro h1 { margin: 8px 0 12px; }
.contact-channels { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 12px; }
.contact-channels li { display: flex; align-items: center; gap: .6rem; font-weight: 600; }
.contact-channels .bi { color: var(--wine); }
.contact-form { padding: clamp(24px, 4vw, 40px); }
.contact-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 800px) { .contact-layout { grid-template-columns: 1fr; } }
/* Contato: largura do site e acabamento */
.contact-layout { max-width: none; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.contact-intro { padding-top: 6px; }
.contact-intro h1 { font-size: clamp(2.2rem, 4vw, 3.2rem); }
.contact-intro > p.muted { font-size: 1.04rem; max-width: 46ch; }
.contact-channels { gap: 12px; margin-top: 30px; }
.contact-channels li { padding: 14px 16px; background: var(--white); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); font-weight: 650; }
.contact-channels li a { color: var(--ink); text-decoration: none; word-break: break-word; }
.contact-channels li a:hover { color: var(--wine); }
.contact-channels .bi { display: inline-grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 12px; background: #f6ecec; color: var(--wine); font-size: 1rem; }
.contact-form { padding: clamp(26px, 4vw, 44px); border-radius: 22px; box-shadow: var(--shadow); }
.contact-form .form-grid { gap: 20px 18px; }
.contact-form textarea.form-control { min-height: 150px; }
.contact-form .form-actions { margin-top: 26px; justify-content: flex-end; }
@media (max-width: 800px) { .contact-layout { grid-template-columns: 1fr; } }
/* Contato: visual sóbrio */
.contact-channels { margin-top: 24px; gap: 14px; }
.contact-channels li { padding: 0; background: none; border: 0; box-shadow: none; font-weight: 500; gap: .5rem; }
.contact-channels li a { color: var(--wine); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.contact-channels li a:hover { color: var(--wine-dark); }
.contact-channels .bi { width: auto; height: auto; flex: 0 0 auto; background: none; border-radius: 0; color: var(--muted); font-size: 1rem; }
.contact-form { border-radius: 14px; box-shadow: none; border: 1px solid var(--line); padding: clamp(24px, 3.5vw, 36px); }
.contact-form .form-actions { border-top: 1px solid var(--line); padding-top: 20px; }
.contact-intro .event-edition { font-size: .8rem; }

/* Anexos do contato: área de arrastar e soltar */
.dropzone { position: relative; margin-top: 22px; }
.dropzone-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dropzone-area { display: grid; gap: 4px; justify-items: start; padding: 18px 20px; border: 1.5px dashed var(--line-strong); border-radius: 14px; background: #fdfaf7; cursor: pointer; transition: border-color .2s, background-color .2s; }
.dropzone-area:hover, .dropzone-area.is-over { border-color: var(--wine); background: #fbf3f4; }
.dropzone-input:focus-visible + .dropzone-area { outline: 3px solid var(--gold); outline-offset: 3px; }
.dropzone-title { font-weight: 650; color: var(--ink); font-size: .95rem; }
.dropzone-title small { font-weight: 500; color: var(--muted); }
.dropzone-hint { font-size: .85rem; color: var(--muted); line-height: 1.5; }
.dropzone-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.dropzone-file { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); font-size: .9rem; }
.dropzone-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--ink); }
.dropzone-file small { color: var(--muted); white-space: nowrap; }
.dropzone-remove { width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.dropzone-remove:hover { background: #f4eeea; color: var(--wine); }
.dropzone-error { margin: 10px 0 0; font-size: .88rem; color: var(--danger); font-weight: 600; }
.dropzone-error[hidden] { display: none; }

/* Hero no celular: foto no topo, texto legível embaixo */
@media (max-width: 590px) {
    .hero { min-height: 100svh; align-items: flex-end; }
    .hero-media img { object-position: 70% 14%; }
    .hero::before { background: linear-gradient(180deg, #2c041200 0%, #2c041266 34%, #2c0412f2 58%, #2c0412 100%); }
    .hero-inner { padding-block: 46svh 44px; }
    .hero-edition { margin-bottom: 12px; }
    .hero h1 { font-size: clamp(2.5rem, 12.5vw, 3.2rem); margin-bottom: 8px; line-height: 1; }
    .hero-description { font-size: .98rem; margin-bottom: 22px; max-width: 34ch; }
    .hero-actions { gap: 10px; }
    .hero-actions .btn-lg { min-height: 54px; font-size: .98rem; }
    .hero-note { margin-top: 16px; font-size: .84rem; }
    .hero-sparkles i { width: 10px !important; height: 10px !important; opacity: .7; }
    .hero-sparkles i:nth-child(n+5) { display: none; }
    .is-home .menu-toggle { background: #2c0412cc; border-color: #ffffff33; }
    .public-brand img { height: 52px; }
}
@media (max-width: 590px) { .hero-media img { object-position: 72% 6%; } }
/* Hero no celular: texto livre do cartão de informações */
@media (max-width: 590px) { .hero-inner { padding-bottom: 104px; } .hero-note { margin-bottom: 0; } }
/* Celular: espaçamento entre regulamento e chamada final */
@media (max-width: 590px) {
    .reference-section { padding-bottom: 0; }
    .cta-band { padding-block: 18px 40px; }
}
/* Emblema do rodapé: canto direito também no celular */
@media (max-width: 590px) { .footer-badge { display: block !important; margin: 22px 0 0 auto !important; width: 64px; } }

/* Transições suaves entre páginas (navegadores que suportam View Transitions) */
@keyframes pageOut { to { opacity: 0; transform: translateY(-6px); } }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } }
a, button { -webkit-tap-highlight-color: transparent; }
.btn, .select-option, .edition-tabs a, .config-tabs a, .public-header nav > a:not(.btn) { transition: transform .18s var(--ease), background-color .2s, color .2s, box-shadow .2s, border-color .2s; }
.btn:active, .select-option:active { transform: scale(.98); }
html { background: var(--paper); }
.admin-content, main#conteudo { animation: contentIn .28s var(--ease) both; }
@keyframes contentIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .admin-content, main#conteudo { animation: none; } }

/* ===== Painel administrativo como app no celular ===== */
.app-tabbar { display: none; }
@media (max-width: 800px) {
    body.admin-body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
    .admin-top { position: sticky; top: 0; min-height: 60px; padding: 10px 14px; }
    .admin-top .back-public, .admin-top .admin-notify { display: none; }
    .admin-content { padding: 18px 14px 28px; }
    .admin-heading { flex-direction: column; align-items: stretch; gap: 12px; margin-bottom: 18px; }
    .admin-heading h1 { font-size: 1.7rem; }
    .admin-heading .button-group, .heading-actions { width: 100%; }
    .admin-heading .btn, .heading-actions .btn, .button-group .btn { flex: 1 1 auto; justify-content: center; }
    .admin-sidebar { position: fixed; inset: 0 auto 0 0; width: min(320px, 88vw); z-index: 90; border-radius: 0 24px 24px 0; }
    .app-tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 85; padding: 6px; gap: 4px; background: #2a0614f2; backdrop-filter: blur(12px); border-radius: 22px; box-shadow: 0 16px 40px -14px #1c0410cc; }
    .app-tabbar a, .app-tab-more { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 56px; border-radius: 16px; color: #d9c3b8; text-decoration: none; font-size: .72rem; font-weight: 650; background: transparent; border: 0; }
    .app-tabbar a .bi, .app-tab-more .bi { font-size: 1.25rem; }
    .app-tabbar a.is-active { background: #e7cf9f2e; color: var(--champagne); }
    .metric-grid { grid-template-columns: 1fr 1fr; }
    .panel, .detail-panel { border-radius: 18px; }
    .form-grid.two-col, .form-grid.three-col, .two-col, .three-col { grid-template-columns: 1fr; }
    .form-control, .form-select, input, select, textarea { font-size: 16px; }
    .form-actions, .sticky-actions { flex-direction: column-reverse; }
    .form-actions .btn, .sticky-actions .btn { width: 100%; }
    .sticky-actions { position: sticky; bottom: calc(92px + env(safe-area-inset-bottom)); }
    .portal-table, .portal-table tbody, .portal-table tr, .portal-table td { display: block; width: 100%; }
    .portal-table thead { display: none; }
    .portal-table tr { margin: 10px 0; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
    .portal-table td { padding: 4px 0 !important; border: 0 !important; }
    .portal-table td .btn { width: 100%; margin-top: 8px; }
    .table-responsive { border: 0; overflow: visible; }
    dialog.portal-dialog { position: fixed; inset: auto 0 0 0; width: 100%; max-width: 100%; max-height: 88vh; margin: 0; border-radius: 24px 24px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); }
    .wide-dialog, .preview-dialog { width: 100%; height: auto; max-height: 92vh; }
    .preview-stage { min-height: 52vh; }
    .edition-tabs, .config-tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
    .edition-tabs a, .config-tabs a { white-space: nowrap; }
    .rte-toolbar { overflow-x: auto; flex-wrap: nowrap; }
}
@media (max-width: 800px) {
    body.admin-body { overflow-x: hidden; }
    .admin-shell, .admin-main, .admin-content, .admin-top, .admin-top-right { min-width: 0; max-width: 100vw; }
    .admin-top-right { flex: 1 1 auto; min-width: 0; justify-content: flex-end; }
    .edition-switch select { max-width: 140px; min-height: 40px; }
    .admin-content .panel { min-width: 0; }
    .admin-content .filter-form, .admin-content .list-filters, .admin-content .mail-filters, .filter-bar { grid-template-columns: 1fr !important; }
    .admin-content .filter-form > div, .admin-content .filter-form .button-group { width: 100%; }
}
/* Barra inferior do painel: mais limpa */
@media (max-width: 800px) {
    .app-tabbar { left: 0; right: 0; bottom: 0; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); gap: 2px; border-radius: 22px 22px 0 0; background: #2a0614f5; box-shadow: 0 -10px 30px -12px #1c041099; }
    .app-tabbar a, .app-tab-more { min-height: 54px; border-radius: 14px; font-size: .7rem; font-weight: 600; color: #c9ada4; position: relative; }
    .app-tabbar a .bi, .app-tab-more .bi { font-size: 1.3rem; }
    .app-tabbar a.is-active { background: transparent; color: var(--champagne); }
    .app-tabbar a.is-active::after { content: ""; position: absolute; bottom: 2px; left: 50%; width: 22px; height: 3px; margin-left: -11px; border-radius: 3px; background: var(--champagne); }
    .app-tab-more:hover, .app-tab-more:focus-visible { background: #ffffff0d; }
}
/* Cabeçalho do painel no celular: compacto e limpo */
@media (max-width: 800px) {
    .admin-top { padding: 8px 12px; min-height: 56px; background: #fffdfbf2; border-bottom: 0; box-shadow: 0 1px 0 var(--line); }
    .admin-top .admin-toggle { width: 40px; height: 40px; border: 0; background: transparent; box-shadow: none; border-radius: 12px; color: var(--wine); font-size: 1.4rem; }
    .admin-top .admin-toggle:hover, .admin-top .admin-toggle:active { background: #f4ebe8; }
    .admin-top-right { gap: 8px; }
    .edition-switch { position: relative; }
    .edition-switch select { border: 0; background-color: transparent; box-shadow: none; padding-left: .2rem; font-size: .92rem; min-height: 40px; max-width: 150px; }
    .edition-switch select option { font-weight: 500; }
    .admin-profile { border: 0; background: transparent; padding: 0; box-shadow: none; }
    .admin-profile .account-avatar { width: 36px; height: 36px; flex-basis: 36px; }
}
/* Cabeçalho do celular: logo no lugar do menu (o menu fica no botão Mais) */
.admin-top-logo { display: none; }
@media (max-width: 800px) {
    .admin-top .admin-toggle { display: none !important; }
    .admin-top-logo { display: inline-flex; align-items: center; }
    .admin-top-logo img { width: 64px; height: auto; display: block; filter: none; }
}
/* Barra inferior: sem linhas e sem sombra, só cor para a seção atual */
@media (max-width: 800px) {
    .app-tabbar { box-shadow: none; border-top: 0; background: #2a0614; }
    .app-tabbar a.is-active::after { display: none; }
    .app-tabbar a.is-active { color: #fff; }
    .app-tabbar a.is-active .bi { color: var(--champagne); }
    .admin-top { box-shadow: none; }
}
.age-hint { display: block; margin-top: 6px; font-size: .86rem; font-weight: 600; color: var(--muted); min-height: 1.2em; }
.age-hint.is-ok { color: var(--success); }
.age-hint.is-bad { color: var(--danger); }
.upload-summary { margin: 0 0 4px; font-size: .86rem; font-weight: 650; color: var(--ink); }
.upload-selected { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .86rem; color: var(--muted); overflow-wrap: anywhere; }

/* Foto de perfil: seletor com prévia */
.avatar-picker { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 4px 0; }
.avatar-preview { position: relative; width: 88px; height: 88px; flex: 0 0 88px; border-radius: 50%; overflow: hidden; }
.avatar-preview .account-avatar { width: 88px; height: 88px; flex-basis: 88px; font-size: 1.4rem; }
.avatar-preview-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar-picker-body { display: grid; gap: 6px; justify-items: start; min-width: 0; }
.avatar-picker-title { font-weight: 650; color: var(--ink); font-size: .92rem; }
.avatar-pick { cursor: pointer; }
.avatar-pick:focus-within { outline: 3px solid var(--gold); outline-offset: 3px; }
.avatar-hint { font-size: .84rem; color: var(--muted); overflow-wrap: anywhere; }
.avatar-remove { margin-top: 4px; }

/* Painel da conta do administrador */
.profile-wrap { position: relative; }
.profile-wrap .admin-profile { cursor: pointer; font: inherit; color: inherit; }
.profile-menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 80; width: min(280px, calc(100vw - 24px)); padding: 8px; background: var(--white); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); animation: rise .18s var(--ease); }
.profile-menu[hidden] { display: none; }
.profile-menu-head { display: flex; align-items: center; gap: 12px; padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.profile-menu-head .account-avatar { width: 40px; height: 40px; flex-basis: 40px; }
.profile-menu-head strong { display: block; font-size: .92rem; color: var(--ink); overflow-wrap: anywhere; }
.profile-menu-head small { display: block; font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.profile-menu a, .profile-logout { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; font-weight: 600; font-size: .92rem; text-decoration: none; text-align: left; cursor: pointer; }
.profile-menu a:hover, .profile-logout:hover { background: #f6eeea; color: var(--wine); }
.profile-menu .bi { color: var(--wine); font-size: 1rem; }
.profile-menu form { margin: 0; }
.profile-logout { color: var(--danger); }
.profile-logout .bi { color: var(--danger); }
