:root {
    --navy: #132c4d;
    --blue: #225e91;
    --ink: #202833;
    --muted: #64748b;
    --line: #cbd5e1;
    --soft: #f5f8fb;
    --success: #166534;
    --danger: #991b1b;
}

* { box-sizing: border-box; }
body { margin: 0; background: #eef2f6; color: var(--ink); font: 15px/1.55 Arial, Helvetica, sans-serif; }
a { color: var(--blue); }
.site-wrap { min-height: calc(100vh - 48px); }
.topbar { height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; background: var(--navy); color: white; }
.brand-mini { font-weight: 700; letter-spacing: .04em; }
.brand-mini span { font-weight: 400; opacity: .8; }
.top-link { color: white; text-decoration: none; font-size: 13px; }
.footer { padding: 14px 20px 24px; color: #64748b; text-align: center; font-size: 12px; }
.container { width: min(1100px, calc(100% - 32px)); margin: 26px auto 40px; }
.narrow { width: min(560px, calc(100% - 32px)); }
.card { background: white; border: 1px solid #dbe3ec; border-radius: 12px; box-shadow: 0 12px 32px rgba(15, 42, 70, .07); padding: 26px; }
.login-card { margin-top: 8vh; }
.login-card h1 { margin: 0 0 8px; color: var(--navy); font-size: 28px; }
.subtitle { color: var(--muted); margin: 0 0 24px; }
.notice { border-radius: 8px; padding: 12px 14px; margin: 14px 0 18px; background: #eff6ff; color: #1e3a5f; border: 1px solid #bfdbfe; }
.notice.success { background: #f0fdf4; color: var(--success); border-color: #bbf7d0; }
.notice.error { background: #fef2f2; color: var(--danger); border-color: #fecaca; }
label { display: block; font-weight: 700; color: #334155; margin-bottom: 6px; }
input, select, textarea { width: 100%; border: 1px solid #b9c6d4; border-radius: 6px; padding: 10px 11px; font: inherit; color: var(--ink); background: white; }
textarea { min-height: 78px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(34,94,145,.16); border-color: var(--blue); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.full { grid-column: 1 / -1; }
.field-note { color: var(--muted); font-size: 12px; margin-top: 4px; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 24px; }
button, .button { display: inline-flex; justify-content: center; align-items: center; border: 0; border-radius: 7px; padding: 11px 18px; font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; }
.primary { color: white; background: var(--blue); }
.primary:hover { background: #1c4d78; }
.secondary { color: #23415f; background: #e8eef5; }
.danger { color: white; background: #b42318; }
.form-paper { padding: 34px 42px 46px; border-radius: 3px; }
.college-head { text-align: center; border-bottom: 2px solid var(--navy); padding-bottom: 13px; margin-bottom: 18px; }
.college-head img { width: 74px; height: 74px; object-fit: contain; float: left; margin: 0 0 0 2px; }
.college-head h1 { margin: 3px 0 0; color: #111827; font-size: 22px; letter-spacing: .02em; }
.college-head h2 { margin: 0; color: #111827; font-size: 18px; }
.college-head p { margin: 2px 0; font-size: 11px; color: #334155; }
.paper-title { text-align: center; font-size: 18px; margin: 18px 0 8px; font-weight: 800; color: #111827; }
.paper-subtitle { text-align: center; font-weight: 700; font-size: 13px; letter-spacing: .08em; margin-bottom: 20px; }
.section-title { margin: 26px -4px 13px; padding: 7px 10px; background: #e9f0f7; border-left: 4px solid var(--blue); color: #163b61; font-size: 15px; font-weight: 800; }
.inline-options { display: flex; flex-wrap: wrap; gap: 13px; padding: 8px 0; }
.inline-options label { font-weight: 400; margin: 0; display: inline-flex; align-items: center; gap: 5px; }
.inline-options input { width: auto; }
.small-input { padding: 8px 9px; }
.qualification { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 12px; }
.qualification th, .qualification td { border: 1px solid #9aa9b9; padding: 7px 6px; vertical-align: middle; }
.qualification th { background: #e9f0f7; color: #183a5d; text-align: center; font-weight: 800; }
.qualification td:first-child { font-weight: 700; white-space: nowrap; }
.qualification input { padding: 7px 5px; border-radius: 3px; min-width: 0; }
.declaration { font-size: 12px; }
.declaration li { margin: 5px 0; }
.ack { display: flex; align-items: flex-start; gap: 9px; margin-top: 14px; font-weight: 700; }
.ack input { width: auto; margin-top: 4px; }
.signature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; margin-top: 28px; }
.signature-line { border-bottom: 1px solid #1f2937; min-height: 34px; }
.signature-label { font-size: 12px; color: #475569; margin-top: 5px; }
.confirmation { text-align: center; padding: 30px 12px; }
.confirmation h1 { color: var(--success); margin-top: 0; }
.confirmation-code { display: inline-block; font-size: 23px; font-weight: 800; letter-spacing: .08em; color: var(--navy); padding: 12px 20px; border: 1px dashed #7aa0c2; border-radius: 7px; margin: 8px 0 18px; }
.admin-header { display: flex; gap: 12px; justify-content: space-between; align-items: end; margin-bottom: 16px; }
.admin-header h1 { margin: 0; color: var(--navy); }
.data-table { width: 100%; border-collapse: collapse; background: white; }
.data-table th, .data-table td { border: 1px solid #d3dde8; padding: 10px 9px; text-align: left; }
.data-table th { background: var(--navy); color: white; font-size: 13px; }
.data-table tr:nth-child(even) { background: #f8fafc; }
.status { display: inline-block; border-radius: 999px; padding: 3px 9px; font-size: 12px; font-weight: 700; }
.status.submitted { color: #166534; background: #dcfce7; }
.status.draft { color: #854d0e; background: #fef9c3; }
.table-wrap { overflow-x: auto; }
.lock-note { margin-top: 8px; color: var(--muted); font-size: 12px; }
@media (max-width: 760px) {
    .grid, .grid-3, .signature-grid { grid-template-columns: 1fr; }
    .full { grid-column: auto; }
    .form-paper { padding: 20px 16px 32px; }
    .college-head img { float: none; margin-bottom: 6px; }
    .college-head h1 { font-size: 18px; }
    .college-head h2 { font-size: 15px; }
    .qualification { font-size: 10px; }
    .qualification th, .qualification td { padding: 5px 3px; }
    .qualification input { font-size: 11px; padding: 5px 3px; }
}
@media print {
    body { background: white; }
    .topbar, .footer, .button-row, .lock-note, .notice { display: none !important; }
    .site-wrap, .container, .card { width: 100%; max-width: none; margin: 0; padding: 0; border: 0; box-shadow: none; }
    .form-paper { padding: 0; }
    input, select, textarea { border: 0; padding: 0; background: transparent; }
    .section-title { break-after: avoid; }
}
