/* ============================================================
   Modern UI Design System - BKK SMKN 1 Karawang
   Inspired by: Jobstreet, LinkedIn, Glints
   Color: Blue (trust) + White/Light Gray (bg) + Orange (CTA)
   ============================================================ */

:root {
    /* Brand */
    --primary: #0066cc;
    --primary-dark: #004c99;
    --primary-light: #0080ff;
    --primary-50: #e6f0fa;
    --primary-100: #cce0f5;

    /* Accent / CTA */
    --accent: #f97316;
    --accent-dark: #ea580c;
    --accent-light: #fb923c;
    --accent-50: #fff7ed;

    /* Semantic */
    --success: #16a34a;
    --success-light: #dcfce7;
    --danger: #dc2626;
    --danger-light: #fee2e2;
    --warning: #d97706;
    --warning-light: #fef3c7;
    --info: #0891b2;
    --info-light: #cffafe;

    /* Neutral */
    --bg: #f5f6f8;
    --bg-alt: #eef0f3;
    --surface: #ffffff;
    --surface-alt: #f8fafc;
    --text: #1a1a2e;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --border: #e2e8f0;
    --border-light: #f1f5f9;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.1);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.12);

    /* Spacing & radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition: 200ms ease;
}

/* Base */
* { box-sizing: border-box; }

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
    margin: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text);
    margin-bottom: 0.5rem;
}
h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }
p { margin-bottom: 1rem; color: var(--text-secondary); line-height: 1.7; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--primary-dark); text-decoration: underline; }

/* Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), transform var(--transition-fast);
    overflow: hidden;
}
.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.card-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: var(--font-size-base);
}
.card-body { padding: 1.25rem; }
.card-footer {
    background: var(--surface-alt);
    border-top: 1px solid var(--border);
    padding: 0.75rem 1.25rem;
}

/* Job card (Jobstreet style) */
.job-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: all var(--transition);
    cursor: pointer;
}
.job-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.job-card .job-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.25rem;
}
.job-card .company-name {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin-bottom: 0.5rem;
}
.job-card .job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}
.job-card .job-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.job-card .badge-new {
    background: var(--accent);
    color: #fff;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-transform: uppercase;
}

/* Buttons */
.btn {
    min-height: 44px;
    min-width: 44px;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: var(--font-size-sm);
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
}
.btn-sm { min-height: 36px; min-width: 36px; padding: 0.25rem 0.75rem; font-size: var(--font-size-xs); }
.btn-lg { min-height: 52px; padding: 0.75rem 1.5rem; font-size: var(--font-size-base); }
.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.btn-accent, .btn-apply {
    background: var(--accent);
    color: #fff;
    font-weight: 700;
}
.btn-accent:hover, .btn-apply:hover {
    background: var(--accent-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}
.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}
.btn-outline-primary:hover {
    background: var(--primary);
    color: #fff;
}
.btn-danger { background: var(--danger); color: #fff; border: none; }
.btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-success { background: var(--success); color: #fff; border: none; }
.btn-success:hover { background: #15803d; color: #fff; }
.btn-secondary { background: var(--bg-alt); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); color: var(--text); }

/* Tables */
.table-responsive {
    border-radius: var(--radius);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table { margin-bottom: 0; }
.table thead th {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    padding: 0.875rem 1rem;
    white-space: nowrap;
}
.table tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-light);
    font-size: var(--font-size-sm);
}
.table tbody tr:hover { background: var(--primary-50); }
.table tbody tr:last-child td { border-bottom: none; }

/* DataTables */
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    min-height: 44px;
    min-width: 200px;
}
.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
    outline: none;
}
.dataTables_wrapper .dataTables_length select {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.375rem 0.75rem;
    min-height: 44px;
}
.dataTables_wrapper .dataTables_info {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    padding-top: 0.75rem;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
    min-height: 40px;
    min-width: 40px;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text) !important;
    margin: 0 2px;
    transition: all var(--transition-fast);
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--primary-50) !important;
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary) !important;
    font-weight: 600;
}

/* Form inputs */
.form-control, .form-select {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    min-height: 44px;
    font-size: var(--font-size-base);
    background: var(--surface);
    color: var(--text);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.12);
    outline: none;
}
.form-group { margin-bottom: 1rem; }
.form-group label, .form-label {
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.375rem;
    font-size: var(--font-size-sm);
}
.form-text { color: var(--text-muted); font-size: var(--font-size-xs); }

