:root {
    --bg: #f7f8fb;
    --card: #ffffff;
    --text: #152033;
    --muted: #6b7280;
    --line: #e8ecf3;
    --primary: #2563eb;
    --primary-soft: #eaf1ff;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #d97706;
    --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    --radius: 18px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: Inter, Segoe UI, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

body.sidebar-open {
    overflow: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

.nav-icon-svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: none;
}

.login-body {
    min-height: 100vh;
    min-height: 100svh;
    position: relative;
    display: grid;
    place-items: center;
    padding: 28px;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 32%),
        linear-gradient(135deg, #eff6ff 0%, #f8fafc 40%, #eef2ff 100%);
    overflow-x: hidden;
    overflow-y: auto;
}

.login-background-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at left bottom, rgba(255, 255, 255, 0.14), transparent 32%),
        linear-gradient(135deg, rgba(239, 246, 255, 0.94), rgba(248, 250, 252, 0.92), rgba(238, 242, 255, 0.94));
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.login-background-layer.has-wallpaper {
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.login-shell {
    width: 100%;
    max-width: 1100px;
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 0;
}

.login-card {
    width: min(100%, 400px);
    max-width: 400px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 26px;
    padding: 28px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.18);
}

.login-header {
    text-align: center;
    margin-bottom: 24px;
}

.login-logo-wrap {
    width: 78px;
    height: 78px;
    margin: 0 auto 16px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.18);
    display: grid;
    place-items: center;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    padding: 12px;
}

.login-logo-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.login-header h1 { margin: 12px 0 8px; font-size: 1.72rem; }
.login-header p { margin: 0; }
.login-note { text-align: center; margin-top: 16px; font-size: .88rem; }

.login-card .stack-form select,
.login-card .stack-form input,
.login-card .stack-form .btn {
    min-height: 48px;
}

.login-card .stack-form label {
    gap: 7px;
}

.brand-chip,
.logo-circle {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 700;
}

.brand-chip-large {
    width: 82px;
    height: 82px;
    margin: 0 auto 18px;
    border-radius: 22px;
    font-size: 1.35rem;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 292px 1fr;
    position: relative;
}

.sidebar {
    background: linear-gradient(180deg, #0f172a 0%, #172554 100%);
    color: #ffffff;
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    min-height: 100vh;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
}

.sidebar-brand {
    display: flex;
    gap: 14px;
    align-items: center;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1.05rem;
}

.sidebar-close {
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    line-height: 1;
}

.mobile-menu-btn {
    display: none;
    border: 1px solid #d6def0;
    background: #ffffff;
    color: var(--text);
    width: 46px;
    height: 46px;
    border-radius: 15px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.08);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.nav-link {
    padding: 13px 14px;
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.92);
    transition: .2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
}

.nav-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    flex: none;
}

.nav-link-label {
    flex: 1;
    min-width: 0;
    font-weight: 600;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    transform: translateX(2px);
}

.nav-link.active .nav-link-icon {
    background: rgba(255, 255, 255, 0.18);
}

.danger-link { margin-top: auto; }
.danger-link:hover { background: rgba(220, 38, 38, 0.24); }
.danger-link .nav-link-icon { background: rgba(220, 38, 38, 0.18); }

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s ease, visibility .22s ease;
    z-index: 39;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-bottom-nav {
    display: none;
}

.content-area {
    padding: 26px;
    min-width: 0;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.topbar-main {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.topbar h1 { margin: 0 0 6px; font-size: 1.7rem; }
.brand-mark img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--line);
}

.card-grid {
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
}
.stats-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.two-col { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
    min-width: 0;
}

.stat-card h3 {
    margin: 0 0 10px;
    font-size: 1rem;
}

.stat-card strong {
    display: block;
    font-size: 2rem;
    margin-bottom: 4px;
}

.muted { color: var(--muted); }

.stack-form { display: flex; flex-direction: column; gap: 14px; }
label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-weight: 600;
    font-size: .96rem;
}

