/* ==========================================================================
   Career Advancement Scheme — sign-in and registration.
   Standalone pages: they share no CSS with the Assistant Professor auth pages,
   so restyling one entrance can never disturb the other.
   ========================================================================== */

:root {
    --cas-primary: #12315C;
    --cas-secondary: #255CA8;
    --cas-teal: #008D88;
    --cas-emerald: #1C9B66;
    --cas-accent: #F5A623;
    --cas-text: #16202E;
    --cas-muted: #5A6879;
    --cas-border: #DDE4EE;
    --cas-surface: #FFFFFF;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
    font-family: 'Inter', 'Noto Sans Tamil', 'Segoe UI', system-ui, sans-serif;
    color: var(--cas-text);
    background:
        radial-gradient(circle at 12% 18%, rgba(0, 141, 136, .30) 0, transparent 45%),
        radial-gradient(circle at 88% 82%, rgba(245, 166, 35, .22) 0, transparent 48%),
        linear-gradient(135deg, #0C2140 0%, #12315C 45%, #255CA8 100%);
}

.cas-auth {
    width: 100%;
    max-width: 1000px;
    background: var(--cas-surface);
    border-radius: 22px;
    box-shadow: 0 30px 70px -25px rgba(6, 20, 40, .65);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

/* ---- Left panel ---- */
.cas-auth__brand {
    background: linear-gradient(150deg, var(--cas-primary), var(--cas-secondary) 70%, var(--cas-teal));
    color: #fff;
    padding: 3rem 2.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.cas-auth__brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: .45;
}

.cas-auth__brand > * { position: relative; }

.cas-auth__mark {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .3);
    font-size: 24px;
    margin-bottom: 1.75rem;
}

.cas-auth__eyebrow {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    padding: 6px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .26);
    margin-bottom: 1rem;
    align-self: flex-start;
}

.cas-auth__brand h1 {
    margin: 0;
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.015em;
}

.cas-auth__brand .sub { margin: .65rem 0 0; font-size: .95rem; opacity: .9; line-height: 1.6; }

.cas-auth__points { margin: 2rem 0 0; padding: 0; list-style: none; }

.cas-auth__points li {
    display: flex;
    gap: .7rem;
    align-items: flex-start;
    margin-bottom: .85rem;
    font-size: .93rem;
    opacity: .95;
}

.cas-auth__points .tick {
    flex: none;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    display: grid;
    place-items: center;
    font-size: 11px;
}

/* ---- Right panel ---- */
.cas-auth__form { padding: 3rem 2.75rem; display: flex; flex-direction: column; justify-content: center; }

.cas-auth__form h2 {
    margin: 0 0 .35rem;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--cas-primary);
    letter-spacing: -.015em;
}

.cas-auth__form .lede { margin: 0 0 1.75rem; font-size: .93rem; color: var(--cas-muted); }

.cas-group { margin-bottom: 1.1rem; }

.cas-group label {
    display: block;
    font-size: .87rem;
    font-weight: 600;
    margin-bottom: .4rem;
}

.cas-group .req { color: #C0392B; }

.cas-group input {
    width: 100%;
    padding: .78rem .95rem;
    border: 1px solid var(--cas-border);
    border-radius: 10px;
    font: inherit;
    font-size: .95rem;
    background: #FBFCFE;
    color: var(--cas-text);
}

.cas-group input:focus {
    outline: none;
    border-color: var(--cas-secondary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 92, 168, .13);
}

.cas-group small { display: block; margin-top: .3rem; font-size: .78rem; color: var(--cas-muted); }

.cas-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }

.cas-check { display: flex; gap: .6rem; align-items: flex-start; margin: .35rem 0 1.25rem; }
.cas-check input { width: 17px; height: 17px; margin-top: 2px; flex: none; }
.cas-check label { font-size: .86rem; color: var(--cas-muted); line-height: 1.5; }

.cas-submit {
    width: 100%;
    min-height: 48px;
    padding: .85rem 1.25rem;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cas-primary), var(--cas-secondary));
    color: #fff;
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}

.cas-submit:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -10px rgba(18, 49, 92, .7); }
.cas-submit:focus-visible { outline: 3px solid var(--cas-accent); outline-offset: 3px; }
.cas-submit[disabled] { opacity: .65; cursor: not-allowed; transform: none; }

.cas-alt { margin-top: 1.4rem; text-align: center; font-size: .9rem; color: var(--cas-muted); }
.cas-alt a { color: var(--cas-secondary); font-weight: 600; text-decoration: none; }
.cas-alt a:hover { text-decoration: underline; }

.cas-back { margin-top: 1.6rem; text-align: center; font-size: .85rem; }
.cas-back a { color: var(--cas-muted); text-decoration: none; }
.cas-back a:hover { color: var(--cas-primary); text-decoration: underline; }

.cas-alert {
    display: none;
    padding: .8rem 1rem;
    border-radius: 9px;
    font-size: .88rem;
    margin-bottom: 1.1rem;
    border-left: 4px solid;
}

.cas-alert.err  { display: block; background: #FDECEC; color: #A32D2D; border-color: #A32D2D; }
.cas-alert.ok   { display: block; background: #E6F6EE; color: #10613F; border-color: #10613F; }
.cas-alert ul   { margin: .4rem 0 0; padding-left: 1.1rem; }

@media (max-width: 860px) {
    .cas-auth { grid-template-columns: 1fr; max-width: 520px; }
    .cas-auth__brand { padding: 2.25rem 1.9rem; }
    .cas-auth__brand h1 { font-size: 1.5rem; }
    .cas-auth__points { margin-top: 1.4rem; }
    .cas-auth__form { padding: 2.25rem 1.9rem; }
    .cas-row2 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}

/* ---- Official emblem -------------------------------------------------- */
/* The crest is a detailed circular seal, so it is given room to breathe and
   never cropped into a smaller circular frame. */

.portal-brand__logo { width: 58px; height: 58px; object-fit: contain; }

.cas-top__logo {
    width: 42px; height: 42px; flex: none; object-fit: contain;
    background: #fff; border-radius: 50%; padding: 3px;
}

.cofc-brand__logo {
    width: 42px; height: 42px; flex: none; object-fit: contain;
    background: #fff; border-radius: 50%; padding: 3px;
}

.cas-auth__mark img { width: 100%; height: 100%; object-fit: contain; }
.cas-auth__mark { background: #fff; padding: 5px; border-color: rgba(255,255,255,.5); }

@media (max-width: 560px) {
    .portal-brand__logo { width: 46px; height: 46px; }
}
