:root {
    --primary: #e31c4d;
    --primary-light: #fce4ec;
    --primary-hover: #b8123d;
    --primary-grad-a: #ee1b33;
    --primary-grad-b: #c4126b;
    --border: #e1e5ec;
    --text-primary: #1c2333;
    --text-secondary: #5b6472;
    --text-muted: #8a91a0;
    --surface: #ffffff;
    --surface-1: #f4f6fb;
    --danger: #b3261e;
    --danger-bg: #fbeaea;
    --success: #1a7f37;
    --success-bg: #e6f4ea;
    --warning: #8a5a08;
    --warning-bg: #fbf1de;
    --info: #0f5fa8;
    --info-bg: #e6f1fb;
    --purple: #6b3fa0;
    --purple-bg: #f1e9fb;
    --radius: 10px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--surface-1);
    color: var(--text-primary);
    font-size: 14px;
}

body.preview-white-bg .list-toolbar { margin-bottom: 24px; }

.wave-filter-bar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.wave-filter-bar select {
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    background: var(--surface);
    color: var(--text-primary);
    min-width: 160px;
}
.wave-filter-bar select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.wave-search-wrap { position: relative; flex: 1; min-width: 220px; max-width: 340px; }
.wave-search-wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-muted); pointer-events: none; }
.wave-search-wrap input {
    width: 100%;
    padding: 9px 12px 9px 36px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    background: var(--surface);
    color: var(--text-primary);
}
.wave-search-wrap input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }

.page-big-title { font-size: 28px; font-weight: 700; margin: 0; color: var(--text-primary); }

.page-header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }

.wave-stat-box {
    display: flex;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
}
.wave-stat-item {
    flex: 1;
    min-width: 160px;
    padding: 16px 20px;
    border-right: 1px solid var(--border);
}
.wave-stat-item:last-child { border-right: none; }
.wave-stat-label { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; white-space: nowrap; }
.wave-stat-value { font-size: 20px; font-weight: 700; color: var(--text-primary); }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 220px;
    background: linear-gradient(160deg, var(--primary-grad-a), var(--primary-grad-b));
    padding: 0 14px 22px;
    display: flex;
    flex-direction: column;
    z-index: 20;
    overflow-y: auto;
}
.sidebar-brand {
    height: 56px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    flex-shrink: 0;
}
.sidebar-brand-wordmark { height: 44px; width: auto; display: block; align-self: flex-start; }

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
    font-weight: 500;
}
.sidebar-nav a:hover { background: rgba(255, 255, 255, 0.1); text-decoration: none; color: #fff; }
.sidebar-nav a.active { background: rgba(255, 255, 255, 0.18); color: #fff; font-weight: 700; }
.sidebar-nav a svg { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 2; }
.sidebar-divider { height: 1px; background: rgba(255,255,255,0.18); margin: 6px 12px; }
.sidebar-section-label {
    padding: 14px 14px 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.55);
}
.sidebar-section-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    width: 100%;
    background: none;
    border: none;
    font-family: inherit;
    cursor: pointer;
    padding: 14px 14px 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.55);
}
.sidebar-section-toggle:hover { color: rgba(255,255,255,0.85); }
.sidebar-section-toggle .sidebar-section-caret { width: 14px; height: 14px; flex-shrink: 0; transition: transform .15s; }
.sidebar-section.collapsed .sidebar-section-toggle .sidebar-section-caret { transform: rotate(-90deg); }
.sidebar-section-links { display: flex; flex-direction: column; gap: 2px; }
.sidebar-section.collapsed .sidebar-section-links { display: none; }

.main-wrapper { margin-left: 220px; min-height: 100vh; }

.topbar {
    background: var(--surface);
    border-bottom: none;
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-title { font-size: 16px; font-weight: 700; color: var(--text-primary); }

.topbar-right { display: flex; align-items: center; gap: 16px; }

.topbar .user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
}
.topbar .user-info a { color: var(--primary); }
.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}
.user-avatar-img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.user-menu { position: relative; }
.user-menu-trigger {
    background: none;
    border: none;
    font-family: inherit;
    cursor: pointer;
    border-radius: 8px;
    padding: 6px 8px;
}
.user-menu-trigger:hover { background: var(--surface-1); }
.user-menu-trigger .lucide-chevron-down { transition: transform .15s; color: var(--text-muted); }
.user-menu.open .user-menu-trigger .lucide-chevron-down { transform: rotate(180deg); }
.user-menu-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 200px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 6px;
    z-index: 20;
}
.user-menu.open .user-menu-dropdown { display: block; }
.user-menu-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-primary);
}
.user-menu-dropdown a:hover { background: var(--surface-1); text-decoration: none; }
.user-menu-dropdown a svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--text-secondary); }
.user-menu-divider { height: 1px; background: var(--border); margin: 6px 4px; }
#perusahaanMenuDropdown { min-width: 260px; }
#perusahaanMenuDropdown a { white-space: nowrap; }

