/* Public online admission — a clean, professional applicant-facing form. */
* { box-sizing: border-box; }
:root {
    --ap-dark: #16255c;      /* deep navy */
    --ap-main: #2b4acb;      /* primary blue */
    --ap-light: #4f6ef2;     /* focus / accent */
    --ap-accent: #e8b64c;    /* warm gold accent */
    --ap-soft: #eef2fe;      /* soft blue tint */
    --ap-soft2: #f6f8fe;     /* lighter tint */
    --ap-border: #d9deef;
    --ap-line: #eef0f8;
    --ap-ink: #243049;
    --ap-muted: #717693;
    --ap-ok: #1b7a3a;
    --ap-bad: #c62828;
}

.ap-body {
    margin: 0; padding: 34px 16px 64px; min-height: 100vh;
    background:
        radial-gradient(900px 420px at 50% -140px, rgba(43,74,203,.14), transparent 70%),
        linear-gradient(180deg, #eaeefb 0%, #f6f7fc 420px);
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    color: var(--ap-ink); line-height: 1.5;
}
.ap-wrap { width: min(980px, 100%); margin: 0 auto; }

/* ── Header ── */
.ap-top {
    display: flex; align-items: center; gap: 16px; margin-bottom: 22px;
    padding: 18px 24px; border-radius: 16px;
    background: linear-gradient(120deg, var(--ap-dark), var(--ap-main));
    box-shadow: 0 12px 34px rgba(22,37,92,.28); color: #fff;
}
.ap-logo {
    width: 58px; height: 58px; object-fit: contain; border-radius: 12px;
    background: #fff; padding: 5px; flex: none; box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.ap-top h1 { margin: 0; font-size: 23px; font-weight: 750; letter-spacing: .2px; }
.ap-top p { margin: 3px 0 0; color: #cdd6f6; font-size: 13.5px; font-weight: 500; }

/* ── Card ── */
.ap-card {
    background: #fff; border: 1px solid var(--ap-border); border-radius: 18px;
    box-shadow: 0 14px 40px rgba(22,37,92,.10); overflow: hidden;
}

/* ── Info strips ── */
.ap-strip {
    padding: 13px 24px; background: var(--ap-soft); border-bottom: 1px solid var(--ap-border);
    font-size: 13.5px; line-height: 1.6; color: #35406b;
}
.ap-strip.ap-info { background: #fff8e8; border-bottom-color: #f3e2b4; color: #7a5a12; }
.ap-strip strong { color: var(--ap-dark); }
.ap-req { color: var(--ap-bad); font-weight: 700; }

.ap-err {
    margin: 18px 24px 0; padding: 13px 16px; background: #fdecec; color: #8e1b1b;
    border: 1px solid #f3c3c3; border-left: 4px solid var(--ap-bad);
    border-radius: 10px; font-size: 13.5px; font-weight: 500;
}

/* ── Section headers ── */
.ap-sec {
    margin: 0; padding: 15px 24px; font-size: 14.5px; font-weight: 700; color: var(--ap-dark);
    background: linear-gradient(90deg, var(--ap-soft2), #fff);
    border-top: 1px solid var(--ap-line); border-bottom: 1px solid var(--ap-line);
    display: flex; align-items: center; gap: 9px; position: relative;
}
.ap-sec::before {
    content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 4px; height: 22px; border-radius: 0 4px 4px 0; background: var(--ap-main);
}
.ap-sec:first-of-type { border-top: 0; }

/* ── Grid of fields ── */
.ap-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px 18px; padding: 20px 24px 22px;
}
.ap-f { display: flex; flex-direction: column; gap: 6px; }
.ap-f.ap-wide { grid-column: 1 / -1; }
.ap-f label { font-size: 12.5px; font-weight: 650; color: #41466a; }
.ap-f label small { font-weight: 500; color: var(--ap-muted); }
.ap-f input, .ap-f select {
    padding: 10px 12px; border: 1.5px solid var(--ap-border); border-radius: 10px;
    font-size: 14px; color: var(--ap-ink); background: #fff; width: 100%;
    transition: border-color .15s, box-shadow .15s;
}
.ap-f input::placeholder { color: #abb0c6; }
.ap-f input:hover, .ap-f select:hover { border-color: #b9c0e0; }
.ap-f input:focus, .ap-f select:focus {
    outline: none; border-color: var(--ap-light); box-shadow: 0 0 0 3px rgba(79,110,242,.16);
}
.ap-f input[type=file] {
    padding: 7px; font-size: 12.5px; background: var(--ap-soft2); border-style: dashed; cursor: pointer;
}
.ap-f input[type=file]:hover { background: var(--ap-soft); }
.ap-f input[readonly] { background: var(--ap-soft); color: #35406b; font-weight: 600; cursor: default; }
.ap-f input:disabled { background: #f0f1f6; color: #9a9db5; }
.ap-hint { font-size: 11.5px; color: var(--ap-muted); }
.ap-na { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: #5d6079; margin-top: 2px; font-weight: 500; }
.ap-na input { width: auto; }
.ap-hp { position: absolute; left: -5000px; }

/* ── Footer / submit ── */
.ap-foot {
    padding: 24px; text-align: center; background: var(--ap-soft2); border-top: 1px solid var(--ap-line);
}
.ap-go {
    padding: 14px 48px; background: linear-gradient(120deg, var(--ap-main), var(--ap-light));
    color: #fff; border: 0; border-radius: 30px; font-weight: 700; font-size: 15px; cursor: pointer;
    box-shadow: 0 8px 22px rgba(43,74,203,.32); transition: transform .12s, box-shadow .15s, filter .15s;
}
.ap-go:hover { filter: brightness(1.06); box-shadow: 0 10px 26px rgba(43,74,203,.4); transform: translateY(-1px); }
.ap-go:active { transform: translateY(0); }
.ap-go:disabled { background: #aab0d6; box-shadow: none; cursor: not-allowed; filter: none; transform: none; }

/* ── Done page ── */
.ap-middle { text-align: center; padding: 52px 24px; }
.ap-big { font-size: 56px; display: block; margin-bottom: 10px; }
.ap-middle h2 { margin: 6px 0 10px; color: var(--ap-dark); font-size: 24px; }
.ap-middle p { color: #5d6079; max-width: 560px; margin: 0 auto 10px; line-height: 1.7; }
.ap-ref {
    display: inline-block; background: linear-gradient(120deg, var(--ap-dark), var(--ap-main));
    color: #fff; padding: 13px 32px; border-radius: 12px; font-size: 23px; font-weight: 800;
    letter-spacing: 2px; margin: 18px 0; box-shadow: 0 8px 22px rgba(22,37,92,.28);
}

.ap-links { margin: 20px 0 0; text-align: center; font-size: 14px; color: var(--ap-muted); }
.ap-links a { color: var(--ap-main); font-weight: 650; text-decoration: none; }
.ap-links a:hover { text-decoration: underline; }

/* ── Madhyamik marks grid (subjects as compact columns) ── */
.ap-marks-wrap { padding: 16px 24px 4px; overflow-x: auto; }
.ap-marks-foot {
    padding: 12px 24px 20px; display: flex; gap: 16px; align-items: center;
    flex-wrap: wrap; font-size: 13.5px; color: #35406b;
}
.ap-marks-foot strong { color: var(--ap-dark); }
.ap-marks { border-collapse: separate; border-spacing: 0; width: auto; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px var(--ap-border); }
.ap-marks th, .ap-marks td { border-right: 1px solid var(--ap-line); border-bottom: 1px solid var(--ap-line); padding: 7px 8px; text-align: center; vertical-align: middle; }
.ap-marks tr:last-child td, .ap-marks tr:last-child th { border-bottom: 0; }
.ap-marks th {
    background: var(--ap-soft); color: var(--ap-dark); font-size: 11px; letter-spacing: .4px;
    text-transform: uppercase; white-space: nowrap; text-align: left; font-weight: 750;
}
.ap-marks tr:nth-child(2) td { background: #fbfcff; }
.ap-marks select.mp-sub {
    width: 76px; padding: 5px 4px; border: 1.5px solid var(--ap-border); border-radius: 7px;
    font-size: 12.5px; font-weight: 600; color: var(--ap-dark); background: #fff;
}
.ap-marks input.mp-full, .ap-marks input.mp-obt {
    width: 62px; padding: 5px 6px; border: 1.5px solid var(--ap-border); border-radius: 7px;
    font-size: 13px; text-align: center;
}
.ap-marks select.mp-sub:focus, .ap-marks input.mp-full:focus, .ap-marks input.mp-obt:focus {
    outline: none; border-color: var(--ap-light); box-shadow: 0 0 0 2px rgba(79,110,242,.16);
}
.ap-marks .mp-del {
    border: 0; background: #fde8e8; color: var(--ap-bad); border-radius: 6px;
    width: 24px; height: 24px; cursor: pointer; font-size: 11px; line-height: 1; transition: background .12s;
}
.ap-marks .mp-del:hover { background: #f6cccc; }

/* ── Buttons ── */
.btn-sm { padding: 8px 15px; font-size: 13px; }
.btn-line {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1.5px solid var(--ap-main); color: var(--ap-main);
    background: #fff; border-radius: 9px; font-weight: 650; cursor: pointer; text-decoration: none;
    transition: background .12s, color .12s;
}
.btn-line:hover { background: var(--ap-main); color: #fff; }

/* ── Status page ── */
.ap-status-form { display: flex; flex-direction: column; gap: 14px; max-width: 440px; }
.ap-status-form .ap-go { align-self: flex-start; }
.ap-status-head { margin-bottom: 16px; }
.ap-chip { display: inline-block; padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.ap-chip-pending { background: #fef3c7; color: #92400e; }
.ap-chip-ok { background: #d1fae5; color: #065f46; }
.ap-chip-wait { background: #e0e7ff; color: #3730a3; }
.ap-chip-no { background: #fee2e2; color: #991b1b; }
.ap-status-table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; }
.ap-status-table td { padding: 10px 4px; border-bottom: 1px solid var(--ap-line); font-size: 14px; }
.ap-status-table td:first-child { color: var(--ap-muted); width: 140px; }
.ap-says { padding: 15px 18px; background: var(--ap-soft); border-radius: 12px; color: #35406b; line-height: 1.6; font-size: 14px; }

/* ── Responsive ── */
@media (max-width: 600px) {
    .ap-body { padding: 18px 10px 44px; }
    .ap-top { padding: 14px 16px; gap: 12px; }
    .ap-top h1 { font-size: 19px; }
    .ap-grid { grid-template-columns: 1fr; padding: 16px 16px 18px; }
    .ap-sec { padding: 13px 16px; }
    .ap-strip { padding: 12px 16px; }
    .ap-marks-wrap { padding: 14px 16px 2px; }
    .ap-marks-foot { padding: 12px 16px 16px; }
    .ap-err { margin: 14px 16px 0; }
}

/* ── Admission centre (cyber café) pages ── */
.cn-narrow { width: min(460px, 100%); }
.cn-card { padding: 22px 24px; }
.cn-form { display: flex; flex-direction: column; gap: 14px; }
.cn-form .ap-go { align-self: flex-start; }
.ap-top .cn-out { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 14px; }
.ap-top .cn-out button { padding: 7px 14px; border: 1px solid currentColor; border-radius: 8px; background: transparent; color: inherit; cursor: pointer; font: inherit; }
.ap-top .cn-out a { color: inherit; }
.cn-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 22px; }
.cn-h2 { margin: 0 0 12px; font-size: 17px; }
.cn-h2 small { font-weight: 400; opacity: .7; }
.cn-table-wrap { overflow-x: auto; }
.cn-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cn-table th, .cn-table td { padding: 9px 10px; border-bottom: 1px solid var(--ap-border); text-align: left; white-space: nowrap; }
.cn-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--ap-muted); }
.ap-centre-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    margin: 0 0 14px; padding: 12px 16px; border-radius: 12px; background: #eef4ff; border: 1px solid #c9d8f5; font-size: 14px;
}
.ap-centres { margin: 16px auto 0; max-width: 560px; text-align: left; }
.ap-centres li { margin: 0 0 8px; }
a.ap-go { display: inline-block; text-decoration: none; }

/* Admin's test copy of the form (Settings -> Online Admission Form) */
.ap-test-bar {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap;
    margin: 0 0 14px; padding: 13px 16px; border-radius: 12px; font-size: 13.5px; line-height: 1.55;
    background: #fff4d6; border: 1px solid #f0d58a; color: #6b4d00;
}
.ap-test-bar a { color: #6b4d00; font-weight: 700; white-space: nowrap; }
.ap-test-warn { margin-top: 6px; color: #8e1b1b; font-weight: 600; }
.ap-test-frame { display: block; width: 100%; height: 1240px; border: 1px solid var(--ap-border); border-radius: 12px; background: #e9eef3; }
