/* ── Design tokens (Health Contract / Hauling Control theme) ── */
:root {
    --hc-primary: #4a1212;
    --hc-primary-dark: #350d0d;
    --hc-primary-light: #6b1f1f;
    --hc-primary-muted: #9a5555;
    --hc-bg: #f0e8eb;
    --hc-bg-deep: #e6d6dc;
    --hc-surface: #ffffff;
    --hc-surface-soft: #fdfafb;
    --hc-text: #3d1010;
    --hc-text-muted: #7a5252;
    --hc-text-on-primary: #ffffff;
    --hc-border: #eadde2;
    --hc-border-strong: #d9bcc6;
    --hc-success: #1b7a3a;
    --hc-success-bg: #e6f4ec;
    --hc-warning: #c56a00;
    --hc-warning-bg: #fff4e8;
    --hc-danger: #b42318;
    --hc-danger-bg: #fdecea;
    --hc-info: #0369a1;
    --hc-info-bg: #e0f2fe;
    --hc-chart-secondary: #f0c4d4;
    --hc-shadow: 0 1px 2px rgba(61, 16, 16, 0.05), 0 6px 20px rgba(61, 16, 16, 0.06);
    --hc-shadow-lg: 0 10px 40px rgba(61, 16, 16, 0.12);
    --hc-radius: 0.875rem;
    --hc-radius-lg: 1.125rem;
    --hc-sidebar-width: 252px;
}

/* Alpine cloak */
[x-cloak] {
    display: none !important;
}

/* Base */
html {
    overflow-x: hidden;
}

body.hc-theme {
    background: radial-gradient(circle at 100% 0%, #fce8ef 0%, var(--hc-bg) 42%, #ebe3e6 100%);
    color: var(--hc-text);
    min-height: 100vh;
}

.app-shell,
.app-main {
    max-width: 100vw;
}

/* Sidebar */
.hc-sidebar {
    background: linear-gradient(180deg, var(--hc-primary) 0%, var(--hc-primary-dark) 100%);
    color: var(--hc-text-on-primary);
}

/* Sidebar desktop — jangan bergantung utility hidden/lg:flex saja */
aside.hc-sidebar.no-print {
    display: none;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    flex-direction: column;
    overflow-y: auto;
}

@media (min-width: 1024px) {
    aside.hc-sidebar.no-print {
        display: flex !important;
        width: var(--hc-sidebar-width);
    }
}

@media (min-width: 1024px) {
    .hc-sidebar:not(.hc-mobile-drawer) {
        width: var(--hc-sidebar-width);
    }
}

.hc-mobile-drawer {
    width: min(288px, 86vw);
    max-width: 86vw;
}

.hc-sidebar-logo {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

.hc-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    transition: background 0.15s, color 0.15s;
}

.hc-nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.hc-nav-link.active {
    background: #fff;
    color: var(--hc-primary);
    font-weight: 600;
    box-shadow: var(--hc-shadow);
}

.hc-nav-sub {
    display: block;
    padding: 0.5rem 0.875rem;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.75);
    transition: background 0.15s;
}

.hc-nav-sub:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.hc-nav-sub.active {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-weight: 600;
}

/* Header */
.hc-header {
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid var(--hc-border);
    backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

.hc-page-title {
    color: var(--hc-primary);
    font-weight: 700;
}

.hc-datetime {
    display: none;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--hc-primary);
    white-space: nowrap;
    padding: 0.375rem 0.75rem;
    background: var(--hc-bg);
    border: 1px solid var(--hc-border);
    border-radius: 9999px;
}

.hc-datetime i {
    width: 0.875rem;
    height: 0.875rem;
    opacity: 0.75;
}

@media (min-width: 480px) {
    .hc-datetime {
        display: inline-flex;
    }
}

/* Cards & panels */
.hc-card {
    background: var(--hc-surface);
    border: 1px solid var(--hc-border);
    border-radius: var(--hc-radius-lg);
    box-shadow: var(--hc-shadow);
    padding: 1.125rem;
    backdrop-filter: blur(4px);
    min-width: 0;
    max-width: 100%;
}

.hc-card-title {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--hc-primary);
    margin-bottom: 0.875rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--hc-border);
}

.hc-kpi-card {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 6.75rem;
    border-radius: 0.875rem;
    padding: 1rem 1.125rem;
    color: #fff;
    box-shadow: none;
    border: none;
}

.hc-kpi-card::before {
    display: none;
}

.hc-kpi-watermark {
    position: absolute;
    right: 0.625rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    pointer-events: none;
    line-height: 0;
}

.hc-kpi-watermark-icon {
    width: 3.75rem;
    height: 3.75rem;
    opacity: 0.18;
    stroke-width: 1.5;
}

.hc-kpi-body {
    position: relative;
    z-index: 2;
    min-width: 0;
    width: 100%;
    padding-right: 3rem;
}

.hc-kpi-label {
    margin-top: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.3;
}

@media (min-width: 640px) {
    .hc-kpi-label {
        font-size: 0.75rem;
    }
}

