/* ============================================================
   assets/css/style.css
   Global styles untuk CV ATS Builder by Ismet
   Tema: Dark Luxury — elegan, professional, modern
   ============================================================ */

/* ===== CSS VARIABLES ===== */
:root {
    --bg-dark:      #0d0d14;
    --bg-card:      #161625;
    --bg-elevated:  #1e1e30;
    --border:       rgba(255,255,255,0.08);
    --border-light: rgba(255,255,255,0.14);
    --text-primary: #f0f0f5;
    --text-muted:   #8888aa;
    --text-subtle:  #5555770;
    --accent:       #6c63ff;
    --accent-light: #8b84ff;
    --accent-glow:  rgba(108, 99, 255, 0.25);
    --success:      #22c55e;
    --error:        #ef4444;
    --warning:      #f59e0b;
    --radius:       10px;
    --radius-lg:    16px;
    --shadow:       0 4px 24px rgba(0,0,0,0.4);
    --shadow-lg:    0 8px 48px rgba(0,0,0,0.6);
    --transition:   0.2s ease;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', Arial, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: #fff; }

/* ===== UTILITY ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.fade-in { animation: fadeIn 0.4s ease; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== ALERTS ===== */
.alert {
    padding: 12px 18px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 14px;
    border: 1px solid transparent;
    animation: fadeIn 0.3s ease;
}
.alert-success { background: rgba(34,197,94,0.1); border-color: rgba(34,197,94,0.3); color: #86efac; }
.alert-error   { background: rgba(239,68,68,0.1);  border-color: rgba(239,68,68,0.3);  color: #fca5a5; }
.alert-warning { background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.3); color: #fcd34d; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 20px var(--accent-glow);
}
.btn-primary:hover {
    background: var(--accent-light);
    box-shadow: 0 0 30px var(--accent-glow);
    color: #fff;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-color: var(--border-light);
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.25);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--border);
}
.btn-ghost:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }

