/* ============================================================
   NDA Compendium — Authentication design system
   Full-page split layout. Brand palette preserved.
   ============================================================ */
:root {
    --nms-primary: #1a472a;
    --nms-primary-dark: #133e24;
    --nms-teal: #134e4a;
    --nms-secondary: #2563eb;
    --nms-accent: #dc2626;
    --nms-light: #f0fdf4;
    --ok: #059669;
    --warn: #b45309;
    --ink: #0f172a;
    --ink-2: #334155;
    --muted: #64748b;
    --muted-2: #94a3b8;
    --line: #e2e8f0;
    --surface: #ffffff;
    --bg: #f8fafc;
    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 18px;
    --shadow-1: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
    --shadow-3: 0 18px 44px rgba(15, 23, 42, .14);
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Montserrat', var(--font);
}

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

body.auth-body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink-2);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

body.auth-body a { text-decoration: none; }
body.auth-body h1,
body.auth-body h2,
body.auth-body h3 {
    font-family: var(--font-heading);
    color: var(--ink);
    margin: 0;
    line-height: 1.25;
}
body.auth-body :focus-visible {
    outline: 2px solid var(--nms-secondary);
    outline-offset: 2px;
    border-radius: 6px;
}

/* Layout ---------------------------------------------------- */
.auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr;
}

.auth__visual {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 28px;
    color: #fff;
    background:
        linear-gradient(150deg, rgba(19, 62, 36, .94) 0%, rgba(19, 78, 74, .90) 100%),
        url('/assets/Bg-for-army.jpg') center/cover no-repeat;
}
.auth__visual::after {
    content: '';
    position: absolute;
    right: -120px;
    bottom: -120px;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .14), transparent 70%);
    pointer-events: none;
}
.auth__visual-inner { position: relative; z-index: 1; max-width: 460px; margin: 0 auto; width: 100%; }

.auth__logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 14px;
    background: rgba(255, 255, 255, .12);
    padding: 6px;
    margin-bottom: 20px;
}
.auth__brand-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
}
.auth__brand-text { color: rgba(255, 255, 255, .88); font-size: .95rem; margin: 0 0 26px; max-width: 40ch; }

.auth__features { display: flex; flex-direction: column; gap: 14px; }
.auth__feature { display: flex; align-items: center; gap: 12px; font-size: .9rem; color: rgba(255, 255, 255, .94); }
.auth__feature i {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: rgba(255, 255, 255, .14);
}
.auth__visual-foot { margin-top: 30px; font-size: .78rem; color: rgba(255, 255, 255, .6); }

.auth__panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px 48px;
    background: var(--bg);
}
.auth__form { width: 100%; max-width: 430px; }

@media (min-width: 992px) {
    .auth { grid-template-columns: 1.02fr 1fr; }
    .auth__visual { padding: 56px 48px; min-height: 100vh; }
    .auth__panel { padding: 56px 48px; }
    .auth__brand-title { font-size: 1.9rem; }
}

/* On mobile the visual becomes a compact banner */
@media (max-width: 991px) {
    .auth__visual { padding: 26px 20px; min-height: 210px; }
    .auth__logo { width: 46px; height: 46px; margin-bottom: 12px; }
    .auth__brand-title { font-size: 1.3rem; }
    .auth__brand-text { margin-bottom: 0; font-size: .88rem; }
    .auth__features,
    .auth__visual-foot { display: none; }
}

/* Form header ----------------------------------------------- */
.auth-head { margin-bottom: 24px; }
.auth-title { font-size: 1.5rem; font-weight: 700; margin: 0 0 6px; }
.auth-sub { color: var(--muted); font-size: .92rem; margin: 0; }

/* Alerts ---------------------------------------------------- */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: .86rem;
    margin-bottom: 18px;
    border: 1px solid transparent;
}
.auth-alert i { font-size: 1.1rem; margin-top: 1px; }
.auth-alert--error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.auth-alert--success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.auth-alert--info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.auth-alert--warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }

