/* ============================================================
   VTU Platform - Auth Pages CSS
   Green Theme | Mobile-First | Dark/Light Mode
   ============================================================ */

:root {
    --vtu-green:        #16a34a;
    --vtu-green-dark:   #15803d;
    --vtu-green-deep:   #166534;
    --vtu-green-light:  #dcfce7;
    --vtu-green-xlight: #f0fdf4;
    --vtu-text:         #111827;
    --vtu-text-muted:   #6b7280;
    --vtu-border:       #e5e7eb;
    --vtu-bg:           #f4f6f9;
    --vtu-white:        #ffffff;
    --vtu-card-bg:      #ffffff;
    --vtu-input-bg:     #ffffff;
    --vtu-shadow:       0 18px 50px rgba(15, 23, 42, 0.10);
    --vtu-shadow-soft:  0 8px 26px rgba(15, 23, 42, 0.08);
    --vtu-radius:       18px;
    --vtu-transition:   all 0.3s ease;
}

[data-theme="dark"] {
    --vtu-text:       #f9fafb;
    --vtu-text-muted: #9ca3af;
    --vtu-border:     #374151;
    --vtu-bg:         #111827;
    --vtu-white:      #1f2937;
    --vtu-card-bg:    #1f2937;
    --vtu-input-bg:   #374151;
    --vtu-shadow:     0 22px 70px rgba(0,0,0,0.50);
    --vtu-shadow-soft: 0 10px 34px rgba(0,0,0,0.40);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body.auth-body {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    background: radial-gradient(900px 500px at 15% 12%, rgba(22,163,74,0.08), transparent 55%),
                radial-gradient(850px 500px at 95% 85%, rgba(22,163,74,0.10), transparent 60%),
                var(--vtu-bg);
    color: var(--vtu-text);
    min-height: 100vh;
    transition: var(--vtu-transition);
}

/* ─── Layout ─── */
.auth-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ─── Left Panel ─── */
.auth-left {
    width: 45%;
    background: linear-gradient(145deg, #15803d 0%, #16a34a 40%, #22c55e 100%);
    padding: 60px 50px;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-left::before {
    content: '';
    position: absolute;
    top: -100px; right: -100px;
    width: 400px; height: 400px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.auth-left::after {
    content: '';
    position: absolute;
    bottom: -80px; left: -80px;
    width: 300px; height: 300px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.auth-left-content { position: relative; z-index: 1; }

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
    line-height: 1;
}

.auth-tagline {
    font-size: 2rem;
    font-weight: 800;
    color: rgba(255,255,255,0.9);
    line-height: 1.3;
    margin-bottom: 12px;
}

.auth-tagline span { color: #ffffff; }

.auth-sub {
    color: rgba(255,255,255,0.75);
    font-size: 1rem;
    line-height: 1.6;
}

.auth-features { display: flex; flex-direction: column; gap: 16px; }

.auth-feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 12px 16px;
    backdrop-filter: blur(4px);
}
.feature-icon{
    color: white;
}

.auth-feature-item .feature-icon { font-size: 1.5rem; }

.auth-feature-item strong {
    display: block;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
}

.auth-feature-item p {
    color: rgba(255,255,255,0.7);
    font-size: 0.8rem;
    margin: 0;
}

.auth-stats {
    display: flex;
    gap: 24px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    padding: 12px 20px;
    flex: 1;
}

.stat-number {
    font-size: 1.4rem;
    font-weight: 800;
    color: #ffffff;
}

.stat-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.7);
    margin-top: 2px;
}

/* ─── Right Panel ─── */
.auth-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: transparent;
    overflow-y: auto;
}

.auth-form-container {
    width: 100%;
    max-width: 460px;
}

.auth-card {
    background: var(--vtu-card-bg);
    border: 1.5px solid var(--vtu-border);
    border-radius: var(--vtu-radius);
    box-shadow: var(--vtu-shadow);
    overflow: hidden;
}

.auth-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--vtu-border);
    background: linear-gradient(180deg, rgba(22,163,74,0.06), rgba(22,163,74,0.00));
}