.hc-kpi-value {
    font-size: clamp(0.875rem, 1.4vw, 1.5rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.hc-kpi-subtitle {
    margin-top: 0.35rem;
    font-size: 0.6875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.35;
}

/* KPI grid — mobile 2 kolom, desktop horizontal via --hc-kpi-cols */
.hc-kpi-section {
    --hc-kpi-cols: 4;
    margin-bottom: 0;
    width: 100%;
    min-width: 0;
}

.hc-kpi-section-title {
    margin-bottom: 0.375rem;
    padding-left: 0.125rem;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hc-text-muted);
}

.hc-kpi-track {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    width: 100%;
    min-width: 0;
    align-items: stretch;
}

.hc-kpi-track > .hc-kpi-card {
    min-width: 0;
    max-width: 100%;
}

@media (min-width: 640px) {
    .hc-kpi-track {
        gap: 1.125rem;
    }

    .hc-kpi-card {
        min-height: 7rem;
        padding: 1.125rem 1.25rem;
    }

    .hc-kpi-watermark-icon {
        width: 4.25rem;
        height: 4.25rem;
    }
}

@media (min-width: 1024px) {
    .hc-kpi-track {
        grid-template-columns: repeat(var(--hc-kpi-cols, 4), minmax(0, 1fr));
        gap: 1.25rem;
    }

    .hc-kpi-card {
        min-height: 7.25rem;
    }

    .hc-kpi-section--cols-5 .hc-kpi-value,
    .hc-kpi-section--cols-6 .hc-kpi-value {
        font-size: clamp(0.8125rem, 0.95vw, 1.125rem);
    }

    .hc-kpi-section--cols-5 .hc-kpi-label,
    .hc-kpi-section--cols-6 .hc-kpi-label {
        font-size: 0.6875rem;
    }

    .hc-kpi-section--cols-5 .hc-kpi-watermark-icon,
    .hc-kpi-section--cols-6 .hc-kpi-watermark-icon {
        width: 3.25rem;
        height: 3.25rem;
    }

    .hc-kpi-section--cols-5 .hc-kpi-body,
    .hc-kpi-section--cols-6 .hc-kpi-body {
        padding-right: 2.5rem;
    }
}

/* KPI flat color themes */
.hc-kpi-maroon { background: #601a1a; }
.hc-kpi-emerald { background: #059669; }
.hc-kpi-rose { background: #e11d48; }
.hc-kpi-green { background: #16a34a; }
.hc-kpi-sky { background: #0284c7; }
.hc-kpi-violet { background: #7c3aed; }
.hc-kpi-amber { background: #d97706; }
.hc-kpi-indigo { background: #4f46e5; }
.hc-kpi-crimson { background: #dc2626; }
.hc-kpi-teal { background: #0f766e; }
.hc-kpi-orange { background: #ea580c; }
.hc-kpi-slate { background: #475569; }

/* Welcome banner */
.hc-welcome-banner {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: linear-gradient(135deg, #d4847a 0%, #a04545 42%, #601a1a 100%);
    border-radius: var(--hc-radius-lg);
    padding: 1rem 1.25rem;
    color: #fff;
    box-shadow: 0 10px 32px rgba(96, 26, 26, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

@media (min-width: 768px) {
    .hc-welcome-banner {
        flex-direction: row;
        align-items: center;
        padding: 1.5rem 1.75rem;
    }
}

.hc-welcome-title {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.25;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

@media (min-width: 640px) {
    .hc-welcome-title {
        font-size: 1.5rem;
    }
}

.hc-welcome-desc {
    margin-top: 0.5rem;
    max-width: 42rem;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.9);
}

@media (min-width: 640px) {
    .hc-welcome-desc {
        font-size: 0.875rem;
    }
}

.hc-welcome-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    padding: 0.625rem 1.25rem;
    border-radius: 9999px;
    background: #fff;
    color: var(--hc-primary);
    font-size: 0.8125rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hc-welcome-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
}

/* Login page — full bg image + centered card */
.hc-login-page {
    position: relative;
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.hc-login-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
}

.hc-login-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hc-login-bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        160deg,
        rgba(96, 26, 26, 0.82) 0%,
        rgba(74, 20, 20, 0.72) 50%,
        rgba(96, 26, 26, 0.85) 100%
    );
}

.hc-login-card-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 24rem;
}

.hc-login-card {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--hc-radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    padding: 1.75rem 1.5rem;
}

@media (min-width: 640px) {
    .hc-login-card {
        padding: 2rem;
    }
}

.hc-login-brand {
    text-align: center;
    margin-bottom: 1.5rem;
}

.hc-password-field {
    position: relative;
}

.hc-password-field .hc-input {
    padding-right: 2.75rem;
}

.hc-password-toggle {
    position: absolute;
    right: 0.625rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: none;
    background: transparent;
    color: var(--hc-text-muted);
    border-radius: 0.375rem;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}

.hc-password-toggle:hover {
    color: var(--hc-primary);
    background: var(--hc-bg);
}

.hc-caps-notice {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--hc-warning);
}

.hc-caps-notice.is-off {
    color: var(--hc-text-muted);
}

.hc-login-credit {
    margin-top: 1rem;
    font-size: 0.625rem;
    color: rgba(255, 255, 255, 0.65);
    text-align: center;
}

.hc-login-credit a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: underline;
}

/* Buttons */
.hc-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    background: var(--hc-primary);
    color: #fff;
    border: none;
    transition: background 0.15s;
}

.hc-btn-primary:hover {
    background: var(--hc-primary-light);
}

.hc-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    background: var(--hc-surface);
    color: var(--hc-primary);
    border: 1px solid var(--hc-border-strong);
    transition: background 0.15s;
}

.hc-btn-secondary:hover {
    background: var(--hc-bg);
}

.hc-btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    background: var(--hc-danger);
    color: #fff;
    border: none;
    transition: opacity 0.15s;
}

.hc-btn-danger:hover {
    opacity: 0.9;
}

/* Form controls */
.hc-input,
.hc-select,
.hc-textarea {
    width: 100%;
    min-height: 2.75rem;
    border-radius: 0.5rem;
    border: 2px solid var(--hc-border-strong);
    background-color: #ffffff;
    color: var(--hc-text);
    box-shadow: 0 1px 2px rgba(61, 16, 16, 0.04);
    padding: 0.5625rem 0.75rem;
    font-size: 0.875rem;
    color: var(--hc-text);
    background: #ffffff;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-shadow: 0 1px 2px rgba(96, 26, 26, 0.04);
}

.hc-textarea {
    min-height: 5rem;
    resize: vertical;
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
}

.hc-input:focus,
.hc-select:focus,
.hc-textarea:focus {
    border-color: var(--hc-primary);
    box-shadow: 0 0 0 3px rgba(74, 18, 18, 0.12);
}

.hc-input-readonly {
    background: var(--hc-bg);
    color: var(--hc-text);
    cursor: default;
}

.hc-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.hc-label {
    display: block;
    margin-bottom: 0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--hc-text);
}

.hc-form-section-body .hc-field + .hc-field {
    margin-top: 0;
}

.hc-field-error {
    font-size: 0.75rem;
    color: var(--hc-danger);
}

/* Fallback: form di halaman yang belum dimigrasi penuh */
.app-main input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=file]):not([class*="hc-"]):not(.sr-only),
.app-main select:not([class*="hc-"]),
.app-main textarea:not([class*="hc-"]) {
    width: 100%;
    min-height: 2.75rem;
    border-radius: 0.5rem;
    border: 2px solid var(--hc-border-strong);
    padding: 0.5625rem 0.75rem;
    font-size: 0.875rem;
    color: var(--hc-text);
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(61, 16, 16, 0.04);
    outline: none;
}

.app-main input:not([class*="hc-"]):focus,
.app-main select:not([class*="hc-"]):focus,
.app-main textarea:not([class*="hc-"]):focus {
    border-color: var(--hc-primary);
    box-shadow: 0 0 0 2px rgba(96, 26, 26, 0.15);
}

/* Slicer filters (dashboard reference) */
.hc-slicer-group {
    margin-bottom: 1rem;
}

.hc-slicer-title {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--hc-primary);
    margin-bottom: 0.5rem;
}

.hc-slicer-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.hc-slicer-btn {
    padding: 0.375rem 0.625rem;
    border-radius: 0.375rem;
    font-size: 0.6875rem;
    font-weight: 600;
    border: 1px solid var(--hc-border-strong);
    background: var(--hc-surface);
    color: var(--hc-primary);
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}

.hc-slicer-btn:hover {
    background: var(--hc-bg);
}

.hc-slicer-btn.active,
label.hc-slicer-btn:has(input:checked) {
    background: var(--hc-primary);
    color: #fff;
    border-color: var(--hc-primary);
}

label.hc-slicer-btn {
    cursor: pointer;
}

/* Tables */
.hc-table-shell {
    border: 1px solid var(--hc-border);
    border-radius: var(--hc-radius-lg);
    background: var(--hc-surface);
    box-shadow: var(--hc-shadow);
    overflow: hidden;
}

.hc-table-scroll {
    display: block;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    max-width: 100%;
    min-width: 0;
    width: 100%;
    scrollbar-width: thin;
    scrollbar-color: var(--hc-border-strong) transparent;
}

.hc-table-scroll::-webkit-scrollbar {
    height: 6px;
}

.hc-table-scroll::-webkit-scrollbar-thumb {
    background: var(--hc-border-strong);
    border-radius: 999px;
}

.hc-table-scroll table,
.hc-table {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.hc-table thead tr,
.hc-table-scroll table thead tr {
    border-bottom: 1px solid var(--hc-border);
}

.hc-table th,
.hc-table-scroll table th {
    padding: 0.75rem 0.875rem;
    text-align: left;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--hc-text-muted);
    background: linear-gradient(180deg, var(--hc-surface-soft) 0%, #f8f2f4 100%);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}

.hc-table td,
.hc-table-scroll table td {
    padding: 0.75rem 0.875rem;
    font-size: 0.8125rem;
    border-bottom: 1px solid var(--hc-border);
    white-space: nowrap;
    vertical-align: middle;
    background: var(--hc-surface);
}

.hc-table tbody tr:hover td,
.hc-table-scroll table tbody tr:hover td {
    background: #fdf8fa;
}

.hc-table tbody tr:last-child td,
.hc-table-scroll table tbody tr:last-child td {
    border-bottom: none;
}

.hc-table .col-actions,
.hc-table-scroll table .col-actions {
    position: sticky;
    right: 0;
    z-index: 2;
    box-shadow: -6px 0 12px rgba(61, 16, 16, 0.04);
}

.hc-table th.col-actions,
.hc-table-scroll table th.col-actions {
    background: #f8f2f4;
}

/* Icon action buttons */
.hc-action-group {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.hc-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.625rem;
    border: 1px solid transparent;
    transition: transform 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
    cursor: pointer;
    text-decoration: none;
}

.hc-action:hover {
    transform: translateY(-1px);
}

.hc-action-view {
    background: var(--hc-info-bg);
    color: var(--hc-info);
    border-color: #bae6fd;
}

.hc-action-edit {
    background: #f3e8ff;
    color: #7e22ce;
    border-color: #e9d5ff;
}

.hc-action-delete {
    background: var(--hc-danger-bg);
    color: var(--hc-danger);
    border-color: #fecaca;
}

.hc-action-print {
    background: var(--hc-success-bg);
    color: var(--hc-success);
    border-color: #bbf7d0;
}

.hc-action-neutral {
    background: var(--hc-surface-soft);
    color: var(--hc-text-muted);
    border-color: var(--hc-border);
}

/* Mobile bottom drawer */
.hc-bottom-drawer {
    background: var(--hc-surface);
    border-top-left-radius: 1.5rem;
    border-top-right-radius: 1.5rem;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.18);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.hc-bottom-drawer-handle {
    width: 2.75rem;
    height: 0.3rem;
    margin: 0.625rem auto 0;
    border-radius: 999px;
    background: var(--hc-border-strong);
}

.hc-bottom-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.875rem 1rem 0.5rem;
}

.hc-bottom-drawer-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--hc-primary-light), var(--hc-primary));
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
}

.hc-bottom-drawer-body {
    overflow-y: auto;
    padding: 0.5rem 1rem 0.75rem;
    max-height: calc(88vh - 9rem);
}

.hc-bottom-drawer-footer {
    padding: 0.75rem 1rem 1rem;
    border-top: 1px solid var(--hc-border);
}

.hc-drawer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.625rem;
}