/* Fields ---------------------------------------------------- */
.auth-field { margin-bottom: 16px; }
.auth-field > label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: var(--ink-2);
    margin-bottom: 7px;
}
.auth-control { position: relative; }
.auth-control > i.lead {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-2);
    font-size: 1.15rem;
    pointer-events: none;
}
.auth-input {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    font-family: var(--font);
    font-size: 16px;
    color: var(--ink);
    transition: border-color .18s ease, box-shadow .18s ease;
}
.auth-control > i.lead ~ .auth-input { padding-left: 44px; }
.auth-input.has-action { padding-right: 48px; }
.auth-input::placeholder { color: var(--muted-2); }
.auth-input:focus {
    outline: none;
    border-color: var(--nms-primary);
    box-shadow: 0 0 0 3px rgba(26, 71, 42, .12);
}
.auth-input[aria-invalid="true"] { border-color: var(--nms-accent); box-shadow: 0 0 0 3px rgba(220, 38, 38, .12); }
.auth-action-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border: none;
    background: transparent;
    color: var(--muted);
    border-radius: 9px;
    cursor: pointer;
    font-size: 1.1rem;
}
.auth-action-btn:hover { background: var(--bg); }
.auth-hint { font-size: .78rem; color: var(--muted); margin-top: 6px; }

/* Buttons --------------------------------------------------- */
.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 50px;
    padding: 12px 18px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--nms-primary) 0%, var(--nms-teal) 100%);
    color: #fff;
    font-family: var(--font);
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .18s ease, opacity .18s ease;
}
.auth-btn:hover { box-shadow: 0 10px 22px rgba(26, 71, 42, .28); transform: translateY(-1px); color: #fff; }
.auth-btn:active { transform: translateY(0); }
.auth-btn:disabled,
.auth-btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }
.auth-btn i { font-size: 1.1rem; }
.auth-btn--ghost {
    background: var(--surface);
    color: var(--ink-2);
    border-color: var(--line);
}
.auth-btn--ghost:hover { background: var(--bg); color: var(--ink); box-shadow: none; }
.auth-btn--success { background: linear-gradient(135deg, #10b981 0%, var(--ok) 100%); }
.auth-btn--success:hover { box-shadow: 0 10px 22px rgba(16, 185, 129, .28); }

.auth-btn .btn-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: auth-spin .7s linear infinite;
    display: none;
}
.auth-btn.is-loading .btn-spinner { display: inline-block; }
.auth-btn.is-loading .btn-label { opacity: .85; }
@keyframes auth-spin { to { transform: rotate(360deg); } }

/* Rows & links ---------------------------------------------- */
.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 4px 0 18px;
}
.auth-check { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--ink-2); cursor: pointer; }
.auth-check input { width: 17px; height: 17px; accent-color: var(--nms-primary); }
.auth-link { color: var(--nms-primary); font-weight: 600; font-size: .85rem; }
.auth-link:hover { text-decoration: underline; }

.auth-alt { text-align: center; font-size: .87rem; color: var(--muted); margin-top: 20px; }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted-2);
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin: 22px 0;
}
.auth-divider::before,
.auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.auth-note { font-size: .8rem; color: var(--muted); line-height: 1.5; }
.auth-note a { color: var(--nms-primary); font-weight: 600; }

.auth-foot { margin-top: 22px; text-align: center; font-size: .78rem; color: var(--muted-2); }

/* Collapsible payment verification (login) ------------------ */
.auth-collapse { display: none; margin-top: 14px; }
.auth-collapse.open { display: block; animation: auth-fade .25s ease; }
@keyframes auth-fade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

/* Compact card (notification / small states) ---------------- */
.auth-mini {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 18px;
    background:
        linear-gradient(150deg, rgba(19, 62, 36, .95) 0%, rgba(19, 78, 74, .92) 100%),
        url('/assets/Bg-for-army.jpg') center/cover no-repeat;
}
.auth-mini__card {
    width: 100%;
    max-width: 440px;
    background: var(--surface);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-3);
    padding: 32px 26px;
    text-align: center;
}
.auth-mini__icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: var(--nms-light);
    color: var(--nms-primary);
}
.auth-mini__icon.is-success { background: #ecfdf5; color: var(--ok); }
.auth-mini h1 { font-size: 1.3rem; margin-bottom: 8px; }
.auth-mini p { color: var(--muted); font-size: .9rem; margin: 0 0 18px; }

/* Two-column field grid ------------------------------------- */
.auth-grid { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
@media (min-width: 560px) { .auth-grid { grid-template-columns: 1fr 1fr; } }