.auth-home-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--vtu-text-muted);
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 12px;
    transition: var(--vtu-transition);
}

.auth-home-link:hover {
    background: rgba(22,163,74,0.08);
    color: var(--vtu-green);
}

.auth-theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    border: 1.5px solid var(--vtu-border);
    background: var(--vtu-input-bg);
    color: var(--vtu-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--vtu-transition);
}

.auth-theme-toggle:hover {
    border-color: rgba(22,163,74,0.35);
    box-shadow: 0 10px 22px rgba(22,163,74,0.10);
    transform: translateY(-1px);
}

.auth-card-body {
    padding: 26px 22px 22px;
}

.auth-form-header {
    margin-bottom: 20px;
}

.auth-form-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--vtu-text);
    margin-bottom: 6px;
}

.auth-form-header p {
    color: var(--vtu-text-muted);
    font-size: 0.95rem;
}

.auth-page-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(22,163,74,0.16), rgba(22,163,74,0.06));
    border: 1px solid rgba(22,163,74,0.22);
    color: var(--vtu-green);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 14px;
}

.auth-page-icon-lg {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    font-size: 1.55rem;
    margin-bottom: 16px;
}

/* ─── Form Elements ─── */
.form-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--vtu-text);
    margin-bottom: 6px;
}

.form-control {
    background: var(--vtu-input-bg);
    border: 1.5px solid var(--vtu-border);
    border-radius: 12px;
    color: var(--vtu-text);
    font-size: 0.9rem;
    padding: 12px 14px;
    transition: var(--vtu-transition);
}

.form-control:focus {
    border-color: var(--vtu-green);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
    background: var(--vtu-input-bg);
    color: var(--vtu-text);
}

.form-control.is-invalid { border-color: #dc2626; }
.form-control.is-invalid:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15); }