input,
select,
textarea,
button {
    font: inherit;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #d8dfeb;
    border-radius: 12px;
    padding: 12px 14px;
    background: #fff;
    color: var(--text);
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 12px;
    min-height: 46px;
    padding: 11px 16px;
    cursor: pointer;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    vertical-align: middle;
    text-align: center;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background-color .16s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-light { background: #f3f6fb; color: var(--text); border-color: var(--line); }
.btn-danger { background: #fee2e2; color: var(--danger); border-color: #fecaca; }
.btn-warning { background: #fff7ed; color: var(--warning); border-color: #fed7aa; }
.btn-sm { min-height: 38px; padding: 8px 12px; font-size: .88rem; border-radius: 10px; }
.btn-block { width: 100%; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.form-actions > .btn,
.form-actions > button,
.section-tools > .btn,
.section-tools > button,
.section-inline-filter > .btn,
.section-inline-filter > button,
.action-group > .btn,
.action-group > button,
.camera-actions-row > .btn,
.camera-actions-row > button {
    margin: 0;
}

.alert {
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 18px;
    border: 1px solid transparent;
}

.alert-success { background: #ecfdf3; color: #166534; border-color: #bbf7d0; }
.alert-error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.section-head h2,
.card h2 { margin: 0 0 14px; font-size: 1.15rem; }
.section-head h2 { margin-bottom: 0; }

.table-wrap,
.report-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.no-scroll-report {
    overflow: visible;
}

.table-wrap::-webkit-scrollbar,
.report-table-wrap::-webkit-scrollbar {
    height: 10px;
}

.table-wrap::-webkit-scrollbar-thumb,
.report-table-wrap::-webkit-scrollbar-thumb {
    background: #cfd8e6;
    border-radius: 999px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

th, td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
    font-size: .95rem;
}

th {
    background: #fbfcfe;
    white-space: nowrap;
}

.text-center { text-align: center; }
.action-group { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: flex-start; }

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: .84rem;
    font-weight: 700;
}
.badge-aktif,
.badge-sesuai,
.badge-masuk { background: #ecfdf3; color: #166534; }
.badge-suspend,
.badge-tidak_sesuai,
.badge-keluar { background: #fef2f2; color: #991b1b; }
.badge-menunggu { background: #fff7ed; color: #9a3412; }
.badge-dikunci { background: #ede9fe; color: #5b21b6; }
.badge-terbuka { background: #eef2ff; color: #3730a3; }

.thumb {
    width: 54px;
    height: 54px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid var(--line);
}

.preview-box {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    padding: 18px;
}
.preview-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    align-items: center;
}
.preview-image {
    width: 140px;
    max-height: 100px;
    object-fit: contain;
}
.preview-favicon {
    width: 48px;
    height: 48px;
    object-fit: contain;
}
.preview-image-contain {
    width: 140px;
    max-height: 110px;
    object-fit: contain;
}

.preview-stack {
    display: grid;
    gap: 18px;
}

.settings-preview-row {
    align-items: flex-start;
}

.input-helper {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: .86rem;
}

.logo-circle.has-image {
    background: rgba(255, 255, 255, 0.08);
    padding: 6px;
    overflow: hidden;
}

.logo-circle.has-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.login-preview-card {
    position: relative;
    min-height: 220px;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid #d8dfeb;
    background: linear-gradient(135deg, #e0ecff, #f8fafc);
}

.login-preview-card.has-background {
    background-image: var(--login-preview-bg);
    background-size: cover;
    background-position: center;
}

.login-preview-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.42), rgba(37, 99, 235, 0.2));
}

.login-preview-content {
    position: relative;
    z-index: 1;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    padding: 24px;
}

.login-preview-content strong {
    font-size: 1.1rem;
    color: #fff;
}

.login-preview-content .muted {
    color: rgba(255, 255, 255, 0.82);
}

.login-preview-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    padding: 10px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.page-intro {
    padding-top: 18px;
    padding-bottom: 18px;
}

.notice-stack {
    display: grid;
    gap: 12px;
}

.notice-item {
    border-radius: 16px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    background: #fff;
}

.notice-item strong {
    display: block;
    margin-bottom: 6px;
}

.notice-item p {
    margin: 0;
    color: var(--muted);
}

.notice-item.success {
    background: #ecfdf3;
    border-color: #bbf7d0;
}

.notice-item.warning {
    background: #fff7ed;
    border-color: #fed7aa;
}

.notice-item.danger {
    background: #fef2f2;
    border-color: #fecaca;
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.quick-link-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.quick-link-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: #cdddff;
}

.quick-link-card strong {
    display: block;
    margin-bottom: 8px;
}

.quick-link-card span {
    color: var(--muted);
    font-size: .93rem;
    line-height: 1.5;
}

.filter-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}


.section-tools {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
    justify-content: flex-end;
}

.section-inline-filter {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.section-inline-filter label {
    display: grid;
    gap: 6px;
    min-width: 180px;
    font-size: .92rem;
    color: var(--muted);
}

.section-inline-filter input[type="date"] {
    min-width: 170px;
}

.section-inline-filter > .btn,
.section-inline-filter > button,
.section-tools > .btn,
.section-tools > button {
    align-self: flex-end;
}

.section-inline-filter > .btn,
.section-inline-filter > button {
    min-width: 118px;
}

.filter-note-text {
    margin: -2px 0 14px;
    color: var(--muted);
    font-size: .92rem;
}

.filter-note-text strong {
    color: var(--text);
}


.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 8px;
}

.report-number {
    font-variant-numeric: tabular-nums;
    letter-spacing: -.01em;
    line-height: 1.25;
}

.report-price-number {
    letter-spacing: -.015em;
    word-break: break-word;
}

.report-price-exact {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: .82rem;
    line-height: 1.45;
    font-weight: 600;
}

.report-number-cell {
    text-align: right !important;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    font-size: .94rem;
}

.laporan-intro-card {
    padding-top: 20px;
    padding-bottom: 20px;
}

.laporan-intro-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.laporan-intro-head h2 {
    margin: 0 0 8px;
    font-size: 1.45rem;
}

.laporan-intro-head p {
    margin: 0;
    max-width: 720px;
    line-height: 1.65;
}

.laporan-period-badge {
    min-width: 220px;
    border: 1px solid #d9e5ff;
    background: linear-gradient(180deg, #ffffff 0%, #f5f8ff 100%);
    border-radius: 18px;
    padding: 14px 16px;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
}

.laporan-period-badge strong,
.laporan-period-badge span {
    display: block;
}

.laporan-period-badge strong {
    font-size: 1rem;
    margin-bottom: 4px;
}

.laporan-period-badge span {
    color: var(--muted);
    font-size: .9rem;
}

.laporan-stats-grid .stat-card h3 {
    color: var(--muted);
    font-size: .92rem;
    margin-bottom: 12px;
}

.laporan-stats-grid .stat-card strong {
    font-size: clamp(1.2rem, 2.2vw, 1.55rem);
}

.laporan-stats-grid .stat-card {
    padding: 18px 18px 16px;
}

.laporan-filter-card {
    margin-top: 4px;
}

.laporan-section-head > div {
    min-width: 0;
}

.laporan-section-head p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.report-preview-note {
    margin: -4px auto 18px;
    max-width: 760px;
    text-align: center;
    color: #475569;
    line-height: 1.65;
}

.report-table .report-number-cell,
.laporan-table .report-number-cell {
    font-weight: 600;
    color: #0f172a;
}

.report-table td.report-number-cell {
    text-align: right !important;
}

.laporan-table {
    min-width: 700px;
}

.laporan-table th,
.laporan-table td {
    line-height: 1.55;
}

.laporan-table thead th {
    letter-spacing: .01em;
}

.table-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fbfcfe;
}

.table-toolbar-left,
.table-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.table-search {
    min-width: 220px;
}

.table-meta {
    color: var(--muted);
    font-size: .92rem;
}

.table-empty-row td {
    text-align: center;
    color: var(--muted);
}

.pagination-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination-info {
    color: var(--muted);
    font-size: .92rem;
}

.status-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.report-preview {
    margin: 22px 0;
}

.report-preview-title {
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 3rem);
    margin: 0 0 10px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.report-preview-subtitle {
    text-align: center;
    margin: 0 0 10px;
    color: var(--muted);
    line-height: 1.65;
}

.report-sheet {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.report-sheet-head {
    background: linear-gradient(180deg, #f7e7b7 0%, #ecd894 100%);
    padding: 20px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-bottom: 1px solid #d5c07a;
}

.report-sheet-head strong {
    font-size: 1.35rem;
    letter-spacing: -.01em;
}

.report-sheet-head span {
    font-size: 1rem;
    font-weight: 700;
}

.report-table-wrap {
    background: #ffffff;
    padding-bottom: 6px;
}

.report-table {
    width: 100%;
    min-width: 0;
    border-collapse: collapse;
    table-layout: auto;
}

.report-table th,
.report-table td {
    border: 1px solid #344054;
    padding: 10px 10px;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
    font-size: .9rem;
    line-height: 1.45;
}

.report-table .no-col,
.report-table .report-no-cell {
    width: 52px;
    min-width: 52px;
    max-width: 52px;
}

.report-table .report-no-cell {
    font-weight: 700;
}

.report-table .kode-col {
    width: 120px;
    min-width: 120px;
}

.report-table .nama-col {
    width: 240px;
    min-width: 240px;
}

.report-head-left {
    text-align: left !important;
}

.report-table thead th {
    background: #d9e8c5;
    font-weight: 800;
}

.report-table tbody tr:nth-child(even) {
    background: #fafcff;
}

.report-table .report-group-row th {
    background: #bfd5ac;
}

.report-table .report-sub-row th {
    background: #d8e6c6;
}


.two-day-sheet {
    overflow: hidden;
}

.two-day-report-table th:nth-child(3),
.two-day-report-table td:nth-child(3) {
    width: 8%;
}

.two-day-report-table th:nth-child(4),
.two-day-report-table td:nth-child(4) {
    width: 10%;
}

.two-day-report-table th:nth-child(5),
.two-day-report-table td:nth-child(5) {
    width: 8%;
}

.mobile-report-list {
    display: none;
}

.mobile-report-card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.mobile-report-top,
.mobile-report-meta,
.mobile-day-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.mobile-report-top {
    margin-bottom: 6px;
    color: var(--muted);
    font-size: .9rem;
}

.mobile-report-card h3 {
    margin: 0 0 12px;
    font-size: 1rem;
    line-height: 1.5;
}

.mobile-report-meta {
    padding: 6px 0;
    border-top: 1px solid #eef2f7;
}

.mobile-day-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.mobile-day-card {
    background: #f8fafc;
    border: 1px solid #e5eaf2;
    border-radius: 14px;
    padding: 10px;
}

.mobile-day-title {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
}

.mobile-day-row + .mobile-day-row {
    margin-top: 6px;
}

.mobile-report-empty {
    color: var(--muted);
    text-align: center;
    padding: 16px 0;
}

.compact-filter-form {
    gap: 12px;
}

.report-filter-grid {
    max-width: 560px;
}

.report-text-left {
    text-align: left !important;
    white-space: normal !important;
}

.report-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin: 18px 0 0;
}

.report-summary-card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px 18px;
    box-shadow: var(--shadow);
}

.report-summary-card span {
    display: block;
    color: var(--muted);
    margin-bottom: 8px;
    font-size: .92rem;
}

.report-summary-card strong {
    font-size: 1.05rem;
    line-height: 1.35;
}

@media (max-width: 980px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: 0;
        top: auto;
        width: auto;
        min-height: 0;
        max-height: min(78vh, 720px);
        z-index: 40;
        border-radius: 26px 26px 0 0;
        transform: translateY(calc(100% + 24px));
        transition: transform .26s ease;
        box-shadow: 0 -18px 36px rgba(15, 23, 42, .22);
        padding: 22px 18px calc(28px + env(safe-area-inset-bottom));
        overflow: hidden;
        border-right: none;
    }

    .sidebar.open {
        transform: translateY(0);
    }

    .sidebar-header {
        align-items: center;
    }

    .sidebar-close {
        display: inline-flex;
    }

    .sidebar-nav {
        overflow-y: auto;
        padding-right: 4px;
    }

    .mobile-menu-btn {
        display: none !important;
    }

    .mobile-bottom-nav {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 38;
        padding: 0 12px calc(10px + env(safe-area-inset-bottom));
        pointer-events: none;
    }

    .mobile-bottom-nav-inner {
        pointer-events: auto;
        display: flex;
        align-items: stretch;
        gap: 4px;
        padding: 8px;
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(14px);
        border: 1px solid rgba(214, 222, 240, 0.95);
        border-radius: 26px;
        box-shadow: 0 18px 36px rgba(15, 23, 42, 0.14);
    }

    .mobile-nav-link {
        flex: 1 1 0;
        min-width: 0;
        border: none;
        background: transparent;
        color: #97a3b6;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 10px 6px 9px;
        border-radius: 18px;
        min-height: 68px;
        font-size: .72rem;
        font-weight: 700;
        text-align: center;
        cursor: pointer;
        transition: .2s ease;
    }

    .mobile-nav-link:hover,
    .mobile-nav-link.active {
        color: var(--primary);
        background: var(--primary-soft);
    }

    .mobile-nav-link.active {
        box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12);
    }

    .mobile-nav-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-nav-icon .nav-icon-svg {
        width: 24px;
        height: 24px;
        stroke-width: 1.9;
    }

    .mobile-nav-label {
        display: block;
        line-height: 1.15;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .content-area {
        padding: 22px 22px calc(110px + env(safe-area-inset-bottom));
    }

    .grid-2,
    .grid-3,
    .report-summary-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        align-items: flex-start;
    }
}

@media (max-width: 720px) {
    .content-area { padding: 16px 16px calc(104px + env(safe-area-inset-bottom)); }

    .laporan-intro-head {
        flex-direction: column;
        align-items: stretch;
    }

    .laporan-period-badge {
        min-width: 0;
        width: 100%;
    }

    .laporan-stats-grid .stat-card strong,
    .report-summary-card strong {
        font-size: 1rem;
    }

    .report-price-exact {
        font-size: .78rem;
    }

    .topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .topbar-main {
        width: 100%;
        gap: 0;
    }

    .topbar h1 {
        font-size: 1.35rem;
    }

    .brand-mark {
        display: none;
    }

    .mobile-bottom-nav {
        padding: 0 10px calc(8px + env(safe-area-inset-bottom));
    }

    .mobile-bottom-nav-inner {
        gap: 2px;
        padding: 7px;
        border-radius: 22px;
    }

    .mobile-nav-link {
        min-height: 64px;
        padding: 8px 4px;
        font-size: .68rem;
    }

    .card,
    .login-card {
        padding: 18px;
    }

    .login-body {
        padding: 16px;
    }

    .login-card {
        border-radius: 24px;
    }

    .login-logo-wrap,
    .brand-chip-large {
        width: 76px;
        height: 76px;
    }

    .form-actions,
    .action-group,
    .pagination-buttons {
        width: 100%;
    }

    .form-actions .btn,
    .section-head .btn,
    .pagination-buttons .btn,
    .action-group .btn,
    .section-inline-filter .btn,
    .section-tools > .btn {
        width: 100%;
        flex: 1 1 100%;
    }

    .table-toolbar,
    .pagination-wrap,
    .section-head,
    .table-toolbar-left,
    .table-toolbar-right,
    .status-inline,
    .section-tools,
    .section-inline-filter {
        flex-direction: column;
        align-items: stretch;
    }

    .section-inline-filter label {
        min-width: 0;
        width: 100%;
    }

    .table-search {
        width: 100%;
        min-width: 0;
    }

    .table-wrap table {
        min-width: 620px;
    }

    .report-preview {
        margin: 18px 0;
    }

    .report-preview-title {
        font-size: 1.95rem;
        line-height: 1.2;
    }

    .report-preview-subtitle {
        font-size: .94rem;
        padding: 0 6px;
    }

    .report-sheet {
        border-radius: 18px;
    }

    .report-sheet-head {
        padding: 16px;
    }

    .desktop-report-table {
        display: none;
    }

    .mobile-report-list {
        display: grid;
        gap: 12px;
    }

    .report-filter-grid,
    .mobile-day-grid {
        grid-template-columns: 1fr;
    }

    .no-scroll-report {
        overflow: visible;
    }

    .report-sheet-head strong {
        font-size: 1.05rem;
    }

    .report-sheet-head span {
        font-size: .92rem;
    }

    .report-scroll-note {
        display: block;
    }

    .report-table {
        min-width: 860px;
    }

    .report-table th,
    .report-table td {
        font-size: .86rem;
        padding: 9px 10px;
    }

    .report-table .sticky-col {
        min-width: 100px;
    }

    .report-table .sticky-col-2 {
        left: 100px;
        min-width: 180px;
    }
}

.readonly-input {
    background: #f8fafc;
    color: #334155;
}

.compact-intro {
    padding-top: 8px;
    padding-bottom: 8px;
}

.compact-intro .section-head,
.compact-form {
    margin: 0;
}

.qty-pair-grid input {
    text-align: center;
}

.action-switcher-card {
    padding-top: 18px;
    padding-bottom: 18px;
}

.panel-toggle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.panel-toggle-btn {
    min-height: 52px;
}

.panel-toggle-btn.is-active {
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.toggle-panels-stack {
    display: grid;
    gap: 18px;
}

.toggle-panel {
    display: none;
}

.toggle-panel.is-active {
    display: block;
}

.camera-stage-label {
    font-weight: 700;
    color: #334155;
    font-size: .95rem;
}

.camera-box {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px;
    background: #fbfcfe;
    display: grid;
    gap: 14px;
}

.camera-input {
    padding: 10px 12px;
    background: #fff;
}

.camera-preview {
    min-height: 90px;
    border: 1px dashed #d6dde8;
    border-radius: 16px;
    background: #fff;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.camera-preview:empty::before {
    content: 'Foto';
    color: var(--muted);
    font-size: .92rem;
}

.camera-preview-image {
    width: 100%;
    max-height: 260px;
    object-fit: contain;
}

.compact-actions {
    justify-content: space-between;
}

.compact-actions .btn {
    min-width: 160px;
}

@media (max-width: 720px) {
    .action-switcher-card {
    padding-top: 18px;
    padding-bottom: 18px;
}

.panel-toggle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.panel-toggle-btn {
    min-height: 52px;
}

.panel-toggle-btn.is-active {
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.toggle-panels-stack {
    display: grid;
    gap: 18px;
}

.toggle-panel {
    display: none;
}

.toggle-panel.is-active {
    display: block;
}

.camera-stage-label {
    font-weight: 700;
    color: #334155;
    font-size: .95rem;
}

.camera-box {
        padding: 14px;
    }

    .camera-preview-image {
        max-height: 220px;
    }

    .compact-actions .btn {
        min-width: 0;
    }
}

.camera-input-hidden,
.is-hidden {
    display: none !important;
}

.camera-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.camera-stage {
    border: 1px dashed #d6dde8;
    border-radius: 16px;
    background: #fff;
    min-height: 240px;
    overflow: hidden;
    display: grid;
    place-items: center;
}

.camera-video {
    width: 100%;
    max-height: 340px;
    object-fit: cover;
    background: #111827;
}

.camera-preview {
    width: 100%;
    min-height: 240px;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.camera-preview:empty::before {
    content: 'Belum ada foto';
}

.camera-preview.has-photo {
    min-height: auto;
}

.camera-preview-image {
    width: 100%;
    max-height: 340px;
    object-fit: cover;
    display: block;
}

.end-only {
    justify-content: flex-end;
}

@media (max-width: 720px) {
    .camera-actions-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .camera-stage,
    .camera-preview {
        min-height: 220px;
    }

    .camera-video,
    .camera-preview-image {
        max-height: 260px;
    }
}


.thumb-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.thumb-button .thumb {
    transition: transform .18s ease, box-shadow .18s ease;
}

.thumb-button:hover .thumb {
    transform: scale(1.04);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
}

.image-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
}

.image-preview-modal.open {
    display: block;
}

.image-preview-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.78);
}

.image-preview-dialog {
    position: relative;
    z-index: 1;
    width: min(92vw, 920px);
    margin: 4vh auto;
    background: #ffffff;
    border-radius: 20px;
    padding: 18px;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.24);
}

.image-preview-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 0;
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
    font-size: 1.6rem;
    cursor: pointer;
}

.image-preview-full {
    width: 100%;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 14px;
    background: #f8fafc;
}

body.preview-open {
    overflow: hidden;
}

@media (max-width: 720px) {
    .image-preview-dialog {
        width: min(94vw, 94vw);
        margin: 6vh auto;
        padding: 12px;
    }

    .image-preview-close {
        top: 6px;
        right: 6px;
    }
}


.bulk-delete-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bulk-delete-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.bulk-check-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text);
}

