/* ============================================================
   Job Hunt CMS — Dark Modern UI
   ============================================================ */
:root {
    --bg:       #0f172a;
    --panel:    #1e293b;
    --panel-2:  #273347;
    --border:   #334155;
    --text:     #e2e8f0;
    --muted:    #94a3b8;
    --accent:   #22d3ee;
    --accent-h: #06b6d4;
    --primary:  #6366f1;
    --success:  #10b981;
    --warn:     #f59e0b;
    --danger:   #ef4444;
    --new:      #ec4899;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.55;
    font-size: 15px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-h); }

h1, h2, h3 { margin: 0 0 16px; line-height: 1.2; }
h1 { font-size: 28px; font-weight: 700; }
h2 { font-size: 20px; font-weight: 600; }
h3 { font-size: 16px; font-weight: 600; }

code {
    background: #0f172a;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: "SF Mono", Monaco, Consolas, monospace;
    font-size: 13px;
}

.muted { color: var(--muted); }
.tiny  { font-size: 12px; }

/* ============================================================
   AUTH (login page)
   ============================================================ */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top, #1e293b, var(--bg));
    padding: 20px;
}
.auth-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.auth-logo { font-size: 56px; margin-bottom: 12px; }
.auth-card form { text-align: left; margin-top: 24px; }
.auth-card label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--muted);
    margin: 12px 0 6px;
    font-weight: 600;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 240px;
    background: var(--panel);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 24px 0;
}
.sb-logo {
    padding: 0 24px 24px;
    font-size: 18px;
    font-weight: 700;
    border-bottom: 1px solid var(--border);
}
.sb-nav { padding: 12px 0; flex: 1; }
.sb-nav a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 24px;
    color: var(--muted);
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all .15s;
}
.sb-nav a:hover { background: var(--panel-2); color: var(--text); }
.sb-nav a.active {
    background: var(--panel-2);
    color: var(--accent);
    border-left-color: var(--accent);
}
.sb-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}

.main {
    margin-left: 240px;
    padding: 32px 40px;
    min-height: 100vh;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}
.topbar h1 { margin: 0; }

/* ============================================================
   STATS CARDS
   ============================================================ */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.stat {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}
.stat-v { font-size: 32px; font-weight: 700; }
.stat-l { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .5px; }
.stat.new .stat-v { color: var(--new); }
.stat.applied .stat-v { color: var(--success); }

/* ============================================================
   FILTERS
   ============================================================ */
.filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    background: var(--panel);
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 24px;
}
.filters input[type=text] { flex: 1; min-width: 240px; }

/* ============================================================
   INPUTS / BUTTONS
   ============================================================ */
input[type=text], input[type=password], input[type=email],
select, textarea {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    transition: border-color .15s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.btn {
    background: var(--panel-2);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all .15s;
}
.btn:hover { background: var(--panel); border-color: var(--accent); }
.btn-primary {
    background: var(--accent);
    color: #0f172a;
    border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-h); border-color: var(--accent-h); color: #fff; }
.btn-ghost { background: transparent; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; }

/* ============================================================
   JOB CARDS
   ============================================================ */
.jobs { display: flex; flex-direction: column; gap: 12px; }
.job {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    transition: border-color .2s, transform .15s;
}
.job:hover { border-color: var(--accent); }
.job h3 { margin: 0 0 8px; font-size: 16px; }
.job h3 a { color: var(--text); }
.job h3 a:hover { color: var(--accent); }

.job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 10px;
}
.job-desc {
    color: var(--muted);
    font-size: 13px;
    margin: 12px 0;
    line-height: 1.6;
}
.job-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    margin-left: 8px;
    vertical-align: middle;
}
.tag-new     { background: var(--new); color: #fff; }
.tag-applied { background: var(--success); color: #fff; }
.tag-saved   { background: var(--warn); color: #000; }

.source-pill {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    background: var(--panel-2);
    border: 1px solid var(--border);
}
.src-indeed    { background: #003a9b; color: #fff; border-color: #003a9b; }
.src-linkedin  { background: #0a66c2; color: #fff; border-color: #0a66c2; }
.src-stepstone { background: #0050a0; color: #fff; border-color: #0050a0; }
.src-xing      { background: #026466; color: #fff; border-color: #026466; }
.src-kununu    { background: #09aa4e; color: #fff; border-color: #09aa4e; }

/* ============================================================
   CARDS / TABLES
   ============================================================ */
.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}

.table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.table th, .table td { padding: 12px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
.table th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.table tr:last-child td { border-bottom: 0; }

.pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}
.pill-ok   { background: rgba(16,185,129,.15); color: var(--success); }
.pill-bad  { background: rgba(239,68,68,.15); color: var(--danger); }
.pill-warn { background: rgba(245,158,11,.15); color: var(--warn); }

.badge {
    background: var(--new);
    color: #fff;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}

/* ============================================================
   SWITCH TOGGLE
   ============================================================ */
.switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; cursor: pointer; inset: 0;
    background: var(--border);
    transition: .2s;
    border-radius: 22px;
}
.slider::before {
    position: absolute;
    content: "";
    height: 16px; width: 16px;
    left: 3px; bottom: 3px;
    background: #fff;
    transition: .2s;
    border-radius: 50%;
}
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(18px); }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty {
    text-align: center;
    padding: 80px 20px;
    background: var(--panel);
    border: 1px dashed var(--border);
    border-radius: 12px;
}
.empty-icon { font-size: 64px; margin-bottom: 16px; }

/* ============================================================
   UTILS
   ============================================================ */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}
.alert-error { background: rgba(239,68,68,.1); color: #fca5a5; border: 1px solid rgba(239,68,68,.3); }
.alert-success { background: rgba(16,185,129,.1); color: #6ee7b7; border: 1px solid rgba(16,185,129,.3); }

.codeblock {
    background: #0b1220;
    border: 1px solid var(--border);
    padding: 14px;
    border-radius: 8px;
    font-family: "SF Mono", Monaco, Consolas, monospace;
    font-size: 13px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    margin: 12px 0;
}

.setting-row {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.setting-row:last-child { border-bottom: 0; }

.inline-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.inline-form input { flex: 1; }

.pagination {
    display: flex;
    gap: 6px;
    margin-top: 24px;
    justify-content: center;
    flex-wrap: wrap;
}
.pagination a {
    padding: 8px 12px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--muted);
    font-weight: 600;
}
.pagination a.active { background: var(--accent); color: #0f172a; border-color: var(--accent); }

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--panel);
    border: 1px solid var(--accent);
    padding: 12px 20px;
    border-radius: 8px;
    transform: translateY(100px);
    opacity: 0;
    transition: all .3s;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0,0,0,.5);
    max-width: 340px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { border-color: var(--danger); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); transition: transform .25s; z-index: 100; }
    .sidebar.open { transform: translateX(0); }
    .main { margin-left: 0; padding: 20px; }
    .filters input[type=text] { min-width: 100%; }
}
/* ============================================================
   v1.1 additions — APPEND these to the end of your style.css
   ============================================================ */

.keywords-banner {
    background: linear-gradient(135deg, rgba(34,211,238,.08), rgba(99,102,241,.08));
    border-color: var(--accent);
}

.keyword-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 16px;
    background: var(--panel-2);
    border: 1px solid var(--border);
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
}

.keyword-match {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(34,211,238,.1);
    color: var(--accent);
    font-size: 11px;
    font-weight: 600;
}