/* Badges */
.badge {
    padding: 0.3em 0.6em;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: var(--font-size-xs);
}
.badge-success { background: var(--success-light); color: #166534; }
.badge-danger { background: var(--danger-light); color: #991b1b; }
.badge-warning { background: var(--warning-light); color: #92400e; }
.badge-info { background: var(--info-light); color: #155e75; }
.badge-primary { background: var(--primary-50); color: var(--primary); }
.badge-secondary { background: var(--bg-alt); color: var(--text-muted); }

/* Alerts */
.alert {
    border: none;
    border-radius: var(--radius);
    border-left: 4px solid;
    padding: 1rem 1.25rem;
}
.alert-success { background: var(--success-light); border-left-color: var(--success); color: #166534; }
.alert-danger { background: var(--danger-light); border-left-color: var(--danger); color: #991b1b; }
.alert-warning { background: var(--warning-light); border-left-color: var(--warning); color: #92400e; }
.alert-info { background: var(--info-light); border-left-color: var(--info); color: #155e75; }

/* Modal */
.modal-content {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}
.modal-header {
    border-bottom: 1px solid var(--border);
    background: var(--primary);
    color: #fff;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.modal-header .close { color: #fff; opacity: 0.8; text-shadow: none; }
.modal-header .close:hover { opacity: 1; }
.modal-body { padding: 1.25rem; }
.modal-footer {
    border-top: 1px solid var(--border);
    padding: 0.75rem 1.25rem;
    background: var(--surface-alt);
}

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.spinner {
    width: 44px;
    height: 44px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.toast {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 1rem 1.25rem;
    min-width: 280px;
    max-width: 400px;
    animation: slideInRight 0.3s ease;
    font-size: var(--font-size-sm);
}
.toast-success { border-left-color: var(--success); }
.toast-danger { border-left-color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }
.toast-info { border-left-color: var(--info); }
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Navbar */
.topbar, .topbar.bg-primary, .topbar.bg-dark {
    background: var(--primary) !important;
    box-shadow: var(--shadow-sm);
    min-height: 64px;
    max-height: 64px;
}
.topbar .navbar, .navbar.top-navbar, .navbar.top-navbar.bg-primary {
    min-height: 64px;
    max-height: 64px;
    padding: 0 1rem;
}
.navbar-header {
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
    margin: 0;
    background: var(--primary) !important;
}
.navbar-header .logo,
.navbar-header .navbar-brand,
.navbar-header .logo-icon {
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0;
    margin: 0;
}
.navbar-header .light-logo,
.navbar-header img {
    max-height: 48px !important;
    width: auto !important;
    object-fit: contain;
}
.navbar-collapse {
    display: flex;
    align-items: center;
}
@media (max-width: 767.98px) {
    .navbar-collapse {
        background: var(--primary) !important;
        padding: 0.5rem 0;
    }
    .navbar-collapse .navbar-nav {
        width: 100%;
    }
    .navbar-collapse .nav-item {
        width: 100%;
    }
    .navbar-collapse .nav-link {
        padding: 0.75rem 1rem;
        border-radius: var(--radius-sm);
    }
}
.navbar-nav {
    align-items: center;
    height: 64px;
}
.navbar-nav .nav-link {
    padding: 0.5rem 1rem;
    line-height: 1.5;
}
/* Ensure all navbar parts have consistent blue background */
.navbar-header,
.navbar-header.bg-primary,
.navbar-header.fnd_bg-transparent,
.navbar-collapse,
.navbar-collapse.show,
.navbar-collapse.collapsing,
.navbar-collapse.bg-primary,
.navbar-collapse.fnd_bg-transparent,
.navbar-collapse.collapse,
.navbar-collapse.collapse.show {
    background: var(--primary) !important;
}
.navbar-topbar, .top-navbar {
    background: var(--primary) !important;
}
/* Navbar toggler */
.topbartoggler, .nav-toggler {
    color: #fff !important;
}
/* Ensure navbar brand/logo area is blue */
.navbar-brand {
    background: transparent !important;
}
.navbar.top-navbar, .navbar.top-navbar.bg-primary, .navbar.top-navbar.bg-dark {
    background: var(--primary) !important;
}
.navbar-nav .nav-link {
    color: #fff !important;
    font-weight: 500;
    transition: color var(--transition-fast);
}
.navbar-nav .nav-link:hover {
    color: var(--accent-light) !important;
}
.navbar-brand .logo-text {
    color: #fff;
    font-weight: 700;
}

/* Sidebar (admin) - professional dark blue theme (matches navbar) */
.left-sidebar {
    background: var(--primary-dark) !important;
    background-image: none !important;
    border-right: none !important;
    box-shadow: var(--shadow-md);
}
.scroll-sidebar, .sidebar-nav, .sidebar-nav ul {
    background: var(--primary-dark) !important;
    background-image: none !important;
}
.sidebar-nav .nav-small-cap {
    padding: 0.75rem 1rem 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.sidebar-nav .nav-small-cap i {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.3);
}
.sidebar-item {
    margin-bottom: 0.125rem;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.85);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}
.sidebar-link i {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.875rem;
    border-radius: 6px;
    background: rgba(255,255,255,0.1);
    transition: all var(--transition-fast);
}
.sidebar-link:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-color: rgba(255,255,255,0.1);
}
.sidebar-link:hover i {
    color: #fff;
}
.sidebar-link.active {
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-weight: 600;
    border-color: rgba(255,255,255,0.2);
}
.sidebar-link.active i {
    color: var(--accent-light);
}
.first-level {
    padding-left: 1rem;
    margin-top: 0.25rem;
}
.first-level .sidebar-link {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Footer */
.footer, .footer.text-white, .footer.text-white.bg-dark {
    background: var(--primary-dark) !important;
    color: #fff;
}
.footer-top {
    background: var(--primary-dark) !important;
    color: #fff !important;
}
.footer-top h3, .footer-top p, .footer-top a, .footer-top span, .footer-top div {
    color: #fff !important;
}
.footer-top a.text-warning {
    color: var(--accent-light) !important;
}
.footer-top img {
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: var(--radius);
}
.footer a { color: var(--accent-light); }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer-bottom {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.9);
    padding: 0.75rem 0;
    font-size: var(--font-size-sm);
}
.footer-bottom a { color: var(--accent-light); }
.footer-bottom a:hover { color: #fff; }

/* Page header */
.page-title {
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.25rem;
    font-size: var(--font-size-2xl);
}
.breadcrumb {
    background: transparent;
    padding: 0;
    font-size: var(--font-size-sm);
}
.breadcrumb-item a { color: var(--primary); }
.breadcrumb-item.active { color: var(--text-muted); }

/* Hero section (frontend) */
.hero-section {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--primary-light));
    color: #fff;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-section .container { position: relative; z-index: 1; }
.hero-title {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}
.hero-subtitle {
    font-size: var(--font-size-lg);
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 600px;
}
.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-size: var(--font-size-base);
    font-weight: 700;
    border-radius: var(--radius);
    background: var(--accent);
    color: #fff;
    border: none;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
    transition: all var(--transition);
}
.hero-cta:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.4);
    color: #fff;
    text-decoration: none;
}

/* Section */
.section {
    padding: 4rem 0;
}
.section-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text);
}
.section-subtitle {
    color: var(--text-muted);
    font-size: var(--font-size-base);
    margin-bottom: 2rem;
}

/* Stat card */
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    transition: all var(--transition);
}
.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 1.25rem;
}
.stat-card .stat-value {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}
.stat-card .stat-label {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    font-weight: 500;
}

/* Company card */
.company-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
    transition: all var(--transition);
}
.company-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.company-card img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 0.75rem;
}
.company-card .company-name {
    font-weight: 600;
    color: var(--text);
    font-size: var(--font-size-sm);
}