.hc-drawer-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.75rem 0.375rem;
    border-radius: 0.875rem;
    border: 1px solid var(--hc-border);
    background: var(--hc-surface-soft);
    color: var(--hc-text-muted);
    font-size: 0.625rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.15s;
}

.hc-drawer-tile:hover,
.hc-drawer-tile.active {
    background: linear-gradient(145deg, var(--hc-primary-light), var(--hc-primary));
    border-color: var(--hc-primary);
    color: #fff;
    box-shadow: var(--hc-shadow);
}

.hc-card .hc-table-shell {
    border: none;
    box-shadow: none;
    border-radius: 0;
    margin: 0;
}

.hc-card--table {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding-bottom: 0;
    padding-left: 0;
    padding-right: 0;
    overflow: hidden;
}

.hc-card--table .hc-card-title {
    padding-left: 1.125rem;
    padding-right: 1.125rem;
}

.hc-card--table .hc-table-shell {
    margin-top: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    width: 100%;
    min-width: 0;
}

.hc-card--table .hc-table-scroll {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    scrollbar-width: thin;
    scrollbar-color: var(--hc-border-strong) transparent;
}

.hc-card--table .hc-table-scroll::-webkit-scrollbar {
    height: 6px;
}

.hc-card--table .hc-table-scroll::-webkit-scrollbar-thumb {
    background: var(--hc-border-strong);
    border-radius: 999px;
}