@media (max-width: 900px) {
    .sidebar { position: static; width: auto; flex-direction: row; overflow-x: auto; padding: 10px; }
    .sidebar-nav { flex-direction: row; }
    .main-wrapper { margin-left: 0; }
}

.container {
    max-width: none;
    margin: 0 auto;
    padding: 24px 32px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header h1 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}
.btn:hover { background: var(--surface-1); text-decoration: none; }
.btn-primary { background: linear-gradient(135deg, var(--primary-grad-a), var(--primary-grad-b)); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-danger { color: var(--danger); border-color: var(--danger-bg); }
.btn-danger:hover { background: var(--danger-bg); }
.btn-sm { padding: 5px 11px; font-size: 12px; }

.dashboard-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    align-items: start;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
}
.stat-card .label { font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.stat-card .value { font-size: 24px; font-weight: 700; color: var(--text-primary); }
.stat-card .sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.stat-card.accent .value { color: var(--primary); }
.stat-card.danger .value { color: var(--danger); }
.stat-card.success .value { color: var(--success); }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.sidebar-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    position: sticky;
    top: 72px;
}
.sidebar-panel h2 {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tx-list { display: flex; flex-direction: column; gap: 10px; }
.tx-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}
.tx-row:last-child { border-bottom: none; }
.tx-title { font-weight: 600; color: var(--text-primary); }
.tx-meta { color: var(--text-muted); font-size: 12px; }
.tx-amount { font-weight: 700; white-space: nowrap; }
.tx-amount.in { color: var(--success); }
.tx-amount.out { color: var(--danger); }

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
.badge-draft { background: var(--surface-1); color: var(--text-secondary); }
.badge-terkirim { background: var(--info-bg); color: var(--info); }
.badge-diterima { background: var(--info-bg); color: var(--info); }
.badge-ditolak { background: var(--danger-bg); color: var(--danger); }
.badge-dibayar { background: var(--warning-bg); color: var(--warning); }
.badge-dikonversi { background: var(--success-bg); color: var(--success); }
.badge-lunas { background: var(--success-bg); color: var(--success); }
.badge-sebagian { background: var(--warning-bg); color: var(--warning); }
.badge-batal { background: var(--danger-bg); color: var(--danger); }
.badge-jatuh-tempo { background: var(--danger-bg); color: var(--danger); }
.badge-owner { background: var(--success-bg); color: var(--success); }
.badge-staff { background: var(--surface-1); color: var(--text-secondary); }
.badge-aset { background: var(--purple-bg); color: var(--purple); }
.badge-kewajiban { background: var(--warning-bg); color: var(--warning); }
.badge-modal { background: var(--info-bg); color: var(--info); }
.badge-pendapatan { background: var(--success-bg); color: var(--success); }
.badge-beban { background: var(--danger-bg); color: var(--danger); }

