/* =============================================
   TUITION ADMIN — DESIGN SYSTEM
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* CSS Variables */
:root {
    --primary: #6366F1;
    --primary-hover: #4F46E5;
    --primary-light: rgba(99, 102, 241, 0.12);
    --primary-glow: rgba(99, 102, 241, 0.35);
    --accent: #06B6D4;
    --accent-light: rgba(6, 182, 212, 0.12);
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --sidebar-bg: rgba(255, 255, 255, 0.03);
    --sidebar-width: 260px;
    --content-bg: transparent;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.45);
    --border: rgba(255, 255, 255, 0.12);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--content-bg);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* =============================================
   LOGIN PAGE
   ============================================= */
.login-page {
    height: 100vh;
    width: 100vw;
    background: linear-gradient(135deg, #0F0E2A 0%, #1E1B4B 40%, #312E81 70%, #1e3a5f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: fixed;
    top: 0;
    left: 0;
    overflow: hidden;
}

/* Floating orbs background */
.login-page::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(79,70,229,0.18) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

.login-page::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(6,182,212,0.12) 0%, transparent 70%);
    bottom: -80px;
    left: -80px;
    border-radius: 50%;
    animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-30px) scale(1.05); }
}

.login-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-xl);
    padding: 36px 40px;
    width: 100%;
    max-width: 420px;
    max-height: calc(100vh - 48px);
    overflow: hidden;
    position: relative;
    z-index: 1;
    box-shadow: 0 32px 80px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
    animation: slideUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.login-logo {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 8px 24px var(--primary-glow);
    font-size: 24px;
}

.login-brand {
    text-align: center;
    margin-bottom: 24px;
}

.login-brand h1 {
    font-size: 22px;
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.login-brand p {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    font-weight: 400;
}

/* Step indicator */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transition: var(--transition);
}

.step-dot.active {
    width: 24px;
    border-radius: 4px;
    background: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
}

.step-dot.done {
    background: var(--success);
}

/* Form */
.form-group {
    margin-bottom: 14px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.6);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

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

.input-icon {
    position: absolute;
    left: 14px;
    color: rgba(255,255,255,0.35);
    font-size: 16px;
    pointer-events: none;
}

.form-input {
    width: 100%;
    padding: 13px 16px 13px 42px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-md);
    color: #FFFFFF;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    outline: none;
    transition: var(--transition);
}

.form-input::placeholder {
    color: rgba(255,255,255,0.25);
    font-weight: 400;
}

.form-input:focus {
    border-color: var(--primary);
    background: rgba(79,70,229,0.10);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* OTP Input */
.otp-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 8px;
}

.otp-input {
    width: 44px;
    height: 50px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-sm);
    color: #FFFFFF;
    outline: none;
    transition: var(--transition);
    caret-color: var(--primary);
}

.otp-input:focus {
    border-color: var(--primary);
    background: rgba(79,70,229,0.12);
    box-shadow: 0 0 0 3px var(--primary-glow);
    transform: scale(1.05);
}

.otp-input.filled {
    border-color: rgba(79,70,229,0.6);
    background: rgba(79,70,229,0.15);
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary), #6366F1);
    border: none;
    border-radius: var(--radius-md);
    color: #FFFFFF;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.2px;
    box-shadow: 0 4px 16px var(--primary-glow);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: var(--transition);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px var(--primary-glow);
}

.btn-primary:hover::before { opacity: 1; }

.btn-primary:active:not(:disabled) {
    transform: translateY(0px);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Loading spinner */
.btn-primary .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

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

/* Back button */
.btn-back {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
    transition: var(--transition);
}

.btn-back:hover { color: rgba(255,255,255,0.9); }

/* Resend OTP */
.resend-row {
    text-align: center;
    margin-top: 10px;
}

.resend-text {
    font-size: 13px;
    color: rgba(255,255,255,0.4);
}

.btn-resend {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    transition: var(--transition);
}

.btn-resend:hover { color: #22D3EE; text-decoration: underline; }
.btn-resend:disabled { color: rgba(255,255,255,0.25); cursor: default; text-decoration: none; }

/* Alert / Error */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
    animation: fadeIn 0.3s ease;
}

.alert-error {
    background: rgba(239,68,68,0.15);
    border: 1px solid rgba(239,68,68,0.3);
    color: #FCA5A5;
}

.alert-success {
    background: rgba(16,185,129,0.12);
    border: 1px solid rgba(16,185,129,0.25);
    color: #6EE7B7;
}

/* Demo hint */
.demo-hint {
    margin-top: 12px;
    padding: 10px 14px;
    background: rgba(6,182,212,0.08);
    border: 1px solid rgba(6,182,212,0.2);
    border-radius: var(--radius-sm);
    text-align: center;
}

.demo-hint p {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    margin-bottom: 2px;
}

.demo-hint span {
    font-size: 13px;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 2px;
}

/* Footer */
.login-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 11px;
    color: rgba(255,255,255,0.2);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Mobile number prefix */
.phone-prefix {
    position: absolute;
    left: 42px;
    color: rgba(255,255,255,0.6);
    font-size: 15px;
    font-weight: 500;
    pointer-events: none;
}

.form-input.with-prefix {
    padding-left: 74px;
}

/* Step transition */
.step-panel {
    animation: fadeIn 0.35s ease both;
}

/* Phone info row */
.phone-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin-bottom: 20px;
}

.phone-info-number {
    font-size: 15px;
    font-weight: 600;
    color: #FFFFFF;
}

.phone-info-label {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    margin-bottom: 2px;
}