/* News card */
.news-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all var(--transition);
}
.news-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.news-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}
.news-card .news-body {
    padding: 1rem;
}
.news-card .news-title {
    font-weight: 600;
    color: var(--text);
    font-size: var(--font-size-base);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-card .news-date {
    color: var(--text-muted);
    font-size: var(--font-size-xs);
    margin-bottom: 0.5rem;
}
.news-card .news-excerpt {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title { font-size: var(--font-size-2xl); }
    .hero-subtitle { font-size: var(--font-size-base); }
    .section { padding: 2.5rem 0; }
    .stat-card { padding: 1rem; }
    .stat-card .stat-value { font-size: var(--font-size-2xl); }
}

@media (max-width: 576px) {
    .hero-title { font-size: var(--font-size-xl); }
    .hero-section { padding: 3rem 0; }
    .section { padding: 2rem 0; }
}

/* Utility */
.text-primary { color: var(--primary) !important; }
.bg-primary { background-color: var(--primary) !important; }
.text-accent { color: var(--accent) !important; }
.bg-accent { background-color: var(--accent) !important; }
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }
.rounded { border-radius: var(--radius) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.fw-600 { font-weight: 600 !important; }
.fw-700 { font-weight: 700 !important; }

/* ============================================================
   Modern Navbar (no Bootstrap collapse dependency)
   ============================================================ */
.navbar-modern {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1030;
}
.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.navbar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    font-size: 1.125rem;
}
.navbar-logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
    display: block; /* mobile: tampilkan logo */
}
.navbar-logo:hover {
    text-decoration: none;
    color: #fff;
    opacity: 0.9;
}
.navbar-title {
    display: none; /* mobile: sembunyikan title */
}
/* Desktop: cukup title, tanpa logo */
@media (min-width: 992px) {
    .navbar-logo img {
        display: none;
    }
    .navbar-title {
        display: inline;
    }
}
.navbar-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.navbar-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}
.navbar-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.navbar-toggle.open span:nth-child(2) {
    opacity: 0;
}
.navbar-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}
.navbar-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.25rem;
}
.navbar-menu li a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all var(--transition-fast);
    display: block;
}
.navbar-menu li a:hover {
    color: #fff;
    background: rgba(255,255,255,0.12);
    text-decoration: none;
}
.navbar-menu li a.active {
    color: #fff;
    background: rgba(255,255,255,0.15);
    font-weight: 600;
}

