:root {
  --ink: #172033;
  --muted: #687086;
  --line: #e7e9f1;
  --surface: #ffffff;
  --canvas: #f6f7fb;
  --purple: #6d49df;
  --purple-dark: #5131c0;
  --purple-soft: #f0ecff;
  --blue: #3182f6;
  --green: #21a675;
  --red: #e64c62;
  --amber: #d58a16;
  --shadow: 0 18px 50px rgba(31, 38, 64, .09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
button, input, select { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(1.8rem, 3vw, 2.55rem); letter-spacing: -.045em; }
h2 { margin-bottom: 6px; letter-spacing: -.025em; }
.muted { color: var(--muted); }
.eyebrow { margin-bottom: 9px; color: var(--purple); font-size: .73rem; font-weight: 800; letter-spacing: .16em; }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 30px; background: #17132b; }
.login-simple { width: min(430px, 100%); }
.login-card-simple { display: grid; gap: 24px; padding: 42px; border-radius: 22px; background: white; box-shadow: 0 30px 90px rgba(0,0,0,.34); }
.login-logo { width: 190px; max-width: 70%; height: auto; justify-self: center; }
.login-card-simple h2 { margin: 0; font-size: 1.55rem; text-align: center; }
.login-shell { width: min(1040px, 100%); min-height: 630px; display: grid; grid-template-columns: 1.06fr .94fr; overflow: hidden; border-radius: 28px; background: white; box-shadow: 0 30px 100px rgba(0,0,0,.35); }
.login-brand { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 64px; overflow: hidden; color: white; background: linear-gradient(145deg, #5330c4, #8261ed); }
.login-brand::before, .login-brand::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; }
.login-brand::before { width: 520px; height: 520px; right: -300px; top: -200px; }
.login-brand::after { width: 350px; height: 350px; left: -220px; bottom: -190px; }
.login-brand .eyebrow { color: #ddd2ff; margin-top: 34px; }
.login-brand h1 { max-width: 470px; font-size: clamp(2.1rem, 4vw, 3.4rem); line-height: 1.04; }
.login-brand > p:not(.eyebrow) { max-width: 440px; color: #e3dcfb; font-size: 1.03rem; line-height: 1.65; }
.brand-mark { z-index: 1; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; color: var(--purple); background: white; font-size: 1.7rem; font-weight: 900; box-shadow: 0 10px 30px rgba(33,18,85,.25); }
.login-formula { z-index: 1; display: flex; align-items: baseline; gap: 12px; margin-top: 58px; color: #e7dfff; }
.login-formula strong { color: white; font-size: 2.15rem; }
.login-formula span { font-size: .82rem; }
.login-card { display: flex; flex-direction: column; justify-content: center; padding: 64px; }
.login-card h2 { font-size: 2rem; }
.stack-form { display: grid; gap: 20px; margin-top: 28px; }
label { display: grid; gap: 8px; color: #474e60; font-size: .84rem; font-weight: 700; }
input, select { min-height: 44px; width: 100%; border: 1px solid #dfe2eb; border-radius: 10px; padding: 10px 13px; color: var(--ink); background: white; outline: none; transition: border-color .18s, box-shadow .18s; }
input:focus, select:focus { border-color: #957bed; box-shadow: 0 0 0 4px rgba(109,73,223,.11); }
input[readonly] { color: #555d70; background: #f5f6f9; }
.login-foot { margin: 24px 0 0; color: #8a91a2; font-size: .75rem; line-height: 1.55; text-align: center; }

.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; padding: 9px 15px; font-weight: 750; transition: transform .15s, background .15s, border-color .15s; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: white; background: var(--purple); box-shadow: 0 7px 18px rgba(109,73,223,.2); }
.button-primary:hover { background: var(--purple-dark); }
.button-secondary { color: var(--purple-dark); border-color: #d9cffb; background: var(--purple-soft); }
.button-leaderboard { color: white; text-decoration: none; background: #141a2c; box-shadow: 0 7px 18px rgba(20,26,44,.16); }
.button-leaderboard:hover { background: #252d44; }
.button-ghost { color: #4f5669; border-color: #dfe2eb; background: white; }
.button-wide { width: 100%; min-height: 49px; }

.topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(24px, calc((100vw - 1500px) / 2)); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.92); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.brand span:last-child { display: grid; line-height: 1.1; }
.brand small { margin-top: 4px; color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; }
.brand-mark-small { width: 37px; height: 37px; border-radius: 11px; color: white; background: var(--purple); font-size: 1.1rem; box-shadow: none; }
.top-actions, .hero-actions { display: flex; align-items: center; gap: 10px; }
.hero-actions { flex-wrap: wrap; justify-content: flex-end; }
.admin-chip { display: flex; align-items: center; gap: 8px; color: #4c5366; font-size: .84rem; font-weight: 700; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #22b17b; box-shadow: 0 0 0 4px #e6f8f1; }

.page-shell { width: min(1500px, calc(100% - 48px)); margin: 0 auto; padding: 48px 0 72px; }
.hero-row { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.hero-row p:last-child { margin-bottom: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-top: 31px; }
.stat-card { position: relative; min-height: 136px; padding: 22px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 6px 20px rgba(35,42,67,.035); }
.stat-card::after { content: ""; position: absolute; width: 75px; height: 75px; right: -25px; top: -25px; border-radius: 50%; background: currentColor; opacity: .08; }
.stat-card span, .stat-card small { display: block; color: var(--muted); }
.stat-card span { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.stat-card strong { display: block; margin: 9px 0 7px; color: var(--ink); font-size: 2rem; letter-spacing: -.04em; }
.stat-card small { font-size: .75rem; }
.accent-purple { color: var(--purple); border-top: 3px solid var(--purple); }
.accent-blue { color: var(--blue); border-top: 3px solid var(--blue); }
.accent-green { color: var(--green); border-top: 3px solid var(--green); }
.accent-red { color: var(--red); border-top: 3px solid var(--red); }

.jury-recap-section { margin: 22px 0 19px; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: 0 8px 28px rgba(35,42,67,.045); }
.jury-recap-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 19px; }
.jury-recap-heading h2 { font-size: 1.2rem; }
.jury-recap-heading p:last-child { margin: 0; font-size: .8rem; }
.recap-live-badge { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 9px; padding: 8px 12px; border: 1px solid #cde8dc; border-radius: 999px; color: #177653; background: #f0faf6; font-size: .72rem; font-weight: 800; }
.jury-recap-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.jury-recap-card { min-width: 0; display: grid; gap: 7px; padding: 16px; border: 1px solid #e5e7ef; border-radius: 14px; color: var(--ink); background: linear-gradient(145deg, #fff, #fbfbfd); text-align: left; box-shadow: 0 4px 13px rgba(35,42,67,.025); transition: transform .16s, border-color .16s, box-shadow .16s; }
.jury-recap-card:hover, .jury-recap-card:focus-visible { transform: translateY(-2px); border-color: #a995ec; box-shadow: 0 10px 24px rgba(70,52,137,.11); outline: none; }
.jury-recap-card-head, .jury-recap-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.jury-recap-card-head > span { overflow: hidden; color: var(--purple); font-size: .61rem; font-weight: 900; letter-spacing: .1em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.jury-recap-card-head > b { color: #8b91a1; font-size: .62rem; }
.jury-recap-card > strong { display: flex; align-items: baseline; gap: 4px; margin-top: 3px; color: var(--red); font-size: 1.72rem; letter-spacing: -.045em; }
.jury-recap-card > strong small { color: #969cac; font-size: .75rem; font-weight: 750; letter-spacing: 0; }
.jury-recap-label { overflow: hidden; font-size: .79rem; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.jury-recap-card progress { width: 100%; height: 6px; overflow: hidden; border: 0; border-radius: 999px; background: #f0eefa; appearance: none; }
.jury-recap-card progress::-webkit-progress-bar { border-radius: 999px; background: #f0eefa; }
.jury-recap-card progress::-webkit-progress-value { border-radius: 999px; background: linear-gradient(90deg, #8265e7, #5e3bd0); }
.jury-recap-card progress::-moz-progress-bar { border-radius: 999px; background: linear-gradient(90deg, #8265e7, #5e3bd0); }
.jury-recap-foot { color: var(--muted); font-size: .64rem; }
.jury-recap-foot > b { color: var(--red); }
.jury-recap-foot small { color: #23805f; }
.dq-recap-card { align-content: space-between; border-color: #f1cbd1; background: linear-gradient(145deg, #fff9fa, #fff0f2); }
.dq-recap-card:hover, .dq-recap-card:focus-visible { border-color: #e17182; box-shadow: 0 10px 24px rgba(169,48,67,.12); }
.dq-recap-card .jury-recap-card-head > span, .dq-recap-card > strong { color: #c7374e; }
.dq-recap-card-foot { align-self: end; padding-top: 10px; border-top: 1px solid #f2d6da; color: #a33b4c; font-size: .66rem; font-weight: 800; }

.formula-banner { display: flex; align-items: center; justify-content: space-between; gap: 25px; margin: 19px 0; padding: 16px 19px; border: 1px solid #ded6fb; border-radius: 14px; background: linear-gradient(90deg, #f6f3ff, #fbfaff); }
.formula-banner > div:first-child { display: flex; align-items: center; gap: 12px; }
.formula-banner small { display: block; margin-top: 3px; color: var(--muted); }
.formula-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: white; background: var(--purple); font-size: 1.25rem; font-weight: 900; }
.formula-pills { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.formula-pills span, .category-tag { border: 1px solid #dfd8f6; border-radius: 999px; padding: 6px 10px; color: #5a43ad; background: white; font-size: .74rem; font-weight: 700; white-space: nowrap; }

.table-card { overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: white; box-shadow: var(--shadow); }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 23px; border-bottom: 1px solid var(--line); }
.table-toolbar h2 { font-size: 1.2rem; }
.table-toolbar p { margin-bottom: 0; font-size: .8rem; }
.filters { display: flex; gap: 9px; }
.filters select { width: 180px; }
.search-field { width: min(330px, 28vw); display: flex; align-items: center; gap: 6px; border: 1px solid #dfe2eb; border-radius: 10px; padding-left: 12px; }
.search-field:focus-within { border-color: #957bed; box-shadow: 0 0 0 4px rgba(109,73,223,.11); }
.search-field input { min-height: 42px; border: 0; padding-left: 2px; box-shadow: none; }
.search-field span { color: #848b9b; font-size: 1.3rem; }
.table-scroll { overflow-x: auto; }
.score-table { width: 100%; min-width: 1740px; border-collapse: collapse; font-size: .8rem; }
.score-table th { padding: 13px 14px; color: #767d8e; background: #fafafd; font-size: .67rem; letter-spacing: .065em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.score-table td { padding: 15px 14px; border-top: 1px solid #f0f1f5; vertical-align: middle; }
.score-table tbody tr:hover { background: #fcfbff; }
.score-table td > strong { font-size: .88rem; }
.cell-max, .total-cell small { display: block; margin-top: 4px; color: #8b91a1; font-size: .66rem; white-space: nowrap; }
.team-cell { min-width: 235px; display: flex; align-items: center; gap: 11px; }
.team-cell > strong, .evidence-bib-button { min-width: 45px; display: grid; place-items: center; padding: 7px; border-radius: 8px; color: var(--purple-dark); background: var(--purple-soft); font-size: 1rem; }
.evidence-bib-button { position: relative; min-height: 42px; border: 1px solid #d9cffb; font-weight: 850; transition: transform .16s, border-color .16s, box-shadow .16s; }
.evidence-bib-button:hover, .evidence-bib-button:focus-visible { transform: translateY(-1px); border-color: #9b83e9; box-shadow: 0 6px 16px rgba(109,73,223,.18); outline: none; }
.evidence-bib-button span { position: absolute; right: -5px; bottom: -5px; width: 18px; height: 18px; display: grid; place-items: center; border: 2px solid white; border-radius: 50%; color: white; background: var(--purple); font-size: .55rem; }
.team-cell div { display: grid; gap: 4px; }
.team-cell b { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-cell small { color: var(--muted); }
.rank { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: #62697a; background: #eff1f5; font-weight: 850; }
.rank-1 { color: #966513; background: #fff0bd; }
.rank-2 { color: #687083; background: #e9edf3; }
.rank-3 { color: #98582e; background: #f6dfce; }
.dq-badge { display: inline-flex; padding: 5px 7px; border-radius: 6px; color: #c63149; background: #ffebee; font-size: .7rem; font-weight: 850; }
.total-cell strong { color: var(--purple-dark); font-size: 1rem !important; }
.detail-button { border: 0; padding: 7px 9px; color: var(--purple); background: transparent; font-size: .75rem; font-weight: 750; }
.detail-button:hover { text-decoration: underline; }
.button-edit { min-height: 35px; padding: 7px 11px; color: var(--purple-dark); border-color: #d9cffb; background: var(--purple-soft); font-size: .72rem; white-space: nowrap; }
.checkpoint-cell { min-width: 210px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px; }
.checkpoint-cell span { padding: 5px 7px; border-radius: 6px; color: #596073; background: #f2f3f7; font-size: .68rem; text-align: center; }
.input-count { display: inline-flex; min-width: 42px; justify-content: center; padding: 5px 7px; border-radius: 7px; color: #8b6470; background: #fff0f2; font-weight: 800; }
.input-count.complete { color: #187b58; background: #eaf9f3; }
.progress-label { display: inline-flex; padding: 5px 8px; border-radius: 7px; color: #4f586d; background: #eef1f6; font-weight: 750; white-space: nowrap; }
.component-score { display: inline-flex; min-width: 78px; align-items: baseline; justify-content: center; gap: 4px; padding: 6px 9px; border-radius: 8px; color: var(--purple-dark); background: var(--purple-soft); font-weight: 850; white-space: nowrap; }
.component-score strong { font-size: .78rem; }
.component-score small { color: #7668a5; font-size: .63rem; font-weight: 800; }
.special-form { display: flex; gap: 4px; }
.special-input { width: 73px; min-height: 34px; padding: 5px 7px; border-radius: 7px; }
.special-form button { width: 31px; border: 0; border-radius: 7px; color: white; background: #8b70e8; }
.warning-text { color: var(--amber); font-weight: 700; }
.empty-state { padding: 55px !important; color: var(--muted); text-align: center; }
.alert { margin: 22px 0; padding: 13px 16px; border-radius: 10px; font-size: .85rem; font-weight: 650; }
.alert-error { color: #a92c41; border: 1px solid #f2c7ce; background: #fff0f2; }
.alert-success { color: #147451; border: 1px solid #bce9d7; background: #ecfaf5; }

.modal { width: min(1050px, calc(100% - 32px)); max-height: calc(100vh - 40px); padding: 0; overflow: hidden; border: 0; border-radius: 20px; color: var(--ink); background: white; box-shadow: 0 35px 100px rgba(24,19,46,.33); }
.modal::backdrop { background: rgba(21, 17, 39, .62); backdrop-filter: blur(3px); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 24px 27px 19px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin-bottom: 4px; }
.modal-head p:last-child { margin-bottom: 0; font-size: .82rem; }
.icon-button { width: 38px; height: 38px; border: 0; border-radius: 10px; color: #656c7d; background: #f2f3f7; font-size: 1.45rem; }
.modal-body { max-height: calc(100vh - 200px); padding: 25px 27px; overflow-y: auto; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 17px 27px; border-top: 1px solid var(--line); background: #fafafd; }
.jury-recap-modal { width: min(1480px, calc(100% - 28px)); }
.jury-recap-modal-shell { height: min(850px, calc(100vh - 34px)); display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
.jury-recap-modal-body { min-height: 0; padding: 18px; overflow: hidden; background: #f6f7fb; }
.jury-recap-state { height: 100%; min-height: 340px; display: grid; place-items: center; align-content: center; gap: 11px; color: var(--muted); text-align: center; }
.jury-recap-state[hidden], .jury-recap-columns[hidden] { display: none; }
.jury-recap-state strong { color: var(--ink); }
.jury-recap-state p { margin: 0; font-size: .8rem; }
.jury-recap-error strong { color: var(--red); }
.jury-recap-columns { height: 100%; min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.jury-list-panel { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: white; }
.jury-list-missing { grid-template-rows: auto auto minmax(0, 1fr); }
.jury-list-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px; border-bottom: 1px solid var(--line); }
.jury-list-panel > header > div { display: grid; gap: 3px; }
.jury-list-panel > header > div span { color: var(--muted); font-size: .6rem; font-weight: 900; letter-spacing: .11em; }
.jury-list-panel > header > div strong { font-size: .85rem; }
.jury-list-missing > header > div strong { color: var(--red); }
.jury-list-filled > header > div strong { color: var(--green); }
.jury-bulk-form { display: grid; grid-template-columns: minmax(155px, auto) minmax(150px, 1fr) auto; align-items: end; gap: 10px; padding: 11px 13px; border-bottom: 1px solid var(--line); background: #fbfaff; }
.jury-bulk-selection { display: grid; align-self: center; gap: 4px; }
.jury-select-all { display: flex; align-items: center; gap: 7px; font-size: .68rem; cursor: pointer; }
.jury-select-all input, .jury-row-select input { width: 17px; height: 17px; min-height: 0; flex: 0 0 auto; margin: 0; padding: 0; accent-color: var(--purple); cursor: pointer; }
.jury-bulk-selection > strong { color: var(--purple-dark); font-size: .66rem; }
.jury-bulk-fields { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.jury-bulk-fields label { gap: 4px; font-size: .62rem; }
.jury-bulk-fields label:only-child { grid-column: 1 / -1; }
.jury-bulk-fields input { min-height: 36px; padding: 6px 9px; border-radius: 8px; font-size: .72rem; }
.jury-bulk-form .button { min-height: 36px; padding: 7px 11px; font-size: .68rem; white-space: nowrap; }
.jury-bulk-form .button:disabled { cursor: not-allowed; opacity: .5; transform: none; }
.jury-bulk-message { grid-column: 1 / -1; min-height: 13px; margin: -2px 0 0; color: var(--muted); font-size: .62rem; }
.jury-bulk-message.success { color: var(--green); font-weight: 750; }
.jury-bulk-message.error { color: var(--red); font-weight: 750; }
.jury-search { width: min(245px, 48%); display: flex; align-items: center; gap: 6px; padding-left: 10px; border: 1px solid #dfe2eb; border-radius: 9px; }
.jury-search:focus-within { border-color: #957bed; box-shadow: 0 0 0 3px rgba(109,73,223,.1); }
.jury-search span { color: #8d93a3; font-size: 1.1rem; }
.jury-search input { min-height: 37px; padding: 7px 8px 7px 2px; border: 0; box-shadow: none; font-size: .72rem; }
.jury-table-scroll { min-height: 0; overflow: auto; }
.jury-detail-table { width: 100%; min-width: 650px; border-collapse: collapse; font-size: .72rem; }
.jury-detail-table th { position: sticky; z-index: 1; top: 0; padding: 10px 12px; color: #7d8495; background: #fafafd; font-size: .59rem; letter-spacing: .06em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.jury-detail-table td { padding: 11px 12px; border-top: 1px solid #f0f1f5; vertical-align: middle; }
.jury-detail-table tbody tr:hover { background: #fcfbff; }
.jury-missing-table { min-width: 720px; }
.jury-select-column, .jury-row-select { width: 52px; text-align: center !important; }
.jury-team-cell { min-width: 185px; }
.jury-team-cell strong { display: inline-grid; min-width: 37px; place-items: center; margin-right: 7px; padding: 5px 6px; border-radius: 7px; color: var(--purple-dark); background: var(--purple-soft); }
.jury-team-cell span { font-weight: 750; }
.jury-category-cell { white-space: nowrap; }
.jury-value-cell { min-width: 125px; color: #343b4d; font-weight: 800; white-space: nowrap; }
.jury-detail-table td:last-child small { display: block; margin-top: 5px; color: var(--muted); font-size: .61rem; }
.jury-detail-badge { display: inline-flex; padding: 5px 7px; border-radius: 6px; font-size: .62rem; font-weight: 850; white-space: nowrap; }
.jury-detail-badge.missing { color: #b1364a; background: #ffedf0; }
.jury-detail-badge.filled { color: #147553; background: #eaf9f3; }
.jury-detail-badge.admin { color: #5b3fc0; background: var(--purple-soft); }
.jury-detail-badge.dq { color: #b42e45; background: #ffedf0; }
.jury-list-empty { margin: 0; padding: 35px 15px; color: var(--muted); font-size: .74rem; text-align: center; }
.dq-recap-modal { width: min(1180px, calc(100% - 28px)); }
.dq-recap-modal-shell { height: min(760px, calc(100vh - 34px)); display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
.dq-recap-modal-body { min-height: 0; padding: 18px; overflow: hidden; background: #f6f7fb; }
.dq-list-panel { height: 100%; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: white; }
.dq-list-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.dq-list-panel > header > div { display: grid; gap: 3px; }
.dq-list-panel > header > div span { color: var(--muted); font-size: .6rem; font-weight: 900; letter-spacing: .11em; }
.dq-list-panel > header > div strong { color: var(--red); font-size: .88rem; }
.dq-detail-table { min-width: 820px; }
.dq-reason-cell { min-width: 300px; color: #4b3540; line-height: 1.5; }
.settings-form, [data-edit-form] { max-height: calc(100vh - 40px); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; }
.settings-form .modal-body, [data-edit-form] .modal-body { min-height: 0; max-height: none; }
.settings-form .modal-actions, [data-edit-form] .modal-actions { position: relative; z-index: 2; flex-shrink: 0; }
.settings-section { padding: 0 0 26px; margin: 0 0 25px; border-bottom: 1px solid var(--line); }
.settings-section:last-child { padding-bottom: 0; margin-bottom: 0; border-bottom: 0; }
.publication-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.publication-toggle { position: relative; min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 13px; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: #fbfbfd; cursor: pointer; }
.publication-toggle:has(input:checked) { border-color: #cfc2f7; background: #f8f5ff; }
.publication-toggle input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.toggle-track { width: 46px; height: 26px; display: flex; align-items: center; padding: 3px; border-radius: 999px; background: #c8cbd4; transition: background .18s ease; }
.toggle-track span { width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(28,24,43,.2); transition: transform .18s ease; }
.publication-toggle input:checked + .toggle-track { background: var(--purple); }
.publication-toggle input:checked + .toggle-track span { transform: translateX(20px); }
.publication-toggle input:focus-visible + .toggle-track { outline: 3px solid rgba(109,73,223,.22); outline-offset: 2px; }
.toggle-copy { min-width: 0; display: grid; gap: 4px; }
.toggle-copy strong { color: var(--ink); font-size: .8rem; }
.toggle-copy small { color: var(--muted); font-size: .67rem; font-weight: 550; line-height: 1.45; }
.edit-section { padding: 0 0 25px; margin: 0 0 25px; border-bottom: 1px solid var(--line); }
.edit-section:last-child { padding-bottom: 0; margin-bottom: 0; border-bottom: 0; }
.edit-modal { width: min(1080px, calc(100% - 32px)); }
.edit-body { padding-top: 22px; }
.edit-category-rank { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 3px 16px; margin-bottom: 22px; padding: 15px 17px; border: 1px solid #d8cdf7; border-left: 4px solid var(--purple); border-radius: 11px; background: linear-gradient(105deg, #f6f2ff, #fff); }
.edit-category-rank span { grid-row: 1 / 3; color: var(--purple); font-size: .62rem; font-weight: 900; letter-spacing: .1em; }
.edit-category-rank strong { color: var(--purple-dark); font-size: 1rem; }
.edit-category-rank small { color: var(--muted); font-size: .7rem; }
.active-dq-reason { margin-bottom: 16px; padding: 13px 15px; border: 1px solid #efc5cc; border-left: 4px solid var(--red); border-radius: 10px; background: #fff3f5; }
.active-dq-reason[hidden] { display: none; }
.active-dq-reason span { color: #a92e43; font-size: .65rem; font-weight: 900; letter-spacing: .08em; }
.active-dq-reason p { margin: 7px 0 0; color: #57343a; font-size: .8rem; font-weight: 700; line-height: 1.5; }
textarea { width: 100%; resize: vertical; border: 1px solid #dfe2eb; border-radius: 10px; padding: 11px 13px; color: var(--ink); background: white; font: inherit; outline: none; }
textarea:focus { border-color: #957bed; box-shadow: 0 0 0 4px rgba(109,73,223,.11); }
.textarea-label { margin-top: 14px; }
.section-title { display: flex; align-items: center; gap: 11px; margin-bottom: 17px; }
.section-title > span { width: 33px; height: 33px; display: grid; place-items: center; border-radius: 9px; color: var(--purple); background: var(--purple-soft); font-size: .73rem; font-weight: 850; }
.section-title h3, .section-title p { margin-bottom: 2px; }
.section-title h3 { font-size: 1rem; }
.section-title p { color: var(--muted); font-size: .75rem; }
.field-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.field-grid-3 { grid-template-columns: repeat(3, 1fr); }
.field-grid-4 { grid-template-columns: repeat(4, 1fr); }
.percentage-total { margin-top: 12px; text-align: right; color: var(--muted); font-size: .78rem; }
.percentage-total strong { margin-left: 6px; color: var(--green); }
.percentage-total strong.invalid { color: var(--red); }
.category-settings { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; }
.category-settings article { padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: #fbfbfd; }
.category-settings h4 { margin-bottom: 14px; font-size: .9rem; }
.category-settings label { font-size: .71rem; }
.category-settings input { min-height: 41px; background: white; }
.detail-modal { width: min(850px, calc(100% - 32px)); }
.detail-meta { margin-bottom: 18px; padding: 13px; border-radius: 10px; background: #f7f5ff; }
.detail-meta span { color: var(--purple); font-size: .76rem; font-weight: 800; }
.detail-meta p { margin: 7px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.segment-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.segment-grid article { padding: 17px; border: 1px solid var(--line); border-radius: 13px; }
.segment-grid article > span { color: var(--purple); font-size: .67rem; font-weight: 800; text-transform: uppercase; }
.segment-grid h3 { margin: 5px 0 14px; font-size: .9rem; }
.segment-grid dl { display: grid; gap: 8px; margin: 0 0 17px; }
.segment-grid dl div { display: flex; justify-content: space-between; gap: 8px; }
.segment-grid dt { color: var(--muted); font-size: .7rem; }
.segment-grid dd { margin: 0; font-size: .7rem; font-weight: 700; }
.segment-grid article > strong { color: var(--purple-dark); font-size: 1.05rem; }
.formula-note { margin: 17px 0 0; padding: 13px 15px; border-left: 3px solid var(--purple); color: var(--muted); background: #faf9ff; font-size: .76rem; line-height: 1.55; }

.evidence-modal { width: min(1180px, calc(100% - 32px)); }
.evidence-modal-shell { max-height: calc(100vh - 40px); display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
.evidence-modal-body { min-height: 390px; max-height: calc(100vh - 155px); padding: 24px 27px 28px; overflow-y: auto; background: #f7f8fc; }
.evidence-state { min-height: 340px; display: grid; place-items: center; align-content: center; gap: 10px; color: var(--muted); text-align: center; }
.evidence-state[hidden], .evidence-gallery[hidden] { display: none; }
.evidence-state strong { color: var(--ink); font-size: 1rem; }
.evidence-state p { max-width: 430px; margin: 0; font-size: .82rem; line-height: 1.55; }
.evidence-spinner { width: 34px; height: 34px; border: 3px solid #ded7f9; border-top-color: var(--purple); border-radius: 50%; animation: evidence-spin .75s linear infinite; }
.evidence-empty-icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 17px; color: var(--purple); background: var(--purple-soft); font-size: 1.55rem; }
.evidence-error strong { color: var(--red); }
.evidence-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.evidence-card { min-width: 0; padding: 0; overflow: hidden; border: 1px solid #e2e4ec; border-radius: 14px; color: var(--ink); background: white; text-align: left; box-shadow: 0 8px 22px rgba(31,38,64,.055); transition: transform .16s, border-color .16s, box-shadow .16s; }
.evidence-card:hover, .evidence-card:focus-visible { transform: translateY(-2px); border-color: #aa97eb; box-shadow: 0 14px 30px rgba(61,45,120,.13); outline: none; }
.evidence-image-wrap { position: relative; height: 185px; display: grid; place-items: center; overflow: hidden; background: linear-gradient(145deg, #eceef4, #f8f9fb); }
.evidence-image-wrap::after { content: "Lihat gambar"; position: absolute; right: 10px; bottom: 10px; padding: 5px 8px; border-radius: 7px; color: white; background: rgba(23,32,51,.76); font-size: .65rem; font-weight: 750; opacity: 0; transform: translateY(4px); transition: opacity .16s, transform .16s; }
.evidence-card:hover .evidence-image-wrap::after { opacity: 1; transform: none; }
.evidence-image-wrap img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .25s; }
.evidence-card:hover img { transform: scale(1.025); }
.evidence-card.image-failed .evidence-image-wrap::before { content: "Gambar tidak tersedia"; color: var(--muted); font-size: .76rem; }
.evidence-card.image-failed img { display: none; }
.evidence-caption { display: grid; gap: 5px; padding: 13px 14px 15px; }
.evidence-caption strong, .evidence-caption small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evidence-caption strong { font-size: .82rem; }
.evidence-caption small { color: var(--muted); font-size: .7rem; }

.evidence-preview { width: min(1180px, calc(100% - 28px)); max-height: calc(100vh - 28px); padding: 0; overflow: visible; border: 0; border-radius: 17px; color: white; background: #111522; box-shadow: 0 35px 110px rgba(0,0,0,.55); }
.evidence-preview::backdrop { background: rgba(7,9,15,.88); backdrop-filter: blur(5px); }
.evidence-preview figure { margin: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.evidence-preview img { width: 100%; max-height: calc(100vh - 120px); display: block; object-fit: contain; border-radius: 17px 17px 0 0; background: #090b12; }
.evidence-preview figcaption { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 20px; }
.evidence-preview figcaption strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evidence-preview figcaption span { flex: 0 0 auto; color: #aeb5c6; font-size: .74rem; }
.preview-close { position: absolute; z-index: 2; top: -13px; right: -13px; width: 40px; height: 40px; border: 3px solid #111522; border-radius: 50%; color: #222938; background: white; font-size: 1.35rem; box-shadow: 0 7px 20px rgba(0,0,0,.3); }
@keyframes evidence-spin { to { transform: rotate(360deg); } }

@media (max-width: 980px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .jury-recap-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .formula-banner, .table-toolbar { align-items: flex-start; flex-direction: column; }
  .formula-pills { justify-content: flex-start; }
  .filters { width: 100%; }
  .search-field { width: 100%; }
  .category-settings { grid-template-columns: 1fr; }
  .field-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .segment-grid { grid-template-columns: 1fr; }
  .evidence-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jury-recap-modal-shell { height: calc(100vh - 28px); }
  .dq-recap-modal-shell { height: calc(100vh - 28px); }
  .jury-recap-columns { grid-template-columns: 1fr; overflow-y: auto; }
  .jury-list-panel { min-height: 420px; }
}

@media (max-width: 720px) {
  .login-page { padding: 0; background: white; }
  .login-shell { min-height: 100vh; grid-template-columns: 1fr; border-radius: 0; }
  .login-brand { min-height: 310px; padding: 35px; }
  .login-brand h1 { font-size: 2.1rem; }
  .login-brand > p:not(.eyebrow), .login-formula { display: none; }
  .login-card { padding: 35px; }
  .login-card-simple { padding: 32px 25px; border-radius: 18px; }
  .topbar { height: 64px; padding: 0 17px; }
  .admin-chip { display: none; }
  .page-shell { width: min(100% - 28px, 1500px); padding-top: 30px; }
  .hero-row { align-items: flex-start; flex-direction: column; }
  .hero-actions { width: 100%; }
  .hero-actions form, .hero-actions button, .hero-actions a { flex: 1 1 calc(50% - 6px); }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stat-card { min-height: 122px; padding: 17px; }
  .stat-card strong { font-size: 1.65rem; }
  .jury-recap-section { padding: 18px 14px; }
  .jury-recap-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .jury-recap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jury-recap-card { padding: 13px; }
  .jury-recap-card > strong { font-size: 1.45rem; }
  .jury-recap-foot { align-items: flex-start; flex-direction: column; gap: 3px; }
  .filters { flex-direction: column; }
  .filters select { width: 100%; }
  .field-grid, .field-grid-3, .field-grid-4 { grid-template-columns: 1fr; }
  .edit-category-rank { grid-template-columns: 1fr; gap: 5px; }
  .edit-category-rank span { grid-row: auto; }
  .publication-controls { grid-template-columns: 1fr; }
  .modal-head, .modal-body, .modal-actions { padding-left: 18px; padding-right: 18px; }
  .jury-recap-modal-body { padding: 10px; }
  .dq-recap-modal-body { padding: 10px; }
  .jury-list-panel > header { align-items: flex-start; flex-direction: column; }
  .jury-bulk-form { grid-template-columns: 1fr; align-items: stretch; }
  .jury-bulk-fields { grid-column: 1; }
  .jury-bulk-form .button { width: 100%; }
  .dq-list-panel > header { align-items: flex-start; flex-direction: column; }
  .jury-search { width: 100%; max-width: none; }
  .evidence-modal-body { min-height: 330px; padding: 18px; }
  .evidence-gallery { grid-template-columns: 1fr; }
  .evidence-preview figcaption { align-items: flex-start; flex-direction: column; gap: 6px; }
  .preview-close { top: 8px; right: 8px; border-width: 0; }
}

@media (max-width: 430px) {
  .jury-recap-grid { grid-template-columns: 1fr; }
  .jury-recap-card-head > b { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
  .evidence-spinner { animation-duration: 1.6s; }
  .evidence-card, .evidence-image-wrap img { transition: none; }
}
