:root {
    --navy: #052c69;
    --navy-deep: #042150;
    --blue: #1d63e9;
    --blue-dark: #1552c7;
    --blue-soft: #eaf1ff;
    --yellow: #ffd21c;
    --yellow-dark: #f4bd00;
    --orange: #ff8a00;
    --green: #16a34a;
    --green-soft: #e9f9ef;
    --red: #ef4444;
    --red-soft: #fff0f0;
    --purple: #a855f7;
    --text: #172033;
    --muted: #7b879c;
    --line: #e7ebf2;
    --bg: #f4f7fc;
    --card: #ffffff;
    --shadow: 0 1px 2px rgba(17, 38, 78, .03), 0 8px 24px rgba(17, 38, 78, .025);
    --radius: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background: var(--bg);
    font-family: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15.5px;
    -webkit-font-smoothing: antialiased;
}

body.no-scroll {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

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

button {
    cursor: pointer;
}

h1,
h2,
h3,
h4,
p {
    margin: 0;
}

svg {
    display: block;
}

.lucide {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

/* -------------------------------------------------------------------------- */
/* App frame                                                                   */
/* -------------------------------------------------------------------------- */
.app-shell {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    width: 242px;
    padding: 18px 14px 14px;
    color: #fff;
    background:
        radial-gradient(circle at 20% 4%, rgba(63, 131, 255, .28), transparent 30%),
        linear-gradient(165deg, #073879 0%, #052d6b 46%, #032154 100%);
    overflow-y: auto;
    transition: transform .25s ease;
}

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 164px;
    min-height: 0;
    margin-bottom: 4px;
    padding: 8px 10px;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .16);
}

.brand-logo {
    display: block;
    width: 144px;
    height: auto;
    max-height: 122px;
    object-fit: contain;
    object-position: center;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 11px;
    border-radius: 9px;
    color: #d7e4fb;
    font-size: 14px;
    font-weight: 600;
    transition: .18s ease;
}

.nav-item .lucide {
    width: 17px;
    height: 17px;
    opacity: .9;
}

.nav-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, .08);
}

.nav-item.active {
    color: #0b336e;
    background: var(--yellow);
    box-shadow: 0 7px 18px rgba(0, 0, 0, .16);
}

.nav-item.active .lucide {
    stroke-width: 2.4;
}

.sidebar-store {
    position: relative;
    margin-top: auto;
    padding: 15px 12px 14px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 12px;
    background: rgba(255, 255, 255, .055);
    overflow: hidden;
}

.sidebar-store::after {
    content: '';
    position: absolute;
    right: -30px;
    bottom: -34px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 210, 28, .08);
}

.sidebar-store-icon {
    display: grid;
    width: 29px;
    height: 29px;
    margin-bottom: 9px;
    place-items: center;
    color: var(--yellow);
    border-radius: 8px;
    background: rgba(255, 210, 28, .12);
}

.sidebar-store strong {
    display: block;
    color: #fff;
    font-size: 14px;
    line-height: 1.35;
}

.sidebar-store span {
    display: block;
    margin-top: 2px;
    color: #a8bfe2;
    font-size: 13px;
}

.app-main {
    min-height: 100vh;
    margin-left: 242px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 18px;
    height: 68px;
    padding: 0 24px;
    border-bottom: 1px solid #edf0f5;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(12px);
}

.mobile-menu-btn {
    display: none;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--text);
    background: #fff;
}

.topbar-search {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    max-width: 395px;
    height: 38px;
    padding: 0 13px;
    color: #8a96a9;
    border: 1px solid #e6eaf1;
    border-radius: 8px;
    background: #f8fafc;
}

.topbar-search .lucide {
    flex: none;
    width: 16px;
    height: 16px;
}

.topbar-search input {
    width: 100%;
    color: var(--text);
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 13.5px;
}

.topbar-search input::placeholder {
    color: #9aa5b7;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

.notif {
    position: relative;
}

.notif-btn {
    position: relative;
    display: grid;
    width: 37px;
    height: 37px;
    padding: 0;
    place-items: center;
    color: #25334b;
    border: 1px solid #edf0f5;
    border-radius: 50%;
    background: #fff;
    transition: border-color .18s ease, background .18s ease;
}

.notif-btn:hover {
    border-color: #dbe4f1;
    background: #f8fbff;
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    display: grid;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    place-items: center;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #f43f5e;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

.notif-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 72;
    width: 348px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(15, 35, 70, .16);
}

.notif-dropdown[hidden] {
    display: none;
}

.notif-dropdown-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 15px 11px;
    border-bottom: 1px solid #eef2f7;
    background: #fbfdff;
}

.notif-dropdown-head strong {
    display: block;
    color: #1c2a41;
    font-size: 14px;
    font-weight: 800;
}

.notif-dropdown-head span {
    display: block;
    margin-top: 2px;
    color: #8b96a8;
    font-size: 13px;
}

.notif-dropdown-head form {
    margin: 0;
}

.notif-read-all {
    padding: 0;
    color: var(--blue);
    border: 0;
    background: transparent;
    font-size: 13px;
    font-weight: 700;
}

.notif-read-all:hover {
    color: var(--blue-dark);
    text-decoration: underline;
}

.notif-list {
    max-height: 370px;
    overflow-y: auto;
}

.notif-form {
    margin: 0;
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    padding: 11px 15px;
    color: var(--text);
    border: 0;
    border-bottom: 1px solid #f2f5f9;
    background: #fff;
    text-align: left;
    transition: background .16s ease;
}

.notif-item:last-child {
    border-bottom: 0;
}

.notif-item:hover {
    background: #f7faff;
}

.notif-item.is-unread {
    background: #f4f9ff;
}

.notif-item.is-unread:hover {
    background: #edf5ff;
}

.notif-icon {
    display: grid;
    flex: none;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
}

.notif-icon .lucide {
    width: 16px;
    height: 16px;
}

.notif-icon.warning {
    color: #b77900;
    background: #fff7df;
}

.notif-icon.danger {
    color: #d93636;
    background: #fff0f0;
}

.notif-icon.info {
    color: #1d63e9;
    background: #edf4ff;
}

.notif-icon.neutral {
    color: #64748b;
    background: #f1f5f9;
}

.notif-copy {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
}

.notif-item-title {
    color: #1c2a41;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
}

.notif-item-message {
    margin-top: 2px;
    color: #64718a;
    font-size: 13px;
    line-height: 1.5;
}

.notif-item-time {
    margin-top: 4px;
    color: #9aa6b8;
    font-size: 13px;
}

.notif-unread-dot {
    flex: none;
    width: 7px;
    height: 7px;
    margin-top: 5px;
    border-radius: 50%;
    background: #f43f5e;
}

.notif-empty {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 5px;
    padding: 30px 18px 32px;
    text-align: center;
}

.notif-empty .lucide {
    width: 24px;
    height: 24px;
    margin-bottom: 3px;
    color: #a9b5c7;
}

.notif-empty strong {
    color: #334158;
    font-size: 13px;
}

.notif-empty span {
    color: #8b96a8;
    font-size: 13px;
    line-height: 1.5;
}

.notif-foot {
    padding: 8px 15px;
    color: #93a0b3;
    border-top: 1px solid #eef2f7;
    background: #fbfdff;
    font-size: 13px;
    text-align: center;
}

.profile {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    padding-left: 3px;
}