/* Dashboard — panel tabel dalam grid 2 kolom */
.hc-dashboard-tables {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    min-width: 0;
}

@media (min-width: 1024px) {
    .hc-dashboard-tables {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.hc-dashboard-tables > * {
    min-width: 0;
    max-width: 100%;
}

/* Report pages — layout terpusat */
.hc-report-page {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hc-report-page > * {
    min-width: 0;
    margin: 0;
}

.hc-report-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    min-width: 0;
}

.hc-report-body > * {
    margin: 0;
}

.hc-report-charts {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
}

@media (min-width: 1024px) {
    .hc-report-charts--2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Dashboard layout */
.hc-dashboard-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    min-width: 0;
}

.hc-dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    min-width: 0;
}

.hc-dashboard-layout > *,
.hc-dashboard-main > * {
    margin: 0;
}

/* Filter card — collapsible */
.hc-filter-card {
    background: var(--hc-surface);
    border: 1px solid var(--hc-border);
    border-radius: var(--hc-radius-lg);
    box-shadow: var(--hc-shadow);
    padding: 0.75rem 1rem 0.875rem;
    width: 100%;
    min-width: 0;
}

.hc-filter-card-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    margin-bottom: 0;
    padding: 0.125rem 0;
    border: none;
    border-bottom: none;
    background: transparent;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--hc-primary);
    cursor: pointer;
    text-align: left;
}

.hc-filter-card-head[aria-expanded="true"] {
    margin-bottom: 0.875rem;
    padding-bottom: 0.625rem;
    border-bottom: 1px solid var(--hc-border);
}

.hc-filter-chevron {
    color: var(--hc-text-muted);
}

.hc-filter-card-form {
    width: 100%;
    min-width: 0;
    padding-top: 0.125rem;
}

