html, body {
    height: 100%;
    margin: 0;
}

body.auth-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Inter', 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body.auth-page * {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.body-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.auth-section {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(160deg, #0a0e28 0%, #111b45 40%, #1a2a6c 70%, #2a3a8c 100%);
    position: relative;
    padding: 100px 20px 40px;
}

.auth-card-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
}

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

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.15);
    overflow: hidden;
}

.auth-header {
    background: linear-gradient(135deg, #4154f1, #6f7ff5);
    padding: 28px 32px;
    text-align: center;
}

.auth-header h2 {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.3px;
}

.auth-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin: 6px 0 0;
    font-weight: 500;
}

.auth-body {
    padding: 32px;
}

.auth-body .form-group {
    margin-bottom: 20px;
}

.auth-body .form-label {
    font-size: 13px;
    font-weight: 600;
    color: #344054;
    margin-bottom: 6px;
    display: block;
    letter-spacing: 0.2px;
}

.auth-body .form-control {
    height: 46px;
    border-radius: 10px;
    border: 1.5px solid #e0e3eb;
    padding: 10px 16px;
    font-size: 14px;
    color: #1a1a2e;
    background: #f9fafb;
    transition: all 0.2s;
}

.auth-body .form-control:focus {
    border-color: #4154f1;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(65, 84, 241, 0.12);
    outline: none;
}

.auth-body select.form-control {
    appearance: auto;
}

.auth-body textarea.form-control {
    height: auto;
    min-height: 90px;
    resize: vertical;
}

.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    min-width: 240px;
    padding: 0 48px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #4154f1, #6f7ff5);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    letter-spacing: 0.3px;
}

.auth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(65, 84, 241, 0.35);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-divider {
    height: 1px;
    background: #e8eaef;
    margin: 20px 0;
}

.auth-links {
    text-align: center;
    padding-top: 4px;
}

.auth-links p {
    font-size: 14px;
    color: #6c757d;
    margin: 10px 0;
}

.auth-links a {
    color: #4154f1;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-links a:hover {
    color: #2a3ad4;
    text-decoration: underline;
}

.auth-error {
    font-size: 14px;
    font-weight: 600;
    color: #dc3545;
    text-align: center;
    margin: 12px 0 0;
    min-height: 20px;
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 48px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 1.1rem;
    color: #868e96;
    transition: color 0.2s;
    padding: 4px;
    line-height: 1;
}

.toggle-password:hover {
    color: #4154f1;
}