.profile-avatar {
    width: 31px;
    height: 31px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-meta strong {
    display: block;
    color: #16233a;
    font-size: 13.5px;
    line-height: 1.3;
}

.profile-meta span {
    display: block;
    color: #8b96a8;
    font-size: 13px;
}

.profile-more {
    display: grid;
    width: 22px;
    height: 22px;
    padding: 0;
    margin-left: -3px;
    place-items: center;
    color: #7f8b9d;
    border: 0;
    border-radius: 6px;
    background: transparent;
}

.profile-more:hover,
.profile-more[aria-expanded="true"] {
    color: #40516d;
    background: #f1f5fb;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 70;
    width: 220px;
    padding: 7px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 18px 44px rgba(15, 35, 70, .14);
}

.profile-dropdown[hidden] {
    display: none;
}

.profile-dropdown-head {
    padding: 8px 10px 10px;
    margin-bottom: 4px;
    border-bottom: 1px solid #f0f3f8;
}

.profile-dropdown-head strong {
    display: block;
    color: #233149;
    font-size: 13px;
    font-weight: 800;
}

.profile-dropdown-head span {
    display: block;
    margin-top: 2px;
    color: #8b96a8;
    font-size: 13px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.profile-dropdown a,
.profile-dropdown button {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 36px;
    padding: 0 10px;
    color: #4d5c73;
    border: 0;
    border-radius: 7px;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
}

.profile-dropdown a:hover,
.profile-dropdown button:hover {
    color: #1d63e9;
    background: #f5f9ff;
}

.profile-dropdown form {
    margin: 0;
}

.profile-dropdown .lucide {
    width: 15px;
    height: 15px;
}

.profile-logout {
    color: #b34a4a !important;
}

.profile-logout:hover {
    color: #9b2f2f !important;
    background: #fff4f4 !important;
}

.page-content {
    width: 100%;
    padding: 17px 22px 28px;
}

/* -------------------------------------------------------------------------- */
/* Shared components                                                           */
/* -------------------------------------------------------------------------- */
.card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 17px 11px;
}

.card-title {
    color: #17233b;
    font-size: 15.5px;
    font-weight: 800;
    letter-spacing: -.1px;
}

.card-subtitle {
    color: var(--muted);
    font-size: 13px;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--blue);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.card-link:hover {
    text-decoration: underline;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 0 15px;
    color: #fff;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--blue);
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1;
    transition: .18s ease;
    white-space: nowrap;
}

.btn:hover {
    background: var(--blue-dark);
    transform: translateY(-1px);
}

.btn .lucide {
    width: 17px;
    height: 17px;
}

.btn-yellow {
    color: #0b315f;
    background: var(--yellow);
    box-shadow: 0 4px 12px rgba(244, 189, 0, .18);
}

.btn-yellow:hover {
    background: #ffdb4d;
}

.btn-outline {
    color: #2d3a50;
    border-color: #dfe5ee;
    background: #fff;
}

.btn-outline:hover {
    border-color: #c7d2e3;
    background: #f9fbfd;
}

.btn-soft {
    color: var(--blue);
    border-color: #dce7fb;
    background: #f1f6ff;
}

.btn-soft:hover {
    background: #e8f1ff;
}

.btn-ghost {
    color: #5f6c81;
    background: transparent;
}

.btn-ghost:hover {
    background: #f3f6fa;
}

.btn-danger {
    color: #d93636;
    border-color: #f3d6d6;
    background: #fff5f5;
}

.btn-sm {
    min-height: 33px;
    padding: 0 11px;
    border-radius: 7px;
    font-size: 13px;
}

.btn-lg {
    min-height: 46px;
    padding: 0 20px;
    font-size: 14px;
}

.btn-icon {
    width: 36px;
    min-height: 36px;
    padding: 0;
    border-radius: 8px;
}

.btn[disabled] {
    opacity: .55;
    pointer-events: none;
}

/* -------------------------------------------------------------------------- */
/* Invoice email dialog                                                        */
/* -------------------------------------------------------------------------- */
.invoice-mail-dialog {
    width: min(560px, calc(100vw - 28px));
}

.mail-warning {
    display: flex;
    gap: 10px;
    padding: 11px 12px;
    margin-bottom: 14px;
    color: #92400e;
    border: 1px solid #fcd34d;
    border-radius: 9px;
    background: #fffbeb;
}

.mail-warning svg {
    flex: none;
    width: 16px;
    height: 16px;
    margin-top: 1px;
}

.mail-warning strong {
    display: block;
    font-size: 13px;
    font-weight: 800;
}

.mail-warning span {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    line-height: 1.55;
}

.mail-warning code {
    padding: 1px 4px;
    font-size: 13px;
    border-radius: 4px;
    background: #fef3c7;
}

.mail-recipient {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #e8edf4;
    border-radius: 9px;
    background: #f8fafd;
}

.mail-recipient-avatar {
    display: grid;
    width: 34px;
    height: 34px;
    color: #0b3265;
    font-size: 15.5px;
    font-weight: 800;
    border-radius: 50%;
    background: #dceafe;
    place-items: center;
}

.mail-recipient strong {
    display: block;
    color: #1b2b43;
    font-size: 13.5px;
}

.mail-recipient span {
    color: #8d99aa;
    font-size: 13px;
}

.mail-attach {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 11px;
    color: #33475f;
    font-size: 13px;
    border: 1px dashed #cfdcec;
    border-radius: 8px;
    background: #f8fbff;
}

.mail-attach input[type="checkbox"] {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    min-width: 14px;
    margin: 0;
    padding: 0;
    border-radius: 3px;
    accent-color: #1a5bd6;
    appearance: auto;
    -webkit-appearance: checkbox;
}

.mail-attach span {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.45;
    word-break: break-word;
}

.mail-status {
    margin-top: 12px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.55;
    border-radius: 8px;
}

.mail-status.success {
    color: #15803d;
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
}

.mail-status.error {
    color: #b91c1c;
    border: 1px solid #fecaca;
    background: #fef2f2;
}

.invoice-mail-dialog textarea {
    min-height: 96px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 22px;
    padding: 0 8px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.badge-green {
    color: #0d8d42;
    background: #eafaf0;
}

.badge-red {
    color: #e04040;
    background: #fff0f0;
}

.badge-yellow {
    color: #a26a00;
    background: #fff8df;
}

.badge-orange {
    color: #c46300;
    background: #fff3e8;
}

.badge-blue {
    color: #1a62d8;
    background: #edf4ff;
}

.badge-gray {
    color: #64748b;
    background: #f1f5f9;
}

.badge-dark {
    color: #fff;
    background: #19325f;
}

.status-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field label,
.field-label {
    color: #4b576a;
    font-size: 13px;
    font-weight: 700;
}

.field input,
.field select,
.field textarea,
.input {
    width: 100%;
    min-height: 44px;
    padding: 0 13px;
    color: var(--text);
    border: 1px solid #e2e8f1;
    border-radius: 9px;
    outline: 0;
    background: #fff;
    font-size: 13.5px;
    transition: border .18s, box-shadow .18s;
}

.field textarea {
    min-height: 82px;
    padding-top: 10px;
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.input:focus {
    border-color: #9bbcf8;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
}

.field input::placeholder,
.field textarea::placeholder {
    color: #a4afbf;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.form-grid .span-2 {
    grid-column: span 2;
}

.field-hint {
    color: #95a1b2;
    font-size: 13px;
    line-height: 1.35;
}

.field-hint a {
    color: var(--blue);
    font-weight: 700;
    text-decoration: none;
}

.field-hint a:hover {
    text-decoration: underline;
}

.product-image-upload {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 11px;
    border: 1px dashed #d9e3f0;
    border-radius: 10px;
    background: #f8fbff;
}

.product-image-preview {
    display: grid;
    flex: none;
    width: 84px;
    height: 84px;
    overflow: hidden;
    place-items: center;
    border: 1px solid #e4ebf5;
    border-radius: 9px;
    background: #fff;
}

.product-image-preview img {
    width: 100%;
    height: 100%;
    padding: 5px;
    object-fit: contain;
}

.product-image-controls {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.product-image-input {
    display: none;
}

.product-image-pick {
    cursor: pointer;
}

.product-image-name {
    max-width: 100%;
    overflow: hidden;
    color: #5b6779;
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flash {
    position: fixed;
    z-index: 100;
    top: 76px;
    right: 22px;
    display: flex;
    align-items: center;
    gap: 9px;
    max-width: 360px;
    padding: 12px 15px;
    color: #116d37;
    border: 1px solid #c9f0d7;
    border-radius: 9px;
    background: #f0fdf4;
    box-shadow: 0 12px 30px rgba(15, 45, 30, .12);
    font-size: 13.5px;
    font-weight: 600;
    animation: slideIn .3s ease;
}

.flash.error {
    color: #b91c1c;
    border-color: #fecaca;
    background: #fef2f2;
}

.flash-close {
    display: grid;
    padding: 0;
    margin-left: 8px;
    place-items: center;
    color: currentColor;
    border: 0;
    background: transparent;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 44px 20px;
    color: var(--muted);
    text-align: center;
}

.empty-state .lucide {
    width: 34px;
    height: 34px;
    margin-bottom: 10px;
    color: #b4c0d2;
}

.empty-state strong {
    margin-bottom: 4px;
    color: #374151;
    font-size: 14px;
}

.empty-state span {
    font-size: 13px;
}

/* -------------------------------------------------------------------------- */
/* Dashboard                                                                   */
/* -------------------------------------------------------------------------- */
.dashboard-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 15px;
}

.welcome-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #152239;
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -.65px;
}

.welcome-title .lucide {
    width: 21px;
    height: 21px;
    color: #f7b500;
    transform: rotate(-8deg);
    fill: #ffd24a;
}

.welcome-subtitle {
    margin-top: 3px;
    color: #8490a2;
    font-size: 13px;
}

.promo-banner {
    position: relative;
    display: flex;
    align-items: center;
    width: 395px;
    min-width: 300px;
    height: 62px;
    padding: 0 112px 0 20px;
    border: 1px solid #f6cc1a;
    border-radius: 8px;
    background:
        radial-gradient(circle at 88% 20%, rgba(255, 255, 255, .35), transparent 28%),
        linear-gradient(110deg, #ffdb35 0%, #ffd21c 56%, #ffd84c 100%);
    overflow: hidden;
}

.promo-banner::before {
    content: '';
    position: absolute;
    top: -18px;
    right: 55px;
    width: 68px;
    height: 68px;
    border: 9px solid rgba(255, 255, 255, .18);
    border-radius: 50%;
}

.promo-banner::after {
    content: '';
    position: absolute;
    left: 47%;
    bottom: -38px;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
}

.promo-copy {
    position: relative;
    z-index: 2;
}

.promo-copy strong {
    display: block;
    color: #0b3265;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.3;
}

.promo-copy span {
    display: block;
    margin-top: 1px;
    color: #0b3265;
    font-size: 13px;
    font-weight: 700;
    opacity: .82;
}

.promo-mascot {
    position: absolute;
    z-index: 1;
    right: 20px;
    bottom: -8px;
    width: 100px;
    height: 94px;
    object-fit: contain;
    object-position: center bottom;
    filter: drop-shadow(0 5px 6px rgba(87, 52, 0, .14));
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;
    margin-bottom: 14px;
}

.kpi-card {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    min-height: 76px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--shadow);
}

.kpi-icon {
    display: grid;
    flex: none;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 9px;
}

.kpi-icon .lucide {
    width: 19px;
    height: 19px;
}

.kpi-icon.green { color: #12a252; background: #e9f9ef; }
.kpi-icon.blue { color: #2563eb; background: #edf4ff; }
.kpi-icon.yellow { color: #f2a100; background: #fff8e2; }
.kpi-icon.red { color: #f05555; background: #fff1f1; }

.kpi-label {
    color: #677286;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
}

.kpi-value {
    margin-top: 3px;
    color: #152138;
    font-size: 19.5px;
    font-weight: 800;
    letter-spacing: -.4px;
    line-height: 1.2;
    white-space: nowrap;
}

.kpi-foot {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    color: #6f7b8e;
    font-size: 13px;
    line-height: 1.2;
}

.kpi-foot .up {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    color: #10a64f;
    font-weight: 700;
}

.kpi-foot .lucide {
    width: 10px;
    height: 10px;
}

.kpi-foot a {
    color: var(--blue);
    font-weight: 700;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 14px;
}

.chart-card { grid-column: span 8; min-height: 294px; }
.category-card { grid-column: span 4; min-height: 294px; }
.stock-card { grid-column: span 4; min-height: 238px; }
.transactions-card { grid-column: span 5; min-height: 238px; }
.quick-card { grid-column: span 3; min-height: 238px; }

.chart-toolbar {
    display: flex;
    align-items: center;
    gap: 13px;
}

.chart-legend {
    display: flex;
    align-items: center;
    gap: 11px;
    color: #667287;
    font-size: 13px;
}

.chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.legend-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--blue);
}

.legend-dot.yellow {
    background: var(--yellow);
}

.chart-select {
    height: 27px;
    padding: 0 24px 0 9px;
    color: #5e6b7f;
    border: 1px solid #e5e9f0;
    border-radius: 5px;
    outline: 0;
    background: #fff;
    font-size: 13px;
}

.chart-wrap {
    position: relative;
    height: 223px;
    padding: 3px 14px 9px;
}

.chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}

.category-body {
    display: flex;
    align-items: center;
    gap: 17px;
    min-height: 220px;
    padding: 3px 18px 16px;
}

.donut-wrap {
    position: relative;
    flex: none;
    width: 170px;
    height: 170px;
}

.donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.donut-center strong {
    color: #16243c;
    font-size: 20px;
    font-weight: 800;
}

.donut-center span {
    color: #8a96a8;
    font-size: 13px;
}

.category-legend {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
}

.category-legend-item {
    display: flex;
    align-items: center;
    color: #4d5b70;
    font-size: 13px;
}

.category-legend-item .dot {
    width: 7px;
    height: 7px;
    margin-right: 7px;
    border-radius: 50%;
}

.category-legend-item .percent {
    margin-left: auto;
    color: #364256;
    font-weight: 700;
}

.low-stock-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 0 13px 10px;
}

.low-stock-row {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 46px;
    border-bottom: 1px solid #f1f4f8;
}

.low-stock-row:last-child {
    border-bottom: 0;
}

.low-stock-thumb {
    display: grid;
    flex: none;
    width: 31px;
    height: 33px;
    padding: 3px;
    place-items: center;
    border-radius: 6px;
    background: #f7f9fc;
}

.low-stock-thumb img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.low-stock-info {
    min-width: 0;
}

.low-stock-name {
    display: block;
    overflow: hidden;
    color: #263248;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.low-stock-stock {
    display: block;
    margin-top: 2px;
    color: #8b96a8;
    font-size: 13px;
}

.low-stock-row .badge {
    margin-left: auto;
    height: 18px;
    padding: 0 7px;
    font-size: 13px;
}

.recent-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.recent-table th:nth-child(1),
.recent-table td:nth-child(1) {
    width: 26%;
}

.recent-table th:nth-child(2),
.recent-table td:nth-child(2) {
    width: 15%;
}

.recent-table th:nth-child(3),
.recent-table td:nth-child(3) {
    width: 24%;
}

.recent-table th:nth-child(4),
.recent-table td:nth-child(4) {
    width: 19%;
}

.recent-table th:nth-child(5),
.recent-table td:nth-child(5) {
    width: 16%;
}

.recent-table th {
    height: 34px;
    padding: 0 10px;
    color: #6d798c;
    border-top: 1px solid #f0f3f8;
    border-bottom: 1px solid #f0f3f8;
    background: #fbfcfe;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
}

.recent-table th:first-child,
.recent-table td:first-child {
    padding-left: 15px;
}

.recent-table th:last-child,
.recent-table td:last-child {
    padding-right: 15px;
}

.recent-table td {
    height: 42px;
    padding: 4px 10px;
    color: #435065;
    border-bottom: 1px solid #f2f4f8;
    font-size: 13px;
}

.recent-table tbody tr:last-child td {
    border-bottom: 0;
}

.recent-table .invoice-no {
    color: #324054;
    font-size: 13px;
    white-space: nowrap;
}

.recent-table .amount {
    color: #263248;
    font-weight: 700;
    white-space: nowrap;
}

.recent-table .status-cell {
    text-align: right;
}

.recent-table .badge {
    height: 17px;
    padding: 0 6px;
    font-size: 13px;
}

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 0 10px 12px;
}

.quick-action {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 0 9px;
    color: #2456ad;
    border: 1px solid #d9e5fb;
    border-radius: 6px;
    background: #f8fbff;
    font-size: 13px;
    font-weight: 700;
    transition: .18s ease;
}

.quick-action:hover {
    color: #fff;
    border-color: var(--blue);
    background: var(--blue);
    transform: translateX(1px);
}

.quick-action .lucide {
    width: 13px;
    height: 13px;
    flex: none;
}

.module-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.module-tile {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 84px;
    padding: 14px;
    color: #253249;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: .18s ease;
}

.module-tile::after {
    content: '';
    position: absolute;
    top: -26px;
    right: -26px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--tile-soft, #edf4ff);
}

.module-tile:hover {
    border-color: #cfdcf0;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(20, 45, 90, .08);
}

.module-icon {
    position: relative;
    z-index: 1;
    display: grid;
    flex: none;
    width: 39px;
    height: 39px;
    place-items: center;
    color: var(--tile-color, var(--blue));
    border-radius: 9px;
    background: var(--tile-soft, #edf4ff);
}

.module-tile strong {
    display: block;
    font-size: 13.5px;
    font-weight: 800;
}

.module-tile span {
    display: block;
    margin-top: 3px;
    color: #8994a6;
    font-size: 13px;
}

.module-tile .lucide:last-child {
    position: relative;
    z-index: 1;
    width: 15px;
    height: 15px;
    margin-left: auto;
    color: #94a2b7;
}

/* -------------------------------------------------------------------------- */
/* Generic page header                                                         */
/* -------------------------------------------------------------------------- */
.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

.page-head-left {
    display: flex;
    align-items: center;
    gap: 11px;
}

.back-btn {
    display: grid;
    width: 33px;
    height: 33px;
    place-items: center;
    color: #324054;
    border: 1px solid #e4e9f1;
    border-radius: 8px;
    background: #fff;
}

.back-btn:hover {
    background: #f8fafc;
}

.page-title {
    color: #142138;
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -.6px;
    line-height: 1.2;
}

.page-subtitle {
    margin-top: 4px;
    color: #8792a5;
    font-size: 13px;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* -------------------------------------------------------------------------- */
/* Products                                                                    */
/* -------------------------------------------------------------------------- */
.summary-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
    margin-bottom: 14px;
}

.summary-mini {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 68px;
    padding: 12px 15px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.summary-mini .kpi-icon {
    width: 36px;
    height: 36px;
}

.summary-mini span {
    display: block;
    color: #7d899b;
    font-size: 13px;
}

.summary-mini strong {
    display: block;
    margin-top: 2px;
    color: #1b273d;
    font-size: 17.5px;
    font-weight: 800;
}

.product-panel {
    max-width: 100%;
    overflow: hidden;
}

.product-toolbar {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px 15px;
    border-bottom: 1px solid #f1f4f8;
}

.product-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 160px;
    max-width: 280px;
    height: 36px;
    padding: 0 11px;
    color: #92a0b4;
    border: 1px solid #e6eaf1;
    border-radius: 7px;
    background: #fff;
}

.product-search .lucide {
    width: 15px;
    height: 15px;
}

.product-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 13px;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 36px;
    padding: 0 11px;
    color: #5c687b;
    border: 1px solid #e6eaf1;
    border-radius: 7px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
}

.filter-btn .lucide {
    width: 14px;
    height: 14px;
}

.product-tabs {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 9px 15px;
    border-bottom: 1px solid #f1f4f8;
    overflow-x: auto;
    scrollbar-width: none;
}

.product-tabs::-webkit-scrollbar {
    display: none;
}

.tab-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    height: 30px;
    padding: 0 13px;
    color: #657186;
    border: 1px solid transparent;
    border-radius: 6px;
    background: #f7f9fc;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.tab-pill:hover {
    color: #26466f;
    background: #f0f5ff;
}

.tab-pill.active {
    color: #fff;
    background: var(--blue);
    box-shadow: 0 3px 8px rgba(37, 99, 235, .2);
}

.product-list {
    padding: 0 15px;
}

.product-row {
    display: grid;
    grid-template-columns: minmax(210px, 1fr) 160px 120px 90px;
    align-items: center;
    gap: 15px;
    min-height: 70px;
    border-bottom: 1px solid #f0f3f8;
}

.product-row:last-child {
    border-bottom: 0;
}

.product-main {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.product-thumb-form {
    flex: none;
}

.product-thumb {
    position: relative;
    display: grid;
    width: 45px;
    height: 48px;
    padding: 3px;
    overflow: hidden;
    place-items: center;
    border: 1px solid #f0f3f8;
    border-radius: 7px;
    background: #fbfcfe;
    cursor: pointer;
}

.product-thumb:focus-within {
    border-color: #9bbcf8;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
}

.product-thumb img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.product-thumb-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 6px;
    background: rgba(6, 45, 107, .62);
    opacity: 0;
    transition: opacity .15s ease;
}

.product-thumb-overlay svg {
    width: 15px;
    height: 15px;
}

.product-thumb:hover .product-thumb-overlay,
.product-thumb:focus-within .product-thumb-overlay {
    opacity: 1;
}

.product-thumb-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.product-name {
    display: block;
    overflow: hidden;
    color: #1e2b42;
    font-size: 13.5px;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.product-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    color: #98a3b5;
    font-size: 13px;
}

.product-meta .dot-sep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #c3cbd8;
}

