/* ==========================================================================
   Sirat Islamic — login / register screens
   Carried over from the inline styles that lived in login.php and register.php,
   consolidated into one stylesheet and extended with validation states.
   ========================================================================== */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    font-family: var(--font-body);
    background: var(--auth-bg, #0F3D2E) center/cover fixed;
}

.auth-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 61, 46, 0.92), rgba(31, 111, 95, 0.92));
}

.auth-card {
    position: relative;
    z-index: 1;
    background: #fff;
    padding: 48px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 460px;
    animation: authRise 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-card--wide {
    max-width: 620px;
}

@keyframes authRise {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------- branding */

.auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo img {
    max-width: 200px;
    width: 100%;
    height: auto;
}

.auth-logo h2 {
    color: var(--primary-green);
    font-family: var(--font-heading);
    margin: 15px 0 4px;
    font-size: 26px;
}

.auth-logo p {
    color: var(--light-text);
    margin: 0;
    font-size: 14px;
}

/* ------------------------------------------------------------------ fields */

.auth-card .form-group {
    margin-bottom: 22px;
}

.auth-card .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.auth-card .form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--heading-color);
    font-weight: 600;
    font-size: 14px;
}

.auth-card .form-group input,
.auth-card .form-group select {
    width: 100%;
    padding: 14px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text-color);
    background: #fff;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.auth-card .form-group input:focus,
.auth-card .form-group select:focus {
    outline: none;
    border-color: var(--gold-accent);
    box-shadow: 0 0 0 4px rgba(200, 169, 81, 0.15);
}

.auth-card .form-group input.is-invalid {
    border-color: #d94141;
    background: #fffafa;
}

.field-error {
    display: block;
    margin-top: 6px;
    color: #c33;
    font-size: 12.5px;
    font-weight: 500;
}

.input-hint {
    display: block;
    margin-top: 6px;
    color: var(--light-text);
    font-size: 12.5px;
}

/* ----------------------------------------------------------------- actions */

.auth-card .btn-auth {
    width: 100%;
    padding: 15px;
    background: var(--gold-accent);
    color: var(--primary-green);
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.3s, color 0.3s, transform 0.15s;
}

.auth-card .btn-auth:hover {
    background: var(--primary-green);
    color: #fff;
}

.auth-card .btn-auth:active {
    transform: translateY(1px);
}

.auth-footer {
    text-align: center;
    margin-top: 22px;
    color: var(--light-text);
    font-size: 14px;
    line-height: 1.9;
}

.auth-footer a {
    color: var(--gold-accent);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ---------------------------------------------------------------- messages */

.auth-alert {
    padding: 13px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
}

.auth-alert i {
    margin-top: 2px;
}

.auth-alert--error {
    background: #fdecec;
    color: #a52020;
    border: 1px solid #f5c6c6;
}

.auth-alert--success {
    background: #e8f6ee;
    color: #1b6b3f;
    border: 1px solid #bfe3cd;
}

.auth-alert--info {
    background: #eaf2f7;
    color: #1d5a7a;
    border: 1px solid #c3dced;
}

.auth-alert ul {
    margin: 4px 0 0;
    padding-left: 18px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 16px;
    color: #888;
    font-size: 13px;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e6e6e6;
}
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    font-weight: 600;
    text-decoration: none;
    transition: box-shadow .2s, border-color .2s;
}
.btn-google:hover {
    border-color: #C8A951;
    box-shadow: 0 6px 16px rgba(15, 61, 46, 0.08);
    color: #0F3D2E;
}
.auth-google-hint {
    text-align: center;
    color: #888;
    font-size: 12px;
    margin: 10px 0 0;
}

.auth-forgot {
    text-align: right;
    margin: -8px 0 18px;
    font-size: 13px;
}
.auth-forgot a {
    color: #1F6F5F;
    font-weight: 600;
    text-decoration: none;
}
.auth-forgot a:hover { text-decoration: underline; }

