/* LandingPro — UI dashboard (Bootstrap 5 + penyesuaian). Mobile: offcanvas + navigasi bawah. Desktop: sidebar tetap. */
:root {
  --bs-font-sans-serif: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-primary: #2563EB; --bs-primary-rgb: 37, 99, 235;
  --bs-body-bg: #F4F6FB; --bs-body-color: #0F172A; --bs-border-color: #E5E9F2;
  --bs-border-radius: .65rem; --bs-border-radius-lg: .9rem;
  --sb-w: 264px; --sb-bg: #0F172A; --sb-fg: #CBD5E1; --top-h: 64px;
}
body.dash { min-height: 100vh; }
a { text-decoration: none; }
.btn { font-weight: 600; border-radius: .6rem; }
.btn-primary { --bs-btn-bg: #2563EB; --bs-btn-border-color: #2563EB; --bs-btn-hover-bg: #1D4ED8; --bs-btn-hover-border-color: #1D4ED8; --bs-btn-active-bg: #1E40AF; }
.btn-icon { width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 12px; padding: 0; font-size: 1.25rem; color: #334155; }
.btn-icon:hover { background: #EEF2FF; }
.form-control, .form-select { border-radius: .6rem; min-height: 44px; }
.form-control:focus, .form-select:focus { border-color: #93B4F8; box-shadow: 0 0 0 .2rem rgb(37 99 235 / .15); }
.form-label { font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
.form-text { font-size: .8rem; }
.min-w-0 { min-width: 0; }

/* ---------- Sidebar ---------- */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sb-w); background: var(--sb-bg); color: var(--sb-fg); flex-direction: column; z-index: 1030; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #334155 transparent; }
.sidebar-oc { width: min(86vw, 300px) !important; }
.sidebar-oc .sidebar { position: static; width: 100%; min-height: 100%; display: flex; }
.sb-brand { display: flex; align-items: center; gap: 10px; padding: 20px 20px 14px; color: #fff; font-weight: 800; font-size: 1.1rem; }
.sb-logo { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, #2563EB, #7C3AED); color: #fff; font-weight: 800; }
.sb-user { display: flex; gap: 10px; align-items: center; margin: 0 14px 10px; padding: 12px; border-radius: 12px; background: rgb(255 255 255 / .05); }
.avatar-sm { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #38BDF8, #6366F1); color: #fff; font-weight: 700; font-size: .9rem; flex: none; }
.sb-nav { padding: 4px 10px 12px; flex: 1; }
.sb-group { font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #64748B; padding: 16px 12px 6px; }
.sb-link { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--sb-fg); font-size: .9rem; font-weight: 500; transition: background .15s, color .15s; text-align: left; }
.sb-link .bi { font-size: 1.05rem; width: 20px; text-align: center; opacity: .9; }
.sb-link:hover { background: rgb(255 255 255 / .06); color: #fff; }
.sb-link.active { background: linear-gradient(90deg, rgb(37 99 235 / .9), rgb(99 102 241 / .75)); color: #fff; box-shadow: 0 6px 16px -8px rgb(37 99 235 / .8); }
.sb-badge { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: #F43F5E; color: #fff; font-size: .72rem; font-weight: 700; text-align: center; }
.sb-foot { padding: 10px; border-top: 1px solid rgb(255 255 255 / .07); }

/* ---------- Kandungan ---------- */
.main { min-height: 100vh; display: flex; flex-direction: column; }
@media (min-width: 992px) { .main { margin-left: var(--sb-w); } }
.topbar { position: sticky; top: 0; z-index: 1020; height: var(--top-h); display: flex; align-items: center; gap: 8px; padding: 0 12px; background: rgb(255 255 255 / .85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--bs-border-color); }
@media (min-width: 992px) { .topbar { padding: 0 28px; } }
.topbar-title { font-size: 1.1rem; font-weight: 700; margin: 0; min-width: 0; }
.dot-badge { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #F43F5E; color: #fff; font-size: .65rem; font-weight: 700; display: grid; place-items: center; }
.content { padding: 18px 14px 96px; width: 100%; max-width: 1280px; }
@media (min-width: 992px) { .content { padding: 28px 28px 48px; } }
.is-wide .content { max-width: none; }

/* ---------- Navigasi bawah (mobile) ---------- */
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1025; display: flex; justify-content: space-around; background: #fff; border-top: 1px solid var(--bs-border-color); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px -12px rgb(15 23 42 / .25); }
.bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; color: #64748B; font-size: .7rem; font-weight: 600; border-radius: 10px; }
.bottom-nav a .bi { font-size: 1.3rem; }
.bottom-nav a.active { color: #2563EB; }

/* ---------- Kad & komponen ---------- */
.card { border: 1px solid var(--bs-border-color); border-radius: 1rem; box-shadow: 0 1px 2px rgb(15 23 42 / .04); }
.card-header { background: transparent; border-bottom: 1px solid var(--bs-border-color); padding: 14px 18px; font-weight: 700; }
.card-body { padding: 18px; }
@media (min-width: 768px) { .card-body { padding: 22px; } }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.page-head h2 { font-size: 1.35rem; font-weight: 800; margin: 0; }
.page-head p { margin: 2px 0 0; color: #64748B; font-size: .92rem; }
.stat-card { position: relative; overflow: hidden; padding: 18px; border-radius: 1rem; background: #fff; border: 1px solid var(--bs-border-color); height: 100%; }
.stat-card .stat-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem; margin-bottom: 12px; }
.stat-card .stat-v { font-size: 1.65rem; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.stat-card .stat-l { color: #64748B; font-size: .85rem; }
.ic-blue { background: #DBEAFE; color: #1D4ED8; } .ic-green { background: #DCFCE7; color: #15803D; } .ic-amber { background: #FEF3C7; color: #B45309; }
.ic-rose { background: #FFE4E6; color: #BE123C; } .ic-violet { background: #EDE9FE; color: #6D28D9; } .ic-cyan { background: #CFFAFE; color: #0E7490; }
.table { --bs-table-bg: transparent; margin: 0; }
.table > :not(caption) > * > * { padding: .75rem .9rem; vertical-align: middle; }
.table thead th { font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: #64748B; font-weight: 700; background: #F8FAFC; white-space: nowrap; }
.table-hover tbody tr:hover { --bs-table-hover-bg: #F8FAFF; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.filter-bar .form-control, .filter-bar .form-select { min-height: 40px; width: auto; flex: 1 1 160px; }
.empty { text-align: center; padding: 44px 16px; color: #64748B; }
.empty .bi { font-size: 2.6rem; color: #CBD5E1; display: block; margin-bottom: 8px; }
.empty h5 { color: #0F172A; font-weight: 700; }
.confirm-ic { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%; background: #FEF2F2; color: #DC2626; display: grid; place-items: center; font-size: 1.5rem; }
.link-box { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 12px; background: #F1F5F9; border: 1px dashed #CBD5E1; font-weight: 600; word-break: break-all; }
.link-box { flex-wrap: wrap; }
.link-box > a:first-child { color: #1D4ED8; flex: 1 1 220px; min-width: 0; }
.chk-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.chk-list li { display: flex; gap: 10px; align-items: center; }
.chk-list .bi-check-circle-fill { color: #16A34A; } .chk-list .bi-circle { color: #CBD5E1; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.media-tile { position: relative; border-radius: 12px; overflow: hidden; background: #fff; border: 1px solid var(--bs-border-color); }
.media-tile img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: repeating-conic-gradient(#F1F5F9 0 25%, #fff 0 50%) 50% / 16px 16px; }
.media-tile .meta { padding: 6px 8px; font-size: .72rem; color: #64748B; }
.media-tile .actions { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; }
.thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: #E2E8F0; flex: none; }
.thumb-ph { display: grid; place-items: center; color: #94A3B8; }
.toast { border-radius: 12px; box-shadow: 0 12px 30px -10px rgb(15 23 42 / .35); }
.badge { font-weight: 600; }
.nav-tabs-scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.nav-tabs-scroll .nav-link { white-space: nowrap; }
.btn.is-loading { pointer-events: none; opacity: .8; }
.btn.is-loading::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 16px 22px; border-left: 2px solid #E2E8F0; margin-left: 6px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: #2563EB; border: 2px solid #fff; }
.perm-table td, .perm-table th { text-align: center; }
.perm-table td:first-child, .perm-table th:first-child { text-align: left; }
.sticky-actions { position: sticky; bottom: 70px; z-index: 10; background: #fff; border: 1px solid var(--bs-border-color); border-radius: 14px; padding: 10px; box-shadow: 0 10px 30px -15px rgb(15 23 42 / .35); }
@media (min-width: 992px) { .sticky-actions { bottom: 16px; } }

/* Kad senarai bertukar dari jadual di mobile */
@media (max-width: 767.98px) {
  .table-cards thead { display: none; }
  .table-cards tbody tr { display: block; padding: 12px 14px; border-bottom: 1px solid var(--bs-border-color); }
  .table-cards tbody td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0 !important; border: 0; text-align: right; }
  .table-cards tbody td::before { content: attr(data-l); font-weight: 600; color: #64748B; font-size: .8rem; text-align: left; }
  .table-cards tbody td.td-main { display: block; text-align: left; font-size: 1rem; }
  .table-cards tbody td.td-main::before { content: none; }
}

/* ---------- Halaman auth ---------- */
.auth-body { background: #F4F6FB; min-height: 100vh; }
.auth-wrap { display: grid; min-height: 100vh; }
@media (min-width: 992px) { .auth-wrap { grid-template-columns: 1fr 1fr; } }
.auth-side { flex-direction: column; justify-content: space-between; padding: 48px; color: #fff; background: radial-gradient(circle at 20% 20%, #7C3AED 0, transparent 45%), radial-gradient(circle at 80% 80%, #06B6D4 0, transparent 40%), #1E3A8A; }
.auth-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: inherit; }
.auth-main .auth-brand { color: #0F172A; }
.auth-points li { margin-bottom: 10px; font-size: 1.05rem; } .auth-points .bi { color: #A7F3D0; margin-right: 8px; }
.auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 440px; background: #fff; border-radius: 1.25rem; padding: 28px 22px; box-shadow: 0 20px 50px -20px rgb(15 23 42 / .25); border: 1px solid var(--bs-border-color); }
@media (min-width: 576px) { .auth-card { padding: 36px 34px; } }
.auth-card h1 { font-size: 1.5rem; font-weight: 800; }
.pw-wrap { position: relative; }
.pw-wrap .pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: #64748B; padding: 6px 8px; }
.slug-input .input-group-text { background: #F8FAFC; font-weight: 600; font-size: .85rem; }
.slug-status { font-size: .85rem; font-weight: 600; min-height: 1.3em; }
.slug-status.ok { color: #15803D; } .slug-status.err { color: #B91C1C; }
.slug-input { flex-wrap: nowrap; }
.slug-input .input-group-text { font-size: .78rem; max-width: 58%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; line-height: 30px; }