.stock-meter {
    width: 76px;
    height: 5px;
    margin-top: 5px;
    border-radius: 4px;
    background: #eef1f6;
    overflow: hidden;
}

.stock-meter span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--green);
}

.stock-meter.low span {
    background: #f59e0b;
}

.stock-value {
    color: #26344c;
    font-size: 13px;
    font-weight: 700;
}

.stock-value small {
    color: #97a2b4;
    font-size: 13px;
    font-weight: 500;
}

.product-price {
    color: #223049;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.product-price small {
    display: block;
    margin-top: 2px;
    color: #98a3b4;
    font-size: 13px;
    font-weight: 500;
}

.product-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
}

/* -------------------------------------------------------------------------- */
/* Stock opname                                                                */
/* -------------------------------------------------------------------------- */
.opname-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 17px;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow);
}

.opname-hero-icon {
    display: grid;
    flex: none;
    width: 49px;
    height: 49px;
    place-items: center;
    color: var(--blue);
    border-radius: 12px;
    background: #edf4ff;
}

.opname-hero-icon .lucide {
    width: 25px;
    height: 25px;
}

.opname-hero-info {
    min-width: 160px;
}

.opname-hero-info strong {
    display: block;
    color: #1b2940;
    font-size: 15.5px;
    font-weight: 800;
}

.opname-hero-info span {
    display: block;
    margin-top: 3px;
    color: #8a95a7;
    font-size: 13px;
}

.opname-stats {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 0;
}

.opname-stat {
    flex: 1;
    padding: 0 17px;
    border-left: 1px solid #edf0f5;
}

.opname-stat span {
    display: block;
    color: #7a8698;
    font-size: 13px;
}

.opname-stat strong {
    display: block;
    margin-top: 2px;
    color: #1a2840;
    font-size: 20px;
    font-weight: 800;
}

.opname-stat strong.green { color: #10a252; }
.opname-stat strong.orange { color: #f59e0b; }
.opname-stat strong.red { color: #ef4444; }

.opname-progress {
    flex: 1.25;
    padding-left: 18px;
    border-left: 1px solid #edf0f5;
}

.opname-progress-head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 7px;
    color: #7c889a;
    font-size: 13px;
}

.opname-progress-head strong {
    color: #1c2940;
}

.progress-track {
    width: 100%;
    height: 8px;
    border-radius: 6px;
    background: #eef2f7;
    overflow: hidden;
}

.progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #6ea3ff);
}

.opname-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 295px;
    gap: 14px;
    align-items: start;
}

.table-card {
    overflow: hidden;
}

.data-table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 650px;
}

.data-table th {
    height: 42px;
    padding: 0 15px;
    color: #647187;
    border-top: 1px solid #f0f3f8;
    border-bottom: 1px solid #f0f3f8;
    background: #fbfcfe;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
}

.data-table td {
    height: 60px;
    padding: 9px 15px;
    color: #40506a;
    border-bottom: 1px solid #f1f4f8;
    font-size: 13px;
}

.data-table tr:last-child td {
    border-bottom: 0;
}

.data-table .product-cell {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 190px;
}

.data-table .product-cell img {
    width: 32px;
    height: 34px;
    object-fit: contain;
}

.data-table .product-cell strong {
    display: block;
    color: #243148;
    font-size: 13px;
}

.data-table .product-cell span {
    display: block;
    margin-top: 2px;
    color: #99a4b5;
    font-size: 13px;
}