.auth-legal { margin-top: 4px; }
.auth-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #555;
    line-height: 1.5;
    cursor: pointer;
}
.auth-check input { margin-top: 3px; flex-shrink: 0; }
.auth-check a { color: #1F6F5F; font-weight: 600; }

/* ------------------------------------------------------------- responsive */

@media (max-width: 640px) {
    .auth-card {
        padding: 30px 22px;
    }

    .auth-card .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .auth-logo img {
        max-width: 150px;
    }

    .auth-logo h2 {
        font-size: 22px;
    }

    .auth-card .form-group input,
    .auth-card .btn-auth {
        padding: 12px;
        font-size: 14px;
    }
}

/* Embedded in the public header/footer layout */
.auth-embed {
    padding: 40px 0 80px;
    background: linear-gradient(to bottom, #fcfcfc, #f4f9f6);
}

.auth-embed .auth-card {
    margin: 0 auto;
    box-shadow: 0 12px 36px rgba(15, 61, 46, 0.12);
}

.auth-embed .auth-checkout-note,
.reg-panel .auth-checkout-note {
    background: #f7f3e8;
    border: 1px solid #ead9a4;
    color: #5c4a16;
    border-radius: 12px;
    padding: 12px 14px;
    margin: 0 0 22px;
    font-size: 14px;
    line-height: 1.55;
}

.auth-embed .auth-checkout-note i,
.reg-panel .auth-checkout-note i {
    color: #0F3D2E;
    margin-right: 6px;
}

/* ============================================================= REGISTER
   Professional split panel — brand aside + calm form column
   ============================================================= */

.page-register .reg-stage {
    --reg-ink: #0F3D2E;
    --reg-ink-soft: #1F6F5F;
    --reg-gold: #C8A951;
    --reg-gold-soft: #E8D5A3;
    --reg-paper: #FFFEFA;
    --reg-mist: #F3F7F4;
    --reg-line: rgba(15, 61, 46, 0.10);
    position: relative;
    padding: 32px 24px 80px;
    background:
        radial-gradient(ellipse 70% 50% at 0% 0%, rgba(200, 169, 81, 0.16), transparent 55%),
        radial-gradient(ellipse 55% 45% at 100% 10%, rgba(31, 111, 95, 0.12), transparent 50%),
        linear-gradient(180deg, #EAF3EE 0%, var(--reg-mist) 42%, #F7FAF8 100%);
    overflow: hidden;
}

.page-register .reg-stage::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(
            -18deg,
            transparent 0 18px,
            rgba(15, 61, 46, 0.015) 18px 19px
        );
    pointer-events: none;
}

.reg-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1.15fr);
    max-width: 1280px;
    margin: 0 auto;
    border-radius: 28px;
    overflow: hidden;
    background: var(--reg-paper);
    border: 1px solid rgba(15, 61, 46, 0.08);
    box-shadow:
        0 28px 64px rgba(15, 61, 46, 0.14),
        0 1px 0 rgba(255, 255, 255, 0.65) inset;
    animation: authRise 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.reg-aside {
    position: relative;
    color: #FFF8E4;
    background:
        linear-gradient(160deg, #0A2C21 0%, #0F3D2E 38%, #164A38 72%, #1A5A45 100%);
    padding: 44px 40px 48px;
    display: flex;
    align-items: stretch;
}

.reg-aside::after {
    content: '';
    position: absolute;
    right: -40px;
    bottom: -40px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(200, 169, 81, 0.22), transparent 68%);
    pointer-events: none;
}

.reg-aside-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.reg-aside-logo {
    width: min(168px, 70%);
    height: auto;
    margin-bottom: 28px;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.25));
}

.reg-aside-kicker {
    margin: 0 0 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--reg-gold);
}

.reg-aside-title {
    margin: 0 0 14px;
    font-family: var(--font-heading, 'Amiri', Georgia, serif);
    font-size: clamp(28px, 3.2vw, 38px);
    font-weight: 700;
    line-height: 1.2;
    color: #FFF8E4;
    letter-spacing: -0.01em;
}

.reg-aside-title em {
    font-style: italic;
    color: var(--reg-gold-soft);
}

.reg-aside-lead {
    margin: 0 0 28px;
    font-size: 15px;
    line-height: 1.65;
    color: rgba(255, 248, 228, 0.78);
    max-width: 34ch;
}