.bulk-check-label input,
.selection-cell input,
.selection-col input {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 0;
    accent-color: var(--primary);
}

.selection-col,
.selection-cell {
    width: 52px;
    text-align: center;
}

.selection-cell {
    vertical-align: middle;
}

@media (max-width: 768px) {
    .bulk-delete-toolbar {
        align-items: stretch;
    }

    .bulk-delete-toolbar .btn {
        width: 100%;
    }
}


body.popup-open {
    overflow: hidden;
}

.action-popup-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}

.action-popup-modal.open {
    opacity: 1;
    visibility: visible;
}

.action-popup-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
}

.action-popup-dialog {
    position: relative;
    width: min(92vw, 420px);
    margin: min(12vh, 80px) auto 0;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.22);
    padding: 22px 22px 20px;
    border: 1px solid var(--line);
    transform: translateY(12px) scale(.98);
    transition: transform .2s ease;
}

.action-popup-modal.open .action-popup-dialog {
    transform: translateY(0) scale(1);
}

.action-popup-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.action-popup-modal.is-success .action-popup-badge {
    background: #ecfdf3;
    color: #166534;
}

.action-popup-modal.is-error .action-popup-badge {
    background: #fef2f2;
    color: #991b1b;
}

.action-popup-modal.is-warning .action-popup-badge,
.action-popup-modal.is-info .action-popup-badge {
    background: #eff6ff;
    color: #1d4ed8;
}