.actual-input {
    width: 70px;
    height: 32px;
    padding: 0 9px;
    color: #22324b;
    border: 1px solid #dfe5ee;
    border-radius: 6px;
    outline: 0;
    background: #fff;
    font-size: 13px;
    font-weight: 700;
}

.actual-input:focus {
    border-color: #8cb2f7;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
}

.diff-value {
    font-weight: 700;
}

.diff-value.negative { color: #e33e3e; }
.diff-value.zero { color: #16a34a; }
.diff-value.positive { color: #2563eb; }

.opname-side {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.side-card-body {
    padding: 0 15px 15px;
}

.side-info-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    color: #7d899c;
    border-bottom: 1px dashed #edf0f5;
    font-size: 13px;
}

.side-info-row:last-child {
    border-bottom: 0;
}

.side-info-row strong {
    color: #26344c;
    font-weight: 700;
    text-align: right;
}

.side-tip {
    padding: 14px;
    border: 1px solid #fae8b5;
    border-radius: 10px;
    background: #fffdf4;
}

.side-tip strong {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #8f6500;
    font-size: 13px;
}

.side-tip p {
    margin-top: 6px;
    color: #9a7b36;
    font-size: 13px;
    line-height: 1.55;
}

/* -------------------------------------------------------------------------- */
/* Purchase orders                                                             */
/* -------------------------------------------------------------------------- */
.toolbar-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.status-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
}

.status-tab {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 30px;
    padding: 0 13px;
    color: #6e7a8d;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
}

.status-tab:hover {
    background: #f6f9fe;
}

.status-tab.active {
    color: #fff;
    background: var(--blue);
    box-shadow: 0 3px 8px rgba(37, 99, 235, .2);
}

.search-compact {
    display: flex;
    align-items: center;
    gap: 7px;
    width: 235px;
    height: 34px;
    padding: 0 10px;
    color: #8e9aad;
    border: 1px solid #e6eaf1;
    border-radius: 7px;
    background: #fff;
}

.search-compact .lucide {
    width: 14px;
    height: 14px;
}

.search-compact input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 13px;
}

.po-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.po-card {
    position: relative;
    display: block;
    padding: 14px 15px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--shadow);
    transition: .18s ease;
    overflow: hidden;
}

.po-card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: #dbe4f0;
}

.po-card[data-status="dipesan"]::before { background: #fbbf24; }
.po-card[data-status="diterima"]::before { background: #22c55e; }
.po-card[data-status="selesai"]::before { background: #2563eb; }
.po-card[data-status="draft"]::before { background: #cbd5e1; }
.po-card[data-status="dibatalkan"]::before { background: #ef4444; }

.po-card:hover {
    border-color: #cad8ec;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(20, 48, 96, .07);
}

.po-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.po-number {
    color: #1c416e;
    font-size: 13px;
    font-weight: 800;
}

.po-supplier {
    margin-top: 5px;
    color: #6e7a8d;
    font-size: 13px;
}

.po-total {
    margin-top: 9px;
    color: #15233b;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -.3px;
}

.po-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 9px;
    padding-top: 9px;
    color: #8b97a9;
    border-top: 1px dashed #edf0f5;
    font-size: 13px;
}

.po-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.po-meta .lucide {
    width: 11px;
    height: 11px;
}

.po-meta .due {
    margin-left: auto;
    color: #677a94;
}

/* -------------------------------------------------------------------------- */
/* Forms / create PO                                                           */
/* -------------------------------------------------------------------------- */
.form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 14px;
    align-items: start;
}

.form-card {
    padding: 17px;
}

.form-section + .form-section {
    margin-top: 19px;
    padding-top: 17px;
    border-top: 1px solid #f0f3f8;
}

.form-section-title {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 12px;
    color: #1e2c43;
    font-size: 14px;
    font-weight: 800;
}

.form-section-title .step {
    display: grid;
    width: 21px;
    height: 21px;
    place-items: center;
    color: #fff;
    border-radius: 50%;
    background: var(--blue);
    font-size: 13px;
}

.form-section-hint {
    margin-left: auto;
    color: #95a0b2;
    font-size: 13px;
    font-weight: 500;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 16px;
    margin-top: 16px;
    border-top: 1px solid #f0f3f8;
}

.form-actions.split {
    justify-content: space-between;
}

.line-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.line-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 82px 118px 34px;
    align-items: center;
    gap: 8px;
}

.line-item select,
.line-item input {
    width: 100%;
    height: 38px;
    padding: 0 10px;
    color: #25344b;
    border: 1px solid #e2e8f1;
    border-radius: 7px;
    outline: 0;
    background: #fff;
    font-size: 13px;
}

.line-item input:focus,
.line-item select:focus {
    border-color: #9bbcf8;
}

.line-price {
    color: #43536a;
    font-size: 13px;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

.line-remove {
    display: grid;
    width: 32px;
    height: 32px;
    padding: 0;
    place-items: center;
    color: #a3adbd;
    border: 1px solid #e8edf4;
    border-radius: 6px;
    background: #fff;
}

.line-remove:hover {
    color: #dc2626;
    border-color: #fecaca;
    background: #fef2f2;
}

.line-remove .lucide {
    width: 14px;
    height: 14px;
}

.add-line-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 34px;
    margin-top: 3px;
    padding: 0 11px;
    color: var(--blue);
    border: 1px dashed #bed3f7;
    border-radius: 7px;
    background: #f8fbff;
    font-size: 13px;
    font-weight: 700;
}

.add-line-btn .lucide {
    width: 13px;
    height: 13px;
}

.summary-card {
    position: sticky;
    top: 80px;
    padding: 17px;
}

.summary-title {
    color: #1c2a41;
    font-size: 15px;
    font-weight: 800;
}

.summary-rows {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: 14px;
    padding-top: 13px;
    border-top: 1px dashed #e7ebf2;
}

.summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #707d91;
    font-size: 13px;
}

.summary-row strong {
    color: #26344c;
    font-weight: 700;
}

.summary-total {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    padding-top: 13px;
    margin-top: 2px;
    border-top: 1px solid #edf0f5;
}

.summary-total span {
    color: #5e6b7f;
    font-size: 13px;
}

.summary-total strong {
    color: #13233c;
    font-size: 22.5px;
    font-weight: 800;
    letter-spacing: -.5px;
}

.summary-note {
    padding: 10px;
    margin-top: 13px;
    color: #8b7228;
    border: 1px solid #fae9b5;
    border-radius: 7px;
    background: #fffdf5;
    font-size: 13px;
    line-height: 1.5;
}

.summary-actions {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 14px;
}

.summary-actions .btn {
    width: 100%;
}

/* -------------------------------------------------------------------------- */
/* Invoice list / detail                                                       */
/* -------------------------------------------------------------------------- */
.invoice-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
    margin-bottom: 14px;
}

.invoice-summary .summary-mini {
    min-height: 65px;
}

.invoice-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.invoice-row {
    display: grid;
    grid-template-columns: 155px minmax(140px, 1fr) 130px 95px 22px;
    align-items: center;
    gap: 12px;
    min-height: 67px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    transition: .16s ease;
}

.invoice-row:hover {
    border-color: #cbd9ed;
    box-shadow: 0 8px 22px rgba(18, 42, 83, .06);
    transform: translateY(-1px);
}

.invoice-date {
    color: #828ea1;
    font-size: 13px;
}

.invoice-date strong {
    display: block;
    margin-bottom: 2px;
    color: #233149;
    font-size: 13px;
    font-weight: 700;
}

.invoice-customer strong {
    display: block;
    color: #202e45;
    font-size: 13px;
    font-weight: 700;
}

.invoice-customer span {
    display: block;
    margin-top: 3px;
    color: #929daf;
    font-size: 13px;
}

.invoice-amount {
    color: #1e2d45;
    font-size: 14px;
    font-weight: 800;
    text-align: right;
}

.invoice-row .chevron {
    color: #aab5c5;
    width: 14px;
    height: 14px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 14px;
    align-items: start;
}

.invoice-detail-card {
    overflow: hidden;
}

.invoice-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    padding: 19px 20px 15px;
}

.invoice-kicker {
    color: #8c98aa;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .9px;
    text-transform: uppercase;
}

.invoice-number-lg {
    margin-top: 3px;
    color: #14223a;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -.4px;
}

.invoice-detail-tools {
    display: flex;
    align-items: center;
    gap: 6px;
}

.invoice-detail-meta {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 15px;
    padding: 15px 20px;
    border-top: 1px solid #f1f4f8;
    border-bottom: 1px solid #f1f4f8;
    background: #fbfcfe;
}

.invoice-meta-item span {
    display: block;
    color: #8995a7;
    font-size: 13px;
}

.invoice-meta-item strong {
    display: block;
    margin-top: 4px;
    color: #233149;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

.invoice-meta-item small {
    display: block;
    margin-top: 2px;
    color: #8b97a9;
    font-size: 13px;
}

.invoice-items {
    padding: 0 20px;
}

.invoice-items table {
    width: 100%;
    border-collapse: collapse;
}

.invoice-items th {
    padding: 12px 0 9px;
    color: #69768a;
    border-bottom: 1px solid #eef1f6;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
}

.invoice-items th:nth-child(n+3),
.invoice-items td:nth-child(n+3) {
    text-align: right;
}

.invoice-items td {
    padding: 12px 0;
    color: #35435a;
    border-bottom: 1px solid #f3f5f8;
    font-size: 13px;
}

.invoice-items td:first-child {
    width: 52%;
}

.invoice-item-product {
    display: flex;
    align-items: center;
    gap: 9px;
}

.invoice-item-product img {
    width: 31px;
    height: 34px;
    object-fit: contain;
}

.invoice-item-product strong {
    display: block;
    color: #27354c;
    font-size: 13px;
    font-weight: 700;
}

.invoice-item-product span {
    display: block;
    margin-top: 2px;
    color: #9ba6b6;
    font-size: 13px;
}

.invoice-totals {
    display: flex;
    justify-content: flex-end;
    padding: 14px 20px 19px;
}

.invoice-total-box {
    width: 250px;
}

.invoice-total-row {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 4px 0;
    color: #718095;
    font-size: 13px;
}

.invoice-total-row strong {
    color: #2c3a51;
    font-weight: 600;
}

.invoice-total-row.grand {
    align-items: center;
    padding-top: 10px;
    margin-top: 5px;
    color: #18263e;
    border-top: 1px solid #e7ebf2;
    font-size: 14px;
    font-weight: 800;
}

.invoice-total-row.grand strong {
    color: var(--blue);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.3px;
}

.invoice-detail-actions {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 12px 20px;
    border-top: 1px solid #f1f4f8;
    background: #fbfcfe;
}

.invoice-side-card {
    padding: 16px;
}

.customer-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid #edf0f5;
    border-radius: 8px;
    background: #fbfcfe;
}

.customer-avatar {
    display: grid;
    flex: none;
    width: 37px;
    height: 37px;
    place-items: center;
    color: #1a5bd3;
    border-radius: 50%;
    background: #e6efff;
    font-size: 14px;
    font-weight: 800;
}

