/* ===========================================================
   Portal Lowongan Kerja Fakfak - Stylesheet
   =========================================================== */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #10b981;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

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

.container { max-width: 1100px; margin: 0 auto; padding: 30px 20px; }

/* ---------- Navbar ---------- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.logo { font-size: 1.4rem; font-weight: 700; color: var(--text); }
.logo span { color: var(--primary); }
.nav-links { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.nav-links a { color: var(--text); font-weight: 500; }
.user-greeting { color: var(--text-muted); font-size: 0.9rem; }
.notif-link { position: relative; }
.badge {
    background: var(--danger); color: #fff; font-size: 0.7rem;
    padding: 2px 6px; border-radius: 10px; margin-left: 4px;
}

/* ---------- Buttons ---------- */
.btn-primary, .btn-secondary, .btn-outline, .btn-primary-small, .btn-outline-small {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
    text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; }
.btn-primary:disabled { background: #94a3b8; cursor: not-allowed; }
.btn-secondary { background: var(--secondary); color: #fff; margin-top: 12px; }
.btn-outline { background: transparent; border: 1px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; text-decoration: none; }
.btn-primary-small { background: var(--primary); color: #fff; padding: 6px 14px; font-size: 0.85rem; }
.btn-outline-small { border: 1px solid var(--border); padding: 6px 14px; font-size: 0.85rem; border-radius: 8px; color: var(--text); }

/* ---------- Hero / Search ---------- */
.hero {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    text-align: center;
    padding: 60px 20px;
}
.hero h1 { font-size: 1.9rem; margin-bottom: 10px; }
.hero p { opacity: 0.9; margin-bottom: 25px; }
.search-form {
    display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
    max-width: 700px; margin: 0 auto 15px;
}
.search-form input, .search-form select {
    padding: 12px 15px; border-radius: 8px; border: none; font-size: 0.95rem;
}
.search-form input { flex: 1; min-width: 220px; }

/* ---------- Forms (auth & general) ---------- */
.auth-container {
    display: flex; justify-content: center; align-items: center;
    min-height: 90vh; padding: 20px;
}
.auth-card, .form-container {
    background: var(--card-bg); padding: 35px; border-radius: 14px;
    max-width: 460px; width: 100%; box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.form-container { max-width: 700px; margin: 0 auto; }
.auth-card h1, .form-container h1 { margin-bottom: 5px; }
.subtitle { color: var(--text-muted); margin-bottom: 20px; }

form label { display: block; margin-top: 15px; margin-bottom: 6px; font-weight: 600; font-size: 0.9rem; }
form input[type=text], form input[type=email], form input[type=password],
form input[type=number], form input[type=date], form select, form textarea {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border);
    border-radius: 8px; font-size: 0.95rem; font-family: inherit;
}
form small { color: var(--text-muted); display: block; margin-top: 4px; font-size: 0.8rem; }
form button.btn-primary { margin-top: 20px; width: 100%; padding: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

.role-toggle { display: flex; gap: 15px; margin-bottom: 10px; }
.role-toggle label { display: flex; align-items: center; gap: 6px; font-weight: 400; margin: 0; }

.switch-link { text-align: center; margin-top: 18px; font-size: 0.9rem; }

/* ---------- Alerts ---------- */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 15px; font-size: 0.9rem; }
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-info { background: #dbeafe; color: #1e40af; }

/* ---------- Job cards ---------- */
.job-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px; margin-top: 20px;
}
.job-card {
    background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px;
    padding: 20px; position: relative;
}
.job-card h3 { margin-bottom: 6px; }
.instansi { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 4px; }
.tipe-kerja { display: inline-block; background: #eff6ff; color: var(--primary); padding: 2px 10px; border-radius: 20px; font-size: 0.8rem; margin-bottom: 8px; }
.gaji { font-weight: 600; margin-bottom: 4px; }
.deadline { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 12px; }
.empty-state { color: var(--text-muted); padding: 40px 0; text-align: center; }

/* ---------- Match score badges ---------- */
.match-score, .match-score-box {
    display: inline-block; padding: 4px 12px; border-radius: 20px;
    font-size: 0.8rem; font-weight: 700; margin-bottom: 10px;
}
.match-high { background: #dcfce7; color: #166534; }
.match-mid { background: #fef9c3; color: #854d0e; }
.match-low { background: #fee2e2; color: #991b1b; }
.match-score-box { font-size: 0.95rem; padding: 8px 16px; }

/* ---------- Detail page ---------- */
.detail-container { max-width: 800px; }
.back-link { display: inline-block; margin-bottom: 15px; }
.detail-card { background: var(--card-bg); border-radius: 14px; padding: 30px; border: 1px solid var(--border); }
.detail-card h1 { margin-bottom: 6px; }
.instansi-name { color: var(--text-muted); margin-bottom: 14px; }
.detail-meta { display: flex; gap: 15px; flex-wrap: wrap; margin-bottom: 20px; font-size: 0.9rem; color: var(--text-muted); }
.detail-card h2 { margin-top: 25px; margin-bottom: 8px; font-size: 1.1rem; }

/* ---------- Tables ---------- */
.data-table { width: 100%; border-collapse: collapse; margin-top: 15px; background: var(--card-bg); border-radius: 10px; overflow: hidden; }
.data-table th, .data-table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.data-table th { background: #f1f5f9; font-weight: 600; }

.status-badge { padding: 3px 10px; border-radius: 20px; font-size: 0.78rem; font-weight: 600; }
.status-terkirim { background: #e0f2fe; color: #075985; }
.status-dilihat { background: #fef9c3; color: #854d0e; }
.status-diproses { background: #fef3c7; color: #92400e; }
.status-diterima { background: #dcfce7; color: #166534; }
.status-ditolak { background: #fee2e2; color: #991b1b; }
.status-aktif { background: #dcfce7; color: #166534; }
.status-menunggu_verifikasi { background: #fef9c3; color: #854d0e; }
.status-ditutup { background: #e2e8f0; color: #475569; }

/* ---------- Pelamar cards (instansi view) ---------- */
.pelamar-list { display: flex; flex-direction: column; gap: 15px; margin-top: 20px; }
.pelamar-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.pelamar-card h3 { margin-bottom: 6px; }
.inline-form { display: flex; gap: 10px; margin-top: 12px; align-items: center; }
.inline-form select { padding: 8px; border-radius: 8px; border: 1px solid var(--border); }

/* ---------- Notifikasi ---------- */
.notif-list { display: flex; flex-direction: column; gap: 12px; margin-top: 15px; }
.notif-item { background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; padding: 15px; }
.notif-item small { color: var(--text-muted); display: block; margin: 6px 0; }

/* ---------- Admin stats ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 15px; margin: 20px 0 35px; }
.stat-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 20px; text-align: center; }
.stat-number { display: block; font-size: 2rem; font-weight: 700; color: var(--primary); }

.page-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }

/* ---------- Footer ---------- */
.footer { text-align: center; padding: 25px; color: var(--text-muted); font-size: 0.85rem; border-top: 1px solid var(--border); margin-top: 40px; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .navbar { flex-direction: column; align-items: flex-start; gap: 10px; }
    .hero h1 { font-size: 1.4rem; }
    .grid-2 { grid-template-columns: 1fr; }
}