/* Filter — satu baris horizontal (grid, sama seperti form kurs) */
.hc-filter-inline {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1rem;
    align-items: end;
}

.hc-filter-cell {
    min-width: 0;
}

.hc-filter-label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--hc-text-muted);
}

.hc-filter-label--ghost {
    visibility: hidden;
}

.hc-filter-cell .hc-input,
.hc-filter-cell .hc-select {
    width: 100%;
    min-height: 2.625rem;
}

.hc-filter-cell--actions .hc-filter-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hc-filter-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    min-height: 2.625rem;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 700;
    white-space: nowrap;
}

.hc-filter-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.625rem;
    min-height: 2.625rem;
    padding: 0.5rem;
}

.hc-filter-card .hc-filter-actions .hc-btn-primary {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

@media (min-width: 768px) {
    .hc-filter-inline {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .hc-filter-inline {
        grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
    }

    .hc-filter-cell--actions {
        min-width: 11rem;
    }
}

@media (min-width: 1280px) {
    .hc-filter-inline {
        grid-template-columns: repeat(6, minmax(0, 1fr)) auto;
    }
}

/* Settings tabs */
.hc-settings-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.hc-settings-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    border: 1px solid var(--hc-border);
    background: var(--hc-surface);
    color: var(--hc-text-muted);
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}

.hc-settings-tab:hover,
.hc-settings-tab.active {
    background: var(--hc-primary);
    border-color: var(--hc-primary);
    color: #fff;
}

.hc-settings-section {
    scroll-margin-top: 5rem;
}

/* Mobile app drawer */
.hc-mobile-drawer-nav {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.hc-mobile-drawer-nav .hc-nav-link,
.hc-mobile-drawer-nav .hc-nav-sub {
    width: 100%;
}

.hc-mobile-drawer-header,
.hc-mobile-drawer-footer {
    padding-left: 1rem;
    padding-right: 1rem;
}

.hc-dashboard-title {
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--hc-primary);
    margin-bottom: 0.375rem;
    padding: 0;
}

@media (min-width: 640px) {
    .hc-dashboard-title {
        font-size: 1.125rem;
        margin-bottom: 0.5rem;
    }
}

.hc-filter-panel {
    background: var(--hc-surface);
    border: 1px solid var(--hc-border);
    border-radius: var(--hc-radius-lg);
    box-shadow: var(--hc-shadow);
    padding: 0.75rem;
}

@media (min-width: 1280px) {
    .hc-filter-panel {
        position: sticky;
        top: 4rem;
        align-self: start;
        max-height: calc(100vh - 5rem);
        overflow-y: auto;
        padding: 0.875rem;
    }
}

/* Filter — horizontal ringkas di mobile */
.hc-filter-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hc-filter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.125rem;
}

.hc-filter-head-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--hc-primary);
}

.hc-filter-strip {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.125rem;
}

.hc-filter-strip::-webkit-scrollbar {
    display: none;
}

.hc-filter-strip .hc-select,
.hc-filter-strip .hc-input {
    min-width: 7.5rem;
    flex-shrink: 0;
    font-size: 0.75rem;
    padding: 0.375rem 0.5rem;
}

.hc-filter-strip .hc-filter-search {
    flex: 1 1 8rem;
    min-width: 7rem;
    max-width: 14rem;
}

.hc-filter-chip {
    flex-shrink: 0;
    padding: 0.3125rem 0.625rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 600;
    border: 1px solid var(--hc-border-strong);
    background: var(--hc-surface);
    color: var(--hc-primary);
    cursor: pointer;
    white-space: nowrap;
}

.hc-filter-chip.active,
label.hc-filter-chip:has(input:checked) {
    background: var(--hc-primary);
    color: #fff;
    border-color: var(--hc-primary);
}

.hc-filter-actions {
    display: flex;
    gap: 0.375rem;
    flex-shrink: 0;
}

.hc-filter-actions .hc-btn-primary,
.hc-filter-actions .hc-btn-secondary {
    padding: 0.375rem 0.625rem;
    font-size: 0.75rem;
}

@media (max-width: 1279px) {
    .hc-filter-panel .hc-slicer-group {
        margin-bottom: 0;
    }

    .hc-filter-panel .hc-slicer-title {
        display: none;
    }

    .hc-filter-panel .hc-slicer-grid {
        display: contents;
    }

    .hc-filter-panel .hc-slicer-group--selects {
        display: contents;
    }

    .hc-filter-panel form {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 0.375rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .hc-filter-panel form::-webkit-scrollbar {
        display: none;
    }

    .hc-filter-panel .hc-filter-head {
        display: none;
    }

    .hc-filter-panel .hc-filter-actions-stack {
        display: none;
    }

    .hc-filter-panel select.hc-select {
        min-width: 6.5rem;
        width: auto;
        flex-shrink: 0;
        font-size: 0.6875rem;
        padding: 0.3125rem 0.5rem;
    }

    .hc-filter-panel label.hc-slicer-btn,
    .hc-filter-panel label.hc-filter-chip {
        flex-shrink: 0;
        margin: 0;
    }
}

@media (min-width: 1280px) {
    .hc-filter-panel form {
        display: flex;
        flex-direction: column;
        gap: 0.625rem;
        overflow: visible;
        flex-wrap: wrap;
    }

    .hc-filter-panel .hc-filter-head {
        display: flex;
    }

    .hc-filter-panel .hc-slicer-group {
        display: block;
        margin-bottom: 0.625rem;
    }

    .hc-filter-panel .hc-slicer-title {
        display: flex;
    }

    .hc-filter-panel .hc-slicer-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 0.375rem;
    }

    .hc-filter-panel .hc-slicer-group--selects {
        display: block;
    }

    .hc-filter-panel select.hc-select {
        width: 100%;
        min-width: 0;
    }

    .hc-filter-panel .hc-filter-actions-stack {
        display: flex;
    }
}