.input-group-text {
    background: var(--vtu-input-bg);
    border: 1.5px solid var(--vtu-border);
    color: var(--vtu-text-muted);
    border-right: none;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.input-group .form-control { border-left: none; border-radius: 0; }
.input-group .form-control:focus { border-left: none; }
.input-group .form-control:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.input-group .btn-outline-secondary {
    border: 1.5px solid var(--vtu-border);
    border-left: none;
    color: var(--vtu-text-muted);
    background: var(--vtu-input-bg);
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.input-group .btn-outline-secondary:hover { color: var(--vtu-green); }

/* ─── Primary Button ─── */
.btn-vtu {
    background: linear-gradient(135deg, var(--vtu-green), var(--vtu-green-dark));
    border: none;
    border-radius: 14px;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 13px 24px;
    transition: var(--vtu-transition);
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
}

.btn-vtu:hover {
    background: linear-gradient(135deg, var(--vtu-green-dark), #166534);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(22, 163, 74, 0.45);
}

.btn-vtu:active { transform: translateY(0); }

.btn-vtu:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ─── Password Strength ─── */
.strength-bar {
    height: 4px;
    background: var(--vtu-border);
    border-radius: 2px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease, background 0.3s ease;
    width: 0%;
}

.strength-text { font-size: 0.78rem; color: var(--vtu-text-muted); }

/* ─── OTP Input ─── */
.otp-input-group {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.otp-digit {
    width: 52px !important;
    height: 56px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    border-radius: 10px !important;
    border: 2px solid var(--vtu-border) !important;
    transition: var(--vtu-transition);
}

.otp-digit:focus {
    border-color: var(--vtu-green) !important;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15) !important;
}

/* ─── Auth Footer Link ─── */
.auth-footer-link {
    text-align: center;
    margin-top: 24px;
    color: var(--vtu-text-muted);
    font-size: 0.9rem;
}

.auth-footer-link a {
    color: var(--vtu-green);
    font-weight: 600;
    text-decoration: none;
}

.auth-footer-link a:hover { text-decoration: underline; }

.forgot-link {
    color: var(--vtu-green);
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
}

.forgot-link:hover { text-decoration: underline; }

/* ─── Mobile Brand ─── */
.mobile-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.mobile-brand .brand-icon { font-size: 1.6rem; }
.mobile-brand .brand-name { font-size: 1.3rem; font-weight: 800; color: var(--vtu-green); }

/* ─── Alerts ─── */
.alert { border-radius: 10px; font-size: 0.875rem; }
.alert-success { background: var(--vtu-green-xlight); border-color: var(--vtu-green-light); color: #166534; }
.alert-danger  { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }

/* ─── Form Check ─── */
.form-check-input:checked {
    background-color: var(--vtu-green);
    border-color: var(--vtu-green);
}

.auth-btn-outline {
    border-radius: 12px;
    font-weight: 800;
    border-width: 1.5px;
}

.auth-info {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1.5px solid var(--vtu-border);
    background: rgba(15, 23, 42, 0.03);
    color: var(--vtu-text);
    font-size: 0.88rem;
    line-height: 1.55;
}

.auth-info i {
    margin-top: 2px;
    flex: 0 0 auto;
}

.auth-info-blue {
    border-color: rgba(2, 132, 199, 0.30);
    background: rgba(2, 132, 199, 0.08);
}

.auth-info-blue i {
    color: #0284c7;
}

[data-theme="dark"] .auth-info {
    background: rgba(255,255,255,0.04);
}

[data-theme="dark"] .auth-info-blue {
    background: rgba(2, 132, 199, 0.16);
    border-color: rgba(2, 132, 199, 0.35);
}

/* ─── Responsive ─── */
@media (max-width: 991.98px) {
    .auth-right { padding: 30px 16px; }
    .auth-form-container { max-width: 100%; }
    .auth-card-body { padding: 22px 18px 18px; }
}

@media (max-width: 480px) {
    .otp-digit { width: 44px !important; height: 50px; font-size: 1.2rem; }
    .otp-input-group { gap: 6px; }
    .auth-form-header h1 { font-size: 1.5rem; }
}

[data-theme="dark"] .form-text,
[data-theme="dark"] .text-muted {
    color: var(--vtu-text-muted) !important;
}

[data-theme="dark"] code {
    background: rgba(255,255,255,0.08);
    color: #86efac;
    padding: 1px 5px;
    border-radius: 4px;
}

/* ─── Google OAuth Button ────────────────────────────────── */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    background: #ffffff;
    color: #3c4043;
    border: 1.5px solid #dadce0;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.12), 0 1px 2px rgba(60, 64, 67, 0.08);
    transition: background 0.18s ease, border-color 0.18s ease,
                box-shadow 0.18s ease, transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    margin-top: 2px;
    margin-bottom: 0;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

/* Ripple shimmer on hover */
.btn-google::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(66, 133, 244, 0.06);
    opacity: 0;
    transition: opacity 0.18s ease;
    border-radius: inherit;
}

.btn-google:hover {
    background: #f8f9fa;
    border-color: #c5c8cb;
    box-shadow: 0 2px 8px rgba(60, 64, 67, 0.18), 0 1px 3px rgba(60, 64, 67, 0.1);
    color: #3c4043;
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-google:hover::before {
    opacity: 1;
}

.btn-google:active {
    background: #f1f3f4;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.1);
    transform: translateY(0);
}

.btn-google:active::before {
    opacity: 0;
}

.btn-google-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    /* Crisp rendering */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Dark mode */
[data-theme="dark"] .btn-google {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .btn-google::before {
    background: rgba(96, 165, 250, 0.06);
}

[data-theme="dark"] .btn-google:hover {
    background: #263548;
    border-color: #4a6080;
    color: #f1f5f9;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .btn-google:active {
    background: #1e293b;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

/* ─── Auth Divider ───────────────────────────────────────── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 16px;
    color: var(--vtu-text-muted);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--vtu-border);
}

.auth-divider span {
    white-space: nowrap;
    padding: 0 2px;
}

/* Pull the form-header bottom margin tighter when followed by Google button */
.auth-form-header + .btn-google {
    margin-top: 0;
}