.pw-strength {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pw-bar {
    flex: 1;
    height: 4px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.pw-bar-fill {
    height: 100%;
    width: 0%;
    background: tomato;
    transition: width 0.25s ease, background 0.25s ease;
    border-radius: 3px;
}

.pw-label {
    min-width: 70px;
    font-size: 11px;
    font-weight: 600;
    color: #6c757d;
}

.password-tooltip {
    margin-top: 6px;
    font-size: 11px;
    color: #555;
    display: none;
}

.password-tooltip .invalid { color: #d9534f; }
.password-tooltip .valid { color: #198754; }

.match-indicator {
    font-size: 11px;
    margin-top: 4px;
    color: #6c757d;
    font-weight: 500;
}

.match-indicator.match { color: #198754; }
.match-indicator.nomatch { color: #d9534f; }

.password-help-short {
    font-size: 11px;
    color: #868e96;
    margin-top: 4px;
}

.form-text {
    font-size: 12px;
    color: #868e96;
    margin-top: 6px;
}

.reg-section {
    flex: 1;
    display: flex;
    align-items: stretch;
    background: linear-gradient(160deg, #0a0e28 0%, #111b45 40%, #1a2a6c 70%, #2a3a8c 100%);
    padding: 80px 0 0;
    min-height: 100vh;
}

.reg-container {
    display: flex;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    min-height: calc(100vh - 80px);
}

.reg-left {
    flex: 0 0 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 48px;
}

.reg-left-content {
    max-width: 360px;
}

.reg-left-content h1 {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    line-height: 1.25;
    margin: 0 0 16px;
    letter-spacing: -0.3px;
}

.reg-subtitle {
    font-size: 15px;
    color: rgba(255,255,255,0.7);
    line-height: 1.6;
    margin: 0 0 36px;
    font-weight: 400;
}

.reg-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 36px;
}

.reg-feature {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.reg-feature-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: rgba(65,84,241,0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b9aff;
    font-size: 16px;
}

.reg-feature strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
}

.reg-feature span {
    font-size: 12.5px;
    color: rgba(255,255,255,0.55);
    line-height: 1.45;
}

.reg-trust {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
}

.reg-trust i {
    color: #6dd58c;
    font-size: 18px;
    flex-shrink: 0;
}

.reg-trust span {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
}

.reg-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 40px 40px 20px;
}

.reg-form-card {
    width: 100%;
    max-width: 560px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25), 0 0 0 1px rgba(255,255,255,0.15);
    overflow: hidden;
}

.reg-form-header {
    background: linear-gradient(135deg, #4154f1, #6f7ff5);
    padding: 22px 28px;
    text-align: center;
}

.reg-form-header h2 {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.3px;
}

.reg-form-header p {
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    margin: 4px 0 0;
    font-weight: 500;
}

.reg-form-body {
    padding: 24px 28px;
}

.reg-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 10px;
}

.reg-row-single {
    grid-template-columns: 1fr;
    max-width: 50%;
}

.reg-field {
    display: flex;
    flex-direction: column;
}

.reg-label {
    font-size: 12px;
    font-weight: 600;
    color: #344054;
    margin-bottom: 4px;
    display: block;
    letter-spacing: 0.2px;
}

.reg-input {
    height: 40px;
    border-radius: 8px;
    border: 1.5px solid #e0e3eb;
    padding: 8px 14px;
    font-size: 13px;
    color: #1a1a2e;
    background: #f9fafb;
    transition: all 0.2s;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}

.reg-input:focus {
    border-color: #4154f1;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(65,84,241,0.12);
    outline: none;
}

.reg-select {
    appearance: auto;
}

.reg-submit {
    text-align: center;
    margin-top: 16px;
}

.reg-submit .auth-btn {
    height: 42px;
    font-size: 14px;
    border-radius: 10px;
    min-width: 240px;
}

.reg-educator-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 6px;
    padding: 10px 12px;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    font-size: 11.5px;
    color: #3730a3;
    line-height: 1.45;
}

.reg-educator-notice i {
    flex-shrink: 0;
    font-size: 14px;
    color: #4f46e5;
    margin-top: 1px;
}

@media (max-width: 991px) {
    .reg-container {
        flex-direction: column;
        min-height: auto;
    }

    .reg-left {
        flex: none;
        padding: 40px 24px 20px;
    }

    .reg-left-content {
        max-width: 100%;
        text-align: center;
    }

    .reg-left-content h1 {
        font-size: 26px;
    }

    .reg-subtitle {
        margin-bottom: 24px;
    }

    .reg-features {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 14px;
        margin-bottom: 24px;
    }

    .reg-feature {
        text-align: left;
    }

    .reg-trust {
        justify-content: center;
    }

    .reg-right {
        padding: 0 24px 40px;
    }

    .reg-form-card {
        max-width: 100%;
    }
}

@media (max-width: 767px) {
    .auth-section {
        padding: 90px 16px 24px;
        align-items: flex-start;
    }

    .auth-header {
        padding: 22px 24px;
    }

    .auth-body {
        padding: 24px;
    }

    .pw-label {
        display: none;
    }

    .password-wrapper input {
        padding-right: 44px;
    }

    .reg-section {
        padding-top: 70px;
    }

    .reg-left {
        padding: 30px 20px 16px;
    }

    .reg-left-content h1 {
        font-size: 22px;
    }

    .reg-features {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .reg-right {
        padding: 0 16px 30px;
    }

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

    .reg-row-single {
        max-width: 100%;
    }

    .reg-form-body {
        padding: 20px;
    }

    .reg-form-header {
        padding: 18px 20px;
    }

    .reg-form-header h2 {
        font-size: 18px;
    }
}