.reg-aside-points {
    list-style: none;
    margin: auto 0 0;
    padding: 0;
    display: grid;
    gap: 14px;
}

.reg-aside-points li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13.5px;
    line-height: 1.45;
    color: rgba(255, 248, 228, 0.88);
}

.reg-aside-points i {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(200, 169, 81, 0.16);
    color: var(--reg-gold);
    font-size: 13px;
}

.reg-panel {
    padding: 44px 52px 40px;
    background: var(--reg-paper);
}

.reg-panel-head {
    margin-bottom: 26px;
}

.reg-panel-head h2 {
    margin: 0 0 8px;
    font-family: var(--font-heading, 'Amiri', Georgia, serif);
    font-size: 30px;
    font-weight: 700;
    color: var(--reg-ink);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.reg-panel-head p {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.55;
    color: #5a7268;
    max-width: 46ch;
}

.reg-block {
    margin: 0 0 26px;
    padding: 0;
    border: 0;
}

.reg-block-title {
    margin: 0 0 16px;
    padding-bottom: 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--reg-ink);
    border-bottom: 1px solid var(--reg-line);
    position: relative;
}

.reg-block-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 42px;
    height: 2px;
    background: var(--reg-gold);
}

.reg-form .form-group {
    margin-bottom: 16px;
}

.reg-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 16px;
}

.reg-form .form-group label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 600;
    color: #243d34;
}

.reg-form .form-group label .req {
    color: var(--reg-gold);
    font-weight: 700;
}

.reg-form .form-group input,
.reg-form .form-group select {
    width: 100%;
    padding: 13px 14px;
    border: 1.5px solid #d5e0db;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    color: #1a2e26;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.reg-form .form-group input::placeholder {
    color: #9aada4;
}

.reg-form .form-group input:hover,
.reg-form .form-group select:hover {
    border-color: #b5c9c0;
}

.reg-form .form-group input:focus,
.reg-form .form-group select:focus {
    outline: none;
    border-color: var(--reg-ink-soft);
    box-shadow: 0 0 0 4px rgba(31, 111, 95, 0.12);
    background: #fff;
}

.reg-form .form-group input.is-invalid,
.reg-form .form-group select.is-invalid {
    border-color: #d94141;
    background: #fffafa;
}

.reg-panel .auth-legal {
    margin: 4px 0 18px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(15, 61, 46, 0.04);
    border: 1px solid var(--reg-line);
}

/* Custom terms checkbox — aligned, tappable, brand-styled */
.reg-legal {
    margin: 6px 0 20px;
    padding: 16px 18px;
    border-radius: 14px;
    background: #F7FBF8;
    border: 1.5px solid var(--reg-line);
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.reg-legal:focus-within {
    border-color: rgba(31, 111, 95, 0.45);
    box-shadow: 0 0 0 4px rgba(31, 111, 95, 0.10);
}

.reg-legal.is-invalid {
    border-color: #d94141;
    background: #fffafa;
}

.reg-check {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin: 0;
    cursor: pointer;
    user-select: none;
}

.reg-check input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    pointer-events: none;
}

.reg-check-box {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    margin-top: 1px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    border: 1.5px solid #b8c9c1;
    background: #fff;
    color: transparent;
    font-size: 11px;
    transition: background 0.18s, border-color 0.18s, color 0.18s, box-shadow 0.18s;
}

.reg-check-box i {
    line-height: 1;
    transform: scale(0.7);
    transition: transform 0.18s;
}

.reg-check input:checked + .reg-check-box {
    background: var(--reg-ink);
    border-color: var(--reg-ink);
    color: var(--reg-gold);
    box-shadow: 0 4px 10px rgba(15, 61, 46, 0.18);
}

.reg-check input:checked + .reg-check-box i {
    transform: scale(1);
}

.reg-check input:focus-visible + .reg-check-box {
    box-shadow: 0 0 0 4px rgba(31, 111, 95, 0.18);
}

.reg-check:hover .reg-check-box {
    border-color: var(--reg-ink-soft);
}

.reg-check-text {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    line-height: 1.55;
    color: #3d5249;
    padding-top: 1px;
}

.reg-check-text a {
    color: var(--reg-ink-soft);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid rgba(31, 111, 95, 0.25);
}

