:root {
    --bg-main: #0c0e12;
    --bg-card: rgba(22, 26, 32, 0.55); /* 55% Transparan untuk Mode Gelap */
    --bg-input: #0a0c10;
    --accent: #8b5cf6; /* Soft Violet */
    --accent-dark: #7c3aed;
    --accent-glow: rgba(139, 92, 246, 0.3);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --border: #262c36;
    --success: #10b981;
    --error: #ef4444;
    --radius-lg: 20px;
    --radius-md: 12px;
    --shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* LIGHT MODE THEME OVERRIDES */
body.light-mode {
    --bg-main: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.55); /* 55% Transparan untuk Mode Terang */
    --bg-input: #f1f5f9;
    --accent: #7c3aed;
    --accent-dark: #6d28d9;
    --accent-glow: rgba(124, 58, 237, 0.15);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --border: #cbd5e1;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-main);
    background-image: url('./bg-pc.jpg'); /* Gambar untuk Laptop/PC */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    z-index: 0;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(12, 14, 18, 0.4);
    z-index: -1;
}

body.light-mode::before {
    background: rgba(255, 255, 255, 0.15);
}

/* Animations */
.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

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

@keyframes floating {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

/* --- WELCOME OVERLAY --- */
.welcome-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #0c0e12;
    background-image: radial-gradient(circle at center, rgba(139, 92, 246, 0.15) 0%, transparent 70%), url('./bg-pc.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), visibility 1s;
    text-align: center;
    padding: 2rem;
}

.welcome-overlay::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(12, 14, 18, 0.7);
    backdrop-filter: blur(8px);
    z-index: -1;
}

.welcome-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
}

.welcome-content {
    max-width: 600px;
    animation: fadeIn 1s ease-out;
}

.welcome-logo {
    margin-bottom: 2rem;
}

.floating-quill {
    width: 60px;
    height: 60px;
    color: var(--accent);
    animation: floating 3s ease-in-out infinite;
}

.welcome-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.welcome-quote {
    font-size: 1.8rem;
    font-style: italic;
    color: #fff;
    line-height: 1.5;
    margin-bottom: 1rem;
    font-weight: 300;
}

.welcome-quote-source {
    font-size: 0.85rem;
    color: var(--accent);
    opacity: 0.8;
    letter-spacing: 0.08em;
    margin-bottom: 2.5rem;
    font-style: normal;
}

.welcome-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
}

.welcome-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.5);
    background: var(--accent-dark);
}

.welcome-footer {
    margin-top: 4rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
}

