/* Iurana CMS — layout admin (Bootstrap 5.3) */
:root {
    --jm-primary: #0f766e;
    --jm-primary-rgb: 15, 118, 110;
    --jm-primary-soft: #e6f2f1;
    --jm-ink: #1c2434;
    --jm-muted: #667085;
    --jm-line: #e7eaf0;
    --jm-bg: #f5f6f8;
    --jm-sidebar-w: 260px;
    --bs-primary: var(--jm-primary);
    --bs-primary-rgb: var(--jm-primary-rgb);
    --bs-link-color: var(--jm-primary);
    --bs-link-hover-color: #0b5c56;
    --bs-link-color-rgb: 15, 118, 110;
    --bs-link-hover-color-rgb: 11, 92, 86;
    --bs-body-font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    --bs-body-color: var(--jm-ink);
    --bs-border-color: var(--jm-line);
}
body { background: var(--jm-bg); font-size: .9rem; }
.btn-primary { --bs-btn-bg: var(--jm-primary); --bs-btn-border-color: var(--jm-primary); --bs-btn-hover-bg: #0b5c56; --bs-btn-hover-border-color: #0b5c56; --bs-btn-active-bg: #0a514c; --bs-btn-disabled-bg: var(--jm-primary); --bs-btn-disabled-border-color: var(--jm-primary); }
.btn-outline-primary { --bs-btn-color: var(--jm-primary); --bs-btn-border-color: var(--jm-primary); --bs-btn-hover-bg: var(--jm-primary); --bs-btn-hover-border-color: var(--jm-primary); --bs-btn-active-bg: var(--jm-primary); }
.text-primary { color: var(--jm-primary) !important; }
.bg-primary-soft { background: var(--jm-primary-soft); }
.form-control:focus, .form-select:focus { border-color: rgba(var(--jm-primary-rgb), .5); box-shadow: 0 0 0 .2rem rgba(var(--jm-primary-rgb), .12); }
.form-check-input:checked { background-color: var(--jm-primary); border-color: var(--jm-primary); }
.form-label { font-weight: 600; font-size: .8rem; color: #344054; margin-bottom: .35rem; }

/* Sidebar */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--jm-sidebar-w); background: #fff; border-right: 1px solid var(--jm-line); display: flex; flex-direction: column; z-index: 1040; transition: transform .2s; }
.sidebar-brand { display: flex; align-items: center; gap: .6rem; padding: 1.15rem 1.4rem 1rem; text-decoration: none; }
.sidebar-brand img { height: 30px; width: auto; display: block; }
.sidebar-brand .logo { width: 34px; height: 34px; border-radius: 10px; background: var(--jm-primary); color: #fff; display: grid; place-items: center; font-size: 1rem; }
.sidebar-nav { overflow-y: auto; padding: .25rem .75rem 1.5rem; flex: 1; }
.sidebar-nav .nav-section { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: #98a2b3; font-weight: 700; margin: 1.1rem .75rem .4rem; }
.sidebar-nav a { display: flex; align-items: center; gap: .7rem; padding: .55rem .75rem; border-radius: 8px; color: #475467; text-decoration: none; font-weight: 500; margin-bottom: 2px; }
.sidebar-nav a i { font-size: 1.05rem; width: 1.2rem; text-align: center; }
.sidebar-nav a:hover { background: #f2f4f7; color: var(--jm-ink); }
.sidebar-nav a.active { background: var(--jm-primary); color: #fff; box-shadow: 0 2px 6px rgba(var(--jm-primary-rgb), .35); }
.main { margin-left: var(--jm-sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 1030; background: rgba(245, 246, 248, .85); backdrop-filter: blur(8px); padding: .8rem 1.75rem; display: flex; align-items: center; gap: 1rem; }
.topbar .tenant-pill { background: #fff; border: 1px solid var(--jm-line); border-radius: 999px; padding: .35rem .9rem; font-weight: 600; font-size: .82rem; display: inline-flex; align-items: center; gap: .45rem; }
.content { padding: .5rem 1.75rem 2rem; flex: 1; }
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    body.sidebar-open .sidebar { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.2); }
    .main { margin-left: 0; }
    .topbar, .content { padding-left: 1rem; padding-right: 1rem; }
}

/* Page & cards */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.page-head h1 { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.page-head .breadcrumb { font-size: .78rem; margin-bottom: .25rem; }
.card { border: 1px solid var(--jm-line); border-radius: 12px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.card-header { background: #fff; border-bottom: 1px solid var(--jm-line); padding: .9rem 1.25rem; font-weight: 700; border-radius: 12px 12px 0 0 !important; }
.stat { padding: 1.1rem 1.25rem; }
.stat .label { color: var(--jm-muted); font-size: .78rem; font-weight: 600; }
.stat .value { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; margin-top: .2rem; font-variant-numeric: tabular-nums; }
.stat .icon { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; font-size: 1.2rem; }

/* Tables */
table.dataTable { font-size: .85rem; }
table.dataTable thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--jm-muted); font-weight: 700; background: #f9fafb; border-bottom-width: 1px !important; white-space: nowrap; }
table.dataTable td { vertical-align: middle; }
div.dt-container .dt-search input { min-width: 220px; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.badge-soft { font-weight: 600; padding: .35em .65em; border-radius: 6px; }
.badge-soft.success { background: #ecfdf3; color: #067647; }
.badge-soft.warning { background: #fffaeb; color: #b54708; }
.badge-soft.danger { background: #fef3f2; color: #b42318; }
.badge-soft.secondary { background: #f2f4f7; color: #475467; }
.badge-soft.info { background: #eff8ff; color: #175cd3; }
.btn-icon { width: 32px; height: 32px; padding: 0; display: inline-grid; place-items: center; border-radius: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* Modal / editor */
.modal-content { border: 0; border-radius: 14px; }
.modal-header { border-bottom: 1px solid var(--jm-line); }
.modal-title { font-weight: 700; }
.confirm-icon { width: 56px; height: 56px; margin: auto; border-radius: 50%; background: #fffaeb; color: #dc6803; display: grid; place-items: center; font-size: 1.6rem; }
.editor-wrap .ql-toolbar { border-radius: 8px 8px 0 0; border-color: var(--bs-border-color); }
.editor-wrap .ql-container { border-radius: 0 0 8px 8px; border-color: var(--bs-border-color); min-height: 180px; font-family: inherit; font-size: .9rem; }
.img-preview { max-height: 110px; border-radius: 8px; border: 1px solid var(--jm-line); margin-top: .5rem; }

/* Auth */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { background: var(--jm-primary); color: #e7f5f3; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art::after { content: ''; position: absolute; width: 520px; height: 520px; border-radius: 50%; border: 70px solid rgba(255,255,255,.06); right: -160px; bottom: -180px; }
.auth-form { display: grid; place-items: center; padding: 2rem; background: #fff; }
@media (max-width: 860px) { .auth-wrap { grid-template-columns: 1fr; } .auth-art { display: none; } }
.code-box { background: #0f172a; color: #e2e8f0; border-radius: 8px; padding: .6rem .8rem; font-family: ui-monospace, monospace; font-size: .8rem; word-break: break-all; }
.bill-check { border: 1px solid var(--jm-line); border-radius: 10px; padding: .6rem .8rem; display: flex; align-items: center; gap: .6rem; cursor: pointer; }
.bill-check:has(input:checked) { border-color: var(--jm-primary); background: var(--jm-primary-soft); }
.pagination { --bs-pagination-color: var(--jm-primary); --bs-pagination-active-bg: var(--jm-primary); --bs-pagination-active-border-color: var(--jm-primary); --bs-pagination-focus-box-shadow: 0 0 0 .2rem rgba(var(--jm-primary-rgb), .15); }
.breadcrumb a { text-decoration: none; }

/* ===== Panduan & tur (guide.js) ===== */
.btn-guide { border-radius: 999px; font-weight: 600; display: inline-flex; align-items: center; gap: .4rem; background: #fff; border: 1px solid var(--jm-line); }
.btn-guide:hover { border-color: var(--jm-primary); color: var(--jm-primary); }
.guide-panel { --bs-offcanvas-width: 420px; }
.guide-panel .offcanvas-header { align-items: flex-start; border-bottom: 1px solid var(--jm-line); margin-bottom: 1rem; }
.guide-summary { font-size: .95rem; line-height: 1.55; }
.guide-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: #98a2b3; margin: 1rem 0 .5rem; }
.guide-when { padding-left: 1.1rem; margin-bottom: .5rem; color: #475467; }
.guide-steps { list-style: none; counter-reset: s; padding: 0; margin: 0; }
.guide-steps li { counter-increment: s; position: relative; padding: 0 0 .9rem 2.4rem; line-height: 1.5; }
.guide-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--jm-primary-soft); color: var(--jm-primary); font-weight: 800; display: grid; place-items: center; font-size: .82rem; }
.guide-steps li:not(:last-child)::after { content: ''; position: absolute; left: .83rem; top: 1.9rem; bottom: .2rem; width: 2px; background: var(--jm-primary-soft); }
.guide-tip { display: flex; gap: .7rem; background: #fffaeb; border: 1px solid #fde9b8; border-radius: 10px; padding: .75rem .9rem; color: #7a4a06; margin-top: .5rem; }
.guide-tip i { font-size: 1.1rem; color: #dc6803; }
.guide-faq { border: 1px solid var(--jm-line); border-radius: 10px; padding: .6rem .85rem; margin-bottom: .5rem; background: #fff; }
.guide-faq summary { font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: .5rem; }
.guide-faq summary::-webkit-details-marker { display: none; }
.guide-faq summary::after { content: '+'; color: var(--jm-primary); font-weight: 800; }
.guide-faq[open] summary::after { content: '−'; }
.guide-faq > div { color: #475467; margin-top: .45rem; line-height: 1.5; }
.guide-hint { display: flex; gap: .9rem; align-items: flex-start; background: #fff; border: 1px solid rgba(var(--jm-primary-rgb), .25); border-left: 4px solid var(--jm-primary); border-radius: 12px; padding: .9rem 1rem; margin: -.25rem 0 1.25rem; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.guide-hint-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--jm-primary-soft); color: var(--jm-primary); display: grid; place-items: center; font-size: 1.15rem; flex: none; }
.tour-root { position: fixed; inset: 0; z-index: 2000; pointer-events: none; opacity: 0; transition: opacity .2s; }
.tour-root.on { opacity: 1; }
.tour-block { position: fixed; inset: 0; pointer-events: auto; }
.tour-spot { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(15, 23, 42, .58), 0 0 0 3px #f4b740 inset; transition: all .28s ease; pointer-events: none; }
.tour-pop { position: fixed; pointer-events: auto; background: #fff; border-radius: 14px; padding: 1rem 1.1rem .8rem; box-shadow: 0 18px 48px rgba(15, 23, 42, .28); transition: top .28s ease, left .28s ease, opacity .15s; }
.tour-count { font-size: .72rem; font-weight: 700; color: var(--jm-primary); text-transform: uppercase; letter-spacing: .06em; }
.tour-title { font-weight: 800; font-size: 1.05rem; margin: .2rem 0 .3rem; }
.tour-body { color: #475467; line-height: 1.5; font-size: .9rem; }
.tour-actions { display: flex; align-items: center; gap: .4rem; margin-top: .85rem; }
/* Pusat Bantuan */
.help-hero { background: var(--jm-primary); color: #fff; border-radius: 16px; padding: 1.6rem 1.75rem; position: relative; overflow: hidden; }
.help-hero::after { content: ''; position: absolute; width: 300px; height: 300px; border-radius: 50%; border: 46px solid rgba(255,255,255,.07); right: -90px; top: -120px; }
.help-hero h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.help-search { max-width: 520px; position: relative; z-index: 1; }
.help-search .form-control { border: 0; padding: .75rem 1rem .75rem 2.6rem; font-size: 1rem; border-radius: 12px; }
.help-search i { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); color: #98a2b3; }
.help-card { display: flex; gap: .85rem; padding: 1rem; border: 1px solid var(--jm-line); border-radius: 12px; background: #fff; text-decoration: none; color: inherit; height: 100%; transition: border-color .15s, box-shadow .15s; }
.help-card:hover { border-color: var(--jm-primary); box-shadow: 0 4px 14px rgba(var(--jm-primary-rgb), .1); color: inherit; }
.help-card .ic { width: 40px; height: 40px; border-radius: 10px; background: var(--jm-primary-soft); color: var(--jm-primary); display: grid; place-items: center; font-size: 1.15rem; flex: none; }
.help-card .t { font-weight: 700; }
.help-card .d { color: var(--jm-muted); font-size: .82rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.setup-item { display: flex; gap: .8rem; align-items: center; padding: .75rem 1rem; border-bottom: 1px solid var(--jm-line); }
.setup-item:last-child { border-bottom: 0; }
.setup-check { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #d0d5dd; display: grid; place-items: center; flex: none; color: #fff; font-size: .9rem; }
.setup-item.done .setup-check { background: #12b76a; border-color: #12b76a; }
.setup-item.done .setup-title { color: var(--jm-muted); text-decoration: line-through; }
.help-shot { border: 1px solid var(--jm-line); border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 6px 24px rgba(16,24,40,.06); }
.help-shot img { width: 100%; display: block; }
.help-doc .guide-steps li { font-size: .95rem; padding-bottom: 1.1rem; }
.help-doc .guide-steps li::before { width: 2rem; height: 2rem; font-size: .9rem; }
.help-doc .guide-steps li { padding-left: 2.8rem; }
.help-doc .guide-steps li:not(:last-child)::after { left: .98rem; top: 2.2rem; }
.parts { counter-reset: p; list-style: none; padding: 0; }
.parts li { counter-increment: p; display: flex; gap: .7rem; padding: .55rem 0; border-bottom: 1px dashed var(--jm-line); }
.parts li::before { content: counter(p); width: 1.5rem; height: 1.5rem; border-radius: 6px; background: #f4b740; color: #12302e; font-weight: 800; font-size: .75rem; display: grid; place-items: center; flex: none; margin-top: .1rem; }
@media print { .sidebar, .topbar, .no-print { display: none !important; } .main { margin: 0; } }
