/* ===============================
   GLOBAL RESET & CREAMY VARIABLES
================================ */
:root {
    --bg-main: #FAF8F5;          /* Warm Cream Background */
    --bg-card: #FFFFFF;
    --bg-soft-cream: #F3EFEA;    /* Soft Cream Highlight */
    --primary-accent: #2563EB;   /* Royal Blue Accent */
    --primary-hover: #1D4ED8;
    --text-dark: #0F172A;        /* Dark Slate */
    --text-muted: #64748B;
    --border-color: #E2E8F0;
    --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 12px 30px rgba(37, 99, 235, 0.08);
}

html, body {
    overflow-x: clip; 
    background-color: var(--bg-main);
    color: var(--text-dark);
    font-family: 'Plus Jakarta Sans', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 85px;
}

/* ========================================================
   🌐 JOBTRACKER FULL-WIDTH CUSTOM NAVBAR
   ======================================================== */
.custom-navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 14px 0; 
    width: 100%;
    left: 0;
    top: 0;
    transform: none;
    border-radius: 0;
    box-shadow: none;
    transition: all 0.3s ease-in-out;
    z-index: 1050;
}

/* Transisi Halus Saat Halaman Mulai Di-scroll */
.custom-navbar.scrolled {
    padding: 8px 0;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

/* Brand Logo Typography (Reworked to Stack Layout) */
.navbar-brand {
    text-decoration: none;
    line-height: 1.1;
}

.brand-main {
    background: linear-gradient(90deg, #0066ff, #00c2ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.brand-sub {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.02em;
    margin-top: 1px;
}

/* Nav Menu Link Style */
.navbar-nav .nav-link {
    font-weight: 600;
    font-size: 15px;
    color: #475569 !important;
    padding: 8px 16px !important;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover {
    background: rgba(0, 102, 255, 0.05);
    color: #0066ff !important;
}

.navbar-nav .nav-link.active {
    background: rgba(0, 102, 255, 0.08);
    color: #0066ff !important;
}

/* ========================================================
   👥 DYNAMIC AUTHENTICATION BUTTONS MANAGEMENT
   ======================================================== */
.dynamic-auth-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 1. STATE BELUM LOGIN */
.btn-masuk-outline {
    color: #475569 !important;
    background: transparent;
    border: 1px solid #cbd5e1;
    padding: 8px 18px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-masuk-outline:hover {
    background: #f1f5f9;
    color: #00142E !important;
    border-color: #94a3b8;
}

.btn-daftar-solid {
    background: #0066ff;
    color: #ffffff !important;
    padding: 9px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.15);
    transition: all 0.2s ease;
}

.btn-daftar-solid:hover {
    background: #0052cc;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 102, 255, 0.25);
}

/* 2. STATE SUDAH LOGIN */
.btn-user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #4F46E5 0%, #3b82f6 100%);
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-user-avatar:hover {
    transform: scale(1.04);
}

.btn-dashboard-integrated {
    background: #4F46E5;
    color: #ffffff !important;
    padding: 9px 22px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
    transition: all 0.2s ease;
}

.btn-dashboard-integrated:hover {
    background: #4338ca;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3);
}

/* ========================================================
   📌 STICKY SIDEBAR FILTER (FIXED STICKY SCROLL)
======================================================== */
.sticky-sidebar {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 100px !important; /* Mengunci posisi filter agar tidak ikut tergulung */
    z-index: 99;
    background: var(--bg-card);
    padding: 22px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.btn-reset-filter {
    font-size: 0.78rem;
    color: #EF4444;
    text-decoration: none;
    font-weight: 700;
}

.btn-reset-filter:hover {
    text-decoration: underline;
}

/* ========================================================
   💼 JOB CARDS (VERTIKAL MELEBAR MODERN)
======================================================== */
.job-card-wide {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    transition: all 0.25s ease-in-out;
    box-shadow: var(--shadow-sm);
}

.job-card-wide:hover {
    border-color: var(--primary-accent);
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.company-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--bg-soft-cream);
    color: var(--primary-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.badge-type {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-fulltime { background: #DCFCE7; color: #166534; }
.badge-parttime { background: #F3E8FF; color: #6B21A8; }
.badge-contract { background: #FFEDD5; color: #9A3412; }
.badge-internship { background: #FEF3C7; color: #92400e; }
.badge-freelance { background: #E0F2FE; color: #075985; }

.badge-kebijakan {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 8px;
    letter-spacing: 0.3px;
    background: #F1F5F9;
    color: #334155;
    border: 1px solid #E2E8F0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.job-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.35;
    margin-bottom: 2px;
}

.company-name {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    font-weight: 500;
}

.job-details-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #475569;
}

.detail-item i {
    color: var(--primary-accent);
    font-size: 1rem;
    flex-shrink: 0;
}

.detail-item strong {
    color: #334155;
    font-weight: 600;
}

.btn-detail-pill {
    width: 100%;
    background: transparent;
    color: var(--primary-accent);
    border: 1.5px solid var(--primary-accent);
    padding: 9px 18px;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 700;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-detail-pill:hover {
    background: var(--primary-accent);
    color: #ffffff;
}

/* ========================================================
   🪟 MODAL DETAIL (SAFE TEXT RESIZING & OVERFLOW FIX)
======================================================== */
.custom-modal { 
    border-radius: 20px; 
    border: none; 
    overflow: hidden;
}

.modal-logo-circle {
    width: 48px; 
    height: 48px; 
    border-radius: 12px;
    background: #EFF6FF; 
    color: var(--primary-accent);
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 1.3rem;
}

.modal-job-title {
    font-size: clamp(1rem, 4vw, 1.25rem); /* Auto resize font */
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.3;
}

.modal-company-name {
    word-break: break-word;
    overflow-wrap: anywhere;
}

.modal-info-grid {
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 8px;
    background: var(--bg-main); 
    padding: 12px 10px; 
    border-radius: 14px; 
    border: 1px solid var(--border-color);
}

.info-box { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    text-align: center;
    min-width: 0; /* Mencegah flex/grid child overflow */
}

.info-box small {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.info-box strong {
    font-size: clamp(0.72rem, 2.5vw, 0.85rem); /* Text auto responsif */
    word-break: break-word;
    overflow-wrap: anywhere;
    max-width: 100%;
    display: block;
    line-height: 1.25;
    margin-top: 2px;
}

/* ========================================================
   FOOTER
======================================================== */
.footer-main {
    background-color: #FFFFFF;
    color: #475569;
    padding: 70px 0 30px;
    border-top: 1px solid var(--border-color);
    width: 100%;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 50px;
    padding-bottom: 40px;
}

.footer-brand .brand-name {
    font-weight: 800;
    font-size: 24px;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.footer-brand .brand-dot { color: var(--primary-accent); }

.footer-brand .brand-desc {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    max-width: 380px;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-main);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    margin-right: 10px;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s ease;
}

.footer-social a:hover {
    background: var(--primary-accent);
    color: #ffffff !important;
    border-color: var(--primary-accent);
}

.footer-nav-col h6 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 18px;
    text-transform: uppercase;
}

.footer-nav-col ul { list-style: none; padding: 0; margin: 0; }
.footer-nav-col ul li { margin-bottom: 10px; }
.footer-nav-col ul li a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-nav-col ul li a:hover { color: var(--primary-accent); }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #F1F5F9;
    font-size: 13px;
    color: #94A3B8;
}

.footer-links a {
    color: #94A3B8;
    text-decoration: none;
    margin-left: 20px;
    transition: color 0.2s ease;
}

.footer-links a:hover { color: var(--primary-accent); }

/* RESPONSIVE LAYOUT */
@media (min-width: 1200px) {
    .col-xl-2-5 { width: 22%; }
    .col-xl-9-5 { width: 78%; }
}

@media (max-width: 991px) {
    .sticky-sidebar { position: static !important; margin-bottom: 20px; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
    .footer-links a { margin: 0 10px; }
}