.customer-box strong {
    display: block;
    color: #26344c;
    font-size: 13px;
}

.customer-box span {
    display: block;
    margin-top: 3px;
    color: #8c98aa;
    font-size: 13px;
}

.timeline {
    position: relative;
    margin-top: 14px;
    padding-left: 19px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 4px;
    bottom: 14px;
    left: 5px;
    width: 1px;
    background: #e8edf4;
}

.timeline-item {
    position: relative;
    padding-bottom: 13px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 3px;
    left: -18px;
    width: 7px;
    height: 7px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #c8d2e1;
    box-shadow: 0 0 0 1px #e2e8f1;
}

.timeline-item.done::before {
    background: #22c55e;
    box-shadow: 0 0 0 1px #b7ecc9;
}

.timeline-item strong {
    display: block;
    color: #35435a;
    font-size: 13px;
}

.timeline-item span {
    display: block;
    margin-top: 2px;
    color: #95a0b1;
    font-size: 13px;
}

/* -------------------------------------------------------------------------- */
/* POS create invoice                                                          */
/* -------------------------------------------------------------------------- */
.pos-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 14px;
    align-items: start;
}

.pos-left {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pos-customer-card {
    padding: 15px;
}

.pos-catalog-card {
    padding: 15px;
}

.pos-scan-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.pos-scan-field {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 7px;
    min-width: 220px;
    padding: 7px 9px;
    border: 1.5px solid #dbe4f1;
    border-radius: 8px;
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.pos-scan-field:focus-within {
    border-color: #7ea8ea;
    box-shadow: 0 0 0 3px rgba(34, 103, 214, .09);
}

.pos-scan-field .lucide {
    flex: none;
    width: 16px;
    height: 16px;
    color: var(--blue);
}

.pos-scan-field input {
    flex: 1;
    min-width: 0;
    padding: 0;
    color: #26344a;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 13px;
}

.pos-scan-field kbd {
    flex: none;
    padding: 2px 5px;
    color: #8a96a8;
    border: 1px solid #e4eaf3;
    border-radius: 4px;
    background: #f7f9fc;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
}

.pos-scan-status {
    width: 100%;
    min-height: 12px;
    color: #8a96a8;
    font-size: 13px;
    line-height: 1.4;
}

.pos-scan-status.success {
    color: #0d8a5f;
    font-weight: 700;
}

.pos-scan-status.error {
    color: #c53030;
    font-weight: 700;
}

.pos-product.is-scanned {
    border-color: #eab308;
    box-shadow: 0 0 0 3px rgba(234, 179, 8, .13);
}

.pos-catalog-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.pos-catalog-head .product-search {
    max-width: none;
}

.pos-products {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    max-height: 440px;
    padding-right: 2px;
    overflow-y: auto;
}

.pos-product {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px;
    text-align: left;
    border: 1px solid #e9edf4;
    border-radius: 9px;
    background: #fff;
    transition: .16s ease;
}

.pos-product:hover {
    border-color: #aec8f5;
    background: #fbfdff;
    box-shadow: 0 5px 14px rgba(21, 59, 118, .06);
}

.pos-product:disabled {
    opacity: .45;
}

.pos-product-img {
    display: grid;
    width: 100%;
    height: 62px;
    margin-bottom: 7px;
    place-items: center;
    border-radius: 6px;
    background: #f8fafd;
}

.pos-product-img img {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.pos-product strong {
    display: block;
    width: 100%;
    overflow: hidden;
    color: #26344a;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.pos-product span {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.pos-product small {
    display: block;
    margin-top: 2px;
    color: #9aa5b6;
    font-size: 13px;
}

.pos-cart {
    position: sticky;
    top: 80px;
    padding: 16px;
}

.pos-cart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 11px;
    border-bottom: 1px solid #f0f3f8;
}

.pos-cart-head strong {
    color: #1b2940;
    font-size: 15px;
    font-weight: 800;
}

.pos-cart-items {
    display: flex;
    flex-direction: column;
    gap: 7px;
    max-height: 265px;
    margin: 11px 0;
    overflow-y: auto;
}

.cart-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 7px;
    border: 1px solid #eef1f6;
    border-radius: 8px;
    background: #fbfcfe;
}

.cart-item img {
    width: 32px;
    height: 34px;
    object-fit: contain;
}

.cart-item strong {
    display: block;
    overflow: hidden;
    color: #2a3850;
    font-size: 13px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.cart-item span {
    display: block;
    margin-top: 2px;
    color: #8e9aac;
    font-size: 13px;
}

.cart-qty {
    display: flex;
    align-items: center;
    gap: 5px;
}

.cart-qty button {
    display: grid;
    width: 20px;
    height: 20px;
    padding: 0;
    place-items: center;
    color: #4a5a73;
    border: 1px solid #e2e8f1;
    border-radius: 4px;
    background: #fff;
}

.cart-qty button:hover {
    color: var(--blue);
    border-color: #b6cdf3;
}

.cart-qty .lucide {
    width: 10px;
    height: 10px;
}

.cart-qty b {
    min-width: 14px;
    color: #2b3a52;
    font-size: 13px;
    text-align: center;
}

.cart-empty {
    padding: 28px 10px;
    color: #96a2b3;
    font-size: 13px;
    text-align: center;
}

.cart-empty .lucide {
    width: 28px;
    height: 28px;
    margin: 0 auto 8px;
    color: #c1cada;
}

.pos-totals {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding-top: 11px;
    border-top: 1px dashed #e7ebf2;
}

.pos-total-row {
    display: flex;
    justify-content: space-between;
    color: #748094;
    font-size: 13px;
}

.pos-total-row strong {
    color: #26344b;
    font-weight: 700;
}

.pos-total-row.grand {
    align-items: center;
    padding-top: 9px;
    margin-top: 2px;
    color: #17253d;
    border-top: 1px solid #e8edf4;
    font-size: 13px;
    font-weight: 800;
}

.pos-total-row.grand strong {
    color: var(--blue);
    font-size: 20px;
}

.discount-input {
    width: 95px;
    height: 26px;
    padding: 0 7px;
    color: #25344b;
    border: 1px solid #e2e8f1;
    border-radius: 5px;
    outline: 0;
    font-size: 13px;
    text-align: right;
}

.pos-cart .field {
    margin-top: 12px;
}

.pos-cart .summary-actions .btn {
    min-height: 38px;
}

/* Payment method picker */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.payment-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    padding: 8px 7px;
    border: 1px solid #e4eaf3;
    border-radius: 9px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.payment-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.payment-option-icon {
    display: grid;
    flex: none;
    width: 25px;
    height: 25px;
    place-items: center;
    color: #6d7d92;
    border-radius: 7px;
    background: #f2f6fc;
}

.payment-option-icon .lucide {
    width: 14px;
    height: 14px;
}

.payment-option-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.15;
}

.payment-option-text strong {
    color: #253550;
    font-size: 13px;
    font-weight: 800;
}

.payment-option-text small {
    overflow: hidden;
    color: #98a4b5;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.payment-option.is-active {
    border-color: #b9d1ff;
    background: #f3f8ff;
    box-shadow: inset 0 0 0 1px #b9d1ff;
}

.payment-option.is-active .payment-option-icon {
    color: var(--blue);
    background: #e1edff;
}

.payment-option:has(input:focus-visible) {
    outline: 2px solid rgba(29, 99, 233, .45);
    outline-offset: 2px;
}

.payment-method-hint {
    display: block;
    margin-top: 6px;
    color: #98a4b5;
    font-size: 13px;
    line-height: 1.45;
}

/* Payment instruction modal */
.payment-modal {
    width: min(470px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    border-radius: 18px;
}

.payment-modal-card {
    background: #fff;
}

.payment-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 20px 14px;
    border-bottom: 1px solid #f0f3f8;
}

.payment-modal-kicker {
    color: var(--blue);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.payment-modal-head h2 {
    margin: 4px 0 0;
    color: #14233c;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -.35px;
}

.payment-total-box {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 16px 20px 0;
    padding: 14px 16px;
    color: #fff;
    border-radius: 12px;
    background: linear-gradient(135deg, #052c69, #0b4aa5);
    box-shadow: 0 10px 24px rgba(5, 44, 105, .16);
}

.payment-total-box span {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    opacity: .7;
}

.payment-total-box strong {
    font-size: 28.5px;
    font-weight: 800;
    letter-spacing: -.5px;
}

.payment-total-box small {
    font-size: 13px;
    opacity: .68;
}

.payment-total-box b {
    font-weight: 700;
}

.payment-panel {
    padding: 14px 20px 0;
}

.payment-panel[hidden] {
    display: none;
}

.payment-panel-lead {
    margin: 0 0 10px;
    color: #6f7d91;
    font-size: 13px;
    line-height: 1.5;
}

.payment-bank-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.payment-bank {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    text-align: left;
    border: 1px solid #e5eaf2;
    border-radius: 10px;
    background: #fff;
    transition: border-color .15s ease, background .15s ease;
}

.payment-bank:hover {
    border-color: #b9d1ff;
    background: #f8fbff;
}

.payment-bank-logo {
    display: grid;
    flex: none;
    min-width: 52px;
    height: 28px;
    padding: 0 6px;
    place-items: center;
    color: #0060af;
    font-size: 13px;
    font-style: italic;
    font-weight: 900;
    line-height: 1;
    border: 1px solid #e2e8f1;
    border-radius: 5px;
    background: #fff;
}

.payment-bank-mandiri {
    color: #003d79;
    font-size: 13px;
    font-style: normal;
    letter-spacing: -.5px;
}

.payment-bank-bri {
    color: #fff;
    border-color: #00529c;
    background: #00529c;
}

.payment-bank-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    line-height: 1.2;
}

.payment-bank-info small {
    color: #97a3b4;
    font-size: 13px;
}

.payment-bank-info strong {
    margin: 2px 0 1px;
    color: #18263e;
    font-size: 13px;
    letter-spacing: .03em;
}

.payment-bank-info em {
    color: #7f8b9e;
    font-size: 13px;
    font-style: normal;
}

.payment-bank-copy {
    display: flex;
    flex: none;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: #8390a3;
}

.payment-bank-copy .lucide {
    width: 13px;
    height: 13px;
}

.payment-bank-copy small {
    font-size: 13px;
}

.payment-hint {
    display: flex;
    gap: 7px;
    margin-top: 11px;
    padding: 9px 10px;
    color: #7c899d;
    border-radius: 8px;
    background: #f4f7fc;
    font-size: 13px;
    line-height: 1.5;
}

.payment-hint .lucide {
    flex: none;
    width: 13px;
    height: 13px;
    margin-top: 1px;
    color: var(--blue);
}

.payment-hint b {
    color: #40516a;
}

.qris-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px;
    border: 1px dashed #d9e2ef;
    border-radius: 12px;
    background: #fbfdff;
}

.qris-code {
    display: grid;
    width: 196px;
    height: 196px;
    overflow: hidden;
    place-items: center;
    border-radius: 8px;
    background: #fff;
}

.qris-code img,
.qris-code canvas {
    width: 196px !important;
    height: 196px !important;
}

.qris-code[hidden],
.qris-image[hidden] {
    display: none !important;
}

.qris-image {
    display: block;
    width: 196px;
    height: 196px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
}

.payment-empty {
    padding: 12px;
    color: #8c98aa;
    border: 1px dashed #e0e7f1;
    border-radius: 9px;
    font-size: 13px;
    text-align: center;
}

.qris-badge {
    padding: 3px 9px;
    color: #fff;
    border-radius: 4px;
    background: #e30613;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .08em;
}

.payment-modal-actions {
    display: flex;
    gap: 8px;
    padding: 16px 20px 20px;
}

.payment-modal-actions .btn {
    flex: 1;
    min-height: 40px;
}

/* -------------------------------------------------------------------------- */
/* Customers & suppliers                                                       */
/* -------------------------------------------------------------------------- */
.partner-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.partner-card {
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--shadow);
}

