
@media (prefers-reduced-motion: no-preference) {
    @view-transition {
        navigation: auto;
    }
}


::view-transition-old(root),
::view-transition-new(root),
::view-transition-group(admin-sidebar),
::view-transition-old(admin-sidebar),
::view-transition-new(admin-sidebar),
::view-transition-group(admin-topbar),
::view-transition-old(admin-topbar),
::view-transition-new(admin-topbar) {
    animation: none !important;
    animation-duration: 0s !important;
    mix-blend-mode: normal !important;
}

:root {
    --primary:      #2d6a4f;
    --primary-dark: #1b4332;
    --primary-light:#40916c;
    --accent:       #52b788;
    --dark:         #1a1a2e;
    --sidebar-bg:   #2c3e50;
    --sidebar-w:    240px;
    --topbar-h:     60px;
    --text-dark:    #2d3748;
    --text-muted:   #718096;
    --bg-light:     #f4f6f9;
    --card-shadow:  0 2px 12px rgba(0,0,0,.08);
    --border-color: #e2e8f0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Poppins', sans-serif; color: var(--text-dark); }
a { text-decoration: none; }


.admin-body { background: var(--bg-light); }


.preload .admin-sidebar,
.preload .admin-main {
    transition: none !important;
}

/* Sidebar */
.admin-sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--sidebar-bg);
    color: #fff;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform .3s ease;
    overflow-y: auto;
    view-transition-name: admin-sidebar;
}

.sidebar-brand {
    padding: 20px 24px;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    background: var(--primary-dark);
    color: #fff;
}
.sidebar-brand i { font-size: 1.3rem; color: var(--accent); }

.sidebar-admin-info {
    padding: 20px 24px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.admin-avatar { margin-bottom: 8px; color: #a0aec0; }
.admin-name { font-size: .85rem; font-weight: 600; color: #e2e8f0; }

.sidebar-nav { flex: 1; padding: 12px 0; }
.sidebar-nav .nav-item,
.sidebar-footer .nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: #a0aec0;
    font-size: .88rem;
    font-weight: 500;
    transition: all .2s;
    cursor: pointer;
    border-left: 3px solid transparent;
}
.sidebar-nav .nav-item:hover,
.sidebar-footer .nav-item:hover {
    background: rgba(255,255,255,.07);
    color: #fff;
}
.sidebar-nav .nav-item.active {
    background: rgba(255,255,255,.1);
    color: #fff;
    border-left-color: var(--accent);
    font-weight: 600;
}
.sidebar-nav .nav-item i { width: 18px; text-align: center; }
.sidebar-footer { border-top: 1px solid rgba(255,255,255,.1); padding: 12px 0; }

/* Main area */
.admin-main {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    transition: margin-left .3s ease;
}

/* Topbar */
.admin-topbar {
    height: var(--topbar-h);
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,.05);
    view-transition-name: admin-topbar;
}
.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px 8px;
}
.topbar-title {
    flex: 1;
    font-size: .9rem;
    font-weight: 600;
    color: var(--text-dark);
}
.topbar-right { color: var(--text-muted); cursor: pointer; }

/* Content area */
.admin-content { padding: 24px; }

/* Collapsed sidebar */
.admin-body.sidebar-collapsed .admin-sidebar { transform: translateX(-100%); }
.admin-body.sidebar-collapsed .admin-main { margin-left: 0; }


.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform .2s, box-shadow .2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
}
.stat-icon.green  { background: var(--primary); }
.stat-icon.blue   { background: #3182ce; }
.stat-icon.orange { background: #dd6b20; }
.stat-icon.purple { background: #805ad5; }
.stat-count { font-size: 1.8rem; font-weight: 700; color: var(--text-dark); }
.stat-label { font-size: .82rem; color: var(--text-muted); }

/* Welcome card */
.welcome-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    border-radius: 1px;
    padding: 28px;
    box-shadow: var(--card-shadow);
}
.welcome-card h5 { font-size: 1rem; opacity: .85; }
.welcome-card h3 { font-size: 1.4rem; font-weight: 700; margin-top: 4px; }
.welcome-card p  { font-size: .88rem; opacity: .8; margin-top: 8px; line-height: 1.7; }


.data-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--card-shadow);
}
.data-card .card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.data-card .card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
}

