/* ============================================================
   JobMap GIS - Premium CSS
   ============================================================ */

:root {
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --primary-light: #818cf8;
    --secondary: #06b6d4;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --dark: #0f172a;
    --darker: #020617;
    --card-bg: rgba(255, 255, 255, 0.05);
    --glass: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.12);
    --text-muted: #94a3b8;
    --gradient-primary: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0e7490 100%);
    --shadow: 0 20px 60px rgba(0,0,0,0.3);
    --shadow-sm: 0 4px 20px rgba(0,0,0,0.15);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--darker);
    color: #e2e8f0;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--darker); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* Navbar */
#mainNavbar {
    background: rgba(15, 23, 42, 0.85) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 12px 0;
    transition: var(--transition);
}
#mainNavbar.scrolled {
    background: rgba(15, 23, 42, 0.98) !important;
    box-shadow: 0 4px 30px rgba(0,0,0,0.4);
}
.brand-icon {
    width: 38px; height: 38px;
    background: var(--gradient-primary);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; color: white;
}
.brand-icon-sm {
    width: 30px; height: 30px;
    background: var(--gradient-primary);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; color: white;
}
.navbar-brand span { font-size: 1.25rem; }
.nav-link {
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    color: #cbd5e1 !important;
}
.nav-link:hover, .nav-link.active {
    background: rgba(79,70,229,0.2);
    color: white !important;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    background: var(--gradient-hero);
    position: relative;
    display: flex; align-items: center;
    overflow: hidden;
    padding-top: 70px;
}
.hero-bg-animation {
    position: absolute; inset: 0; z-index: 0;
    background:
        radial-gradient(ellipse 800px 600px at 20% 50%, rgba(79,70,229,0.15) 0%, transparent 60%),
        radial-gradient(ellipse 600px 400px at 80% 20%, rgba(6,182,212,0.12) 0%, transparent 60%),
        radial-gradient(ellipse 400px 300px at 60% 80%, rgba(245,158,11,0.08) 0%, transparent 60%);
    animation: bgPulse 8s ease-in-out infinite alternate;
}
@keyframes bgPulse {
    0%   { opacity: 0.6; }
    100% { opacity: 1; }
}
.hero-content { position: relative; z-index: 1; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(79,70,229,0.2);
    border: 1px solid rgba(79,70,229,0.4);
    border-radius: 50px;
    padding: 6px 16px;
    font-size: 0.8rem; color: var(--primary-light);
    margin-bottom: 1.5rem;
    animation: fadeInDown 0.6s ease;
}
.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.7s ease;
}
.hero-title .highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-desc {
    font-size: 1.1rem; color: #94a3b8;
    max-width: 520px;
    margin-bottom: 2.5rem;
    animation: fadeInUp 0.8s ease;
}

/* Search Box */
.search-box {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 8px 8px 8px 20px;
    display: flex; align-items: center; gap: 8px;
    animation: fadeInUp 0.9s ease;
    max-width: 600px;
}
.search-box input {
    background: transparent;
    border: none; outline: none;
    color: white; flex: 1;
    font-size: 1rem;
    padding: 6px 0;
}
.search-box input::placeholder { color: #64748b; }
.search-box .btn-search {
    background: var(--gradient-primary);
    border: none; color: white;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
}
.search-box .btn-search:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(79,70,229,0.4);
}
.hero-stats { display: flex; gap: 2rem; margin-top: 2rem; animation: fadeInUp 1s ease; }
.hero-stat strong { display: block; font-size: 1.8rem; font-weight: 700; color: white; }
.hero-stat span { font-size: 0.8rem; color: #94a3b8; }

/* Stats Section */
.stat-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    position: relative; overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--gradient-primary);
}
.stat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.stat-icon {
    width: 60px; height: 60px;
    background: rgba(79,70,229,0.15);
    border-radius: 15px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: var(--primary-light);
    margin: 0 auto 1rem;
}
.stat-number { font-size: 2.5rem; font-weight: 800; color: white; }
.stat-label { color: var(--text-muted); font-size: 0.9rem; }

