/* === JobHunter — Clean minimal dark sidebar theme === */

:root {
    --bg: #f5f6fa;
    --sidebar-bg: #1e1e2e;
    --sidebar-text: #cdd6f4;
    --sidebar-active: #89b4fa;
    --card-bg: #ffffff;
    --text: #1e1e2e;
    --text-muted: #6c7086;
    --primary: #1e66f5;
    --primary-hover: #1a5cdb;
    --success: #40a02b;
    --warning: #df8e1d;
    --danger: #d20f39;
    --info: #04a5e5;
    --border: #dce0e8;
    --radius: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 240px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 1.5rem 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.sidebar .logo {
    font-size: 1.4rem;
    font-weight: 700;
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: #fff;
}

.sidebar .logo span { color: var(--sidebar-active); }

.sidebar nav { margin-top: 1rem; }

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.2s, color 0.2s;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: rgba(137, 180, 250, 0.1);
    color: var(--sidebar-active);
}

.sidebar nav a .icon { font-size: 1.1rem; width: 20px; text-align: center; }

/* Main content */
.main {
    margin-left: 240px;
    flex: 1;
    padding: 2rem;
    min-height: 100vh;
}

.page-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* Cards */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.card-value {
    font-size: 2rem;
    font-weight: 700;
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
    font-weight: 500;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-success { background: var(--success); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-info { background: var(--info); color: #fff; }
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.8rem; }
.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}
.btn-outline:hover { background: var(--bg); }

/* Tables */
.table-wrap { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--bg);
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
}

tr:hover { background: #f8f9fe; }

/* Badges */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-new { background: #dce8ff; color: var(--primary); }
.badge-indeed { background: #e8d5f5; color: #6c3d94; }
.badge-hellowork { background: #d5f0e8; color: #1a6b4a; }
.badge-freelancinfo { background: #fff3d5; color: #8a6d1b; }
.badge-linkedin { background: #d5e8f5; color: #0a66c2; }
.badge-cdi { background: #d5f0e8; color: #1a6b4a; }
.badge-cdd { background: #fff3d5; color: #8a6d1b; }
.badge-freelance { background: #e8d5f5; color: #6c3d94; }
.badge-mission { background: #d5e8f5; color: #0a66c2; }

/* Status badges */
.badge-spotted { background: #dce8ff; color: var(--primary); }
.badge-applied { background: #d5f0e8; color: var(--success); }
.badge-waiting { background: #fff3d5; color: var(--warning); }
.badge-interview { background: #e8d5f5; color: #6c3d94; }
.badge-rejected { background: #fdd; color: var(--danger); }
.badge-offer { background: #d5f0e8; color: var(--success); font-weight: 700; }

/* Kanban */
.kanban {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    align-items: start;
}

.kanban-col {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    min-height: 200px;
}

.kanban-col-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kanban-col-title .count {
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.kanban-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem;
    margin-bottom: 0.5rem;
}

.kanban-card h4 {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.kanban-card .meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Filters bar */
.filters {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.filters select, .filters input {
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    background: #fff;
}

/* Detail page */
.job-detail { max-width: 800px; }
.job-detail h1 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.job-detail .meta { color: var(--text-muted); margin-bottom: 1rem; }
.job-detail .description {
    white-space: pre-wrap;
    line-height: 1.6;
    margin: 1rem 0;
    padding: 1rem;
    background: var(--bg);
    border-radius: var(--radius);
}

.job-detail .actions { margin-top: 1.5rem; display: flex; gap: 0.5rem; }

/* Reminders */
.reminder-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
}

.reminder-item .message { flex: 1; }
.reminder-item .date { color: var(--text-muted); font-size: 0.85rem; margin-right: 1rem; }

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.3rem; font-size: 0.9rem; }
.form-group textarea, .form-group input, .form-group select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
}

/* Scrape button */
.scrape-status { margin-top: 0.5rem; font-size: 0.9rem; color: var(--text-muted); }

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        display: flex;
        flex-wrap: wrap;
        padding: 0.75rem;
    }
    .sidebar .logo { border-bottom: none; padding: 0.5rem 1rem; }
    .sidebar nav { display: flex; flex-wrap: wrap; margin-top: 0; }
    .sidebar nav a { padding: 0.5rem 0.75rem; font-size: 0.85rem; }
    .main { margin-left: 0; padding: 1rem; }
    body { flex-direction: column; }
    .kanban { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Links */
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Status select in kanban */
.status-form {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.3rem;
}

.status-form select { font-size: 0.8rem; padding: 0.2rem 0.4rem; }
.status-form button { font-size: 0.75rem; }