.form-section-title { font-size: 13px; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 14px; }
.form-section-divider { border-top: 1px solid var(--border); margin: 20px 0; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.form-group input, .form-group select, .form-group textarea,
.item-row-table input, .item-row-table select, .item-row-table textarea {
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: var(--surface);
    color: var(--text-primary);
    transition: border-color .15s, box-shadow .15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus,
.item-row-table input:focus, .item-row-table select:focus, .item-row-table textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}
.produk-suggest-list {
    position: fixed;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 6px;
    max-height: 240px;
    overflow-y: auto;
    z-index: 50;
}
.produk-suggest-item {
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
}
.produk-suggest-item:hover, .produk-suggest-item.active { background: var(--surface-1); }
.item-row-table select.select-locked {
    background: #e9ecef;
    border-color: #d7dbe2;
    color: var(--text-muted);
    cursor: not-allowed;
}
.form-group input:disabled, .form-group select:disabled, .form-group textarea:disabled,
.form-group input:read-only {
    background: #e9ecef;
    border-color: #d7dbe2;
    color: var(--text-muted);
    cursor: not-allowed;
}
.riwayat-panel {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 320px;
    max-width: 90vw;
    background: var(--surface);
    box-shadow: -6px 0 24px rgba(0,0,0,0.12);
    z-index: 200;
    padding: 20px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform .2s ease;
}
.riwayat-panel.open { transform: translateX(0); }
.riwayat-panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.riwayat-panel-close { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 4px; }
.riwayat-panel-close:hover { color: var(--text-primary); }
.phone-input-group { display: flex; }
.phone-input-group .phone-prefix {
    display: flex; align-items: center; padding: 0 10px;
    background: var(--surface-1); border: 1px solid var(--border); border-right: none;
    border-radius: var(--radius) 0 0 var(--radius);
    font-size: 14px; color: var(--text-secondary);
}
.phone-input-group input { border-radius: 0 var(--radius) var(--radius) 0 !important; flex: 1; min-width: 0; }

.form-actions { display: flex; gap: 10px; margin-top: 20px; }

.ringkasan-diskon-label-input.ringkasan-diskon-label-input { border-color: transparent; background: transparent; padding-left: 0; padding-right: 0; }
.ringkasan-diskon-label-input.ringkasan-diskon-label-input:focus { border-color: var(--primary); background: var(--surface); padding-left: 10px; padding-right: 10px; }

.checkbox-group { display: flex; flex-wrap: wrap; gap: 12px; }
.checkbox-group label { display: flex; align-items: center; gap: 6px; font-weight: 400; font-size: 13px; color: var(--text-primary); }

.filters-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; }
.filters input, .filters select { padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; }

.alert { padding: 10px 14px; border-radius: var(--radius); font-size: 13px; margin-bottom: 16px; }
.alert-success { background: var(--success-bg); color: var(--success); }
.alert-error { background: var(--danger-bg); color: var(--danger); }

.modal-overlay {
    position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000; padding: 16px;
}
.modal-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
    padding: 28px; width: 100%; max-width: 420px; text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
.modal-card h2 { font-size: 18px; margin: 0 0 16px; color: var(--danger); }

.modal-card-form {
    background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
    padding: 24px; width: 100%; max-width: 520px; text-align: left;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-height: 90vh; overflow-y: auto;
}
.modal-card-form h2 { font-size: 17px; margin: 0 0 4px; color: var(--text-primary); }

.modal-close-btn {
    background: none; border: none; cursor: pointer; font-size: 22px; line-height: 1;
    color: var(--text-muted); padding: 4px; flex-shrink: 0;
}
.modal-close-btn:hover { color: var(--text-primary); }
.modal-section-title { font-weight: 700; font-size: 14px; margin: 0 0 2px; }
.modal-section-sub { font-size: 12px; color: var(--text-muted); margin: 0 0 14px; }
.modal-divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

.access-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.access-row:last-child { border-bottom: none; }
.access-icon {
    width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; color: #fff;
}
.access-icon svg { width: 16px; height: 16px; }
.access-name { flex: 1; font-weight: 600; font-size: 13.5px; }
.access-row select { width: 110px; flex-shrink: 0; }

.toggle-switch { position: relative; display: inline-block; width: 38px; height: 21px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; cursor: pointer; inset: 0; background-color: #ccc;
    transition: .15s; border-radius: 21px;
}
.toggle-slider:before {
    position: absolute; content: ""; height: 15px; width: 15px; left: 3px; bottom: 3px;
    background-color: #fff; transition: .15s; border-radius: 50%;
}
.toggle-switch input:checked + .toggle-slider { background-color: var(--primary); }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(17px); }

.access-pill {
    display: inline-block; padding: 4px 10px; border-radius: 20px;
    font-size: 12px; font-weight: 700; white-space: nowrap;
}
.access-pill-none { background: var(--surface-1); color: var(--text-muted); font-weight: 500; }

.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 22vh;
    background: linear-gradient(160deg, var(--primary-light), var(--surface-1));
}
.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 32px;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 10px 30px rgba(227, 28, 77, 0.14);
}
.login-card h1 { font-size: 18px; margin: 0 0 20px; text-align: center; color: var(--primary); }
.login-logo { display: block; height: 60px; width: auto; margin: 0 auto 24px; }

.password-wrap { position: relative; }
.password-wrap input { width: 100%; padding-right: 42px; }
.password-wrap button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
}
.password-wrap button:hover { color: var(--text-secondary); }
.password-wrap button.is-visible { color: var(--primary); }

