/* ============================================
   ABSENSIKU - AUTH PREMIUM DESIGN
   Modern, Clean, World-Class
   ============================================ */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --accent: #ec4899;
    --accent-2: #8b5cf6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    
    --bg-dark: #0a0e27;
    --bg-card: rgba(255, 255, 255, 0.98);
    --bg-soft: #f8fafc;
    
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-focus: #6366f1;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 30px 60px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.25);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   ANIMATED BACKGROUND
   ============================================ */
.auth-body {
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f4e 50%, #2d1b69 100%);
    overflow-x: hidden;
    position: relative;
}

.bg-animation {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.bg-gradient {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.25) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(236, 72, 153, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.15) 0%, transparent 60%);
    animation: gradientShift 20s ease infinite;
}
/*
@keyframes gradientShift {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(5deg); }
}

.bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: blobFloat 15s ease-in-out infinite;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: #6366f1;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: #ec4899;
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

.blob-3 {
    width: 350px;
    height: 350px;
    background: #8b5cf6;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}*/

@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, -50px) scale(1.1); }
    66% { transform: translate(-30px, 30px) scale(0.95); }
}

.bg-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}

/* ============================================
   AUTH CONTAINER (Split Layout)
   ============================================ */
.auth-container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    gap: 32px;
    align-items: center;
}

/* ============================================
   BRAND PANEL (Left)
   ============================================ */
.brand-panel {
    display: flex;
    align-items: center;
    padding: 40px;
}

.brand-content {
    color: #fff;
    max-width: 500px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 48px;
}

.logo-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
    position: relative;
    overflow: hidden;
}

.logo-mark::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.3), transparent);
}

.logo-mark i {
    font-size: 24px;
    color: #fff;
    position: relative;
    z-index: 1;
}

.logo-mark.small {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

.logo-mark.small i {
    font-size: 18px;
}

.logo-text {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff 0%, #c7d2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin: 0 0 20px;
}

.gradient-text {
    background: linear-gradient(135deg, #a5b4fc 0%, #f9a8d4 50%, #c4b5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.brand-subtitle {
    font-size: 16px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 40px;
    max-width: 420px;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 48px;
}

.feature-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
    border-color: rgba(255, 255, 255, 0.2);
}

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(236, 72, 153, 0.3));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.feature-icon i {
    font-size: 20px;
    color: #fff;
}

.feature-item h6 {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 4px;
    color: #fff;
}

.feature-item p {
    font-size: 13px;
    margin: 0;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.5;
}

.trust-badges {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
}

.badge-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.badge-item strong {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, #c7d2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.badge-item span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.divider-v {
    width: 1px;
    height: 32px;
    background: rgba(255, 255, 255, 0.15);
}

/* ============================================
   FORM PANEL (Right)
   ============================================ */
.form-panel {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 48px 44px;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
}

.form-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6366f1, #ec4899, #8b5cf6);
}

.mobile-logo {
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.form-top-nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.back-link:hover {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
}

/* ============================================
   AUTH TABS
   ============================================ */
.auth-tabs {
    display: flex;
    position: relative;
    background: var(--bg-soft);
    border-radius: var(--radius-md);
    padding: 6px;
    margin-bottom: 32px;
    border: 1px solid var(--border);
}

.auth-tab {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    z-index: 2;
}

.auth-tab.active {
    color: var(--primary);
}

.auth-tab:hover:not(.active) {
    color: var(--text-primary);
}

.tab-indicator {
    position: absolute;
    top: 6px;
    left: 6px;
    width: calc(50% - 6px);
    height: calc(100% - 12px);
    background: #fff;
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.auth-tabs[data-active="register"] .tab-indicator {
    transform: translateX(100%);
}

/* ============================================
   FORM HEADER
   ============================================ */
.form-header {
    margin-bottom: 28px;
}

.form-header h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 8px;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.form-header p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* ============================================
   FLOATING INPUTS
   ============================================ */
.form-floating-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.floating-input {
    position: relative;
}

.floating-input input {
    width: 100%;
    padding: 18px 16px 18px 48px;
    font-family: inherit;
    font-size: 15px;
    color: var(--text-primary);
    background: var(--bg-soft);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    transition: var(--transition);
    outline: none;
}

.floating-input input:focus {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.floating-input label {
    position: absolute;
    left: 48px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--text-muted);
    pointer-events: none;
    transition: var(--transition);
    background: transparent;
    padding: 0 4px;
}

.floating-input input:focus ~ label,
.floating-input input:not(:placeholder-shown) ~ label {
    top: 0;
    left: 40px;
    font-size: 12px;
    color: var(--primary);
    background: #fff;
    font-weight: 600;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--text-muted);
    transition: var(--transition);
    pointer-events: none;
}

.floating-input input:focus ~ .input-icon {
    color: var(--primary);
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 6px;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 6px;
    transition: var(--transition);
}

.toggle-password:hover {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
}

/* ============================================
   FORM OPTIONS (Remember / Forgot)
   ============================================ */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.checkbox-premium {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.checkbox-premium input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--border);
    border-radius: 5px;
    background: #fff;
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
}