/* Mobile navbar */
@media (max-width: 991.98px) {
    .navbar-toggle {
        display: flex;
    }
    .navbar-menu {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--primary-dark);
        flex-direction: column;
        padding: 0.5rem;
        box-shadow: var(--shadow-lg);
        border-radius: 0 0 var(--radius) var(--radius);
    }
    .navbar-menu.open {
        display: flex;
    }
    .navbar-menu li {
        width: 100%;
    }
    .navbar-menu li a {
        padding: 0.75rem 1rem;
        border-radius: var(--radius-sm);
    }
}

/* Remove old topbar spacing */
.page-wrapper {
    padding-top: 0 !important;
}

/* ============================================================
   Modern Admin Layout (no Bootstrap collapse dependency)
   ============================================================ */

/* Admin wrapper */
#admin-wrapper {
    display: flex;
    min-height: 100vh;
    background: var(--bg);
}

/* Admin topbar */
.admin-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    box-shadow: var(--shadow-md);
    z-index: 1030;
}
.admin-topbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 1rem;
    max-width: 100%;
}
.admin-topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.admin-sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}
.admin-sidebar-toggle:hover {
    background: rgba(255,255,255,0.1);
}
.admin-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    font-size: 1.125rem;
}
.admin-logo img {
    height: 36px;
    width: auto;
    object-fit: contain;
    display: block; /* mobile: tampilkan logo */
}
.admin-logo:hover { text-decoration: none; color: #fff; opacity: 0.9; }
/* Mobile default: logo image saja */
.admin-logo-text {
    display: none;
    white-space: nowrap;
    font-weight: 700;
    font-size: 1.125rem;
    color: #fff;
}
/* Desktop: cukup text, tanpa gambar logo */
@media (min-width: 992px) {
    .admin-logo img {
        display: none;
    }
    .admin-logo-text {
        display: inline;
    }
}

.admin-topbar-right {
    display: flex;
    align-items: center;
}
.admin-user-menu {
    position: relative;
}
.admin-user-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius);
    transition: background var(--transition-fast);
}
.admin-user-btn:hover {
    background: rgba(255,255,255,0.1);
}
.admin-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.3);
}
.admin-user-name {
    font-weight: 500;
    font-size: 0.9375rem;
}
.admin-user-chevron {
    font-size: 0.75rem;
    opacity: 0.7;
}
.admin-user-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 240px;
    display: none;
    z-index: 1040;
    overflow: hidden;
}
.admin-user-dropdown.open {
    display: block;
    animation: slideDown 0.2s ease;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.admin-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--primary-50);
    border-bottom: 1px solid var(--border);
}
.admin-avatar-lg {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}
.admin-user-name-full {
    font-weight: 600;
    color: var(--text);
    font-size: 0.9375rem;
}
.admin-user-email {
    color: var(--text-muted);
    font-size: 0.8125rem;
}
.admin-user-actions {
    padding: 0.5rem;
}
.admin-logout-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--danger);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: background var(--transition-fast);
}
.admin-logout-btn:hover {
    background: var(--danger-light);
    text-decoration: none;
    color: var(--danger);
}

/* Sidebar overlay (mobile) */
.admin-sidebar-overlay {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1020;
}
.admin-sidebar-overlay.open {
    display: block;
}

/* Sidebar */
.admin-sidebar {
    position: fixed;
    top: 64px;
    left: 0;
    width: 260px;
    height: calc(100vh - 64px);
    background: var(--primary-dark);
    overflow-y: auto;
    z-index: 1025;
    transition: transform var(--transition);
}
.admin-sidebar-content {
    padding: 1rem 0.75rem;
}
.admin-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.admin-nav-section {
    margin-bottom: 1rem;
}
.admin-nav-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.4);
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.25rem;
}
.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}
.admin-nav-item:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    text-decoration: none;
}
.admin-nav-item i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}
.admin-nav-parent {
    width: 100%;
    background: none;
    border: 1px solid transparent;
    cursor: pointer;
    text-align: left;
}
.admin-nav-parent .admin-nav-arrow {
    margin-left: auto;
    font-size: 0.75rem;
    transition: transform var(--transition-fast);
    opacity: 0.6;
}
.admin-nav-submenu {
    display: none;
    padding-left: 1rem;
    margin-top: 0.25rem;
}
.admin-nav-submenu.open {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}
.admin-nav-subitem {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}
.admin-nav-subitem:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
    text-decoration: none;
}
.admin-nav-subitem i {
    width: 18px;
    text-align: center;
    font-size: 0.875rem;
}

/* Main content */
.admin-main {
    flex: 1;
    margin-left: 260px;
    margin-top: 64px;
    min-height: calc(100vh - 64px);
    display: flex;
    flex-direction: column;
}
.admin-content {
    flex: 1;
    padding: 1.5rem;
}
.admin-page-header {
    margin-bottom: 1.5rem;
}
.admin-page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.25rem;
}
.admin-page-body {
    flex: 1;
}