.table { font-size: .87rem; }
.table thead th {
    background: var(--bg-light);
    color: var(--text-muted);
    font-weight: 600;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    border: none;
    padding: 12px 16px;
}
.table tbody td {
    padding: 12px 16px;
    vertical-align: middle;
    border-color: var(--border-color);
}
.table tbody tr:hover { background: #f8fffe; }

/* Buttons */
.btn-primary-spk {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 20px;
    font-size: .87rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}
.btn-primary-spk:hover { background: var(--primary-dark); color: #fff; }

.btn-sm-action {
    padding: 5px 12px;
    font-size: .78rem;
    border-radius: 6px;
    font-weight: 500;
}

/* Forms */
.form-card {
    background: #fff;
    border-radius: 12px;
    padding: 28px;
    box-shadow: var(--card-shadow);
}
.form-card .form-label { font-weight: 600; font-size: .87rem; color: var(--text-dark); }
.form-control, .form-select {
    border-radius: 8px;
    border: 1.5px solid var(--border-color);
    padding: 10px 14px;
    font-size: .88rem;
    transition: border-color .2s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(45,106,79,.12);
}
.form-group { margin-bottom: 20px; }

/* Page title */
.page-heading {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
}
.breadcrumb-spk {
    font-size: .8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

/* AHP Tables */
.ahp-matrix-table th, .ahp-matrix-table td {
    text-align: center;
    font-size: .82rem;
    padding: 8px 10px;
}
.ahp-matrix-table th:first-child,
.ahp-matrix-table td:first-child { text-align: left; font-weight: 600; }

.cr-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: .82rem;
    font-weight: 600;
}
.cr-badge.consistent   { background: #c6f6d5; color: #276749; }
.cr-badge.inconsistent { background: #fed7d7; color: #9b2c2c; }

/* Pagination nav */
.ahp-step-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
}


.user-body { background: #fff; }

/* Navbar */
.user-navbar {
    background: var(--dark);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.user-navbar .navbar-brand { color: var(--accent) !important; font-size: 1.5rem; }
.user-navbar .nav-link {
    color: rgba(255,255,255,.75) !important;
    font-size: .9rem;
    font-weight: 500;
    padding: 8px 14px !important;
    border-radius: 6px;
    transition: all .2s;
}
.user-navbar .nav-link:hover,
.user-navbar .nav-link.active {
    color: #fff !important;
    background: rgba(255,255,255,.1);
}
.user-navbar .navbar-toggler { border-color: rgba(255,255,255,.3); }
.user-navbar .navbar-toggler-icon { filter: invert(1); }
.user-greeting { color: rgba(255,255,255,.85); font-size: .87rem; }

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 480px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--accent) 100%);
    display: flex;
    align-items: center;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.05)" d="M0,160L48,176C96,192,192,224,288,213.3C384,203,480,149,576,138.7C672,128,768,160,864,181.3C960,203,1056,213,1152,197.3C1248,181,1344,139,1392,117.3L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"/></svg>') bottom/cover no-repeat;
}
.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
    padding: 60px 20px;
}
.hero-content h1 { font-size: 2.4rem; font-weight: 700; line-height: 1.3; margin-bottom: 16px; }
.hero-content p  { font-size: 1.1rem; opacity: .85; margin-bottom: 32px; }
.btn-hero {
    background: #fff;
    color: var(--primary);
    font-weight: 700;
    padding: 14px 36px;
    border-radius: 50px;
    font-size: 1rem;
    transition: all .3s;
    box-shadow: 0 4px 15px rgba(0,0,0,.2);
    border: none;
}
.btn-hero:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,.25); color: var(--primary-dark); }

/* Section */
.section { padding: 60px 0; }
.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}
.section-subtitle { color: var(--text-muted); margin-bottom: 40px; }

/* Category Cards */
.category-card {
    background: #fff;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    padding: 24px 20px;
    text-align: center;
    transition: all .3s;
    cursor: pointer;
}
.category-card:hover {
    border-color: var(--primary);
    box-shadow: 0 6px 20px rgba(45,106,79,.15);
    transform: translateY(-4px);
}
.category-card .cat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: #e8f5e9;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin: 0 auto 14px;
}
.category-card h6 { font-weight: 700; font-size: .9rem; }
.category-card small { color: var(--text-muted); font-size: .78rem; }

