:root {
    --primary: #1a5276;
    --primary-dark: #154360;
    --primary-light: #2e86c1;
    --secondary: #17a589;
    --accent: #e67e22;
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #e74c3c;
    --info: #2980b9;
    --light: #f8f9fa;
    --dark: #1a252f;
    --text: #2c3e50;
    --muted: #7f8c8d;
    --border: #dee2e6;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --radius: 10px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: #f0f4f8;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* NAVBAR */
.bg-primary-custom { background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%) !important; }
.brand-icon { width: 40px; height: 40px; background: rgba(255,255,255,0.15); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.navbar-logo { width: 40px; height: 40px; object-fit: contain; flex-shrink: 0; }
.brand-title { font-size: 0.95rem; font-weight: 700; line-height: 1.2; color: #fff; }
.brand-sub { font-size: 0.7rem; color: rgba(255,255,255,0.75); font-weight: 500; }
.navbar-nav .nav-link { color: rgba(255,255,255,0.85) !important; border-radius: 6px; padding: 6px 12px !important; transition: all 0.2s; font-size: 0.875rem; font-weight: 500; }
.navbar-nav .nav-link:hover, .navbar-nav .nav-link.active { background: rgba(255,255,255,0.18); color: #fff !important; }

/* MAIN */
.main-content { flex: 1; padding-bottom: 0; }

/* HERO */
.hero-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
    color: #fff;
    padding: 60px 0 80px;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}
.hero-title { font-size: 2.2rem; font-weight: 800; line-height: 1.2; }
.hero-subtitle { font-size: 1.1rem; opacity: 0.85; }
.hero-stats { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 32px; }
.hero-stat { background: rgba(255,255,255,0.12); border-radius: 10px; padding: 16px 24px; text-align: center; backdrop-filter: blur(5px); }
.hero-stat-num { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.hero-stat-label { font-size: 0.75rem; opacity: 0.8; margin-top: 4px; }

/* SEARCH BAR */
.search-hero { margin-top: -30px; }
.search-card { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: 0 8px 32px rgba(0,0,0,0.12); }
.search-input-group { display: flex; gap: 8px; }
.search-input-group .form-control { border-radius: 8px; border: 2px solid var(--border); font-size: 1rem; padding: 12px 16px; transition: border-color 0.2s; }
.search-input-group .form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,82,118,0.1); }
.search-input-group .btn { border-radius: 8px; padding: 12px 24px; font-weight: 600; }
.jalur-tabs { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.jalur-tab { display: flex; align-items: center; gap: 8px; padding: 8px 20px; border-radius: 8px; border: 2px solid var(--border); background: #fff; color: var(--text); font-weight: 600; text-decoration: none; cursor: pointer; transition: all 0.2s; font-size: 0.9rem; }
.jalur-tab:hover, .jalur-tab.active { border-color: var(--primary); background: var(--primary); color: #fff; }
.jalur-tab .badge-snbt, .jalur-tab .badge-snbp { font-size: 0.75rem; background: rgba(255,255,255,0.25); padding: 2px 8px; border-radius: 20px; }

/* CARDS */
.card-custom { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid rgba(0,0,0,0.05); transition: transform 0.2s, box-shadow 0.2s; overflow: hidden; }
.card-custom:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.card-header-custom { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; padding: 16px 20px; }
.card-body-custom { padding: 20px; }

/* PTN CARD */
.ptn-card { display: flex; flex-direction: column; height: 100%; }
.ptn-card .ptn-header { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; padding: 20px; }
.ptn-card .ptn-name { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.ptn-card .ptn-singkatan { font-size: 0.8rem; opacity: 0.85; }
.ptn-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: 0.7rem; font-weight: 600; }
.badge-jalur-snbp { background: rgb(255, 255, 255); color: #1e8449; border: 1px solid rgba(39,174,96,0.3); }
.badge-jalur-snbt { background: rgb(255, 255, 255); color: #ba6c12; border: 1px solid rgba(230,126,34,0.3); }
.badge-kategori { background: rgb(255, 255, 255); color: #1a6fa8; border: 1px solid rgba(41,128,185,0.3); }

/* PRODI TABLE */
.prodi-table-wrapper { border-radius: var(--radius); overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; box-shadow: var(--shadow); background: #fff; }
.prodi-table { width: 100%; border-collapse: collapse; }
.search-results-table-wrapper .prodi-table { min-width: 980px; }
.prodi-table thead th { background: var(--primary); color: #fff; padding: 12px 16px; font-weight: 600; font-size: 0.875rem; white-space: nowrap; }
.prodi-table tbody tr { border-bottom: 1px solid var(--border); transition: background 0.15s; }
.prodi-table tbody tr:hover { background: #f8f9ff; }
.prodi-table td { padding: 12px 16px; font-size: 0.875rem; vertical-align: middle; }
.prodi-name-link { color: var(--primary); font-weight: 600; text-decoration: none; }
.prodi-name-link:hover { text-decoration: underline; }
.mobile-inline-meta,
.mobile-inline-stats { display: none; }
.th-two-line { display: inline-block; line-height: 1.15; white-space: normal; text-align: center; }

/* PERCENTAGE BADGE */
.pct-badge { display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: 0.8rem; font-weight: 700; }
.pct-high { background: #fde8e8; color: #c0392b; }
.pct-mid { background: #fef3cd; color: #856404; }
.pct-low { background: #d4edda; color: #155724; }
.pct-none { background: #e9ecef; color: #6c757d; }

/* DETAIL PAGE */
.detail-section { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 24px; }
.detail-title { font-size: 1.4rem; font-weight: 800; color: var(--primary-dark); margin-bottom: 4px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.meta-item { display: flex; align-items: center; gap: 6px; font-size: 0.875rem; color: var(--muted); }
.stat-year-card { background: var(--light); border-radius: 8px; padding: 14px; text-align: center; border: 1px solid var(--border); }
.stat-year { font-size: 0.75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.stat-val { font-size: 1.3rem; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 0.7rem; color: var(--muted); margin-top: 2px; }

/* COMPARE */
.compare-table th { background: var(--primary); color: #fff; text-align: center; padding: 12px; }
.compare-table td { padding: 12px 16px; vertical-align: middle; border-bottom: 1px solid var(--border); }
.compare-table .cat-col { background: #f8f9fa; font-weight: 600; font-size: 0.8rem; text-align: center; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.compare-table .val-col { font-size: 0.9rem; text-align: center; }

/* FILTER BAR */
.filter-bar { background: #fff; border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow); margin-bottom: 24px; }
.filter-bar .form-label { font-size: 0.8rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }

/* PAGINATION */
.pagination .page-link { border-radius: 6px !important; margin: 0 2px; color: var(--primary); }
.pagination .page-item.active .page-link { background: var(--primary); border-color: var(--primary); }

/* SECTION HEADER */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.section-title { font-size: 1.4rem; font-weight: 800; color: var(--primary-dark); margin: 0; }
.section-sub { font-size: 0.875rem; color: var(--muted); margin-top: 4px; }

/* FOOTER */
.footer-custom { background: var(--dark); color: rgba(255,255,255,0.7); margin-top: auto; }

/* BUTTONS */
.btn-primary-custom { background: var(--primary); color: #fff; border: none; border-radius: 8px; padding: 10px 20px; font-weight: 600; transition: background 0.2s; }
.btn-primary-custom:hover { background: var(--primary-dark); color: #fff; }

/* BREADCRUMB */
.page-breadcrumb { padding: 16px 0; }
.breadcrumb-item a { color: var(--primary); text-decoration: none; }
.breadcrumb-item.active { color: var(--muted); }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state i { font-size: 3rem; opacity: 0.3; margin-bottom: 16px; }
.empty-state p { font-size: 1rem; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .hero-title { font-size: 1.5rem; }
    .hero-stats { gap: 12px; }
    .hero-stat { padding: 10px 14px; }
    .section-header { flex-direction: column; align-items: flex-start; }
    .prodi-table-wrapper {
        overflow-x: auto;
    }
    .search-results-table-wrapper .prodi-table {
        min-width: 900px;
        table-layout: auto;
    }
    .prodi-table thead th {
        padding: 8px 7px;
        font-size: 0.68rem;
    }
    .prodi-table td {
        padding: 9px 7px;
        font-size: 0.72rem;
        white-space: normal;
    }
    .prodi-table td.prodi-col-name {
        min-width: 0;
        white-space: normal;
    }
    .prodi-table th:nth-child(3),
    .prodi-table td:nth-child(3),
    .prodi-table th:nth-child(5),
    .prodi-table td:nth-child(5),
    .prodi-table th:nth-child(6),
    .prodi-table td:nth-child(6) {
        display: none;
    }
    .prodi-table th:nth-child(1),
    .prodi-table td:nth-child(1) {
        width: 42px;
    }
    .prodi-table th:nth-child(2),
    .prodi-table td:nth-child(2) {
        width: 33%;
    }
    .prodi-table th:nth-child(4),
    .prodi-table td:nth-child(4) {
        width: 18%;
    }
    .prodi-table th:nth-child(7),
    .prodi-table td:nth-child(7) {
        width: 11%;
    }
    .prodi-table th:nth-child(8),
    .prodi-table td:nth-child(8) {
        width: 11%;
    }
    .prodi-table th:nth-child(9),
    .prodi-table td:nth-child(9) {
        width: 11%;
    }
    .prodi-table th:nth-child(10),
    .prodi-table td:nth-child(10) {
        width: 48px;
        text-align: center;
    }
    .filter-bar {
        padding: 14px;
    }
    .mobile-inline-meta {
        display: block;
        margin-top: 4px;
        font-size: 0.62rem;
        color: var(--muted);
        line-height: 1.3;
    }
    .mobile-inline-meta span {
        display: block;
    }
    .th-two-line {
        font-size: 0.65rem;
    }
    .prodi-table td .btn {
        padding: 4px 7px;
    }
}

/* CHART */
.year-chart { display: flex; align-items: flex-end; gap: 8px; height: 120px; padding: 8px 0; }
.year-bar-group { display: flex; flex-direction: column; align-items: center; flex: 1; gap: 4px; height: 100%; }
.year-bar-wrap { display: flex; align-items: flex-end; gap: 3px; height: 90px; width: 100%; justify-content: center; }
.year-bar { width: 12px; border-radius: 3px 3px 0 0; transition: height 0.3s; min-height: 2px; }
.bar-dt { background: var(--primary); }
.bar-peminat { background: var(--accent); }
.year-label { font-size: 0.65rem; color: var(--muted); font-weight: 600; }
.chart-legend { display: flex; gap: 16px; justify-content: center; margin-top: 8px; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 0.75rem; color: var(--muted); }
.legend-dot { width: 10px; height: 10px; border-radius: 2px; }