/* Admin footer */
.admin-footer {
    padding: 1rem 1.5rem;
    background: var(--surface);
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.875rem;
    text-align: center;
}

/* Mobile responsive */
@media (max-width: 991.98px) {
    .admin-sidebar-toggle {
        display: flex;
    }
    .admin-sidebar {
        transform: translateX(-100%);
    }
    .admin-sidebar.open {
        transform: translateX(0);
    }
    .admin-main {
        margin-left: 0;
    }
    .admin-topbar-container {
        padding: 0 0.75rem;
    }
    .admin-user-name {
        display: none;
    }
    .admin-logo-text {
        display: none;
    }
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.lds-ripple {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
}
.lds-ripple div {
    position: absolute;
    border: 4px solid var(--primary);
    opacity: 1;
    border-radius: 50%;
    animation: lds-ripple 1s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}
.lds-ripple div:nth-child(2) {
    animation-delay: -0.5s;
}
@keyframes lds-ripple {
    0% { top: 36px; left: 36px; width: 0; height: 0; opacity: 0; }
    4.9% { top: 36px; left: 36px; width: 0; height: 0; opacity: 0; }
    5% { top: 36px; left: 36px; width: 0; height: 0; opacity: 1; }
    100% { top: 0px; left: 0px; width: 72px; height: 72px; opacity: 0; }
}

/* Page breadcrumb */
.admin-page-header .breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
}
.admin-page-header .breadcrumb-item a {
    color: var(--primary);
}
.admin-page-header .breadcrumb-item.active {
    color: var(--text-muted);
}

/* ============================================================
   Phase 3 Polish: Animations, Accessibility, Print
   ============================================================ */

/* Smooth transitions for interactive elements */
.btn, .card, .job-card, .news-card, .company-card, .stat-card {
    transition: all 0.2s ease;
}

/* Focus states for accessibility */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.3);
}

/* Skip to content link (accessibility) */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: #fff;
    padding: 0.5rem 1rem;
    z-index: 10001;
    transition: top 0.2s;
}
.skip-to-content:focus {
    top: 0;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    z-index: 999;
    transition: all var(--transition);
}
.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}
.back-to-top.visible {
    display: flex;
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, var(--bg-alt) 25%, var(--border-light) 50%, var(--bg-alt) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}
.skeleton-title {
    height: 1.5rem;
    width: 60%;
    margin-bottom: 0.75rem;
}
.skeleton-card {
    height: 200px;
    border-radius: var(--radius);
}

/* Fade in animation */
.fade-in {
    animation: fadeIn 0.4s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Smooth page transitions */
.page-wrapper {
    animation: fadeIn 0.3s ease;
}

/* Print styles */
@media print {
    .navbar-modern, .admin-topbar, .admin-sidebar, .footer, .footer-bottom,
    .btn, .back-to-top, .toast-container, .spinner-overlay {
        display: none !important;
    }
    body { background: #fff; color: #000; }
    .card { box-shadow: none; border: 1px solid #ddd; }
    a { text-decoration: underline; color: #000; }
    .page-wrapper { padding-top: 0 !important; }
    .admin-main { margin-left: 0 !important; margin-top: 0 !important; }
}

/* Reduced motion (accessibility) */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (forced-colors: active) {
    .btn, .card, .badge {
        border: 2px solid CanvasText;
    }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted);
}
.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}
.empty-state h5 {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* Table - modern, responsive, compact */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    border-radius: var(--radius);
}
.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.modern-table thead th {
    white-space: nowrap;
    font-size: 0.75rem;
    padding: 0.625rem 0.75rem;
}
.modern-table tbody td {
    white-space: nowrap;
    font-size: 0.8125rem;
    padding: 0.5rem 0.75rem;
}
/* Sticky first column (No) for better UX during horizontal scroll */
.modern-table thead th:first-child,
.modern-table tbody td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--surface);
}
.modern-table thead th:first-child {
    background: var(--primary);
    z-index: 3;
}
.modern-table tbody tr:hover td:first-child {
    background: var(--primary-50);
}
.dataTables_wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

/* Admin sidebar collapse (desktop mini-sidebar) */
.admin-sidebar-collapse {
    display: none;
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast), color var(--transition-fast);
    align-items: center;
    justify-content: center;
}
.admin-sidebar-collapse:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}
@media (min-width: 992px) {
    .admin-sidebar-collapse {
        display: flex;
    }
}
.admin-sidebar.collapsed {
    width: 70px;
}
.admin-sidebar.collapsed .admin-nav-item span,
.admin-sidebar.collapsed .admin-nav-title,
.admin-sidebar.collapsed .admin-nav-submenu,
.admin-sidebar.collapsed .admin-nav-arrow {
    display: none;
}
.admin-sidebar.collapsed .admin-nav-item {
    justify-content: center;
    padding: 0.625rem;
}
.admin-sidebar.collapsed .admin-nav-item i {
    margin: 0;
    font-size: 1.125rem;
}
.admin-sidebar.collapsed .admin-nav-section {
    margin-bottom: 0.5rem;
}
.admin-main.sidebar-collapsed {
    margin-left: 70px;
}
.admin-main {
    transition: margin-left var(--transition);
}
.admin-sidebar {
    transition: width var(--transition), transform var(--transition);
}