header {
    background: rgba(12, 14, 18, 0.35); /* Jauh lebih transparan */
    padding: 1.25rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.light-mode header {
    background: rgba(255, 255, 255, 0.35); /* Jauh lebih transparan */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.theme-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.theme-btn:hover {
    background: rgba(255,255,255, 0.1);
    border-color: var(--accent);
}

header {
    background: transparent;
    padding: 3rem 2rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #fff;
    text-shadow: 0 4px 10px rgba(0,0,0,0.6);
}

.logo h1 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
}

.version {
    font-size: 0.7rem;
    background: var(--accent);
    color: white;
    padding: 0.2rem 0.8rem;
    border-radius: 4px;
    font-family: var(--font-mono);
}

nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    background: rgba(12, 14, 18, 0.2);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 90;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

nav button {
    padding: 0.6rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-weight: 600;
    border-radius: 100px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

nav button.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    box-shadow: 0 4px 12px var(--accent-glow);
}

nav button:hover:not(.active) {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.install-btn {
    background: linear-gradient(135deg, #10b981, #3b82f6) !important;
    color: white !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.install-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

main {
    max-width: 650px;
    margin: 2rem auto;
    padding: 0 1rem 5rem;
}

.card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    transition: var(--transition);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2.5rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

.stat-badge {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
    margin-left: 0.25rem;
}

input, select, textarea {
    width: 100%;
    padding: 0.9rem 1.25rem;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
    font-size: 1rem;
    -webkit-appearance: none;
    appearance: none;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--accent);
    background: var(--bg-input);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

option {
    background: var(--bg-card);
    color: var(--text-primary);
}

textarea {
    resize: vertical;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--accent);
    background: var(--bg-input);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

button[type="submit"], .btn-action {
    width: 100%;
    padding: 1.1rem;
    background: linear-gradient(135deg, #7c3aed, #c026d3);
    color: white;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.3);
}

button[type="submit"]:hover, .btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(124, 58, 237, 0.4);
}

button[type="submit"]:active, .btn-action:active {
    transform: translateY(0);
}

button[type="submit"]:disabled {
    opacity: 0.5;
    background: var(--text-secondary);
    cursor: not-allowed;
}

.message {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 1rem;
    border-radius: var(--radius-md);
    animation: fadeIn 0.3s ease-out;
}

.message.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.message.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* AI Advisor Section Improvements */
.upload-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.drop-zone {
    border: 2px dashed var(--border);
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-lg);
    padding: 3.5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

/* ADVISOR TABS */
.tabs {
        display: flex;
        gap: 0.5rem;
        background: rgba(255, 255, 255, 0.05);
        padding: 0.4rem;
        border-radius: 12px;
        margin-bottom: 2rem;
    }

    .tab-btn {
        flex: 1;
        padding: 0.8rem;
        border: none;
        background: transparent;
        color: var(--text-dim);
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.3s ease;
        font-weight: 500;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }

    .tab-btn.active {
        background: var(--accent);
        color: white;
        box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    }

    .glass-card {
        background: var(--card-bg);
        backdrop-filter: blur(12px);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 20px;
        padding: 1.5rem;
        margin-bottom: 1.5rem;
        box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    }

    .section-header {
        margin-bottom: 1.5rem;
        display: flex;
        align-items: center;
        gap: 0.8rem;
    }
    
    .section-header h2 { font-size: 1.3rem; }

    /* FORM STYLES */
    .form-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.2rem;
    }

    .input-group {
        display: flex;
        flex-direction: column;
    }

    .input-group.full-width { grid-column: 1 / -1; }

    label {
        font-size: 0.85rem;
        color: var(--text-dim);
        margin-bottom: 0.5rem;
        font-weight: 500;
    }

    input, select, textarea {
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 10px;
        padding: 0.8rem;
        color: white;
        font-family: inherit;
        transition: all 0.3s ease;
    }

    input:focus, select:focus, textarea:focus {
        outline: none;
        border-color: var(--accent);
        background: rgba(255, 255, 255, 0.1);
    }

    .btn {
        background: var(--accent);
        color: white;
        border: none;
        padding: 1rem;
        border-radius: 12px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        width: 100%;
        margin-top: 1rem;
    }

    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
    }

    /* AI ADVISOR SPECIFIC */
    .upload-area {
        border: 2px dashed rgba(255, 255, 255, 0.1);
        padding: 1.5rem;
        border-radius: 15px;
        text-align: center;
        cursor: pointer;
        transition: all 0.3s;
    }

    .upload-area:hover {
        border-color: var(--accent);
        background: rgba(52, 152, 219, 0.05);
    }

    .preview-frame {
        max-width: 80%; /* Dibuat lebih ramping secara horizontal */
        max-height: 180px; /* Jauh lebih mungil vertikalnya */
        border-radius: 12px;
        margin: 1.5rem auto;
        display: block;
        object-fit: contain;
        border: 1px solid rgba(255, 255, 255, 0.05); /* Border sangat tipis */
        box-shadow: 0 4px 15px rgba(0,0,0,0.4); /* Bayangan lebih kalem */
        background: transparent;
    }

    .advisor-btn-group {
        display: flex;
        flex-direction: column; /* Ditumpuk untuk hirarki yang jelas */
        gap: 0.8rem;
        margin-top: 1rem;
        align-items: center;
    }

    .btn-action {
        background: var(--accent);
        color: white;
        border: none;
        padding: 1rem;
        border-radius: 12px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s;
        width: 100%;
        max-width: 300px;
    }

    .btn-action:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
    }

    /* Redesign Tombol Selesai (Subtle & Elegant) */
    .btn-secondary {
        background: rgba(255, 255, 255, 0.05);
        color: var(--text-secondary);
        border: 1px solid rgba(255, 255, 255, 0.1);
        text-decoration: none;
        font-size: 0.9rem;
        padding: 0.8rem;
        border-radius: 12px;
        cursor: pointer;
        transition: all 0.3s;
        width: 100%;
        max-width: 300px;
    }

    .btn-secondary:hover {
        color: white;
        background: rgba(239, 68, 68, 0.2); /* Dark red background focus */
        border-color: rgba(239, 68, 68, 0.4);
    }

    .result-area {
        background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(155, 89, 182, 0.1));
        border-left: 4px solid var(--accent);
        padding: 1.5rem;
        border-radius: 12px;
        margin-top: 1.5rem;
        animation: slideUp 0.5s ease;
    }

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

    .ai-content {
        line-height: 1.6;
        font-size: 0.95rem;
    }

    .ai-content p { margin-bottom: 1rem; }
    .ai-content ul { padding-left: 1.5rem; margin-bottom: 1rem; }
    .ai-content li { margin-bottom: 0.6rem; }
    .ai-content strong { color: var(--accent); font-weight: 600; }

    .message {
        margin-top: 1rem;
        padding: 0.8rem;
        border-radius: 8px;
        font-size: 0.9rem;
        display: none;
    }

    /* HISTORY COMPONENT */
    .history-grid {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        margin-top: 1rem;
    }


    .history-card {
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        padding: 1.25rem;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        transition: var(--transition);
        box-shadow: none;
    }

    .history-card:hover {
        background: rgba(255, 255, 255, 0.06);
        border-color: var(--accent);
    }