.partner-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.partner-avatar {
    display: grid;
    flex: none;
    width: 38px;
    height: 38px;
    place-items: center;
    color: #1d5bc9;
    border-radius: 9px;
    background: #eaf2ff;
    font-size: 14px;
    font-weight: 800;
}

.partner-head strong {
    display: block;
    color: #233149;
    font-size: 13px;
    font-weight: 800;
}

.partner-head span {
    display: block;
    margin-top: 2px;
    color: #909cad;
    font-size: 13px;
}

.partner-info {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px dashed #edf0f5;
}

.partner-info-row {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    color: #788599;
    font-size: 13px;
    line-height: 1.4;
}

.partner-info-row .lucide {
    flex: none;
    width: 12px;
    height: 12px;
    margin-top: 1px;
    color: #a7b2c2;
}

.partner-foot {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 11px;
    padding-top: 10px;
    border-top: 1px solid #f1f4f8;
    color: #8c98aa;
    font-size: 13px;
}

.partner-foot strong {
    color: #34435a;
    font-size: 13px;
}

/* -------------------------------------------------------------------------- */
/* Report                                                                      */
/* -------------------------------------------------------------------------- */
.report-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    gap: 14px;
}

.report-chart {
    padding-bottom: 15px;
}

.report-chart .chart-wrap {
    height: 260px;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
}

.report-table th {
    padding: 9px 13px;
    color: #6d798d;
    border-top: 1px solid #f0f3f8;
    border-bottom: 1px solid #f0f3f8;
    background: #fbfcfe;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
}

.report-table td {
    padding: 11px 13px;
    color: #42516a;
    border-bottom: 1px solid #f2f4f8;
    font-size: 13px;
}

.report-table tr:last-child td {
    border-bottom: 0;
}

.report-table .bar-cell {
    width: 90px;
}

.mini-bar {
    width: 100%;
    height: 5px;
    border-radius: 4px;
    background: #eef2f8;
    overflow: hidden;
}

.mini-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--blue);
}

/* -------------------------------------------------------------------------- */
/* Settings                                                                    */
/* -------------------------------------------------------------------------- */
.settings-layout {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.settings-nav {
    display: flex;
    flex-direction: column;
    padding: 7px;
}

.settings-nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 37px;
    padding: 0 10px;
    color: #637086;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
}

.settings-nav a:hover {
    background: #f6f9fd;
}

.settings-nav a.active {
    color: var(--blue);
    background: #edf4ff;
}

.settings-nav .lucide {
    width: 15px;
    height: 15px;
}

.settings-card {
    padding: 19px;
}

.settings-card + .settings-card {
    margin-top: 14px;
}

.settings-title {
    color: #1c2a41;
    font-size: 15.5px;
    font-weight: 800;
}

.settings-subtitle {
    margin-top: 3px;
    color: #8c98aa;
    font-size: 13px;
}

.settings-subhead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    margin-top: 18px;
    border-bottom: 1px solid #f0f3f8;
}

.settings-subhead strong {
    display: block;
    color: #314057;
    font-size: 13px;
    font-weight: 800;
}

.settings-subhead span {
    display: block;
    margin-top: 3px;
    color: #8d99aa;
    font-size: 13px;
}

.settings-subhead .btn {
    flex: none;
}

.settings-divider {
    height: 1px;
    margin: 18px 0 4px;
    background: #f0f3f8;
}

.bank-setting-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: 12px;
}

.bank-setting-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 11px 12px;
    border: 1px solid #edf1f6;
    border-radius: 11px;
    background: #fbfcfe;
}

.bank-setting-grid {
    flex: 1;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 10px;
}

.bank-setting-grid .field {
    margin: 0;
}

.bank-setting-grid label {
    font-size: 13px;
}

.bank-setting-remove {
    flex: none;
    width: 30px;
    height: 30px;
    margin-bottom: 2px;
    color: #b45b5b;
    border-color: #f0dede;
    background: #fff;
}

.bank-setting-remove:disabled {
    cursor: not-allowed;
    opacity: .35;
}

.form-error {
    margin-top: 8px;
    color: #d43c3c;
    font-size: 13px;
}

.qris-setting {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-top: 14px;
}

.qris-setting-preview {
    display: grid;
    flex: none;
    width: 146px;
    height: 146px;
    overflow: hidden;
    place-items: center;
    border: 1px dashed #d8e1ee;
    border-radius: 12px;
    background: #fbfdff;
}

.qris-setting-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qris-setting-preview img[hidden] {
    display: none;
}

.qris-setting-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: #9aa6b7;
    font-size: 13px;
}

.qris-setting-empty .lucide {
    width: 26px;
    height: 26px;
    color: #c0cada;
}

.qris-setting-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
}

.qris-file-name {
    color: #7d8a9e;
    font-size: 13px;
}

.qris-remove-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
    color: #8b6a6a;
    font-size: 13px;
    cursor: pointer;
}

.qris-remove-row input {
    width: 13px;
    height: 13px;
    accent-color: #d33;
}

.signature-setting {
    align-items: flex-start;
}

.signature-preview {
    width: 190px;
    height: 84px;
}

.signature-preview-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: #9aa6b7;
    font-size: 13px;
}

.signature-preview-empty .lucide {
    width: 22px;
    height: 22px;
    color: #c0cada;
}

.settings-invoice-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 15px;
    padding: 10px 11px;
    color: #6d7e96;
    border: 1px solid #e4edfb;
    border-radius: 9px;
    background: #f7faff;
    font-size: 13px;
    line-height: 1.5;
}

.settings-invoice-note .lucide {
    flex: none;
    width: 15px;
    height: 15px;
    color: var(--blue);
}

.settings-invoice-note a {
    color: var(--blue);
    font-weight: 700;
    text-decoration: none;
}

.settings-invoice-note a:hover {
    text-decoration: underline;
}

/* -------------------------------------------------------------------------- */
/* Account & access                                                            */
/* -------------------------------------------------------------------------- */
.account-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.account-profile-card {
    padding: 24px;
    text-align: center;
}

.account-avatar {
    width: 78px;
    height: 78px;
    margin: 0 auto 14px;
    border: 4px solid #f4f8ff;
    border-radius: 50%;
    background: #eef4ff;
}

.account-profile-card h2 {
    color: #1c2a41;
    font-size: 20px;
    font-weight: 800;
}

.account-email {
    margin-top: 3px;
    color: #8b96a8;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.account-profile-card > .badge {
    margin-top: 10px;
}

.account-divider {
    height: 1px;
    margin: 20px 0 12px;
    background: #f0f3f8;
}

.account-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid #f5f7fb;
    font-size: 13px;
}

.account-info-row span {
    color: #8b96a8;
}

.account-info-row strong {
    color: #34445c;
    font-weight: 700;
    text-align: right;
}

.account-role-note {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding: 11px;
    text-align: left;
    border: 1px solid #e6eefb;
    border-radius: 9px;
    background: #f7faff;
}

.account-role-note .lucide {
    flex: none;
    width: 15px;
    height: 15px;
    margin-top: 1px;
    color: var(--blue);
}

.account-role-note p {
    color: #6c7d95;
    font-size: 13px;
    line-height: 1.55;
}

.account-access-link {
    justify-content: center;
    width: 100%;
    margin-top: 14px;
}

.account-password-card {
    padding: 22px;
}

.account-password-form {
    max-width: 520px;
    margin-top: 18px;
}

.account-password-form .field {
    margin-bottom: 14px;
}

.account-password-tip {
    display: flex;
    gap: 8px;
    padding: 10px 11px;
    color: #6d7e96;
    border: 1px solid #e4edfb;
    border-radius: 9px;
    background: #f7faff;
    font-size: 13px;
    line-height: 1.5;
}

.account-password-tip .lucide {
    flex: none;
    width: 15px;
    height: 15px;
    color: var(--blue);
}

.account-password-actions {
    justify-content: flex-start;
    margin-top: 16px;
}

.access-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.access-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
}

.access-stat-icon {
    display: grid;
    flex: none;
    width: 39px;
    height: 39px;
    place-items: center;
    border-radius: 10px;
}

.access-stat-icon .lucide {
    width: 18px;
    height: 18px;
}

.access-stat-blue {
    color: #1d63e9;
    background: #edf4ff;
}

.access-stat-yellow {
    color: #b58200;
    background: #fff8dc;
}

.access-stat-green {
    color: #178a4a;
    background: #eaf9f0;
}

.access-stat strong {
    display: block;
    color: #1d2b42;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.1;
}

.access-stat span {
    display: block;
    margin-top: 2px;
    color: #8b96a8;
    font-size: 13px;
}

.access-card {
    padding: 18px;
}

.access-card + .access-card {
    margin-top: 14px;
}

.access-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f3f8;
}

.access-card-head h2 {
    color: #1c2a41;
    font-size: 15.5px;
    font-weight: 800;
}

.access-card-head p {
    margin-top: 3px;
    color: #8c98aa;
    font-size: 13px;
}

.access-user-table {
    min-width: 680px;
}

.access-user-table td {
    vertical-align: middle;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 9px;
}

.user-cell img {
    flex: none;
    width: 33px;
    height: 33px;
    border-radius: 50%;
    background: #eef4ff;
}

.user-cell strong {
    display: block;
    color: #2b3b54;
    font-size: 13px;
    font-weight: 800;
}

.user-cell span {
    display: block;
    margin-top: 1px;
    color: #8d99aa;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.access-user-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.access-roles-card {
    margin-top: 14px;
}

.role-card {
    padding: 16px;
    border: 1px solid #edf1f6;
    border-radius: 12px;
    background: #fbfcfe;
}

.role-card + .role-card {
    margin-top: 12px;
}