/* Wisata Grid Card */
.wisata-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all .3s;
    background: #fff;
    height: 100%;
}
.wisata-card:hover { transform: translateY(-6px); box-shadow: 0 12px 30px rgba(0,0,0,.15); }
.wisata-card .card-img-wrapper { position: relative; overflow: hidden; height: 200px; }
.wisata-card .card-img-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.wisata-card:hover .card-img-wrapper img { transform: scale(1.05); }
.wisata-card .card-body { padding: 16px; }
.wisata-card .card-kategori {
    display: inline-block;
    background: #e8f5e9;
    color: var(--primary);
    font-size: .72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
}
.wisata-card .card-nama { font-weight: 700; font-size: .95rem; margin-bottom: 6px; color: var(--text-dark); }
.wisata-card .card-lokasi { font-size: .8rem; color: var(--text-muted); }
.wisata-card .card-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    font-size: .8rem;
}

/* Auth Pages */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    padding: 40px 20px;
}
.auth-card {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 440px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.auth-card-header {
    background: var(--dark);
    color: #fff;
    padding: 24px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: .05em;
}
.auth-card-body { padding: 32px; }
.btn-auth {
    width: 100%;
    background: var(--dark);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
    margin-top: 8px;
}
.btn-auth:hover { background: var(--primary-dark); }

/* AHP Pemilihan */
.ahp-card {
    background: #fff;
    border-radius: 12px;
    padding: 28px;
    box-shadow: var(--card-shadow);
    margin-bottom: 24px;
}
.ahp-card h5 { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.ahp-card .subtitle { color: var(--text-muted); font-size: .87rem; margin-bottom: 24px; }

.comparison-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #f8fffe;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}
.comparison-row .kr-label {
    flex: 1;
    font-weight: 600;
    font-size: .87rem;
    color: var(--text-dark);
}
.comparison-row .kr-label.right { text-align: right; }
.comparison-row select {
    width: 220px;
    flex-shrink: 0;
    font-size: .83rem;
}
.vs-badge {
    background: var(--primary);
    color: #fff;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: .72rem;
    font-weight: 600;
    flex-shrink: 0;
}

/* Result Tables */
.result-section {
    background: #fff;
    border-radius: 12px;
    padding: 28px;
    box-shadow: var(--card-shadow);
    margin-bottom: 28px;
}
.result-section h5 { font-size: 1rem; font-weight: 700; margin-bottom: 20px; }
.result-section .sub-heading { font-size: .87rem; font-weight: 600; color: var(--text-muted); margin-bottom: 12px; }

/* Ranking Table */
.rank-table td:first-child { font-weight: 700; color: var(--primary); }
.rank-badge-1 { background: #ffd700; color: #333; }
.rank-badge-2 { background: #c0c0c0; color: #333; }
.rank-badge-3 { background: #cd7f32; color: #fff; }
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: 700;
    font-size: .9rem;
}

/* Detail Wisata */
.detail-hero { height: 380px; overflow: hidden; position: relative; }
.detail-hero img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 100px;
    background: linear-gradient(transparent, rgba(0,0,0,.4));
}
.detail-content { padding: 40px 0; }
.detail-info-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--card-shadow);
    margin-bottom: 20px;
}
.info-table td { padding: 10px 12px; font-size: .87rem; border-color: var(--border-color); }
.info-table td:first-child { font-weight: 600; color: var(--text-muted); width: 140px; }
.action-btn {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    font-size: .87rem;
    font-weight: 600;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all .2s;
}
.action-btn-primary {
    background: var(--primary);
    color: #fff;
    border: none;
}
.action-btn-primary:hover { background: var(--primary-dark); }
.action-btn-secondary {
    background: #fff;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.action-btn-secondary:hover { background: var(--primary); color: #fff; }

/* Peta */
.map-container { height: 520px; border-radius: 12px; overflow: hidden; box-shadow: var(--card-shadow); }
#map { height: 100%; width: 100%; }
.map-sidebar {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    height: 520px;
    overflow-y: auto;
}

/* Footer */
.user-footer {
    background: var(--dark);
    color: rgba(255,255,255,.7);
    padding: 20px 0;
    font-size: .85rem;
    margin-top: 60px;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-primary-spk { color: var(--primary) !important; }
.bg-primary-spk   { background: var(--primary) !important; }

.spinner-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-sidebar { transform: translateX(-100%); }
    .admin-main { margin-left: 0; }
    .admin-body.sidebar-open .admin-sidebar { transform: translateX(0); }
    .hero-content h1 { font-size: 1.6rem; }
    .comparison-row { flex-direction: column; align-items: stretch; }
    .comparison-row select { width: 100%; }
    .map-container { height: 340px; }
    .map-sidebar { height: auto; }
}