.checkbox-premium input:checked ~ .checkmark {
    background: linear-gradient(135deg, var(--primary), var(--accent-2));
    border-color: transparent;
}

.checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: scale(0) rotate(45deg);
    transition: transform 0.2s ease;
}

.checkbox-premium input:checked ~ .checkmark::after {
    transform: scale(1) rotate(45deg);
}

.check-label a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.check-label a:hover {
    text-decoration: underline;
}

.forgot-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
}

.forgot-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ============================================
   PREMIUM BUTTON
   ============================================ */
.btn-premium {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.btn-primary-premium {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-2) 100%);
    color: #fff;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.35);
}

.btn-primary-premium::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--accent) 100%);
    opacity: 0;
    transition: var(--transition);
}

.btn-primary-premium:hover::before {
    opacity: 1;
}

.btn-primary-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.45);
}

.btn-primary-premium:active {
    transform: translateY(0);
}

.btn-premium span,
.btn-premium i {
    position: relative;
    z-index: 1;
}

.btn-premium i {
    transition: transform 0.3s ease;
}

.btn-premium:hover i {
    transform: translateX(4px);
}

/* ============================================
   SOCIAL LOGIN & DIVIDER
   ============================================ */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.social-login {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.btn-social {
    flex: 1;
    padding: 12px;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-social:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-social.bi-telegram:hover {
    color: #0088cc;
    border-color: #0088cc;
}

.btn-social.bi-google:hover {
    color: #ea4335;
    border-color: #ea4335;
}

.auth-switch {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.auth-switch a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
}

.auth-switch a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ============================================
   FLASH ALERT
   ============================================ */
.auth-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-alert i {
    font-size: 18px;
    flex-shrink: 0;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-info {
    background: rgba(6, 182, 212, 0.1);
    color: #0e7490;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

/* ============================================
   PASSWORD STRENGTH
   ============================================ */
.password-strength {
    margin-bottom: 20px;
}

.strength-bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    background: var(--danger);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.strength-fill[data-strength="1"] { width: 25%; background: var(--danger); }
.strength-fill[data-strength="2"] { width: 50%; background: var(--warning); }
.strength-fill[data-strength="3"] { width: 75%; background: var(--info); }
.strength-fill[data-strength="4"] { width: 100%; background: var(--success); }

.strength-text {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ============================================
   FORM FOOTER
   ============================================ */
.form-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.form-footer p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

/* ============================================
   UTILITIES
   ============================================ */
.hidden {
    display: none !important;
}

.auth-form {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   RESPONSIVE - MOBILE FIRST
   ============================================ */
@media (max-width: 991px) {
    .auth-container {
        grid-template-columns: 1fr;
        padding: 16px;
        gap: 0;
    }
    
    .brand-panel {
        display: none;
    }
    
    .mobile-logo {
        display: flex;
    }
    
    .form-panel {
        padding: 32px 24px;
        border-radius: var(--radius-lg);
    }
    
    .form-header h2 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .form-panel {
        padding: 28px 20px;
    }
    
    .floating-input input {
        padding: 16px 14px 16px 44px;
        font-size: 14px;
    }
    
    .floating-input label {
        left: 44px;
        font-size: 13px;
    }
    
    .floating-input input:focus ~ label,
    .floating-input input:not(:placeholder-shown) ~ label {
        left: 36px;
    }
    
    .auth-tab {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .btn-premium {
        padding: 14px 20px;
        font-size: 14px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================
   DARK MODE SUPPORT (Optional)
   ============================================ */
@media (prefers-color-scheme: dark) {
    /* Bisa ditambahkan nanti */
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}