.role-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.role-card-title {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.role-icon {
    display: grid;
    flex: none;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 9px;
}

.role-icon .lucide {
    width: 16px;
    height: 16px;
}

.role-icon-admin {
    color: #233149;
    background: #eef3fb;
}

.role-icon-manajer {
    color: #1d63e9;
    background: #eaf2ff;
}

.role-icon-kasir {
    color: #b58200;
    background: #fff7d9;
}

.role-card-title strong {
    display: block;
    color: #26364e;
    font-size: 13.5px;
    font-weight: 800;
}

.role-card-title span {
    display: block;
    margin-top: 2px;
    color: #8c98aa;
    font-size: 13px;
    line-height: 1.45;
}

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

.permission-group {
    padding: 10px 12px;
    border: 1px solid #edf1f7;
    border-radius: 9px;
    background: #fff;
}

.permission-group > strong {
    display: block;
    color: #34445c;
    font-size: 13px;
    font-weight: 800;
}

.permission-list {
    display: grid;
    gap: 6px;
    margin-top: 8px;
}

.permission-check {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    color: #5a6b82;
    font-size: 13px;
    line-height: 1.4;
    cursor: pointer;
}

.permission-check input {
    flex: none;
    width: 13px;
    height: 13px;
    margin-top: 1px;
    accent-color: var(--blue);
}

.permission-check input:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.role-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}

.store-profile {
    display: flex;
    align-items: center;
    gap: 13px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid #f0f3f8;
}

.store-logo {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border: 1px solid #eef1f6;
    border-radius: 12px;
    background: #f8fbff;
}

.store-logo img {
    width: 48px;
    height: 44px;
    object-fit: contain;
}

.store-profile strong {
    display: block;
    color: #233149;
    font-size: 15.5px;
}

.store-profile span {
    display: block;
    margin-top: 3px;
    color: #8b97a9;
    font-size: 13px;
}

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 0;
    border-bottom: 1px solid #f2f4f8;
}

.toggle-row:last-child {
    border-bottom: 0;
}

.toggle-row strong {
    display: block;
    color: #314057;
    font-size: 13px;
}

.toggle-row span {
    display: block;
    margin-top: 3px;
    color: #8d99aa;
    font-size: 13px;
}

.toggle {
    position: relative;
    display: block;
    flex: none;
    width: 36px;
    height: 20px;
}

.toggle input {
    position: absolute;
    opacity: 0;
}

.toggle span {
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: #dbe2ec;
    transition: .2s;
}

.toggle span::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
    transition: .2s;
}

.toggle input:checked + span {
    background: var(--blue);
}

.toggle input:checked + span::after {
    transform: translateX(16px);
}

/* -------------------------------------------------------------------------- */
/* Categories                                                                  */
/* -------------------------------------------------------------------------- */
.category-card {
    padding: 18px;
}

.category-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f3f8;
}

.category-card-head h2 {
    color: #1c2a41;
    font-size: 15.5px;
    font-weight: 800;
}

.category-card-head p {
    max-width: 620px;
    margin-top: 3px;
    color: #8c98aa;
    font-size: 13px;
    line-height: 1.5;
}

.category-table {
    min-width: 660px;
}

.category-name-cell {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 170px;
}

.category-icon {
    display: grid;
    flex: none;
    width: 32px;
    height: 32px;
    place-items: center;
    color: #2563eb;
    border-radius: 8px;
    background: #edf4ff;
}

.category-icon .lucide {
    width: 15px;
    height: 15px;
}

.category-name-cell strong {
    display: block;
    color: #243148;
    font-size: 13px;
    font-weight: 800;
}

.category-name-cell span {
    display: block;
    margin-top: 1px;
    color: #99a4b5;
    font-size: 13px;
}

.category-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.category-actions form {
    display: inline-flex;
}

@media (max-width: 900px) {
    .category-card {
        padding: 14px;
    }

    .category-card-head {
        flex-direction: column;
    }
}

/* -------------------------------------------------------------------------- */
/* Dialog                                                                      */
/* -------------------------------------------------------------------------- */
dialog {
    width: min(520px, calc(100vw - 28px));
    padding: 0;
    color: var(--text);
    border: 0;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 24px 80px rgba(9, 27, 58, .25);
}

dialog::backdrop {
    background: rgba(4, 24, 55, .55);
    backdrop-filter: blur(3px);
}

.dialog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 19px 12px;
    border-bottom: 1px solid #f1f4f8;
}

.dialog-head h3 {
    color: #18263e;
    font-size: 17.5px;
    font-weight: 800;
    letter-spacing: -.2px;
}

.dialog-head p {
    margin-top: 3px;
    color: #8b97a9;
    font-size: 13px;
}

.dialog-close {
    display: grid;
    width: 28px;
    height: 28px;
    padding: 0;
    place-items: center;
    color: #7f8b9d;
    border: 1px solid #e8edf4;
    border-radius: 6px;
    background: #fff;
}

.dialog-body {
    padding: 17px 19px;
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 19px 17px;
    border-top: 1px solid #f1f4f8;
}

/* -------------------------------------------------------------------------- */
/* Print                                                                       */
/* -------------------------------------------------------------------------- */
.print-page {
    min-height: 100vh;
    padding: 34px 18px;
    background: #eef2f8;
}

.print-paper {
    width: min(760px, 100%);
    padding: 38px 42px;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 10px 40px rgba(20, 45, 90, .1);
}

.print-head {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    padding-bottom: 22px;
    border-bottom: 2px solid #0b3265;
}

.print-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.print-brand img {
    width: 48px;
    height: 52px;
    object-fit: contain;
}

.print-brand strong {
    display: block;
    color: var(--navy);
    font-size: 23.5px;
    font-weight: 800;
    line-height: 1.1;
}

.print-brand span {
    display: block;
    color: #758398;
    font-size: 13px;
}

.print-title {
    text-align: right;
}

.print-title h1 {
    color: #14233c;
    font-size: 28.5px;
    letter-spacing: -.6px;
}

.print-title p {
    margin-top: 3px;
    color: #758398;
    font-size: 13px;
}

.print-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    padding: 22px 0;
}

.print-info h4 {
    margin-bottom: 6px;
    color: #8b97a9;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .8px;
}

.print-info strong {
    display: block;
    color: #233149;
    font-size: 13px;
}

.print-info span {
    display: block;
    margin-top: 3px;
    color: #718095;
    font-size: 13px;
    line-height: 1.5;
}

.print-table {
    width: 100%;
    border-collapse: collapse;
}

.print-table th {
    padding: 10px;
    color: #fff;
    background: #0b3265;
    font-size: 13px;
    text-align: left;
}

.print-table td {
    padding: 11px 10px;
    color: #35435a;
    border-bottom: 1px solid #eef1f6;
    font-size: 13px;
}

.print-table th:nth-child(n+3),
.print-table td:nth-child(n+3) {
    text-align: right;
}

.print-summary {
    display: flex;
    justify-content: flex-end;
    padding-top: 18px;
}

.print-summary table {
    width: 260px;
}

.print-summary td {
    padding: 4px 0;
    color: #718095;
    font-size: 13px;
}

.print-summary td:last-child {
    color: #27364d;
    font-weight: 700;
    text-align: right;
}

.print-summary tr.grand td {
    padding-top: 10px;
    color: #14233c;
    border-top: 1px solid #e7ebf2;
    font-size: 15.5px;
    font-weight: 800;
}

.print-summary tr.grand td:last-child {
    color: var(--blue);
}

.print-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-top: 25px;
    margin-top: 25px;
    color: #8c98aa;
    border-top: 1px solid #eef1f6;
    font-size: 13px;
}

.print-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    width: min(760px, 100%);
    margin: 16px auto 0;
}

/* -------------------------------------------------------------------------- */
/* Mobile navigation                                                           */
/* -------------------------------------------------------------------------- */
.mobile-bottom-nav {
    display: none;
}

.mobile-overlay {
    display: none;
}

/* -------------------------------------------------------------------------- */
/* Responsive                                                                  */
/* -------------------------------------------------------------------------- */
@media (max-width: 1180px) {
    .chart-card {
        grid-column: span 12;
    }
    .category-card {
        grid-column: span 12;
    }
    .stock-card,
    .transactions-card {
        grid-column: span 6;
    }
    .quick-card {
        grid-column: span 12;
    }
    .quick-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .category-body {
        flex-direction: row;
        gap: 18px;
        padding-bottom: 12px;
    }
    .donut-wrap {
        width: 145px;
        height: 145px;
    }
    .category-legend {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }
    .quick-actions {
        padding: 0 8px 10px;
    }
    .quick-action {
        padding: 0 9px;
        font-size: 12px;
    }
    .promo-banner {
        width: 345px;
    }
    .pos-products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .partner-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1020px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .app-main {
        margin-left: 0;
    }
    .mobile-menu-btn {
        display: grid;
    }
    .mobile-overlay {
        position: fixed;
        inset: 0;
        z-index: 45;
        background: rgba(4, 24, 55, .42);
        backdrop-filter: blur(2px);
    }
    .mobile-overlay.show {
        display: block;
    }
    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .module-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .opname-layout,
    .form-layout,
    .detail-layout,
    .pos-layout {
        grid-template-columns: 1fr;
    }
    .summary-card,
    .pos-cart {
        position: static;
    }
    .opname-hero {
        flex-wrap: wrap;
    }
    .opname-stats {
        flex-wrap: wrap;
        gap: 12px 0;
    }
    .opname-progress {
        min-width: 180px;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-grid .span-2 {
        grid-column: span 1;
    }
    .report-grid,
    .settings-layout {
        grid-template-columns: 1fr;
    }
    .settings-nav {
        flex-direction: row;
        overflow-x: auto;
    }
    .settings-nav a {
        white-space: nowrap;
    }
}

/* Medium screens: keep the compact table readable instead of crushing it. */
@media (max-width: 1340px) and (min-width: 1181px) {
    .transactions-card .recent-table th:nth-child(2),
    .transactions-card .recent-table td:nth-child(2) {
        display: none;
    }
}

@media (max-width: 1180px) {
    .transactions-card .recent-table {
        min-width: 0;
    }
}

@media (max-width: 1020px) {
    .stock-card,
    .transactions-card {
        grid-column: span 12;
    }
    .transactions-card .recent-table th:nth-child(2),
    .transactions-card .recent-table td:nth-child(2),
    .transactions-card .recent-table th:nth-child(3),
    .transactions-card .recent-table td:nth-child(3) {
        display: table-cell;
    }
    .transactions-card .recent-table {
        min-width: 460px;
    }
    .recent-table th,
    .recent-table td {
        font-size: 12px;
        padding-left: 6px;
        padding-right: 6px;
    }
    .recent-table th:first-child,
    .recent-table td:first-child {
        padding-left: 12px;
    }
    .recent-table th:last-child,
    .recent-table td:last-child {
        padding-right: 12px;
    }
    .recent-table .invoice-no {
        font-size: 12px;
    }
    .recent-table .badge {
        padding: 0 5px;
    }
}

@media (max-width: 680px) {
    .transactions-card .recent-table th:nth-child(2),
    .transactions-card .recent-table td:nth-child(2),
    .transactions-card .recent-table th:nth-child(3),
    .transactions-card .recent-table td:nth-child(3) {
        display: none;
    }
    .recent-table th:nth-child(1),
    .recent-table td:nth-child(1) {
        width: 40%;
    }
    .recent-table th:nth-child(4),
    .recent-table td:nth-child(4) {
        width: 32%;
    }
    .recent-table th:nth-child(5),
    .recent-table td:nth-child(5) {
        width: 28%;
    }
}

@media (max-width: 820px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .chart-card,
    .category-card,
    .stock-card,
    .transactions-card,
    .quick-card {
        grid-column: span 2;
    }
    .chart-card {
        min-height: 280px;
    }
    .transactions-card {
        order: 4;
    }
    .category-body {
        flex-direction: row;
    }
    .donut-wrap {
        width: 165px;
        height: 165px;
    }
    .category-legend {
        display: flex;
        width: auto;
    }
    .dashboard-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 11px;
    }
    .promo-banner {
        width: 100%;
        max-width: 470px;
    }
    .product-row {
        grid-template-columns: minmax(190px, 1fr) 140px 85px;
    }
    .product-actions {
        display: none;
    }
    .partner-grid {
        grid-template-columns: 1fr;
    }
    .po-grid {
        grid-template-columns: 1fr;
    }
    .invoice-row {
        grid-template-columns: 130px minmax(120px, 1fr) 100px;
    }
    .invoice-row .invoice-row-status {
        display: none;
    }
    .invoice-row .chevron {
        display: none;
    }
}