/* ============================================================
   Fix & Polish - Perfect display Desktop + Mobile (Admin)
   ============================================================ */

/* Ensure admin body doesn't inherit old theme sidebar margins */
body:has(#admin-wrapper) {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}
#admin-wrapper {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* admin-logo-text rules defined near .admin-logo */

/* Prevent content shift / horizontal scroll */
.admin-main,
.admin-content {
    max-width: 100%;
    overflow-x: hidden;
}

/* Better mobile content padding */
@media (max-width: 991.98px) {
    .admin-content {
        padding: 1rem 0.75rem;
    }
    .admin-page-title {
        font-size: 1.25rem;
    }
    .admin-footer {
        padding: 0.75rem 1rem;
        font-size: 0.8125rem;
    }
    /* Lock body scroll when sidebar open on mobile */
    body.sidebar-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
    .admin-sidebar {
        box-shadow: var(--shadow-xl);
    }
}

@media (max-width: 576px) {
    .admin-content {
        padding: 0.75rem 0.5rem;
    }
    .admin-page-header {
        margin-bottom: 1rem;
    }
    .admin-topbar {
        height: 56px;
    }
    .admin-sidebar,
    .admin-sidebar-overlay {
        top: 56px;
    }
    .admin-sidebar {
        height: calc(100vh - 56px);
    }
    .admin-main {
        margin-top: 56px;
        min-height: calc(100vh - 56px);
    }
    .admin-logo img {
        height: 28px;
    }
}

/* Ensure tables don't break layout */
.admin-page-body .table-responsive,
.admin-page-body .dataTables_wrapper {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Card & form polish inside admin */
.admin-page-body .card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    background: var(--surface);
}
.admin-page-body .card-header {
    background: var(--surface-alt);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}
.admin-page-body .form-control,
.admin-page-body .custom-select,
.admin-page-body select.form-control {
    border-radius: var(--radius-sm);
    border-color: var(--border);
}
.admin-page-body .btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}
.admin-page-body .btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Active nav item highlight */
.admin-nav-item.active,
.admin-nav-subitem.active {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-color: rgba(255,255,255,0.1);
}

/* Ensure collapse button visible only on desktop */
@media (max-width: 991.98px) {
    .admin-sidebar-collapse {
        display: none !important;
    }
}

/* ============================================================
   Modern Table Search + Pagination (match theme)
   ============================================================ */
.table-search-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 0.75rem;
    gap: 0.5rem;
}
.table-search-bar input {
    width: 100%;
    max-width: 280px;
    padding: 0.5rem 0.875rem 0.5rem 2.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242.156a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E") no-repeat 0.75rem center;
    background-size: 14px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.table-search-bar input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.table-search-bar input::placeholder {
    color: var(--text-muted);
}

.table-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-light);
}
.table-pagination .page-info {
    font-size: 0.8125rem;
    color: var(--text-muted);
}
.table-pagination .page-buttons {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}
.table-pagination .page-buttons button {
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.table-pagination .page-buttons button:hover:not(:disabled):not(.active) {
    background: var(--primary-50);
    border-color: var(--primary-light);
    color: var(--primary);
}
.table-pagination .page-buttons button.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-sm);
}
.table-pagination .page-buttons button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background: var(--bg-alt);
}

@media (max-width: 576px) {
    .table-search-bar {
        justify-content: stretch;
    }
    .table-search-bar input {
        max-width: 100%;
    }
    .table-pagination {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .table-pagination .page-buttons {
        justify-content: center;
    }
    .table-pagination .page-buttons button {
        min-width: 32px;
        height: 32px;
        font-size: 0.8125rem;
    }
}

/* Modal polish */
.modal-content {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}
.modal-header {
    border-bottom: 1px solid var(--border);
    background: var(--surface-alt);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.modal-footer {
    border-top: 1px solid var(--border);
    background: var(--surface-alt);
}
.modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

/* Modal: no blink / stable backdrop */
#afandi_modal-deskripsi.modal {
    /* no fade transition */
}
#afandi_modal-deskripsi .modal-dialog {
    margin: 1.75rem auto;
}
#afandi_modal-deskripsi .modal-content {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}
/* ============================================================
   Modal admin/front – stabil, tidak blink, selalu di atas overlay
   Modal & backdrop dipastikan di layer body (bukan trapping di card)
   ============================================================ */