.status-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
    overflow-x: auto;
    overflow-y: hidden;
}
.list-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.list-toolbar .status-tabs { margin-bottom: 0; flex: 1; min-width: 0; }
.list-toolbar .filters-row { margin-bottom: 0; flex: 1; min-width: 0; }
.status-tab {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    border-radius: 6px 6px 0 0;
    transition: background-color .15s, color .15s;
    margin-bottom: -1px;
}
.status-tab:hover { color: var(--primary); text-decoration: none; background: var(--surface-1); }
.status-tab.active { color: var(--primary); border-bottom-color: var(--primary); background: var(--primary-light); }
.status-tab-count {
    display: inline-block;
    background: var(--surface-1);
    color: var(--text-muted);
    border-radius: 20px;
    padding: 1px 8px;
    font-size: 11px;
    margin-left: 4px;
}
.status-tab.active .status-tab-count { background: #fff; color: var(--primary); }

.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }

.kelola-kolom-wrap { position: relative; display: inline-block; }
.kelola-kolom-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.12);
    padding: 10px 14px;
    min-width: 180px;
    z-index: 30;
}
.kelola-kolom-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    padding: 6px 0;
    cursor: pointer;
    white-space: nowrap;
}
.kelola-kolom-item input { margin: 0; }

.bulk-pay-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--primary-light);
    border: 1px solid var(--primary);
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { color: var(--text-secondary); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.02em; }
tr:hover td { background: var(--surface-1); }
td.num, th.num { text-align: right; white-space: nowrap; }

.account-avatar-img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; display: block; }
.account-avatar-initial {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

.item-row-table input, .item-row-table select, .item-row-table textarea { width: 100%; }
.item-row-table td { padding: 8px 6px; border-bottom: 1px solid var(--surface-1); vertical-align: top; }
.item-row-table thead th { border-bottom: 2px solid var(--border); }
.item-row-table tbody tr:hover td { background: transparent; }
.item-catatan-tinggi { margin-top: 6px; font-size: 12px; min-height: 58px; resize: none; overflow: hidden; font-family: inherit; line-height: 1.5; }
.item-sub-label { font-size: 11px; color: var(--text-muted); margin: 6px 0 2px; }
.item-field-group .item-sub-label:first-child { margin-top: 0; }
.item-row-table input.item-produk-kecil { font-size: 12px; padding: 5px 8px; color: var(--text-secondary); }
.item-row-table input.item-nama-order { font-size: 15px; font-weight: 600; }
.item-row-table input.item-nama-order::placeholder { font-weight: 400; font-size: 14px; }
.produk-kunci-wrap { position: relative; }
.item-row-table input.produk-terkunci { background: var(--surface-1); cursor: default; padding-right: 28px; }
.produk-kunci-x { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: none; background: none; color: var(--text-muted); font-size: 16px; line-height: 1; cursor: pointer; padding: 2px 4px; }
.produk-kunci-x:hover { color: var(--danger); }
.pph23-centang { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--text-primary); cursor: pointer; background: var(--surface); }
.form-group .pph23-centang input { width: 16px; height: 16px; margin: 0; padding: 0; accent-color: var(--primary); }
.pph23-centang:has(input:checked) { border-color: var(--primary); background: var(--primary-light); }
.pph23-estimasi td { color: var(--text-muted); font-size: 13px; padding-top: 6px; padding-bottom: 6px; background: var(--surface-1); border-bottom: none; }
.pph23-estimasi-akhir td { color: var(--text-secondary); font-weight: 600; }
.pph23-estimasi-catatan { font-size: 11px; font-weight: 400; color: var(--text-muted); margin-top: 2px; }
.pph23-ringkas { background: var(--surface-1); border-radius: 8px; padding: 10px 14px; margin: 4px 0 16px; font-size: 13px; color: var(--text-secondary); }
.pph23-ringkas > div { display: flex; justify-content: space-between; padding: 3px 0; }
.pph23-ringkas > .pph23-ringkas-total { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 7px; font-weight: 700; color: var(--text-primary); }
.item-row-remove { color: var(--danger); cursor: pointer; background: none; border: none; font-size: 18px; line-height: 1; }
.item-field-group { }
.item-drag-handle { cursor: grab; color: var(--text-muted); padding-top: 9px; flex: 0 0 auto; user-select: none; }
.item-drag-handle:active { cursor: grabbing; }
.item-row.item-row-dragging { opacity: 0.4; }
.btn-link-add { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); background: none; border: none; padding: 8px 0; font-size: 13px; font-weight: 600; cursor: pointer; }
.btn-link-add:hover { text-decoration: underline; }
.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px;
    border-radius: 6px;
    border: none;
    color: var(--text-secondary);
    background: transparent;
    flex-shrink: 0;
}
.icon-btn:hover { background: var(--surface-1); color: var(--text-primary); text-decoration: none; }
.icon-btn.icon-btn-danger { color: var(--danger); }
.icon-btn.icon-btn-danger:hover { background: rgba(179, 38, 30, 0.08); color: var(--danger); }