@media (max-width: 680px) {
    body {
        padding-bottom: 64px;
        background: #f5f7fb;
    }
    .topbar {
        height: 58px;
        padding: 0 14px;
        gap: 9px;
    }
    .topbar-search {
        max-width: none;
        height: 36px;
        background: #f5f8fc;
    }
    .topbar-search input {
        font-size: 12.5px;
    }
    .topbar-right {
        gap: 9px;
    }
    .notif-btn {
        width: 34px;
        height: 34px;
    }
    .notif-badge {
        top: -3px;
        right: -3px;
        min-width: 16px;
        height: 16px;
        font-size: 12px;
    }
    .notif-dropdown {
        position: fixed;
        top: 64px;
        right: 12px;
        left: 12px;
        width: auto;
    }
    .notif-list {
        max-height: calc(100vh - 225px);
    }
    .profile-meta {
        display: none;
    }
    .profile-avatar {
        width: 33px;
        height: 33px;
    }
    .page-content {
        padding: 14px 13px 20px;
    }
    .dashboard-head {
        gap: 12px;
        margin-bottom: 13px;
    }
    .welcome-title {
        font-size: 23px;
    }
    .welcome-subtitle {
        font-size: 12px;
    }
    .promo-banner {
        height: 58px;
        padding-left: 15px;
    }
    .promo-copy strong {
        font-size: 13px;
    }
    .promo-copy span {
        font-size: 12px;
    }
    .promo-mascot {
        width: 88px;
        height: 82px;
        right: 10px;
    }
    .kpi-grid {
        gap: 9px;
        margin-bottom: 11px;
    }
    .kpi-card {
        min-height: 73px;
        padding: 11px;
        gap: 9px;
    }
    .kpi-icon {
        width: 33px;
        height: 33px;
    }
    .kpi-icon .lucide {
        width: 17px;
        height: 17px;
    }
    .kpi-value {
        font-size: 17px;
    }
    .kpi-label {
        font-size: 12px;
    }
    .kpi-foot {
        font-size: 12px;
    }
    .dashboard-grid {
        gap: 10px;
    }
    .chart-card {
        min-height: 258px;
    }
    .chart-wrap {
        height: 190px;
        padding-left: 8px;
        padding-right: 8px;
    }
    .chart-toolbar {
        gap: 7px;
        flex-wrap: wrap;
    }
    .chart-legend {
        font-size: 12px;
    }
    .category-body {
        flex-direction: column;
    }
    .category-legend {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }
    .donut-wrap {
        width: 150px;
        height: 150px;
    }
    .module-strip {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .page-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 13px;
    }
    .page-title {
        font-size: 23px;
    }
    .page-actions {
        width: 100%;
    }
    .page-actions .btn {
        flex: 1;
    }
    .summary-strip {
        grid-template-columns: 1fr;
        gap: 9px;
    }
    .summary-mini {
        min-height: 60px;
    }
    .product-summary,
    .product-page-actions {
        display: none;
    }
    .pos-customer-card .form-grid {
        grid-template-columns: 1fr !important;
    }
    .product-toolbar {
        flex-wrap: wrap;
        padding: 10px 12px;
    }
    .product-search {
        max-width: none;
    }
    .filter-btn span {
        display: none;
    }
    .product-tabs {
        padding: 8px 12px;
    }
    .product-list {
        padding: 0 12px;
    }
    .product-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        min-height: 67px;
    }
    .product-thumb {
        width: 42px;
        height: 45px;
    }
    .product-thumb img {
        width: 39px;
        height: 39px;
    }
    .product-name {
        font-size: 12.5px;
    }
    .product-price-wrap {
        text-align: right;
    }
    .product-price {
        font-size: 12px;
    }
    .product-price small {
        font-size: 12px;
    }
    .stock-col {
        display: none;
    }
    .product-row .stock-meter {
        display: none;
    }
    .opname-hero {
        gap: 11px;
        padding: 13px;
    }
    .opname-hero-info {
        min-width: 0;
        flex: 1;
    }
    .opname-hero-info strong {
        font-size: 13px;
    }
    .opname-hero-icon {
        width: 42px;
        height: 42px;
    }
    .opname-stats {
        width: 100%;
        gap: 0;
        padding-top: 12px;
        border-top: 1px solid #f0f3f8;
    }
    .opname-stat {
        padding: 0 11px;
    }
    .opname-stat:first-child {
        padding-left: 0;
        border-left: 0;
    }
    .opname-stat strong {
        font-size: 18px;
    }
    .opname-progress {
        flex: 0 0 100%;
        padding: 11px 0 0;
        margin-top: 11px;
        border-top: 1px solid #f0f3f8;
        border-left: 0;
    }
    .toolbar-line {
        align-items: stretch;
        flex-direction: column;
    }
    .status-tabs {
        width: 100%;
        overflow-x: auto;
    }
    .status-tab {
        flex: 1;
        justify-content: center;
        padding: 0 10px;
    }
    .search-compact {
        width: 100%;
    }
    .invoice-summary {
        grid-template-columns: 1fr;
        gap: 9px;
    }
    .invoice-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 6px 12px;
        padding: 11px 12px;
    }
    .invoice-date {
        grid-row: span 1;
    }
    .invoice-date strong {
        font-size: 12px;
    }
    .invoice-customer {
        grid-column: 1;
    }
    .invoice-customer strong {
        font-size: 12.5px;
    }
    .invoice-amount {
        grid-column: 2;
        grid-row: 1 / span 2;
    }
    .invoice-row .invoice-row-status {
        display: block;
        grid-column: 1;
        justify-self: start;
    }
    .invoice-detail-meta {
        grid-template-columns: 1fr 1fr;
    }
    .invoice-detail-meta .invoice-meta-item:first-child {
        grid-column: span 2;
    }
    .invoice-items {
        padding: 0 13px;
        overflow-x: auto;
    }
    .invoice-items table {
        min-width: 440px;
    }
    .invoice-detail-head {
        padding: 15px 13px 12px;
    }
    .invoice-number-lg {
        font-size: 18px;
    }
    .invoice-detail-tools .btn span {
        display: none;
    }
    .invoice-totals {
        padding: 12px 13px 16px;
    }
    .invoice-detail-actions {
        padding: 11px 13px;
        flex-wrap: wrap;
    }
    .invoice-detail-actions .btn {
        flex: 1;
    }
    .pos-products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: 390px;
    }
    .pos-scan-field {
        min-width: 100%;
    }
    .form-card {
        padding: 14px;
    }
    .line-item {
        grid-template-columns: minmax(0, 1fr) 62px 82px 30px;
        gap: 5px;
    }
    .line-item select {
        font-size: 12px;
    }
    .line-price {
        font-size: 12px;
    }
    .flash {
        top: 68px;
        right: 13px;
        left: 13px;
        max-width: none;
    }
    .mobile-bottom-nav {
        position: fixed;
        z-index: 45;
        right: 0;
        bottom: 0;
        left: 0;
        display: flex;
        align-items: center;
        justify-content: space-around;
        height: 62px;
        padding: 4px 6px 7px;
        border-top: 1px solid #e9edf4;
        background: rgba(255, 255, 255, .97);
        box-shadow: 0 -6px 18px rgba(22, 42, 77, .05);
        backdrop-filter: blur(10px);
    }
    .mobile-nav-item {
        display: flex;
        flex: 1 1 0;
        min-width: 0;
        overflow: hidden;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        color: #8c98aa;
        font-size: 12px;
        font-weight: 600;
        white-space: nowrap;
    }
    .mobile-nav-item .lucide {
        width: 19px;
        height: 19px;
    }
    .mobile-nav-item.active {
        color: var(--blue);
    }
    .mobile-nav-item.active .lucide {
        fill: rgba(37, 99, 235, .1);
    }
    .topbar .mobile-menu-btn {
        width: 35px;
        height: 35px;
    }
    .topbar-search {
        display: none;
    }
    .sidebar {
        width: 250px;
    }
    .print-paper {
        padding: 24px 20px;
    }
    .print-head {
        flex-direction: column;
    }
    .print-title {
        text-align: left;
    }
    .print-info {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .settings-card {
        padding: 15px;
    }
    .settings-subhead {
        align-items: flex-start;
        flex-direction: column;
    }
    .bank-setting-row {
        align-items: stretch;
        flex-direction: column;
    }
    .bank-setting-grid {
        grid-template-columns: 1fr !important;
    }
    .bank-setting-remove {
        align-self: flex-end;
        margin-bottom: 0;
    }
    .qris-setting {
        flex-direction: column;
    }
    .qris-setting-preview {
        width: 100%;
        max-width: 220px;
        height: auto;
        aspect-ratio: 1;
    }
    .signature-setting {
        align-items: flex-start;
        flex-direction: column;
    }
    .signature-preview {
        width: 100%;
        max-width: 230px;
    }
    .account-layout {
        grid-template-columns: 1fr;
    }
    .access-summary {
        grid-template-columns: 1fr;
    }
    .permission-groups {
        grid-template-columns: 1fr;
    }
    .role-card-head {
        flex-direction: column;
    }
    .page-head-left {
        width: 100%;
    }
}

@media print {
    body {
        padding: 0;
        background: #fff;
    }
    .print-page {
        min-height: 0;
        padding: 0;
        background: #fff;
    }
    .print-paper {
        width: 100%;
        padding: 0;
        box-shadow: none;
    }
    .print-actions {
        display: none;
    }
}
