/* Authentication Pages — Dark IELTS Theme */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-primary: #0b0f1e;
    --bg-secondary: #111632;
    --bg-card: #161b35;
    --bg-input: #1a1f3d;
    --text-primary: #ffffff;
    --text-secondary: #8b8fa8;
    --accent: #7c5cfc;
    --accent-hover: #6a48e8;
    --gradient-btn: linear-gradient(135deg, #7c5cfc 0%, #c95bf5 100%);
    --cyan: #4eddd0;
    --green: #34d399;
    --gold: #facc15;
    --error: #f87171;
    --success: #34d399;
    --border: rgba(255,255,255,0.08);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* ===== Left — Form ===== */
.auth-left {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    background: var(--bg-primary);
}

.auth-content {
    width: 100%;
    max-width: 460px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
}

.logo-img {
    height: 36px;
    width: auto;
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
    color: var(--cyan);
}

/* Title */
.auth-title {
    font-size: 34px;
    font-weight: 700;
    margin-bottom: 6px;
}

.auth-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 28px;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.alert-success { background: rgba(52,211,153,.1); border: 1px solid var(--success); color: var(--success); }
.alert-error, .alert-danger { background: rgba(248,113,113,.1); border: 1px solid var(--error); color: var(--error); }
.alert-info, .alert-warning { background: rgba(124,92,252,.1); border: 1px solid var(--accent); color: var(--accent); }

/* ===== Tabs ===== */
.auth-tabs {
    display: flex;
    background: var(--bg-input);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 28px;
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all .25s;
}

.auth-tab.active {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
}

.auth-tab:hover:not(.active) {
    color: var(--text-primary);
}

/* ===== Method Tabs (Email / Phone) ===== */
.method-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 24px;
}

.method-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 0;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all .25s;
}

.method-tab.active {
    border-color: var(--cyan);
    color: var(--cyan);
    background: rgba(78,221,208,.06);
}

.method-tab:hover:not(.active) {
    border-color: rgba(255,255,255,.15);
    color: var(--text-primary);
}

.hidden { display: none !important; }

/* ===== Form ===== */
.auth-form { width: 100%; }

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

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.label-row label {
    margin-bottom: 0;
}

.forgot-link {
    font-size: 13px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Input with icon */
.input-with-icon {
    position: relative;
}

.input-with-icon > i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 15px;
    pointer-events: none;
}

.input-with-icon .form-control {
    padding-left: 42px;
}

.form-control {
    width: 100%;
    padding: 13px 16px;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all .25s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-secondary);
}

.form-control::placeholder {
    color: #555a75;
}

/* Toggle password */
.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 15px;
    padding: 6px;
}

.toggle-password:hover {
    color: var(--text-primary);
}

.error-message {
    display: block;
    color: var(--error);
    font-size: 12px;
    margin-top: 6px;
}

/* ===== Button ===== */
.btn {
    padding: 13px 24px;
    border-radius: 10px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-btn);
    color: white;
    box-shadow: 0 4px 16px rgba(124,92,252,.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(124,92,252,.5);
}

.btn-block {
    width: 100%;
    margin-bottom: 20px;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: var(--text-secondary);
    font-size: 11px;
    letter-spacing: 1px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border);
}

.divider span { padding: 0 16px; }

/* Social */
.social-login {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.btn-social {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1.5px solid var(--border);
    padding: 12px 16px;
    font-size: 14px;
    border-radius: 10px;
}

.btn-social:hover {
    background: var(--bg-secondary);
    border-color: rgba(255,255,255,.15);
    transform: translateY(-1px);
}

.btn-google {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
}

.btn-google svg {
    flex-shrink: 0;
}

/* Auth switch */
.auth-switch {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 20px;
}

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

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

/* ===== Right Side ===== */
.auth-right {
    position: relative;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    overflow: hidden;
}

/* Subtle gradient bg */
.auth-right::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(124,92,252,.12) 0%, transparent 70%);
    border-radius: 50%;
}

.auth-right::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(78,221,208,.08) 0%, transparent 70%);
    border-radius: 50%;
}

.auth-right-content {
    position: relative;
    z-index: 1;
    max-width: 420px;
    width: 100%;
}

/* Guarantee card */
.guarantee-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 28px;
    margin-bottom: 40px;
    box-shadow: 0 8px 32px rgba(0,0,0,.3);
}

.guarantee-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.guarantee-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(52,211,153,.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--green);
    font-size: 22px;
    flex-shrink: 0;
}

.guarantee-header h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 2px;
}

.guarantee-header p {
    font-size: 13px;
    color: var(--text-secondary);
}

.guarantee-list {
    list-style: none;
    margin-bottom: 20px;
}

.guarantee-list li {
    padding: 7px 0;
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.guarantee-list li i {
    color: var(--green);
    font-size: 15px;
}

/* Stats badge */
.stats-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
}

.avatars {
    display: flex;
}

.avatars span {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #555a75;
    border: 2px solid var(--bg-card);
    margin-left: -8px;
}

.avatars span:first-child { margin-left: 0; }

.stats-badge strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
}

.stats-badge .rating {
    font-size: 12px;
    color: var(--gold);
}

.stats-badge .rating i { font-size: 11px; }

/* Hero text */
.hero-text {
    text-align: center;
}

.hero-text h2 {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 16px;
}

.hero-text h2 span {
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-text p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    font-style: italic;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .auth-container { grid-template-columns: 1fr; }
    .auth-right { display: none; }
    .auth-left { padding: 24px 20px; }
}

@media (max-width: 640px) {
    .auth-content { max-width: 100%; }
    .auth-title { font-size: 26px; }
    .form-row { grid-template-columns: 1fr; }
    .social-login { grid-template-columns: 1fr; }
}