.report-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.report-tab {
    padding: 9px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    background: var(--surface-1);
    border: 1px solid var(--border);
}
.report-tab:hover { text-decoration: none; color: var(--primary); }
.report-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.total-row td { font-weight: 700; border-top: 2px solid var(--border); background: var(--surface-1); }

@media (max-width: 900px) {
    .form-grid { grid-template-columns: 1fr; }
    .dashboard-layout { grid-template-columns: 1fr; }
    .sidebar-panel { position: static; }
}

/* Pin tab utama per user */
.tab-pin { display: inline-flex; align-items: center; margin-left: 6px; color: var(--text-muted); opacity: .35; cursor: pointer; vertical-align: -2px; transition: opacity .15s, color .15s; }
.status-tab:hover .tab-pin, .tab-pin:focus-visible { opacity: 1; }
.tab-pin:hover { color: var(--primary); opacity: 1; }
.tab-pin.is-pinned { color: var(--primary); opacity: 1; }
.tab-pin.is-pinned svg { fill: currentColor; }

/* Tombol tambah produk baru di kotak saran produk */
.produk-suggest-tambah { border-top: 1px solid var(--border); color: var(--primary); font-weight: 600; }

/* Label menu dua bahasa: nama Indonesia + terjemahan Inggris kecil di bawahnya */
.sidebar-nav a .nav-label { display: flex; flex-direction: column; line-height: 1.2; }
.sidebar-nav a .nav-label small { font-size: 10.5px; font-weight: 400; color: rgba(255,255,255,0.68); margin-top: 1px; }
.sidebar-nav a.active .nav-label small { color: rgba(255,255,255,0.85); }
.sidebar-nav a { padding-top: 8px; padding-bottom: 8px; }

/* Lonceng notifikasi di bar atas (sama seperti HRIS, warna merah Finbook) */
.bell-wrap { position: relative; flex-shrink: 0; }
.bell-btn { position: relative; width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer; background: none; color: var(--text-secondary); display: flex; align-items: center; justify-content: center; }
.bell-btn:hover { background: var(--surface-1); color: var(--text-primary); }
.bell-btn svg { width: 20px; height: 20px; stroke-width: 2; }
.bell-badge { position: absolute; top: -1px; right: -3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--primary); color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; border: 2px solid var(--surface); box-sizing: content-box; }
.bell-menu { display: none; position: absolute; top: calc(100% + 10px); right: 0; width: min(380px, 92vw); z-index: 50; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(28, 35, 51, 0.16); overflow: hidden; }
.bell-menu.show { display: block; }
.bell-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.bell-head strong { font-size: 14.5px; }
.bell-head form { margin: 0; }
.bell-readall { background: none; border: none; cursor: pointer; color: var(--primary); font-size: 12.5px; font-weight: 600; font-family: inherit; padding: 2px 4px; }
.bell-readall:hover { text-decoration: underline; }
.bell-list { max-height: 420px; overflow-y: auto; }
.bell-item { display: flex; gap: 10px; padding: 12px 16px; border-bottom: 1px solid #f3f4f7; color: var(--text-primary); text-decoration: none; }
.bell-item:hover { background: #fdf2f5; text-decoration: none; }
.bell-item:last-child { border-bottom: none; }
.bell-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; background: transparent; }
.bell-item.unread { background: #fff6f8; }
.bell-item.unread .bell-dot { background: var(--primary); }
.bell-item.unread.bell-peringatan .bell-dot { background: #f5a524; }
.bell-text strong { display: block; font-size: 13.5px; line-height: 1.35; }
.bell-text small { display: block; font-size: 12.5px; color: var(--text-secondary); margin-top: 2px; line-height: 1.4; }
.bell-text em { display: block; font-style: normal; font-size: 11.5px; color: var(--text-muted); margin-top: 3px; }
.bell-empty { padding: 28px 16px; text-align: center; color: var(--text-secondary); font-size: 13.5px; }
@media (max-width: 900px) {
    .bell-wrap { position: static; }
    .bell-menu { left: 8px; right: 8px; width: auto; margin-top: 6px; }
}