/* Clickable table rows */
.hc-row-clickable {
    cursor: pointer;
}

.hc-row-clickable:hover td {
    background: #faf0f3 !important;
}

.hc-row-clickable:active td {
    background: #f5e6eb !important;
}

.hc-row-clickable td.col-actions {
    cursor: default;
}

/* Detail / preview pages */
.hc-page-header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 1.125rem;
    background: var(--hc-surface);
    border: 1px solid var(--hc-border);
    border-radius: var(--hc-radius-lg);
    box-shadow: var(--hc-shadow);
}

@media (min-width: 768px) {
    .hc-page-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.hc-page-header-badge {
    display: inline-block;
    margin-bottom: 0.25rem;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    background: var(--hc-bg);
    color: var(--hc-primary);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hc-page-header-title {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--hc-primary);
    line-height: 1.2;
}

@media (min-width: 768px) {
    .hc-page-header-title {
        font-size: 1.375rem;
    }
}

.hc-page-header-desc {
    margin-top: 0.25rem;
    font-size: 0.8125rem;
    color: var(--hc-text-muted);
}

.hc-page-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.hc-detail-layout {
    display: grid;
    gap: 0.75rem;
}

@media (min-width: 1024px) {
    .hc-detail-layout {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.hc-detail-section {
    background: var(--hc-surface);
    border: 1px solid var(--hc-border);
    border-radius: var(--hc-radius-lg);
    padding: 1rem;
    box-shadow: var(--hc-shadow);
}

.hc-detail-section-title {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--hc-border);
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--hc-primary);
}

.hc-detail-grid {
    display: grid;
    gap: 0.5rem 1rem;
}

@media (min-width: 480px) {
    .hc-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.hc-detail-field dt {
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--hc-text-muted);
}

.hc-detail-field dd {
    margin: 0.125rem 0 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--hc-text);
}

.hc-detail-highlight {
    color: var(--hc-success) !important;
}

.hc-detail-highlight.negative {
    color: var(--hc-danger) !important;
}

.hc-form-section-title {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 0.875rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--hc-border);
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--hc-primary);
}

.hc-form-section-body {
    display: grid;
    gap: 1rem;
}

.hc-form-section-body .grid {
    gap: 1rem;
}

.hc-form-grid {
    display: grid;
    gap: 0.875rem;
}

.hc-form-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