.drop-zone:hover {
    border-color: var(--accent);
    background: rgba(59, 130, 246, 0.05);
}

.result-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

#aiResult {
    margin-top: 2.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-lg);
}

#aiText {
    white-space: pre-line;
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.6;
}

.hidden { display: none !important; }

/* =========================================
   🤖 CHATBOT WIDGET STYLES
   ========================================= */
.chatbot-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.fab {
    background: linear-gradient(135deg, #7c3aed, #c026d3);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(124, 58, 237, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 0;
    overflow: hidden;
}

.fab-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.6);
}

.fab i {
    width: 28px;
    height: 28px;
}

.chat-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    width: 350px;
    height: 500px;
    border-radius: 20px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chat-panel.hidden {
    display: none !important;
}

.chat-header {
    background: linear-gradient(135deg, #7c3aed, #c026d3);
    color: white;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1rem;
}

.chat-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
}

.chat-title {
    flex: 1;
}

.chat-title h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.chat-title span {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
    display: inline-block;
    margin-top: 0.2rem;
}

.chat-close {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.chat-close:hover {
    opacity: 1;
}

.chat-body {
    flex: 1;
    padding: 1.5rem 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Kustomisasi scrollbar chat */
.chat-body::-webkit-scrollbar {
    width: 6px;
}
.chat-body::-webkit-scrollbar-track {
    background: transparent;
}
.chat-body::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

.chat-msg {
    max-width: 85%;
    padding: 0.8rem 1rem;
    border-radius: 18px;
    font-size: 0.9rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.chat-msg.model {
    background: var(--bg-input);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border);
    position: relative;
}

.typing-active::after {
    content: '|';
    margin-left: 2px;
    animation: blink 0.8s infinite;
    color: var(--accent);
    font-weight: bold;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.chat-msg.user {
    background: var(--accent);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-msg.typing {
    background: transparent;
    border: none;
    font-style: italic;
    color: var(--text-secondary);
    padding: 0.5rem;
}

.chat-footer {
    padding: 1rem;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
    display: flex;
    gap: 0.5rem;
}

.chat-footer input {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.8rem 1rem;
    border-radius: 100px;
    flex: 1;
    font-size: 0.9rem;
}

.chat-footer button {
    background: linear-gradient(135deg, #7c3aed, #c026d3);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s;
}

.chat-footer button:hover {
    background: linear-gradient(135deg, #6d28d9, #a21caf);
}

/* =========================================
   📊 DASHBOARD STATISTICS
   ========================================= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

body.light-mode .stat-card {
    background: rgba(0, 0, 0, 0.03);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
}

.stat-total::before { background: linear-gradient(90deg, #7c3aed, #c026d3); }
.stat-applied::before { background: #3b82f6; }
.stat-screening::before { background: #f59e0b; }
.stat-interview::before { background: #8b5cf6; }
.stat-offering::before { background: #10b981; }
.stat-rejected::before { background: #ef4444; }

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

body.light-mode .stat-card:hover {
    background: rgba(0, 0, 0, 0.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.stat-icon {
    width: 28px;
    height: 28px;
    margin: 0 auto 0.75rem;
    display: block;
}

.stat-total .stat-icon { color: #c026d3; }
.stat-applied .stat-icon { color: #3b82f6; }
.stat-screening .stat-icon { color: #f59e0b; }
.stat-interview .stat-icon { color: #8b5cf6; }
.stat-offering .stat-icon { color: #10b981; }
.stat-rejected .stat-icon { color: #ef4444; }

.stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.4rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* Breakdown Bars */
.breakdown-section,
.recent-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.breakdown-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

.breakdown-bar-item {
    margin-bottom: 1rem;
}

.breakdown-bar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
}

.breakdown-bar-label span:first-child {
    color: var(--text-secondary);
    font-weight: 500;
}

.breakdown-bar-label span:last-child {
    color: var(--text-primary);
    font-weight: 600;
}

.breakdown-bar-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    overflow: hidden;
}

body.light-mode .breakdown-bar-track {
    background: rgba(0, 0, 0, 0.06);
}

.breakdown-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0;
}

.bar-applied { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.bar-screening { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.bar-interview { background: linear-gradient(90deg, #7c3aed, #a78bfa); }
.bar-offering { background: linear-gradient(90deg, #10b981, #34d399); }
.bar-rejected { background: linear-gradient(90deg, #ef4444, #f87171); }

/* Recent Activity */
.recent-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.recent-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: var(--transition);
}

body.light-mode .recent-item {
    background: rgba(0, 0, 0, 0.02);
}

.recent-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(4px);
}

body.light-mode .recent-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

.recent-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 8px currentColor;
}

.recent-info {
    flex: 1;
    min-width: 0;
}

.recent-company {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-detail {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.recent-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* =========================================
   🔍 SEARCH & FILTER
   ========================================= */
.search-filter-bar {
    margin-bottom: 1.5rem;
}

.search-box {
    position: relative;
    margin-bottom: 1rem;
}

.search-box .search-icon {
    position: absolute;
    left: 1.15rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    pointer-events: none;
}

.search-box input {
    padding-left: 2.85rem !important;
    border-radius: 100px !important;
}

.filter-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-pill {
    padding: 0.45rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Outfit', sans-serif;
}

body.light-mode .filter-pill {
    background: rgba(0, 0, 0, 0.04);
}

.filter-pill:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.filter-pill.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    box-shadow: 0 2px 10px var(--accent-glow);
}

.no-results-msg {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* =========================================
   🎨 ADVISOR SUB-TABS & CV SCORER
   ========================================= */
.advisor-tabs {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    padding: 0.35rem;
    border-radius: 14px;
    margin-bottom: 1.75rem;
    border: 1px solid var(--border);
}

body.light-mode .advisor-tabs {
    background: rgba(0, 0, 0, 0.04);
}

.advisor-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: 'Outfit', sans-serif;
}

.advisor-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.advisor-tab.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.advisor-panel.hidden {
    display: none;
}

.ai-helper-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* --- Score Ring --- */
.score-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 2rem 0 1.5rem;
}

.score-ring-container {
    position: relative;
    width: 150px;
    height: 150px;
}

.score-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    filter: drop-shadow(0 0 12px var(--accent-glow));
}

.score-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.06);
    stroke-width: 8;
}

body.light-mode .score-ring-bg {
    stroke: rgba(0, 0, 0, 0.06);
}

.score-ring-fill {
    fill: none;
    stroke: url(#scoreGradient);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 326.73; /* 2π × 52 */
    stroke-dashoffset: 326.73; /* Start at 0% */
    transition: stroke-dashoffset 1.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.score-value small {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.score-label {
    margin-top: 0.75rem;
    font-size: 1.05rem;
    font-weight: 600;
    padding: 0.3rem 1.2rem;
    border-radius: 100px;
    letter-spacing: 0.02em;
}

.score-label.score-excellent {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.score-label.score-good {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
}
.score-label.score-average {
    color: #f97316;
    background: rgba(249, 115, 22, 0.1);
    border: 1px solid rgba(249, 115, 22, 0.2);
}
.score-label.score-poor {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.score-details {
    margin-top: 1.5rem;
    padding: 1.75rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(192, 38, 211, 0.08));
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: var(--radius-lg);
    line-height: 1.7;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.score-details p {
    margin-bottom: 0.8rem;
}

.score-details ul {
    padding-left: 1.2rem;
    margin-bottom: 0.8rem;
}

.score-details li {
    margin-bottom: 0.4rem;
}

.score-details strong {
    color: var(--accent);
}

/* --- PDF Preview Card --- */
.pdf-preview-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(139, 92, 246, 0.07);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0 0.5rem;
    transition: var(--transition);
}

body.light-mode .pdf-preview-card {
    background: rgba(139, 92, 246, 0.05);
}

.pdf-preview-info {
    flex: 1;
    min-width: 0;
}

.pdf-preview-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pdf-preview-size {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

/* =========================================
   📱 SMARTPHONE / MOBILE RESPONSIVE
   ========================================= */
@media (max-width: 650px) {
    body {
        background-image: url('./bg-hp.jpg'); /* Gambar untuk HP */
        background-position: center;
    }

    header { 
        padding: 1rem; 
    }
    
    header h1 { 
        font-size: 1.2rem; 
    }
    
    nav {
        flex-wrap: wrap;
        padding: 0.8rem;
        gap: 0.5rem;
    }
    
    nav button {
        flex: 1 1 auto;
        justify-content: center;
        padding: 0.6rem;
        font-size: 0.85rem;
    }
    
    main {
        padding: 0 0.8rem 5rem;
        margin: 1.5rem auto;
    }
    
    .card, .glass-card {
        padding: 1.25rem;
        border-radius: 16px;
    }
    
    .section-title { 
        font-size: 1.35rem; 
    }

    .form-grid, .grid-2 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    input, select, textarea {
        font-size: 16px; /* Prevents auto-zoom on iOS Safari */
        padding: 0.85rem 1rem;
    }

    .history-header {
        flex-direction: column;
        gap: 0.6rem;
    }

    .status-badge { 
        align-self: flex-start; 
    }

    .preview-frame {
        max-width: 100%;
        max-height: 200px;
    }

    .advisor-btn-group {
        width: 100%;
    }

    .btn-action {
        max-width: 100%;
    }

    /* Mobile Dashboard */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .stat-number {
        font-size: 1.6rem;
    }

    .stat-card {
        padding: 1rem;
    }

    /* Mobile Search & Filter */
    .filter-pills {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
    }

    .filter-pills::-webkit-scrollbar {
        display: none;
    }

    .filter-pill {
        flex-shrink: 0;
    }

    .search-box input {
        font-size: 16px !important;
    }

    /* Nav 2x2 grid on mobile */
    nav button .icon {
        display: none;
    }

    /* Mobile Chatbot Adjustments */
    .chat-panel {
        width: 85vw; /* Lebih lebar di HP */
        height: 65vh; /* Sedikit lebih pendek di HP */
        right: 1rem; /* Merapat ke kanan */
        bottom: 1rem; /* Merapat ke bawah */
        margin-bottom: 0.5rem; 
    }
    
    .chatbot-container {
        bottom: 1rem;
        right: 1rem;
    }
    
    .fab {
        width: 55px;
        height: 55px;
    }
}
