:root {
    --bg-light: #f8fafc;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --input-bg: #ffffff;
    --input-border: #cbd5e1;
    --input-focus-border: #2481cc;
    --input-focus-glow: rgba(36, 129, 204, 0.15);
    --primary-blue: #2481cc;
    --primary-hover: #1c6eb3;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --radius-sm: 6px;
    --radius-md: 10px;
    --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-light);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-wrapper {
    width: 100%;
    max-width: 400px;
}

/* Auth Card */
.auth-card {
    background: var(--card-bg);
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    padding: 36px 32px;
    box-shadow: 0 20px 30px -10px rgba(15, 23, 42, 0.12), 
                0 10px 15px -5px rgba(15, 23, 42, 0.06);
}

/* Brand Header */
.brand-header {
    text-align: center;
    margin-bottom: 28px;
}

.brand-logo {
    width: 52px;
    height: 52px;
    margin: 0 auto 12px;
    background: var(--primary-blue);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-telegram {
    font-size: 26px;
    color: #ffffff;
}

.brand-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.brand-title span {
    color: var(--primary-blue);
}

.brand-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
    font-weight: 400;
}

/* Form Elements */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
}

.form-control {
    width: 100%;
    padding: 11px 14px 11px 40px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--input-focus-border);
    box-shadow: 0 0 0 3px var(--input-focus-glow);
}

.form-control::placeholder {
    color: #94a3b8;
}

/* Toggle Password */
.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
}

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

/* Form Options */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    color: var(--text-secondary);
}

.remember-me input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-blue);
    cursor: pointer;
}

/* Cloudflare Turnstile Wrapper */
.turnstile-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 4px 0;
    min-height: 65px;
    overflow: hidden;
}

/* Submit Button */
.btn-submit {
    margin-top: 6px;
    padding: 12px;
    background: var(--primary-blue);
    border: none;
    border-radius: var(--radius-sm);
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.2s ease;
}

.btn-submit:hover {
    background-color: var(--primary-hover);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Spinner */
.spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Auth Navigation Links */
.auth-links {
    margin-top: 18px;
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
}

.link-auth {
    color: var(--primary-blue);
    font-weight: 700;
    text-decoration: none;
    margin-left: 4px;
}

.link-auth:hover {
    text-decoration: underline;
    color: var(--primary-hover);
}

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 18px 0;
    color: var(--text-muted);
    font-size: 12px;
}

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

.auth-divider span {
    padding: 0 12px;
}

/* Google OAuth Button */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 11px 16px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    color: #334155;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.btn-google:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.google-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Later Link / Button */
.btn-later-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 16px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s ease;
    text-align: center;
}

.btn-later-link:hover {
    color: var(--text-primary);
    background-color: #f1f5f9;
}

/* Footer */
.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 12px;
    color: var(--text-muted);
}