@media (min-width: 1024px) {
    .hc-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Profit summary blocks */
.hc-stat-block {
    border-radius: 0.5rem;
    padding: 0.75rem;
}

.hc-stat-block.revenue {
    background: var(--hc-bg);
    color: var(--hc-primary);
}

.hc-stat-block.cost {
    background: var(--hc-danger-bg);
    color: var(--hc-danger);
}

.hc-stat-block.profit-positive {
    background: var(--hc-success-bg);
    color: var(--hc-success);
}

.hc-stat-block.profit-negative {
    background: var(--hc-danger-bg);
    color: var(--hc-danger);
}

/* Progress bars */
.hc-progress-track {
    height: 0.5rem;
    border-radius: 9999px;
    background: var(--hc-bg-deep);
    overflow: hidden;
}

.hc-progress-fill.cost {
    height: 100%;
    border-radius: 9999px;
    background: var(--hc-danger);
}

.hc-progress-fill.profit {
    height: 100%;
    border-radius: 9999px;
    background: var(--hc-success);
}

/* Screen helpers — jangan set display:block agar flex/grid + gap tetap jalan */
.screen-only {
    /* Hanya marker untuk disembunyikan saat @media print */
}

.print-only {
    display: none;
}

.overflow-safe {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.chart-wrap {
    position: relative;
    height: 13rem;
    width: 100%;
    max-width: 100%;
}

.chart-wrap canvas {
    max-height: 100% !important;
    max-width: 100% !important;
}

/* Mobile bottom spacing + symmetric gutters */
@media (max-width: 1023px) {
    .app-main {
        padding-bottom: 4.25rem !important;
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .app-shell {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .hc-header {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* Mobile bottom nav */
.hc-bottom-nav {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid var(--hc-border);
    backdrop-filter: blur(16px);
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-shadow: 0 -4px 24px rgba(61, 16, 16, 0.06);
}

@media (min-width: 1024px) {
    .hc-bottom-nav,
    .mobile-bottom-nav {
        display: none !important;
    }
}

.hc-bottom-nav-inner {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    max-width: 28rem;
    height: 3.625rem;
    margin: 0 auto;
    padding: 0 0.5rem;
}

.hc-bottom-nav-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.125rem;
    padding: 0.25rem;
    font-size: 0.5625rem;
    font-weight: 600;
    color: var(--hc-text-muted);
    text-decoration: none;
    transition: color 0.15s;
}

.hc-bottom-nav-item.active {
    color: var(--hc-primary);
}

.hc-bottom-nav-item.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1.125rem;
    height: 2px;
    border-radius: 999px;
    background: var(--hc-primary);
}

.hc-bottom-nav-fab-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.125rem;
    margin-top: -0.875rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hc-bottom-nav-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    background: linear-gradient(145deg, var(--hc-primary-light), var(--hc-primary));
    color: #fff;
    box-shadow: 0 6px 16px rgba(74, 18, 18, 0.28);
    border: 2px solid #fff;
}

.hc-bottom-nav-fab-label {
    font-size: 0.5625rem;
    font-weight: 700;
    color: var(--hc-primary);
}

/* Legacy tables fallback */
.overflow-safe table th,
.overflow-safe table td,
table.hc-table th,
table.hc-table td {
    white-space: nowrap;
}

/* Print table */
.print-table {
    width: 100%;
    border-collapse: collapse;
}

.print-table caption {
    caption-side: top;
    text-align: left;
    font-weight: 700;
    font-size: 0.875rem;
    margin-bottom: 0.35rem;
    color: #334155;
}

.print-table th,
.print-table td {
    border: 1px solid #e2e8f0;
    padding: 0.5rem 0.625rem;
    text-align: left;
    vertical-align: top;
}

.print-table th {
    background: #f1f5f9;
}

.print-table td.num,
.print-table th.num {
    text-align: right;
}

@media screen {
    table.hc-table.print-table caption {
        display: none;
    }

    table.hc-table.print-table th,
    table.hc-table.print-table td {
        border: none;
        padding: inherit;
        vertical-align: inherit;
        text-align: inherit;
    }

    table.hc-table.print-table th {
        background: transparent;
    }
}

/* Print */
@media print {
    @page {
        size: A4 landscape;
        margin: 12mm;
    }

    body {
        background: #fff !important;
        color: #000 !important;
        font-size: 11px;
    }

    .no-print,
    .screen-only,
    aside,
    header,
    .mobile-bottom-nav,
    .mobile-menu-sheet,
    .mobile-backdrop,
    button,
    form,
    .pagination,
    canvas,
    .chart-wrap,
    nav,
    .swal2-container {
        display: none !important;
    }

    .print-only {
        display: block !important;
    }

    .app-shell {
        padding: 0 !important;
        margin: 0 !important;
    }

    .app-main {
        padding: 0 !important;
        max-width: 100% !important;
    }

    .print-header {
        margin-bottom: 12px;
        border-bottom: 2px solid #000;
        padding-bottom: 8px;
    }

    .print-header h1 {
        font-size: 16px;
        font-weight: 700;
        margin: 0;
    }

    .print-header p {
        margin: 2px 0 0;
        font-size: 10px;
        color: #444;
    }

    .print-table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 14px;
        page-break-inside: avoid;
    }

    .print-table caption {
        caption-side: top;
        text-align: left;
        font-weight: 700;
        font-size: 12px;
        margin-bottom: 4px;
    }

    .print-table th,
    .print-table td {
        border: 1px solid #333;
        padding: 4px 6px;
        text-align: left;
        vertical-align: top;
    }

    .print-table th {
        background: #e5e7eb !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .print-table td.num,
    .print-table th.num {
        text-align: right;
    }

    .print-kpi-grid {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
        margin-bottom: 12px;
    }

    .print-kpi {
        border: 1px solid #333;
        padding: 6px;
    }

    .print-kpi span {
        display: block;
        font-size: 9px;
        color: #555;
    }

    .print-kpi strong {
        font-size: 11px;
    }
}

/* ── Legacy page compatibility (existing CRUD views) ── */
.hc-theme .bg-indigo-600,
.hc-theme .bg-blue-600 {
    background-color: var(--hc-primary) !important;
}

.hc-theme .hover\:bg-indigo-700:hover,
.hc-theme .hover\:bg-blue-700:hover {
    background-color: var(--hc-primary-light) !important;
}

.hc-theme .bg-slate-800 {
    background-color: var(--hc-primary) !important;
}

.hc-theme .text-indigo-600,
.hc-theme .text-indigo-700 {
    color: var(--hc-primary) !important;
}

.hc-theme .bg-indigo-100 {
    background-color: var(--hc-bg) !important;
}

.hc-theme .hover\:bg-indigo-200:hover {
    background-color: var(--hc-bg-deep) !important;
}

.hc-theme .border-slate-200,
.hc-theme .divide-slate-100 > :not([hidden]) ~ :not([hidden]) {
    border-color: var(--hc-border) !important;
}

.hc-theme .border-slate-300 {
    border-color: var(--hc-border-strong) !important;
}

.hc-theme .bg-slate-100 {
    background-color: var(--hc-bg) !important;
}

.hc-theme .hover\:bg-slate-50:hover,
.hc-theme .hover\:bg-slate-100:hover,
.hc-theme .hover\:bg-slate-200:hover {
    background-color: var(--hc-bg-deep) !important;
}

.hc-theme .text-slate-500,
.hc-theme .text-slate-600 {
    color: var(--hc-text-muted) !important;
}

.hc-theme .text-slate-700,
.hc-theme .text-slate-800 {
    color: var(--hc-primary) !important;
}

.hc-theme .bg-white {
    background-color: var(--hc-surface) !important;
}

.hc-theme .shadow-sm {
    box-shadow: var(--hc-shadow) !important;
}

.hc-theme input:focus,
.hc-theme select:focus,
.hc-theme textarea:focus {
    border-color: var(--hc-primary) !important;
    outline: none;
    box-shadow: 0 0 0 2px rgba(96, 26, 26, 0.12);
}

.hc-theme .rounded-xl.border {
    border-color: var(--hc-border);
}

/* Standard page shell */
.hc-page {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    min-width: 0;
}

.hc-page > * {
    margin: 0;
}

/* Report table — styling terpusat */
.hc-report-page .hc-table-shell,
.hc-report-body .hc-table-shell {
    width: 100%;
    min-width: 0;
}

.hc-report-page .hc-table th,
.hc-report-page .hc-table td,
.hc-report-body .hc-table th,
.hc-report-body .hc-table td {
    padding: 0.75rem 1rem;
}

.hc-report-page .hc-table td.text-right,
.hc-report-page .hc-table th.text-right,
.hc-report-body .hc-table td.text-right,
.hc-report-body .hc-table th.text-right {
    text-align: right;
}

.hc-report-page .hc-table td.text-center,
.hc-report-page .hc-table th.text-center,
.hc-report-body .hc-table td.text-center,
.hc-report-body .hc-table th.text-center {
    text-align: center;
}

.hc-app-shell {
    min-height: 100vh;
}

/* Nav submenu */
.hc-nav-subgroup {
    margin-top: 0.25rem;
    padding-left: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

/* Pagination (Laravel tailwind view fallback) */
.pagination-nav { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.pagination-nav .pagination-links { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.pagination-nav a,
.pagination-nav span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    min-height: 2rem;
    padding: 0.375rem 0.625rem;
    border-radius: 0.5rem;
    border: 1px solid var(--hc-border);
    background: var(--hc-surface);
    color: var(--hc-text);
    font-size: 0.8125rem;
    text-decoration: none;
}
.pagination-nav a:hover { border-color: var(--hc-primary); color: var(--hc-primary); }
.pagination-nav span[aria-current="page"],
.pagination-nav .active span {
    background: var(--hc-primary);
    border-color: var(--hc-primary);
    color: #fff;
    font-weight: 700;
}
.pagination-nav span[aria-disabled="true"] { opacity: 0.5; cursor: default; }

/* Trip form quick-add */
.hc-field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.hc-quick-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    border: 1px solid rgba(96, 26, 26, 0.2);
    background: rgba(96, 26, 26, 0.06);
    color: var(--hc-primary);
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.hc-quick-add-btn:hover {
    background: rgba(96, 26, 26, 0.12);
    border-color: rgba(96, 26, 26, 0.35);
}

.hc-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0.75rem;
    background: rgba(26, 10, 10, 0.55);
    backdrop-filter: blur(2px);
}

@media (min-width: 640px) {
    .hc-modal-backdrop {
        align-items: center;
    }
}

.hc-modal {
    width: 100%;
    max-width: 28rem;
    max-height: calc(100vh - 1.5rem);
    overflow: auto;
    border-radius: 1rem;
    border: 1px solid var(--hc-border);
    background: var(--hc-surface);
    box-shadow: 0 24px 48px rgba(26, 10, 10, 0.22);
}

.hc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1rem 0.75rem;
    border-bottom: 1px solid var(--hc-border);
}

.hc-modal-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--hc-primary);
}

.hc-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    border: 1px solid var(--hc-border);
    background: #fff;
    color: var(--hc-text-muted);
}

