/* --- 1. VARIABLES & RESET --- */
:root {
    --bg-color: #0f172a;
    --sidebar-bg: rgba(255, 255, 255, 0.05);
    --card-bg: rgba(255, 255, 255, 0.05);
    --primary: #818cf8;
    --primary-hover: #6366f1;
    --text-main: #f1f5f9;
    --text-light: #94a3b8;
    --blue-accent: #60a5fa;
    --orange-accent: #fbbf24;
    --green-accent: #34d399;
    --radius: 16px;
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Outfit', sans-serif; }

body {
    /* Deep Abyss Gradient */
    background: linear-gradient(to right, #0f2027, #203a43, #2c5364);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
}

/* --- 2. LAYOUT & SIDEBAR --- */
.app-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    height: 100vh;
}

/* Sidebar (Desktop) */
.sidebar {
    background: var(--sidebar-bg);
    backdrop-filter: blur(12px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 1rem;
    display: flex; flex-direction: column; justify-content: space-between;
    transition: width 0.3s ease;
    overflow: hidden;
}

.brand { 
    font-size: 1.5rem; font-weight: 700; display: flex; align-items: center; gap: 0.8rem; margin-bottom: 3rem; white-space: nowrap; 
}
.nav-links { display: flex; flex-direction: column; gap: 0.5rem; }
.nav-btn {
    background: transparent; border: none; text-align: left; padding: 12px 16px;
    border-radius: 12px; color: var(--text-light); font-size: 1rem; cursor: pointer;
    display: flex; align-items: center; gap: 12px; transition: var(--transition);
}
.nav-btn:hover { background: rgba(255, 255, 255, 0.05); color: white; }
.nav-btn.active { background: rgba(129, 140, 248, 0.15); color: var(--primary); font-weight: 600; border: 1px solid rgba(129, 140, 248, 0.2); }

.user-profile { display: flex; align-items: center; gap: 10px; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.1); white-space: nowrap; }
.user-profile img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.2); }
.user-info p { margin: 0; font-size: 0.85rem; }
.user-info .name { font-weight: 600; }

/* Collapse Logic */
.sidebar.collapsed { width: 80px; padding: 2rem 0.5rem; }
.sidebar.collapsed .brand span, .sidebar.collapsed .nav-btn span, .sidebar.collapsed .user-info { display: none; }
.sidebar.collapsed .nav-btn { justify-content: center; }
.toggle-btn { display: none; } /* Hidden by default, handled by JS if needed */

/* --- 3. MAIN CONTENT --- */
.main-content { padding: 2rem; overflow-y: auto; position: relative; padding-bottom: 100px; /* Space for mobile nav */ }
.view { display: none; animation: fadeUp 0.4s ease; }
.view.active-view { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.view-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }
.header-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Search & Toggles */
.search-box {
    display: flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, 0.1);
    padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.1);
}
.search-box input { background: transparent; border: none; outline: none; color: white; width: 150px; }
.view-toggles { display: flex; background: rgba(0,0,0,0.2); padding: 4px; border-radius: 10px; }
.icon-btn { background: none; border: none; color: var(--text-light); padding: 8px; border-radius: 8px; cursor: pointer; transition: 0.2s; }
.icon-btn.active { background: var(--primary); color: white; }

/* --- 4. LIST VIEW (NEW) --- */
.list-container { background: var(--card-bg); border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.1); overflow: hidden; }
.list-header-row {
    display: grid; grid-template-columns: 2fr 1.5fr 1fr 1fr 1fr; padding: 1rem;
    background: rgba(0,0,0,0.2); font-weight: 600; color: var(--text-light);
}
.list-row {
    display: grid; grid-template-columns: 2fr 1.5fr 1fr 1fr 1fr; padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05); align-items: center; transition: 0.2s;
}
.list-row:hover { background: rgba(255,255,255,0.05); }
.hidden { display: none; }

/* --- 5. KANBAN & CARDS --- */
.kanban-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.kanban-column { background: rgba(0,0,0,0.2); padding: 1rem; border-radius: var(--radius); min-height: 400px; border: 1px solid rgba(255,255,255,0.05); }