body.modal-open {
    overflow: hidden !important;
}
/* Backdrop selalu di body, di bawah dialog */
.modal-backdrop {
    position: fixed !important;
    z-index: 1060 !important;
    background-color: rgba(15, 23, 42, 0.5);
}
.modal-backdrop.show {
    opacity: 0.5;
}
/* Modal selalu di atas backdrop – fixed ke viewport */
.modal {
    position: fixed !important;
    z-index: 1070 !important;
}
.modal.show {
    display: block !important;
}
.modal .modal-dialog {
    pointer-events: auto;
    margin: 1.75rem auto;
}
.modal .modal-content {
    pointer-events: auto;
    position: relative;
    z-index: 1;
}
/* Deskripsi: tanpa animasi transform yang bikin flicker */
#afandi_modal-deskripsi .modal-content {
    transform: none !important;
}

/* ============================================================
   Home carousel – proporsional desktop + mobile
   ============================================================ */
.home-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    /* warna letterbox saat gambar contain */
    background: #0f172a;
}
.home-carousel .carousel-inner {
    width: 100%;
}
/* Proporsi: ~2.4:1 desktop (lebar x pendek), lebih "hero" */
.home-carousel .carousel-item {
    position: relative;
    width: 100%;
    /* aspect-ratio lebih proporsional daripada height tetap */
    aspect-ratio: 21 / 9;
    min-height: 320px;
    max-height: 520px;
    height: auto;
}
.home-carousel-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    /* Fill/Stretch: penuhi area slider, tidak ada celah, seluruh gambar tampil */
    object-fit: fill;
    object-position: center center;
    display: block;
}
.home-carousel-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    /* overlay lebih tebal – teks tetap terbaca, gambar boleh lebih gelap */
    background: linear-gradient(
        180deg,
        rgba(15, 23, 42, 0.45) 0%,
        rgba(15, 23, 42, 0.62) 40%,
        rgba(15, 23, 42, 0.85) 100%
    );
    pointer-events: none;
}
.home-carousel-caption {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: clamp(1rem, 3vw, 2.5rem) clamp(1rem, 4vw, 3rem);
    pointer-events: none;
}
.home-carousel-caption .hero-cta {
    pointer-events: auto;
}
.home-carousel-title {
    color: #fff;
    font-weight: 700;
    font-size: clamp(1.35rem, 3.2vw, 2.5rem);
    line-height: 1.25;
    margin: 0 0 0.5rem;
    text-shadow: 0 2px 12px rgba(0,0,0,0.45);
    max-width: min(900px, 92%);
}
.home-carousel-desc {
    color: rgba(255,255,255,0.92);
    font-size: clamp(0.875rem, 1.6vw, 1.2rem);
    line-height: 1.45;
    margin: 0 0 1.25rem;
    text-shadow: 0 1px 6px rgba(0,0,0,0.4);
    max-width: min(560px, 90%);
}
.home-carousel .carousel-control-prev,
.home-carousel .carousel-control-next {
    z-index: 3;
    width: 8%;
    max-width: 64px;
    opacity: 0.85;
}
.home-carousel .carousel-control-prev:hover,
.home-carousel .carousel-control-next:hover {
    opacity: 1;
}
.home-carousel .hero-cta {
    margin-top: 0.15rem;
    font-size: clamp(0.8125rem, 1.2vw, 1rem);
    padding: 0.7rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.35);
}