.hc-modal-body {
    padding: 1rem;
}

.hc-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.75rem 1rem 1rem;
    border-top: 1px solid var(--hc-border);
}

/* SweetAlert quick-add (trip form) */
.hc-swal-popup {
    width: min(100%, 24rem) !important;
    padding: 1.25rem 1rem 1rem !important;
    border-radius: 1rem !important;
}

.hc-swal-html {
    margin: 0.75rem 0 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    text-align: left !important;
}

.hc-swal-field + .hc-swal-field {
    margin-top: 0.75rem;
}

.hc-swal-label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--hc-text);
}

.hc-swal-optional {
    font-weight: 400;
    color: var(--hc-text-muted);
}

.hc-swal-input {
    box-sizing: border-box;
    width: 100% !important;
    min-height: 2.75rem;
    margin: 0 !important;
    padding: 0.5625rem 0.75rem !important;
    border: 2px solid var(--hc-border-strong) !important;
    border-radius: 0.5rem !important;
    font-size: 0.875rem !important;
    color: var(--hc-text) !important;
    box-shadow: none !important;
}

.hc-swal-input:focus {
    border-color: var(--hc-primary) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(96, 26, 26, 0.12) !important;
}

.hc-swal-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.hc-swal-hint {
    margin-top: 0.75rem;
    font-size: 0.6875rem;
    line-height: 1.4;
    color: var(--hc-text-muted);
}