.btn-danger {
    background: rgba(239,68,68,0.15);
    color: #fca5a5;
    border-color: rgba(239,68,68,0.3);
}
.btn-danger:hover { background: rgba(239,68,68,0.25); color: #fff; }

.btn-success {
    background: rgba(34,197,94,0.15);
    color: #86efac;
    border-color: rgba(34,197,94,0.3);
}
.btn-success:hover { background: rgba(34,197,94,0.25); color: #fff; }

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-full { width: 100%; justify-content: center; }

/* ===== NAVBAR (Ultra-Premium & Animated) ===== */
.navbar {
    height: 75px;
    background: rgba(15, 15, 25, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 1000;
    animation: navbarSlideDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.navbar:hover {
    background: rgba(15, 15, 25, 0.85);
    border-bottom: 1px solid rgba(108, 99, 255, 0.3);
}

@keyframes navbarSlideDown {
    from { opacity: 0; transform: translateY(-30px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 17px;
    color: #fff;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
}

.navbar-brand:hover {
    transform: translateY(-2px);
}

.brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #b122e5);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 18px;
    box-shadow: 0 0 15px rgba(108, 99, 255, 0.4);
    animation: subtleRotate 4s ease-in-out infinite alternate;
}

@keyframes subtleRotate {
    0% { transform: perspective(200px) rotateY(0deg); }
    100% { transform: perspective(200px) rotateY(15deg) scale(1.05); }
}

.navbar-brand em { 
    color: #a5b4fc; 
    font-style: normal; 
    font-size: 13px; 
    font-weight: 500;
    margin-left: 4px; 
    opacity: 0.8;
}

.navbar-center {
    font-size: 14px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    letter-spacing: 0.5px;
    animation: fadeIn 1s ease 0.5s both;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 14px;
    border-radius: 50px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.navbar-user:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(108, 99, 255, 0.4);
    box-shadow: 0 4px 20px rgba(108, 99, 255, 0.15);
    transform: translateY(-1px);
}

.user-avatar {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    box-shadow: 0 0 10px var(--accent-glow);
    position: relative;
    overflow: hidden;
}

.user-avatar::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite linear;
}

@keyframes shine {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.user-name { 
    font-size: 14px; 
    color: #f1f5f9; 
    font-weight: 500;
}

.back-link { 
    color: #cbd5e1; 
    font-size: 14px; 
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.back-link:hover { 
    color: #fff; 
    transform: translateX(-4px);
    text-shadow: 0 0 8px rgba(255,255,255,0.3);
}

/* ===== AUTH PAGES (Premium Aesthetic Upgrade) ===== */
.auth-page {
    background: #09090b; /* Deep background */
    min-height: 100vh;
}

.auth-container {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.auth-brand {
    flex: 0 0 500px;
    background: linear-gradient(-45deg, #09090b, #2e1065, #4c1d95, #000000);
    background-size: 400% 400%;
    animation: gradientFlow 15s ease infinite, slideInLeft 1s cubic-bezier(0.16, 1, 0.3, 1);
    border-right: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    position: relative;
    overflow: hidden;
    box-shadow: 20px 0 50px rgba(0,0,0,0.5);
    z-index: 2;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-60px); }
    to { opacity: 1; transform: translateX(0); }
}

.auth-brand::before {
    content: '';
    position: absolute;
    width: 800px; height: 800px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    top: -200px; left: -200px;
    filter: blur(80px);
    pointer-events: none;
    animation: pulseGlow 8s infinite alternate ease-in-out;
}

@keyframes pulseGlow {
    0% { transform: scale(0.8) translate(0, 0); opacity: 0.5; }
    100% { transform: scale(1.2) translate(50px, 50px); opacity: 1; }
}

.brand-content { position: relative; z-index: 1; text-align: center; }

.brand-logo {
    font-size: 72px;
    color: #fff;
    filter: drop-shadow(0 0 35px rgba(139, 92, 246, 0.9));
    margin-bottom: 24px;
    display: inline-block;
    animation: floatingOrb 5s ease-in-out infinite;
}

@keyframes floatingOrb {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(5deg) scale(1.05); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.brand-content h1 {
    font-family: 'DM Serif Display', serif;
    font-size: 46px;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    line-height: 1.1;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.brand-content > p {
    color: #c4b5fd;
    font-size: 16px;
    margin-bottom: 36px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.brand-tagline {
    color: #e2e8f0;
    font-size: 17px;
    line-height: 1.7;
    margin-bottom: 36px;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.auth-form-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: url('data:image/svg+xml;utf8,<svg width="60" height="60" xmlns="http://www.w3.org/2000/svg"><path d="M 0 0 L 60 0 L 60 60 L 0 60 Z" fill="none"/><path d="M 0 0 L 60 60 M 60 0 L 0 60" stroke="rgba(255,255,255,0.015)" stroke-width="1"/></svg>') center, radial-gradient(circle at center, #1e1e2f 0%, #09090b 100%);
    background-size: 60px 60px, cover;
    animation: fadeInForm 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

@keyframes fadeInForm {
    from { opacity: 0; transform: translateY(30px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-form-inner {
    width: 100%;
    max-width: 420px;
    background: rgba(15, 15, 25, 0.65);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 45px 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), inset 0 1px 1px rgba(255,255,255,0.1);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.auth-form-inner:hover {
    transform: translateY(-5px);
    box-shadow: 0 35px 60px -15px rgba(0, 0, 0, 0.9), 0 0 40px rgba(139, 92, 246, 0.15), inset 0 1px 1px rgba(255,255,255,0.15);
}

.auth-header { margin-bottom: 32px; text-align: center; }
.auth-header h2 { font-family: 'DM Serif Display', serif; font-size: 30px; margin-bottom: 10px; color: #fff; }
.auth-header p { color: #94a3b8; font-size: 15px; }
.auth-header a { color: #a78bfa; font-weight: 600; text-decoration: none; transition: all 0.2s; position: relative; }
.auth-header a:hover { color: #ddd6fe; }
.auth-header a::after { content: ''; position: absolute; left: 0; bottom: -2px; width: 100%; height: 1px; background: currentColor; transform: scaleX(0); transition: transform 0.3s ease; transform-origin: right; }
.auth-header a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ===== FORMS ===== */
.form { display: flex; flex-direction: column; gap: 16px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 13px; font-weight: 500; color: var(--text-muted); }
.form-group label .req { color: var(--accent-light); }

.form-group input,
.form-group textarea,
.form-group select {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 10px 14px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: border-color var(--transition), box-shadow var(--transition);
    width: 100%;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); opacity: 0.5; }

.form-group textarea { resize: vertical; min-height: 80px; }

.form-row { display: flex; flex-direction: column; gap: 16px; }
.form-row.two-col { flex-direction: row; }
.form-row.two-col .form-group { flex: 1; }

.form-group small { font-size: 11px; color: var(--text-muted); }
.char-count { text-align: right; }

/* Password toggle */
.input-with-toggle { position: relative; }
.input-with-toggle input { padding-right: 42px; }
.toggle-pw {
    position: absolute;
    right: 10px; top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.5;
    transition: opacity var(--transition);
}
.toggle-pw:hover { opacity: 1; }

.auth-divider {
    text-align: center;
    margin: 20px 0 10px;
    position: relative;
    color: var(--text-muted);
    font-size: 12px;
}
.auth-divider::before {
    content: '';
    position: absolute;
    left: 0; right: 0; top: 50%;
    height: 1px;
    background: var(--border);
}
.auth-divider span {
    position: relative;
    background: var(--bg-dark);
    padding: 0 12px;
}

.demo-info {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.8;
}
.demo-info code {
    background: rgba(108,99,255,0.15);
    color: var(--accent-light);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 12px;
}

/* ===== DASHBOARD ===== */
.app-page { background: var(--bg-dark); }

.dashboard-main { padding: 50px 0; min-height: calc(100vh - 70px); }

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    animation: fadeIn 0.6s ease forwards;
}

.dashboard-title {
    font-family: 'DM Serif Display', serif;
    font-size: 36px;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.dashboard-subtitle { color: #94a3b8; font-size: 16px; }

/* CV Grid */
.cv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.cv-card {
    background: rgba(30, 30, 48, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 30px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.cv-card:nth-child(1) { animation-delay: 0.1s; }
.cv-card:nth-child(2) { animation-delay: 0.2s; }
.cv-card:nth-child(3) { animation-delay: 0.3s; }
.cv-card:nth-child(4) { animation-delay: 0.4s; }

.cv-card:hover {
    background: rgba(40, 40, 60, 0.6);
    border-color: rgba(255,255,255,0.15);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 20px rgba(108,99,255,0.15);
    transform: translateY(-6px) scale(1.02);
}

.cv-card-icon { font-size: 38px; margin-bottom: 16px; display: inline-block; animation: float 6s infinite ease-in-out; }

.cv-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cv-card-meta { font-size: 13px; color: #94a3b8; line-height: 1.7; margin-bottom: 24px; }

.cv-card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 80px 24px;
    color: var(--text-muted);
    animation: fadeIn 0.5s ease;
}
.empty-icon { font-size: 56px; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { font-size: 20px; color: var(--text-primary); margin-bottom: 8px; }
.empty-state p { margin-bottom: 24px; font-size: 14px; }

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 420px;
    width: 90%;
    box-shadow: var(--shadow-lg);
}

.modal-box h3 { font-size: 18px; color: #fff; margin-bottom: 10px; }
.modal-box p  { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    /* Auth Mobile Perfection */
    .auth-container { display: block; min-height: 100vh; height: auto; }
    .auth-brand { 
        flex: none; 
        padding: 40px 20px; 
        text-align: center; 
        box-shadow: 0 10px 30px rgba(0,0,0,0.5); 
    }
    .auth-brand::before { display: none; }
    .brand-logo { font-size: 50px; margin-bottom: 12px; }
    .brand-content h1 { font-size: 32px; letter-spacing: 0; }
    .brand-content > p { font-size: 13px; margin-bottom: 20px; }
    .brand-tagline { font-size: 14px; margin-bottom: 20px; display: none; /* Sembunyikan pesan panjang di HP biar ringkas */ }
    .brand-features { display: none; /* Sembunyikan fitur di HP agar user langsung ke form */ }

    .auth-form-wrap { padding: 30px 16px; align-items: flex-start; }
    .auth-form-inner { 
        padding: 30px 20px; 
        border-radius: 16px; 
        box-shadow: 0 15px 30px -10px rgba(0,0,0,0.8);
    }
    .auth-header h2 { font-size: 24px; }
    .auth-header { margin-bottom: 24px; }
    
    /* Dashboard */
    .dashboard-main { padding: 25px 0; }
    .dashboard-header { flex-direction: column; gap: 16px; align-items: flex-start; margin-bottom: 24px; }
    .dashboard-title { font-size: 28px; }
    .cv-grid { grid-template-columns: 1fr; gap: 16px; }
    .cv-card { padding: 24px; }
    
    /* Forms */
    .form-row.two-col { flex-direction: column; }
    
    /* Navbar Super Responsive */
    .navbar { 
        min-height: 60px; height: auto;
        padding: 10px 16px; 
        background: rgba(15, 15, 25, 0.85); /* Slightly darker on mobile for contrast */
    }
    .navbar-center { display: none; } /* Hide middle text */
    
    .navbar-brand { font-size: 15px; gap: 8px; }
    .brand-icon { width: 30px; height: 30px; font-size: 14px; border-radius: 8px; }
    .navbar-brand em { display: none; } /* Hide the 'Builder' or secondary text if tight */
    
    .navbar-user { padding: 4px; gap: 8px; background: transparent; border: none; }
    .user-name { display: none; } /* Only show avatar */
    .user-avatar { width: 32px; height: 32px; font-size: 12px; }
    
    .back-link { font-size: 13px; }
}