/* Konten CMS (Tentang Kami dll) – gambar tidak overflow */
.card-body img,
.section img,
#tentang img {
    max-width: 100% !important;
    height: auto !important;
}
.card-body p,
#tentang p {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Section spacing mobile */
@media (max-width: 767.98px) {
    /* Tablet / mobile: 16:9 lebih proporsional di layar sempit */
    .home-carousel .carousel-item {
        aspect-ratio: 16 / 9;
        min-height: 220px;
        max-height: 380px;
        height: auto;
    }
    .home-carousel-caption {
        padding: 1rem 1rem 1.75rem;
        justify-content: center;
    }
    .home-carousel-title {
        font-size: clamp(1.1rem, 4.5vw, 1.5rem);
        margin-bottom: 0.35rem;
    }
    .home-carousel-desc {
        font-size: clamp(0.8rem, 3vw, 0.95rem);
        margin-bottom: 0.875rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .home-carousel .hero-cta {
        font-size: 0.875rem;
        padding: 0.6rem 1.2rem;
    }
    .home-carousel .carousel-control-prev,
    .home-carousel .carousel-control-next {
        width: 12%;
    }
    .section {
        padding: 2rem 0;
    }
    .section-title {
        font-size: 1.35rem;
    }
    .section-subtitle {
        font-size: 0.875rem;
        margin-bottom: 1.25rem;
    }
    .stat-card {
        padding: 1rem 0.75rem;
    }
    .stat-card .stat-value {
        font-size: 1.5rem;
    }
    .stat-card .stat-label {
        font-size: 0.75rem;
    }
    .card-body.p-4 {
        padding: 1.25rem !important;
    }
    /* Footer mobile */
    .footer .col-md-5,
    .footer .col-md-6,
    .footer .col-md-4 {
        margin-bottom: 1.5rem;
    }
    .footer h3 {
        font-size: 1.125rem;
    }
}

@media (max-width: 480px) {
    /* HP kecil: mendekati 4:3 agar teks & tombol muat tanpa terasa gepeng */
    .home-carousel .carousel-item {
        aspect-ratio: 4 / 3;
        min-height: 200px;
        max-height: 320px;
        height: auto;
    }
    .home-carousel-caption {
        padding: 0.75rem 0.75rem 1.25rem;
        justify-content: flex-end;
    }
    .home-carousel-title {
        font-size: 1.125rem;
    }
    .home-carousel-desc {
        font-size: 0.8125rem;
        margin-bottom: 0.65rem;
        -webkit-line-clamp: 2;
    }
    .navbar-container {
        height: 56px;
        padding: 0 0.75rem;
    }
    .navbar-logo img {
        height: 32px;
    }
    .navbar-menu {
        top: 56px;
    }
}

/* Pastikan topbar sticky tidak tutup konten */
.topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
}
#main-wrapper {
    overflow-x: hidden;
}
.page-wrapper {
    overflow-x: hidden;
    max-width: 100vw;
}

/* ============================================================
   Job cards – homepage mobile layout
   ============================================================ */
.job-card-home {
    overflow: visible;
    height: 100%;
}
.job-card-inner {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
}
.job-card-logo {
    width: 56px;
    height: 56px;
    min-width: 56px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: #fff;
    flex-shrink: 0;
}
.job-card-body {
    flex: 1;
    min-width: 0; /* important: allow text truncate in flex */
}
.job-card-body .job-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.15rem;
    line-height: 1.3;
    word-break: break-word;
}
.job-card-body .company-name {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    margin-bottom: 0.35rem;
    word-break: break-word;
}
.job-card-body .job-meta {
    margin-bottom: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}
.job-card-btn {
    margin-top: 0.25rem;
    display: inline-flex;
    align-items: center;
    min-height: 36px;
}

@media (max-width: 575.98px) {
    .job-card {
        padding: 1rem;
    }
    .job-card-inner {
        flex-direction: row;
        gap: 0.75rem;
    }
    .job-card-logo {
        width: 48px;
        height: 48px;
        min-width: 48px;
    }
    .job-card-body .job-title {
        font-size: 0.9375rem;
    }
    .job-card-btn {
        width: auto;
        display: inline-flex;
        justify-content: center;
        margin-top: 0.5rem;
        padding: 0.4rem 0.9rem;
        font-size: 0.8125rem;
    }
    /* Pastikan tidak ada sisa tombol orphan */
    .job-card + .job-card-btn,
    .section > .btn-accent {
        display: none;
    }
}

/* Company cards mobile */
@media (max-width: 575.98px) {
    .company-card {
        padding: 0.75rem 0.5rem;
    }
    .company-card img {
        max-height: 48px;
    }
    .company-card .company-name {
        font-size: 0.75rem;
        line-height: 1.3;
    }
    .news-card img {
        max-height: 160px;
        width: 100%;
        object-fit: cover;
    }
}

/* ============================================================
   News cards – equal height grid (desktop + mobile)
   ============================================================ */
.news-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition);
}
.news-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.news-card-img-link {
    display: block;
    width: 100%;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--bg-alt);
}
.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center;
    display: block;
}
.news-card .news-body {
    padding: 1rem 1.125rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}
.news-card .news-date {
    color: var(--text-muted);
    font-size: 0.8125rem;
    margin-bottom: 0.5rem;
}
.news-card .news-title {
    font-weight: 600;
    color: var(--text);
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 4.2em; /* keep card heights closer */
}
.news-card .news-card-btn {
    margin-top: auto;
    align-self: flex-start;
}

/* Tentang Kami content from CMS */
.tentang-kami-card .card-body {
    text-align: center;
}
.tentang-kami-card .card-body img {
    max-width: 280px;
    height: auto;
    margin: 1rem auto 0;
    display: block;
}
.tentang-kami-card .card-body h1,
.tentang-kami-card .card-body h2,
.tentang-kami-card .card-body h3,
.tentang-kami-card .card-body h4 {
    margin-top: 0;
    margin-bottom: 1rem;
}
.tentang-kami-card .card-body p {
    text-align: center;
    max-width: 36em;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-secondary);
    line-height: 1.7;
}

@media (max-width: 575.98px) {
    .news-card img {
        height: 180px;
    }
    .news-card .news-title {
        min-height: 0;
        -webkit-line-clamp: 2;
    }
}