.action-popup-dialog h3 {
    margin: 0 0 10px;
    font-size: 1.25rem;
    line-height: 1.35;
}

.action-popup-dialog p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.action-popup-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.action-popup-actions .btn {
    min-width: 118px;
}

@media (max-width: 640px) {
    .action-popup-dialog {
        width: calc(100vw - 24px);
        margin-top: 12vh;
        padding: 20px 18px 18px;
        border-radius: 22px;
    }

    .action-popup-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .action-popup-actions .btn {
        width: 100%;
    }
}

.action-note {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    font-size: .88rem;
    color: var(--muted);
}


@media (max-width: 768px) {
    .login-body {
        padding: 20px 16px;
        place-items: stretch center;
    }

    .login-background-layer,
    .login-background-layer.has-wallpaper {
        background-position: center center;
    }

    .login-shell {
        max-width: 460px;
        min-height: calc(100svh - 40px);
        align-items: center;
        padding: 0;
    }

    .login-card {
        width: 100%;
        max-width: 100%;
        padding: 24px 20px;
        border-radius: 24px;
    }

    .login-header {
        margin-bottom: 20px;
    }

    .login-logo-wrap,
    .brand-chip-large {
        width: 68px;
        height: 68px;
        border-radius: 20px;
        margin-bottom: 14px;
    }

    .login-header h1 {
        margin-top: 8px;
        font-size: 1.42rem;
    }

    .login-header p,
    .login-note {
        font-size: .88rem;
        line-height: 1.6;
    }
}

@media (max-width: 480px) {
    .login-body {
        padding: 14px 12px;
    }

    .login-shell {
        min-height: calc(100svh - 28px);
    }

    .login-card {
        padding: 18px 16px;
        border-radius: 20px;
    }

    .login-header {
        margin-bottom: 18px;
    }

    .login-logo-wrap,
    .brand-chip-large {
        width: 60px;
        height: 60px;
        border-radius: 18px;
        padding: 10px;
    }

    .login-header h1 {
        font-size: 1.25rem;
    }

    .login-card .stack-form {
        gap: 12px;
    }

    .login-card .stack-form label {
        font-size: .92rem;
    }

    .login-card .stack-form select,
    .login-card .stack-form input,
    .login-card .stack-form .btn {
        min-height: 46px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .login-note {
        margin-top: 14px;
        font-size: .8rem;
    }
}

@media (max-height: 760px) and (max-width: 768px) {
    .login-body {
        place-items: start center;
    }

    .login-shell {
        min-height: auto;
        padding: 8px 0;
    }
}