.column-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.header-title { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot.blue { background: var(--blue-accent); }
.dot.orange { background: var(--orange-accent); }
.dot.green { background: var(--green-accent); }

.candidate-card {
    background: rgba(255,255,255,0.08); backdrop-filter: blur(10px);
    padding: 1rem; border-radius: 12px; margin-bottom: 1rem; border: 1px solid rgba(255,255,255,0.1);
    cursor: grab; transition: 0.2s; position: relative; box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.candidate-card:active { cursor: grabbing; transform: scale(0.98); }
.candidate-card.dragging { opacity: 0.5; border: 2px dashed var(--primary); transform: scale(0.95); }

.card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.5rem; }
.avatar { width: 32px; height: 32px; background: linear-gradient(135deg, #6366F1, #818CF8); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; }
.star-rating { color: var(--orange-accent); font-size: 0.8rem; letter-spacing: 2px; }

.move-controls { display: flex; gap: 5px; margin-top: 10px; }
.mini-btn { flex: 1; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: var(--text-light); padding: 5px; border-radius: 6px; cursor: pointer; font-size: 0.75rem; }
.mini-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* --- 6. MOBILE BOTTOM NAV (NEW) --- */
.mobile-bottom-nav {
    display: none; position: fixed; bottom: 0; left: 0; width: 100%;
    background: rgba(15, 23, 42, 0.95); backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 0.8rem; justify-content: space-around; z-index: 50;
}
.mobile-bottom-nav .nav-btn { flex-direction: column; padding: 0; gap: 4px; font-size: 0.7rem; justify-content: center; }
.mobile-bottom-nav .nav-btn i { font-size: 1.4rem; }

/* --- 7. RESPONSIVENESS & RIPPLE --- */
.ripple { position: relative; overflow: hidden; }
.ripple::after {
    content: ""; position: absolute; background: rgba(255,255,255,0.3);
    width: 100px; height: 100px; border-radius: 50%; transform: scale(0); opacity: 0;
    pointer-events: none; transition: transform 0.5s, opacity 1s;
}
.ripple:active::after { transform: scale(4); opacity: 1; transition: 0s; }

/* Mobile Query */
@media (max-width: 768px) {
    .app-container { grid-template-columns: 1fr; }
    .sidebar { display: none; } /* Hide Sidebar */
    .mobile-bottom-nav { display: flex; } /* Show Bottom Nav */
    .kanban-grid { grid-template-columns: 1fr; }
    
    /* List View adjustments for mobile */
    .list-header-row, .list-row { grid-template-columns: 1fr 1fr; gap: 10px; font-size: 0.85rem; }
    .list-header-row span:nth-child(3), .list-header-row span:nth-child(4),
    .list-row span:nth-child(3), .list-row span:nth-child(4) { display: none; } 
    
    .view-header { flex-direction: column; align-items: flex-start; }
    .header-actions { width: 100%; justify-content: space-between; }
    .search-box { flex-grow: 1; }
}

/* --- 8. UTILS --- */
.btn-primary { background: var(--primary); color: white; border: none; padding: 10px 20px; border-radius: 10px; cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 600; }
.count-badge { background: rgba(255,255,255,0.1); padding: 2px 8px; border-radius: 10px; font-size: 0.8rem; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.stat-card { background: var(--card-bg); padding: 1.5rem; border-radius: 16px; border: 1px solid rgba(255,255,255,0.1); display: flex; gap: 1rem; align-items: center; }
.stat-num { font-size: 1.5rem; font-weight: 700; }
.icon-box { width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.purple { background: rgba(99, 102, 241, 0.2); color: #a5b4fc; }
.green { background: rgba(52, 211, 153, 0.2); color: #6ee7b7; }
.orange { background: rgba(251, 191, 36, 0.2); color: #fcd34d; }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: 0.3s; z-index: 100; }
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-content { background: #1e293b; padding: 2rem; border-radius: 16px; width: 90%; max-width: 400px; border: 1px solid rgba(255,255,255,0.2); }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 5px; color: var(--text-light); font-size: 0.9rem; }
.form-group input, .form-group select { width: 100%; padding: 10px; background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.1); color: white; border-radius: 8px; outline: none; }
.full-width { width: 100%; justify-content: center; }
.close-btn { background: none; border: none; color: white; font-size: 1.2rem; cursor: pointer; }
.modal-header { display: flex; justify-content: space-between; margin-bottom: 1rem; }

.toast-container { position: fixed; top: 20px; right: 20px; z-index: 1000; }
.toast { background: rgba(30,41,59,0.9); color: white; padding: 12px 20px; border-radius: 8px; margin-bottom: 10px; border-left: 4px solid var(--primary); animation: slideIn 0.3s; box-shadow: 0 4px 10px rgba(0,0,0,0.3); }
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