/* Job Card */
.job-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: var(--transition);
    cursor: pointer; height: 100%;
    position: relative; overflow: hidden;
    text-decoration: none; display: block; color: inherit;
}
.job-card::before {
    content: ''; position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(79,70,229,0.05), transparent);
    transition: var(--transition);
}
.job-card:hover::before { left: 100%; }
.job-card:hover {
    border-color: rgba(79,70,229,0.5);
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(79,70,229,0.2);
    color: inherit;
}
.company-logo {
    width: 50px; height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; color: white; flex-shrink: 0;
}
.job-card .job-title {
    font-size: 1rem; font-weight: 600; color: white;
    transition: color 0.2s;
}
.job-card:hover .job-title { color: var(--primary-light); }
.job-card .company-name { font-size: 0.85rem; color: #94a3b8; }
.badge-type {
    font-size: 0.7rem; padding: 3px 10px; border-radius: 50px;
    font-weight: 600;
}
.badge-fulltime   { background: rgba(16,185,129,0.15); color: #34d399; border: 1px solid rgba(16,185,129,0.3); }
.badge-parttime   { background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }
.badge-remote     { background: rgba(6,182,212,0.15); color: #22d3ee; border: 1px solid rgba(6,182,212,0.3); }
.badge-contract   { background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
.badge-internship { background: rgba(168,85,247,0.15); color: #c084fc; border: 1px solid rgba(168,85,247,0.3); }
.salary-range { font-size: 0.85rem; color: #34d399; font-weight: 600; }

/* Category Cards */
.category-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
    text-decoration: none; display: block; color: inherit;
}
.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(79,70,229,0.5);
    box-shadow: 0 10px 30px rgba(79,70,229,0.2);
    color: inherit;
}
.cat-icon {
    width: 60px; height: 60px;
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; margin: 0 auto 1rem;
}
.cat-icon-1 { background: rgba(79,70,229,0.2); color: #818cf8; }
.cat-icon-2 { background: rgba(16,185,129,0.2); color: #34d399; }
.cat-icon-3 { background: rgba(245,158,11,0.2); color: #fbbf24; }
.cat-icon-4 { background: rgba(6,182,212,0.2); color: #22d3ee; }
.cat-icon-5 { background: rgba(239,68,68,0.2); color: #f87171; }

/* Section styling */
.section-dark { background: var(--darker); padding: 80px 0; }
.section-darker { background: #050c1a; padding: 80px 0; }
.section-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 800;
    color: white;
}
.section-subtitle { color: var(--text-muted); font-size: 1rem; }
.section-line {
    width: 50px; height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
    margin: 10px 0;
}

/* Map Container */
#map, #mapFull, #mapDetail, #mapMini {
    border-radius: var(--radius);
    border: 1px solid var(--glass-border);
}
.map-container { position: relative; }
.map-overlay {
    position: absolute; top: 15px; right: 15px; z-index: 999;
    background: rgba(15,23,42,0.85);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.8rem; color: #94a3b8;
}
.leaflet-popup-content-wrapper {
    background: rgba(15,23,42,0.95) !important;
    color: white !important;
    border: 1px solid rgba(79,70,229,0.4) !important;
    border-radius: 12px !important;
    backdrop-filter: blur(10px);
}
.leaflet-popup-tip { background: rgba(15,23,42,0.95) !important; }

/* Filter Sidebar */
.filter-sidebar {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    position: sticky; top: 90px;
}
.filter-title { font-size: 0.9rem; font-weight: 600; color: white; margin-bottom: 12px; }
.form-control, .form-select {
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid var(--glass-border) !important;
    color: #e2e8f0 !important;
    border-radius: var(--radius-sm) !important;
    font-size: 0.9rem;
}
.form-control:focus, .form-select:focus {
    background: rgba(255,255,255,0.08) !important;
    border-color: rgba(79,70,229,0.5) !important;
    box-shadow: 0 0 0 3px rgba(79,70,229,0.15) !important;
    color: white !important;
}
.form-control::placeholder { color: #64748b !important; }
.form-select option { background: #1e293b; color: #e2e8f0; }

/* Buttons */
.btn-primary-custom {
    background: var(--gradient-primary);
    border: none; color: white;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: var(--transition);
    padding: 10px 24px;
}
.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79,70,229,0.4);
    color: white;
}
.btn-outline-custom {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: #94a3b8;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.btn-outline-custom:hover {
    border-color: var(--primary);
    color: var(--primary-light);
    background: rgba(79,70,229,0.1);
}

/* Detail Page */
.detail-header {
    background: linear-gradient(135deg, rgba(79,70,229,0.15) 0%, rgba(6,182,212,0.1) 100%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 2rem;
}
.detail-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.5rem;
}
.info-item {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.info-item:last-child { border-bottom: none; }
.info-icon {
    width: 36px; height: 36px;
    background: rgba(79,70,229,0.15);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary-light); font-size: 0.85rem; flex-shrink: 0;
}

/* Admin Layout */
.admin-wrapper { display: flex; min-height: 100vh; background: #050c1a; }
.admin-sidebar {
    width: 260px; flex-shrink: 0;
    background: rgba(15,23,42,0.95);
    border-right: 1px solid var(--glass-border);
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
    display: flex; flex-direction: column;
}
.admin-main { flex: 1; padding: 2rem; overflow: auto; }
.sidebar-brand {
    padding: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}
.sidebar-nav { padding: 1rem 0; flex: 1; }
.sidebar-nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 20px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem; font-weight: 500;
    transition: var(--transition);
    border-radius: 8px; margin: 2px 12px;
}
.sidebar-nav-item:hover, .sidebar-nav-item.active {
    background: rgba(79,70,229,0.15);
    color: #a5b4fc;
}
.sidebar-nav-item .nav-icon {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(79,70,229,0.1);
    border-radius: 8px; font-size: 0.85rem; color: var(--primary-light);
}
.sidebar-section-title {
    font-size: 0.7rem; font-weight: 700;
    color: #475569; letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 8px 20px 4px;
}

/* Admin Cards */
.admin-stat-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: var(--transition);
}
.admin-stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.admin-page-title { font-size: 1.5rem; font-weight: 700; color: white; }

/* Table */
.table-dark-custom {
    background: transparent;
    color: #e2e8f0;
}
.table-dark-custom thead tr {
    background: rgba(79,70,229,0.1);
}
.table-dark-custom thead th {
    color: #94a3b8; font-size: 0.8rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.5px;
    border-color: var(--glass-border); padding: 12px 16px;
}
.table-dark-custom tbody tr {
    border-color: rgba(255,255,255,0.04);
    transition: background 0.2s;
}
.table-dark-custom tbody tr:hover { background: rgba(79,70,229,0.06); }
.table-dark-custom td { padding: 12px 16px; vertical-align: middle; font-size: 0.9rem; border-color: rgba(255,255,255,0.04); }
.table-container {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius); overflow: hidden;
}

/* Status Badge */
.status-aktif    { background: rgba(16,185,129,0.15); color: #34d399; border: 1px solid rgba(16,185,129,0.3); border-radius: 50px; padding: 3px 12px; font-size: 0.75rem; font-weight: 600; }
.status-nonaktif { background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.3); border-radius: 50px; padding: 3px 12px; font-size: 0.75rem; font-weight: 600; }

/* Footer */
.footer { background: #050c1a; border-top: 1px solid var(--glass-border); }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: #64748b; text-decoration: none; font-size: 0.85rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--primary-light); }
.social-link {
    width: 36px; height: 36px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: #94a3b8; text-decoration: none;
    transition: var(--transition);
}
.social-link:hover { background: rgba(79,70,229,0.2); color: var(--primary-light); border-color: rgba(79,70,229,0.4); }

/* Login Page */
.login-wrapper {
    min-height: 100vh;
    background: var(--gradient-hero);
    display: flex; align-items: center; justify-content: center;
    padding: 2rem;
}
.login-card {
    background: rgba(15,23,42,0.8);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    width: 100%; max-width: 420px;
}

/* Animations */
@keyframes fadeInDown { from { opacity:0; transform:translateY(-20px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeInUp   { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn     { from { opacity:0; } to { opacity:1; } }
@keyframes float      { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-15px); } }

.animate-fadeInUp { animation: fadeInUp 0.6s ease both; }
.animate-delay-1  { animation-delay: 0.1s; }
.animate-delay-2  { animation-delay: 0.2s; }
.animate-delay-3  { animation-delay: 0.3s; }
.animate-delay-4  { animation-delay: 0.4s; }

/* Boyer Moore info box */
.algorithm-info {
    background: rgba(79,70,229,0.1);
    border: 1px solid rgba(79,70,229,0.3);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 0.85rem; color: #a5b4fc;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-sidebar { width: 220px; }
    .hero-stats { gap: 1rem; }
    .hero-stat strong { font-size: 1.3rem; }
    .search-box { flex-wrap: wrap; }
    .search-box .btn-search { width: 100%; }
}
@media (max-width: 576px) {
    .admin-wrapper { flex-direction: column; }
    .admin-sidebar { width: 100%; height: auto; position: relative; }
    .admin-main { padding: 1rem; }
}

/* ── Leaflet Custom Popup ── */
.custom-popup .leaflet-popup-content-wrapper {
    background: rgba(15,23,42,0.97) !important;
    color: #e2e8f0 !important;
    border: 1px solid rgba(79,70,229,0.45) !important;
    border-radius: 14px !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6) !important;
    padding: 14px !important;
    backdrop-filter: blur(10px);
}
.custom-popup .leaflet-popup-content {
    margin: 0 !important;
    line-height: 1.5;
}
.custom-popup .leaflet-popup-tip-container .leaflet-popup-tip {
    background: rgba(15,23,42,0.97) !important;
}
.custom-popup .leaflet-popup-close-button {
    color: #94a3b8 !important;
    font-size: 1.1rem !important;
    padding: 6px 8px !important;
}
.custom-popup .leaflet-popup-close-button:hover { color: white !important; }

/* Leaflet zoom control dark */
.leaflet-control-zoom a {
    background: rgba(15,23,42,0.9) !important;
    color: #e2e8f0 !important;
    border-color: rgba(255,255,255,.1) !important;
}
.leaflet-control-zoom a:hover {
    background: rgba(79,70,229,0.3) !important;
    color: white !important;
}

/* Leaflet attribution dark */
.leaflet-control-attribution {
    background: rgba(15,23,42,0.7) !important;
    color: #64748b !important;
    font-size: .68rem !important;
    backdrop-filter: blur(4px);
}
.leaflet-control-attribution a { color: #818cf8 !important; }

/* Legend peta */
.map-legend {
    background: rgba(15,23,42,0.92);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: .78rem;
    color: #94a3b8;
    line-height: 1.8;
}
.map-legend-dot {
    display: inline-block;
    width: 12px; height: 12px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}