.reg-check-text a:hover {
    color: var(--reg-ink);
    border-bottom-color: var(--reg-gold);
}

.reg-legal .field-error {
    margin: 10px 0 0 36px;
}

.btn-auth--reg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 20px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #C8A951 0%, #B8903A 100%);
    color: #0F3D2E;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(200, 169, 81, 0.32);
    transition: transform 0.18s, box-shadow 0.18s, background 0.25s, color 0.25s;
}

.btn-auth--reg i {
    font-size: 13px;
    transition: transform 0.2s;
}

.btn-auth--reg:hover {
    background: linear-gradient(135deg, #0F3D2E 0%, #1F6F5F 100%);
    color: #FFF8E4;
    box-shadow: 0 14px 32px rgba(15, 61, 46, 0.28);
}

.btn-auth--reg:hover i {
    transform: translateX(3px);
}

.btn-auth--reg:active {
    transform: translateY(1px);
}

.reg-panel .btn-google {
    border-radius: 12px;
    border-color: #dce6e1;
    padding: 13px;
}

.reg-panel .btn-google:hover {
    border-color: var(--reg-gold);
    background: #FFFEFA;
}

.btn-google--primary {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    padding: 16px 18px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 14px;
    border: 1px solid #dadce0;
    background: #fff;
    color: #3c4043;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(15, 61, 46, 0.08);
}

.btn-google--primary:hover {
    background: #f8faf9;
    border-color: var(--reg-gold, #c8a951);
    color: #202124;
}

.reg-google-steps {
    list-style: none;
    margin: 0 0 22px;
    padding: 0;
    display: grid;
    gap: 10px;
}

.reg-google-steps li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--reg-ink-soft, #4a5c55);
    line-height: 1.4;
}

.reg-step-num {
    flex: 0 0 26px;
    height: 26px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: var(--reg-ink, #0f3d2e);
}

.reg-legal-note {
    margin: 16px 0 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--reg-muted, #6b7c74);
}

.reg-legal-note a {
    color: var(--reg-ink-soft, #4a5c55);
    text-decoration: underline;
}

.reg-course-preview {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--reg-line, #e4ebe7);
}

.reg-course-preview h3 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--reg-ink, #0f3d2e);
}

.reg-course-preview ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.reg-course-preview li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    color: var(--reg-ink-soft, #4a5c55);
}

.reg-course-preview li i {
    width: 18px;
    text-align: center;
    color: var(--reg-gold, #c8a951);
}

.reg-panel .auth-footer {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--reg-line);
}

.reg-panel .auth-footer a {
    color: var(--reg-ink-soft);
}

.reg-panel .auth-footer a:hover {
    color: var(--reg-ink);
}

@media (max-width: 1100px) {
    .reg-shell {
        max-width: 960px;
    }
}

@media (max-width: 920px) {
    .reg-shell {
        grid-template-columns: 1fr;
        max-width: 640px;
        border-radius: 22px;
    }

    .reg-aside {
        padding: 32px 28px 28px;
    }

    .reg-aside-title {
        font-size: 28px;
    }

    .reg-aside-lead {
        max-width: none;
        margin-bottom: 20px;
    }

    .reg-aside-points {
        grid-template-columns: 1fr;
        margin-top: 0;
    }

    .reg-panel {
        padding: 28px 24px 30px;
    }

    .reg-panel-head h2 {
        font-size: 26px;
    }
}

@media (max-width: 560px) {
    .page-register .reg-stage {
        padding: 16px 12px 56px;
    }

    .reg-shell {
        border-radius: 18px;
    }

    .reg-aside {
        padding: 26px 22px 22px;
    }

    .reg-aside-logo {
        width: 132px;
        margin-bottom: 18px;
    }

    .reg-aside-points li span {
        font-size: 13px;
    }

    .reg-panel {
        padding: 22px 18px 24px;
    }

    .reg-form .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .reg-panel-head h2 {
        font-size: 24px;
    }
}

/* Legacy register helpers (kept for older markup / fallbacks) */
.hero--auth { display: none; }
.auth-embed--register { display: none; }

.hp-field {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
