:root {
    --navy: #123a5d;
    --blue: #24689a;
    --teal: #17888a;
    --gold: #e5b955;
    --cream: #fbf8f1;
    --ink: #273849;
    --muted: #667584;
    --line: #dbe4e9;
    --danger: #a52828;
    --white: #fff;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; min-height: 100%; color: var(--ink); background: #f4f7f9; font-family: Arial, Helvetica, sans-serif; line-height: 1.55; }
.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.site-header { padding: 46px 0; color: #fff; background: linear-gradient(125deg, #102f50, #1d7190 72%, #278b82); }
.site-header.compact { padding: 30px 0; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 25px; }
.site-header h1 { margin: 0; color: #fff; font-size: clamp(27px, 4vw, 43px); line-height: 1.15; }
.eyebrow { margin: 0 0 7px; color: #ffe299; font-size: 12px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; }
.subtitle { margin: 8px 0 0; font-size: 18px; }
.admin-link { display: inline-block; padding: 10px 16px; border: 1px solid rgba(255,255,255,.6); border-radius: 7px; color: #fff; text-decoration: none; white-space: nowrap; }
.main-space { padding: 40px 0 70px; }
.intro-card, .form-card, .confirmation-card, .login-card { border-radius: 14px; background: #fff; box-shadow: 0 10px 32px rgba(18,58,93,.09); }
.intro-card { margin-bottom: 22px; padding: 24px 28px; border-left: 5px solid var(--gold); }
.intro-card h2, .confirmation-card h2, .login-card h2 { margin: 0 0 8px; color: var(--navy); }
.intro-card p { margin: 0; color: var(--muted); }
.form-card { position: relative; padding: 30px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 19px 22px; }
.field { margin-bottom: 19px; }
.field.full { width: 100%; }
.field label, .coauthors-box legend { display: block; margin-bottom: 7px; color: var(--navy); font-weight: 700; }
.field label span { color: var(--danger); }
.field input, .field textarea, .search-form input { width: 100%; padding: 12px 13px; border: 1px solid #c8d5dc; border-radius: 7px; color: var(--ink); background: #fff; font: inherit; }
.field input:focus, .field textarea:focus, .search-form input:focus { outline: 3px solid rgba(36,104,154,.13); border-color: var(--blue); }
.field textarea { min-height: 250px; resize: vertical; }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
#word-counter { color: var(--teal); font-size: 13px; }
#word-counter.over-limit { color: var(--danger); }
.help-text { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.coauthors-box { margin: 8px 0 25px; padding: 22px; border: 1px solid var(--line); border-radius: 10px; }
.coauthors-box legend { padding: 0 8px; font-size: 18px; }
.coauthors-box legend small { color: var(--muted); font-size: 12px; font-weight: 400; }
.coauthor-row { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 14px; padding-bottom: 15px; margin-bottom: 15px; border-bottom: 1px dashed var(--line); }
.coauthor-row .field { margin: 0; }
.remove-row { margin-bottom: 1px; padding: 12px 10px; border: 0; color: var(--danger); background: transparent; cursor: pointer; }
.primary-button, .secondary-button { display: inline-block; padding: 12px 20px; border: 0; border-radius: 7px; font-size: 15px; font-weight: 700; cursor: pointer; text-decoration: none; }
.primary-button { color: #fff; background: var(--teal); }
.primary-button:hover { background: var(--navy); }
.secondary-button { color: var(--navy); border: 1px solid #b8cbd4; background: #edf4f6; }
.inline-button { width: auto; }
.consent-row { display: flex; align-items: flex-start; gap: 9px; margin: 4px 0 22px; }
.consent-row input { margin-top: 5px; }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.alert { margin-bottom: 20px; padding: 15px 18px; border-radius: 8px; }
.alert ul { margin-bottom: 0; }
.alert.error { color: #7f1d1d; border: 1px solid #fecaca; background: #fef2f2; }
.alert.warning { color: #704d0b; border: 1px solid #f2d48c; background: #fff8df; }
.confirmation-space { min-height: 520px; padding: 65px 0; }
.confirmation-card { max-width: 680px; margin: 0 auto; padding: 45px 32px; text-align: center; }
.success-icon { display: grid; width: 70px; height: 70px; margin: 0 auto 20px; place-items: center; border-radius: 50%; color: #fff; background: var(--teal); font-size: 36px; font-weight: 700; }
.abstract-id-label { margin-top: 30px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }
.abstract-id { margin: 8px 0 28px; color: var(--navy); font-size: clamp(28px, 6vw, 46px); font-weight: 800; letter-spacing: 1px; }
.login-card { max-width: 460px; margin: 30px auto; padding: 30px; }
.dashboard-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.stat-card { min-width: 210px; padding: 18px 22px; border-radius: 10px; color: #fff; background: var(--navy); }
.stat-card span { display: block; font-size: 13px; opacity: .8; }
.stat-card strong { display: block; font-size: 31px; }
.search-form { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.search-form input { max-width: 520px; }
.text-link, .pdf-link { color: var(--blue); font-weight: 700; }
.table-wrap { overflow-x: auto; border-radius: 10px; background: #fff; box-shadow: 0 8px 24px rgba(18,58,93,.07); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { padding: 13px; color: #fff; background: var(--navy); text-align: left; white-space: nowrap; }
.admin-table td { padding: 13px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table td small { display: block; margin-top: 4px; color: var(--muted); }
.empty-state { padding: 35px !important; color: var(--muted); text-align: center; }
footer { padding: 22px 16px; color: #cdd8e0; background: #0d2d49; text-align: center; font-size: 13px; }
code { padding: 2px 5px; border-radius: 4px; background: rgba(255,255,255,.6); }

@media (max-width: 720px) {
    .site-header { padding: 34px 0; }
    .header-inner, .dashboard-bar { align-items: flex-start; flex-direction: column; }
    .form-grid, .coauthor-row { grid-template-columns: 1fr; }
    .form-card { padding: 23px 18px; }
    .coauthors-box { padding: 18px 14px; }
    .remove-row { justify-self: start; padding: 5px 0; }
    .label-row { align-items: flex-start; flex-direction: column; gap: 0; }
    .search-form { align-items: stretch; flex-direction: column; }
}

@media print {
    .site-header, footer, .confirmation-card button, .confirmation-card a { display: none !important; }
    body { background: #fff; }
    .confirmation-space { padding: 20px 0; }
    .confirmation-card { box-shadow: none; }
}

