/* =========================================================
   OSVIAMART / KOPERASI
   UI FOUNDATION
   ========================================================= */


/* =========================================================
   1. DESIGN TOKENS
   ========================================================= */

:root {

    /* -----------------------------------------------------
       BRAND
    ----------------------------------------------------- */

    --color-primary: #2F4F4F;
    --color-primary-dark: #263F3F;
    --color-primary-light: #6A8080;

    --color-secondary: #5D9EAD;
    --color-secondary-dark: #4C8998;
    --color-secondary-light: #E7F1F3;

    --color-brand: #4EA1E8;
    --color-brand-dark: #378BD3;
    --color-brand-light: #EAF4FC;

    --color-accent: #F4D03F;
    --color-accent-dark: #C9A900;

    --color-white: #FFFFFF;

    /* -----------------------------------------------------
       BACKGROUND
    ----------------------------------------------------- */

    --color-background: #EEF2F2;
    --color-surface: #FFFFFF;
    --color-surface-soft: #F5F8F8;


    /* -----------------------------------------------------
       TEXT
    ----------------------------------------------------- */

    --color-text: #263238;
    --color-text-secondary: #43505A;
    --color-text-muted: #66737A;
    --color-text-light: #9AA5AA;


    /* -----------------------------------------------------
       BORDER
    ----------------------------------------------------- */

    --color-border: #D9E1E3;
    --color-border-light: #E8EDEF;


    /* -----------------------------------------------------
       STATUS
    ----------------------------------------------------- */

    --color-success: #2E7D32;
    --color-success-light: #EAF7EE;

    --color-danger: #C62828;
    --color-danger-light: #FDECEC;

    --color-warning: #9A6700;
    --color-warning-light: #FFF5E5;

    --color-info: #2563EB;
    --color-info-light: #EFF6FF;


    /* -----------------------------------------------------
       LAYOUT
    ----------------------------------------------------- */

    --header-height: 72px;
    --navbar-height: 44px;

    --content-max-width: 1400px;


    /* -----------------------------------------------------
       BORDER RADIUS
    ----------------------------------------------------- */

    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;


    /* -----------------------------------------------------
       SHADOW
    ----------------------------------------------------- */

    --shadow-sm:
        0 1px 2px rgba(0, 0, 0, 0.05);

    --shadow-md:
        0 2px 8px rgba(0, 0, 0, 0.08);

    --shadow-lg:
        0 8px 24px rgba(0, 0, 0, 0.10);


    /* -----------------------------------------------------
       SPACING
    ----------------------------------------------------- */

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
}


/* =========================================================
   2. RESET
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}


html {
    margin: 0;
    padding: 0;

    font-size: 16px;

    scroll-behavior: smooth;
}


body {
    margin: 0;
    padding: 0;

    background: var(--color-background);

    color: var(--color-text);

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 14px;

    line-height: 1.5;
}


button,
input,
select,
textarea {
    font: inherit;
}


button {
    cursor: pointer;
}


a {
    color: inherit;
    text-decoration: none;
}


img {
    max-width: 100%;
    height: auto;
}


/* =========================================================
   3. APPLICATION SHELL
   ========================================================= */

.app {
    min-height: 100vh;

    display: flex;
    flex-direction: column;
}


.app-main {
    flex: 1;

    min-width: 0;

    background: var(--color-background);
}


.page-container {
    width: 100%;
    max-width: var(--content-max-width);

    margin: 0 auto;

    padding: 24px;
}


/* =========================================================
   4. HEADER
   ========================================================= */

.app-header {

    min-height: var(--header-height);

    padding: 10px 24px;

    background: var(--color-primary);

    color: #FFFFFF;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    border-bottom: 1px solid
        rgba(255, 255, 255, 0.15);
}


/* ---------------------------------------------------------
   BRAND
   --------------------------------------------------------- */

.header-brand {

    display: flex;
    align-items: center;

    gap: 12px;

    min-width: 0;
}


.brand-logo {

    width: 42px;
    height: 42px;

    flex: 0 0 42px;

    border-radius: var(--radius-lg);

    background: var(--color-brand);

    color: #FFFFFF;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 21px;
    font-weight: 700;
}


.brand-info {
    min-width: 0;
}


.brand-name {

    color: var(--color-brand);

    font-size: 24px;

    line-height: 1.1;

    font-weight: 700;

    white-space: nowrap;

    overflow: hidden;
    text-overflow: ellipsis;
}


.brand-subtitle {

    margin-top: 3px;

    color: rgba(255, 255, 255, 0.85);

    font-size: 12px;

    line-height: 1.2;
}


/* ---------------------------------------------------------
   USER
   --------------------------------------------------------- */

.header-user {

    display: flex;
    align-items: center;

    gap: 10px;

    font-size: 13px;

    white-space: nowrap;
}


.header-user-name {
    font-weight: 600;
}


.header-user-role {

    padding: 3px 8px;

    border-radius: 20px;

    background:
        rgba(255, 255, 255, 0.10);

    color:
        rgba(255, 255, 255, 0.80);

    font-size: 11px;
}


/* =========================================================
   5. NAVBAR
   ========================================================= */

.app-navbar {

    position: relative;

    z-index: 100;

    min-height: var(--navbar-height);

    background: var(--color-secondary);

    border-bottom:
        1px solid var(--color-secondary-dark);
}


/* ---------------------------------------------------------
   NAV CONTAINER
   --------------------------------------------------------- */

.nav-container {

    width: 100%;
    max-width: var(--content-max-width);

    margin: 0 auto;

    padding: 0 24px;

    display: flex;
    align-items: stretch;
}


/* ---------------------------------------------------------
   NAV ITEM
   --------------------------------------------------------- */

.nav-item {
    position: relative;

    display: flex;
    align-items: center;

    min-height: var(--navbar-height);

    padding: 0 16px;

    color: #FFFFFF;

    font-size: 13px;

    font-weight: 600;

    border-right:
        1px solid rgba(255, 255, 255, 0.20);

    transition:
        background 0.15s ease,
        color 0.15s ease;
}


.nav-item:first-child {
    border-left:
        1px solid rgba(255, 255, 255, 0.20);
}


.nav-item:hover {
    background: var(--color-secondary-dark);

    color: #FFFFFF;
}


.nav-item.active {
    background: var(--color-primary);

    color: #FFFFFF;
}


/* ---------------------------------------------------------
   NAV DROPDOWN
   --------------------------------------------------------- */

.nav-dropdown {
    position: relative;
}


.nav-dropdown-toggle {

    display: flex;
    align-items: center;

    gap: 7px;

    min-height: var(--navbar-height);

    padding: 0 16px;

    color: #FFFFFF;

    font-size: 13px;
    font-weight: 600;

    border: 0;

    background: transparent;

    cursor: pointer;
}


.nav-dropdown-toggle:hover {
    background:
        var(--color-secondary-dark);
}


.nav-dropdown-toggle.active {
    background: var(--color-primary);
    color: #FFFFFF;
}

.nav-menu a.active {
    background: var(--color-secondary-light);
    color: var(--color-primary);
    font-weight: 600;
}

.nav-arrow {

    font-size: 10px;

    transition:
        transform 0.15s ease;
}


.nav-dropdown:hover .nav-arrow {
    transform: rotate(180deg);
}


.nav-menu {

    position: absolute;

    top: 100%;
    left: 0;

    min-width: 210px;

    padding: 6px;

    margin: 0;

    background: var(--color-surface);

    border:
        1px solid var(--color-border);

    border-radius:
        0 0 var(--radius-md) var(--radius-md);

    box-shadow: var(--shadow-lg);

    list-style: none;

    opacity: 0;

    visibility: hidden;

    transform:
        translateY(-4px);

    transition:
        opacity 0.15s ease,
        visibility 0.15s ease,
        transform 0.15s ease;
}


.nav-dropdown:hover .nav-menu {

    opacity: 1;

    visibility: visible;

    transform:
        translateY(0);
}


.nav-menu a {

    display: block;

    padding: 9px 12px;

    border-radius: var(--radius-sm);

    color: var(--color-text);

    font-size: 13px;
}


.nav-menu a:hover {

    background:
        var(--color-secondary-light);

    color:
        var(--color-primary);
}


/* =========================================================
   6. PAGE HEADER
   ========================================================= */

.page-header {

    margin-bottom: 20px;

    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 16px;
}


.page-title {

    margin: 0;

    color: var(--color-text);

    font-size: 24px;

    line-height: 1.25;

    font-weight: 700;
}


.page-description {

    margin: 4px 0 0;

    color: var(--color-text-muted);

    font-size: 13px;
}


.page-actions {

    display: flex;
    align-items: center;

    gap: 8px;

    flex-wrap: wrap;
}


/* =========================================================
   7. CARD
   ========================================================= */

.card {

    width: 100%;

    background:
        var(--color-surface);

    border:
        1px solid var(--color-border-light);

    border-radius:
        var(--radius-lg);

    box-shadow:
        var(--shadow-sm);

    overflow: hidden;
}


/* ---------------------------------------------------------
   CARD HEADER
   --------------------------------------------------------- */

.card-header {

    min-height: 52px;

    padding: 14px 16px;

    background:
        var(--color-surface);

    border-bottom:
        1px solid var(--color-border-light);

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 12px;
}


.card-header > div {
    min-width: 0;
}


/* ---------------------------------------------------------
   CARD TITLE
   --------------------------------------------------------- */

.card-title {

    margin: 0;

    color:
        var(--color-text);

    font-size: 15px;

    line-height: 1.4;

    font-weight: 700;
}


/* ---------------------------------------------------------
   CARD SUBTITLE
   --------------------------------------------------------- */

.card-subtitle {

    margin: 3px 0 0;

    color:
        var(--color-text-muted);

    font-size: 12px;

    line-height: 1.4;
}


/* ---------------------------------------------------------
   CARD HEADER ACTIONS
   --------------------------------------------------------- */

.card-header-actions {

    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: var(--space-2);

    flex-shrink: 0;

    flex-wrap: wrap;
}


/* ---------------------------------------------------------
   CARD BODY
   --------------------------------------------------------- */

.card-body {

    padding: 16px;

    background:
        var(--color-surface);
}


/* ---------------------------------------------------------
   CARD BODY - NO PADDING
   --------------------------------------------------------- */

.card-body-flush {

    padding: 0;
}


/* ---------------------------------------------------------
   CARD FOOTER
   --------------------------------------------------------- */

.card-footer {

    min-height: 52px;

    padding: 12px 16px;

    border-top:
        1px solid var(--color-border-light);

    background:
        var(--color-surface-soft);

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 12px;
}


/* ---------------------------------------------------------
   CARD FOOTER ACTIONS
   --------------------------------------------------------- */

.card-footer-actions {

    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: var(--space-2);

    width: 100%;

    flex-wrap: wrap;
}


/* ---------------------------------------------------------
   CARD DETAIL
   --------------------------------------------------------- */

.card-detail {

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 16px;
}


.card-detail-item {
    min-width: 0;
    padding: 12px 14px;
    background: var(--color-surface-soft);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
}

.card-detail-label {
    margin-bottom: 4px;
    color: var(--color-text-muted);
    font-size: 11px;
    line-height: 1.4;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.card-detail-value {
    color: var(--color-text);
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
    word-break: break-word;
}


/* ---------------------------------------------------------
   CARD COMPACT
   --------------------------------------------------------- */

.card-compact .card-header {

    min-height: 46px;

    padding: 10px 14px;
}


.card-compact .card-body {

    padding: 12px 14px;
}


.card-compact .card-footer {

    min-height: 46px;

    padding: 10px 14px;
}


/* ---------------------------------------------------------
   CARD EMPHASIS
   --------------------------------------------------------- */

.card-primary {

    border-color:
        var(--color-primary-light);
}


.card-success {

    border-color:
        #B8E2C4;
}


.card-danger {

    border-color:
        #F4B7B7;
}


/* ---------------------------------------------------------
   CARD RESPONSIVE
   --------------------------------------------------------- */

@media (max-width: 700px) {

    .card-header {

        align-items: flex-start;

        flex-direction: column;
    }


    .card-header-actions {

        width: 100%;

        justify-content: flex-start;
    }


    .card-footer {

        align-items: flex-start;

        flex-direction: column;
    }


    .card-footer-actions {

        justify-content: flex-start;
    }


    .card-detail {

        grid-template-columns: 1fr;
    }

}


/* =========================================================
   8. BUTTON
   ========================================================= */

.btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 6px;

    min-height: 38px;

    padding: 7px 14px;

    box-sizing: border-box;

    border: 1px solid transparent;

    border-radius: var(--radius-md);

    font-size: 13px;

    font-weight: 600;

    line-height: 1.2;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.05s ease;
}



.btn:active {
    transform: translateY(1px);
}

.btn:focus-visible {

    outline:
        2px solid var(--color-secondary);

    outline-offset: 2px;
}


.btn-primary {

    background:
        var(--color-primary);

    border-color:
        var(--color-primary);

    color: #FFFFFF;
}


.btn-primary:hover {

    background:
        var(--color-primary-dark);

    border-color:
        var(--color-primary-dark);
}


.btn-brand {

    background:
        var(--color-brand);

    border-color:
        var(--color-brand);

    color: #FFFFFF;
}


.btn-brand:hover {

    background:
        var(--color-brand-dark);

    border-color:
        var(--color-brand-dark);
}


.btn-secondary {

    background:
        var(--color-secondary);

    border-color:
        var(--color-secondary);

    color: #FFFFFF;
}


.btn-secondary:hover {

    background:
        var(--color-secondary-dark);

    border-color:
        var(--color-secondary-dark);
}


.btn-outline {

    background:
        #FFFFFF;

    border-color:
        var(--color-border);

    color:
        var(--color-text);
}


.btn-outline:hover {

    background:
        var(--color-surface-soft);

    border-color:
        var(--color-secondary);
}


.btn-danger {

    background:
        var(--color-danger);

    border-color:
        var(--color-danger);

    color: #FFFFFF;
}


.btn-success {

    background:
        var(--color-success);

    border-color:
        var(--color-success);

    color: #FFFFFF;
}


.btn-sm {

    min-height: 30px;

    padding: 5px 10px;

    font-size: 12px;
}


.btn-lg {

    min-height: 42px;

    padding: 9px 18px;

    font-size: 14px;
}


/* =========================================================
   9. FORM
   ========================================================= */

.form-group {

    margin-bottom: 16px;
}


.form-label {

    display: block;

    margin-bottom: 6px;

    color: var(--color-text);

    font-size: 13px;

    font-weight: 600;
}


.form-control {

    width: 100%;

    min-height: 38px;

    padding: 8px 10px;

    background: #FFFFFF;

    border:
        1px solid var(--color-border);

    border-radius: var(--radius-md);

    color: var(--color-text);

    font-size: 13px;

    outline: none;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}


.form-control:hover {

    border-color:
        var(--color-secondary);
}


.form-control:focus {

    border-color:
        var(--color-brand);

    box-shadow:
        0 0 0 3px
        rgba(78, 161, 232, 0.15);
}


.form-control::placeholder {

    color:
        var(--color-text-light);
}


.form-help {

    margin-top: 4px;

    color:
        var(--color-text-muted);

    font-size: 11px;
}


.form-error {

    margin-top: 4px;

    color:
        var(--color-danger);

    font-size: 11px;
}

/* =========================================================
   9.1 TOOLBAR
   ========================================================= */

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.toolbar .filter-form {
    margin: 0;
}

.toolbar .page-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
}

@media (max-width: 700px) {
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar .filter-form {
        max-width: none;
    }

    .toolbar .page-actions {
        justify-content: flex-start;
    }
}

/* =========================
   9.2 FILTER BAR
   ========================= */

.filter-bar {
    display: flex;
    align-items: center;
    margin-bottom: var(--space-4);
}

.filter-form {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
    max-width: 520px;
}

.filter-form .form-control {
    flex: 1;
    min-width: 0;
}

.filter-form .btn {
    flex-shrink: 0;
    white-space: nowrap;
}

/* =========================================================
   9.3 FORM ACTIONS
   ========================================================= */

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-2);
}

/* =========================================================
   9.4 FORM GRID
   ========================================================= */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 20px;
}

.form-grid .form-group {
    min-width: 0;
}

@media (max-width: 700px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   9.5 POS / TRANSACTION LAYOUT
   ========================================================= */

.pos-body {
    background: var(--color-background);
}

.pos-main {
    min-height: calc(100vh - var(--header-height) - var(--navbar-height));
}

.pos-container {
    max-width: 1600px;
    padding-top: 16px;
    padding-bottom: 24px;
}

/* =========================================================
   9.5.1 TRANSACTION CARD
   ========================================================= */

.transaction-summary {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.transaction-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    min-width: 320px;
}

.transaction-summary-row span {
    color: var(--color-text-secondary);
    font-size: 13px;
}

.transaction-summary-row strong {
    color: var(--color-primary);
    font-size: 20px;
    font-weight: 700;
}

@media (max-width: 700px) {
    .transaction-summary {
        align-items: stretch;
    }

    .transaction-summary-row {
        min-width: 0;
        width: 100%;
    }

    .transaction-summary-row strong {
        font-size: 18px;
    }
}

/* =========================================================
   10. TABLE
   ========================================================= */

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-surface);
    font-size: 13px;
}

.table th {
    padding: 9px 10px;
    background: var(--color-secondary);
    color: #FFFFFF;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
    border-right: 1px solid rgba(255, 255, 255, 0.18);
    border-bottom: 2px solid var(--color-secondary-dark);
}

.table th:last-child {
    border-right: 0;
}

.table td {
    padding: 10px 12px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border-light);
    color: var(--color-text);
    vertical-align: middle;
}

.table tbody tr:nth-child(even) td {
    background: #FAFCFC;
}

.table tbody tr:hover td {
    background: var(--color-secondary-light);
}

.table tbody tr:last-child td {
    border-bottom: 0;
}


/* =========================================================
   10.1 COMPACT TABLE
   ========================================================= */

.table-compact {
    font-size: 12px;
}

.table-compact th {
    padding: 7px 8px;
    font-size: 11px;
}

.table-compact td {
    padding: 6px 8px;
    line-height: 1.35;
}

.table-compact .badge {
    padding: 2px 6px;
    font-size: 10px;
}

.table-primary-text {
    color: var(--color-text);
    font-weight: 600;
}

.table-date {
    white-space: nowrap;
    color: var(--color-text-secondary);
    font-size: 12px;
}

.table-compact .table-actions {
    gap: 4px;
}

.table tbody tr:nth-child(even) td {
    background: #FAFCFC;
}

.table tbody tr:hover td {
    background: var(--color-secondary-light);
}

/* =========================================================
   10.2 TABLE ACTION
   ========================================================= */

.table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 30px;
    min-height: 28px;
    padding: 4px 7px;

    background: #FFFFFF;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);

    color: var(--color-text-secondary);
    font-size: 11px;
    font-weight: 600;

    box-shadow: var(--shadow-sm);

    white-space: nowrap;
}

.table-action:hover {
    background: var(--color-surface-soft);
    border-color: var(--color-secondary);
    color: var(--color-primary);
}

.table-action-primary {
    color: var(--color-primary);
}

.table-action-primary:hover {
    background: var(--color-secondary-light);
    border-color: var(--color-secondary);
}

.table-action-danger {
    color: var(--color-danger);
}

.table-action-danger:hover {
    background: var(--color-danger-light);
    border-color: #E7A5A5;
    color: var(--color-danger);
}

.table-compact {
    min-width: max-content;
}

.table-compact .table-actions {
    gap: 4px;
}

/* =========================================================
   10.3 PAGINATION
   ========================================================= */

.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: var(--space-4);
    flex-wrap: wrap;
}

.pagination-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 32px;
    height: 30px;

    padding: 0 8px;

    background: #FFFFFF;

    border: 1px solid var(--color-border);

    border-radius: var(--radius-sm);

    color: var(--color-text-secondary);

    font-size: 12px;
    font-weight: 600;
}

.pagination-item:hover {
    background: var(--color-surface-soft);
    border-color: var(--color-secondary);
    color: var(--color-primary);
}

.pagination-item.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #FFFFFF;
}

/* =========================================================
   11. ALERT
   ========================================================= */

.alert {
    margin-bottom: 16px;
    padding: 0;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    font-size: 13px;
    overflow: hidden;
}

.alert-inner {
    min-height: 42px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
}

.alert-message {
    flex: 1;
    line-height: 1.4;
}

.alert-success {
    background: var(--color-success-light);
    border-color: #A8D5B4;
    color: #14532D;
}

.alert-success .alert-icon {
    background: var(--color-success);
    color: #FFFFFF;
}

.alert-danger {
    background: var(--color-danger-light);
    border-color: #E7A5A5;
    color: #7F1D1D;
}

.alert-danger .alert-icon {
    background: var(--color-danger);
    color: #FFFFFF;
}

.alert-warning {
    background: var(--color-warning-light);
    border-color: #E8C77A;
    color: #78350F;
}

.alert-warning .alert-icon {
    background: var(--color-warning);
    color: #FFFFFF;
}

.alert-info {
    background: var(--color-info-light);
    border-color: #AFCDF5;
    color: #1E3A8A;
}

.alert-info .alert-icon {
    background: var(--color-info);
    color: #FFFFFF;
}


/* =========================================================
   12. BADGE
   ========================================================= */

.badge {

    display: inline-flex;

    align-items: center;

    padding: 3px 8px;

    border-radius: 20px;

    font-size: 11px;

    font-weight: 600;
}


.badge-primary {

    background:
        var(--color-secondary-light);

    color:
        var(--color-primary);
}


.badge-success {

    background:
        var(--color-success-light);

    color:
        #166534;
}


.badge-danger {

    background:
        var(--color-danger-light);

    color:
        #991B1B;
}


.badge-warning {

    background:
        var(--color-warning-light);

    color:
        #92400E;
}

/* =========================================================
   11.1 ALERT REFINEMENT
   ========================================================= */

.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    box-shadow: var(--shadow-sm);
}

.alert-inner {
    display: flex;
    align-items: flex-start;
    gap: 9px;
}

.alert-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 20px;
    height: 20px;

    flex: 0 0 20px;

    border-radius: 50%;

    font-size: 11px;
    font-weight: 700;
}

.alert-success .alert-icon {
    background: var(--color-success);
    color: #FFFFFF;
}

.alert-danger .alert-icon {
    background: var(--color-danger);
    color: #FFFFFF;
}

.alert-warning .alert-icon {
    background: var(--color-warning);
    color: #FFFFFF;
}

.alert-info .alert-icon {
    background: var(--color-info);
    color: #FFFFFF;
}

.alert-message {
    line-height: 20px;
}

/* =========================================================
   13. GRID
   ========================================================= */

.grid {

    display: grid;

    gap: 16px;
}


.grid-2 {
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
}


.grid-3 {
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
}


.grid-4 {
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
}


/* =========================================================
   14. FLEX UTILITIES
   ========================================================= */

.flex {

    display: flex;
}


.items-center {

    align-items: center;
}


.justify-between {

    justify-content: space-between;
}


.gap-1 {
    gap: 4px;
}


.gap-2 {
    gap: 8px;
}


.gap-3 {
    gap: 12px;
}


.gap-4 {
    gap: 16px;
}


/* =========================================================
   14.1 SPACING UTILITIES
   ========================================================= */

.detail-history {
    margin-top: var(--space-6);
}

.detail-footer {
    margin-top: var(--space-6);
}



/* =========================================================
   15. TEXT
   ========================================================= */

.text-muted {

    color:
        var(--color-text-muted);
}


.text-primary {

    color:
        var(--color-primary);
}


.text-brand {

    color:
        var(--color-brand);
}


.text-success {

    color:
        var(--color-success);
}


.text-danger {

    color:
        var(--color-danger);
}


.text-warning {

    color:
        var(--color-warning);
}


.text-right {

    text-align: right;
}


.text-center {

    text-align: center;
}


.font-bold {

    font-weight: 700;
}

/* =========================================================
   15.1. AMOUNT 
   ========================================================= */
.amount {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.amount-positive {
    color: var(--color-success);
    font-weight: 600;
}

.amount-negative {
    color: var(--color-danger);
    font-weight: 600;
}

.amount-primary {
    color: var(--color-primary);
    font-weight: 700;
}

/* =========================================================
   16. EMPTY STATE
   ========================================================= */

.empty-state {
    padding: 48px 20px;
    text-align: center;
    background: var(--color-surface);
    color: var(--color-text-muted);
}

.empty-state-title {
    margin: 0 0 4px;
    color: var(--color-text);
    font-weight: 600;
}

.empty-state-description {
    margin: 0;
    font-size: 13px;
}


/* =========================================================
   17. FOOTER
   ========================================================= */

.app-footer {

    padding: 14px 24px;

    background:
        var(--color-primary);

    color:
        rgba(255, 255, 255, 0.75);

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 16px;

    font-size: 12px;
}


.footer-left,
.footer-right {

    display: flex;

    align-items: center;

    gap: 8px;
}


/* =========================================================
   18. RESPONSIVE
   ========================================================= */

@media (max-width: 1000px) {

    .nav-container {

        padding: 0 12px;

        overflow-x: auto;

        white-space: nowrap;
    }


    .app-container,
    .page-container {
        padding: 20px 16px;
    }


    .grid-4 {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .grid-3 {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}


@media (max-width: 700px) {

    .app-header {

        padding: 10px 16px;
    }


    .header-user {

        display: none;
    }


    .brand-name {

        font-size: 20px;
    }


    .brand-subtitle {

        font-size: 11px;
    }


    .nav-container {

        padding: 0;
    }


    .nav-item,
    .nav-dropdown-toggle {

        padding-left: 12px;
        padding-right: 12px;
    }


    .app-container,
    .page-container {
        padding: 16px 12px;
    }


    .page-header {

        flex-direction: column;
    }


    .page-actions {

        width: 100%;
    }


    .grid-2,
    .grid-3,
    .grid-4 {

        grid-template-columns:
            1fr;
    }


    .app-footer {

        flex-direction: column;

        align-items: flex-start;

        padding: 14px 16px;
    }

    .pos-container {
        padding: 12px;
    }

    .pos-layout {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .pos-payment-panel {
        grid-column: auto;
    }

     .pos-info-bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .pos-transaction-info {
        width: 100%;
        justify-content: space-between;
        gap: 10px;
    }

    .pos-transaction-info > div {
        min-width: 0;
    }
}

/* =========================================================
   POS — LAYOUT
   ========================================================= */

.pos-body {
    background: var(--color-background);
}

.pos-main {
    min-height: calc(
        100vh -
        var(--header-height) -
        var(--navbar-height)
    );
}

.pos-container {
    max-width: 1600px;
    padding-top: 16px;
    padding-bottom: 24px;
}


/* =========================================================
   POS PAGE HEADER
   ========================================================= */

.pos-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.pos-page-title {
    margin: 0;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--color-primary);
}

.pos-page-description {
    margin: 3px 0 0;
    font-size: 12px;
    color: var(--color-text-muted);
}


/* =========================================================
   POS INFO BAR
   ========================================================= */

.pos-info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 12px;
    padding: 12px 14px;

    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-secondary);

    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.pos-customer-summary {
    min-width: 0;
}

.pos-info-label {
    margin-bottom: 2px;

    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;

    color: var(--color-text-muted);
}

.pos-customer-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-primary);
}

.pos-customer-meta {
    margin-top: 3px;
    font-size: 11px;
    color: var(--color-text-secondary);
}

.pos-meta-separator {
    margin: 0 5px;
    color: var(--color-border);
}

.pos-transaction-info {
    display: flex;
    align-items: center;
    gap: 22px;
}

.pos-transaction-info > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pos-transaction-info span {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--color-text-muted);
}

.pos-transaction-info strong {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text);
}


/* =========================================================
   POS GRID
   ========================================================= */

.pos-layout {
    display: grid;

    grid-template-columns:
        260px
        minmax(0, 1fr)
        320px;

    gap: 12px;

    align-items: start;
}

.pos-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;

    min-width: 0;
}

.pos-cart-panel,
.pos-payment-panel {
    min-width: 0;
}


/* =========================================================
   POS PANEL
   ========================================================= */

.pos-panel {
    background: var(--color-surface);

    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);

    box-shadow: var(--shadow-sm);

    overflow: hidden;
}

.pos-panel-header {
    min-height: 42px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 10px 13px;

    border-bottom: 1px solid var(--color-border-light);

    font-size: 13px;
    font-weight: 700;

    color: var(--color-primary);
}

.pos-panel-body {
    padding: 12px;
}


/* =========================================================
   POS CUSTOMER / PRODUCT SEARCH
   ========================================================= */

.pos-product-search {
    position: relative;
}

.pos-search-help {
    margin-top: 6px;

    font-size: 10px;
    line-height: 1.4;

    color: var(--color-text-muted);
}

.pos-search-result {
    position: absolute;

    top: calc(100% + 4px);
    left: 0;
    right: 0;

    z-index: 50;

    max-height: 300px;
    overflow-y: auto;

    background: var(--color-white);

    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);

    box-shadow: var(--shadow-md);
}

.pos-search-item {
    width: 100%;

    display: flex;
    flex-direction: column;
    gap: 3px;

    padding: 9px 10px;

    text-align: left;

    background: var(--color-white);
    border: 0;
    border-bottom: 1px solid var(--color-border-light);

    cursor: pointer;
}

.pos-search-item:last-child {
    border-bottom: 0;
}

.pos-search-item:hover {
    background: var(--color-secondary-light);
}

.pos-search-item-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text);
}

.pos-search-item-meta {
    font-size: 10px;
    color: var(--color-text-muted);
}


/* =========================================================
   POS CART
   ========================================================= */

.pos-cart-header > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pos-cart-header small {
    font-size: 10px;
    font-weight: 400;
    color: var(--color-text-muted);
}

.pos-cart-body {
    padding: 0 12px 12px;
}

.pos-cart-table {
    width: 100%;
    table-layout: fixed;
}

.pos-cart-table th,
.pos-cart-table td {
    vertical-align: middle;
}

.pos-cart-table th {
    white-space: nowrap;
}

.pos-cart-table .pos-col-product {
    width: 32%;
}

.pos-cart-table .pos-col-qty {
    width: 9%;
}

.pos-cart-table .pos-col-price {
    width: 14%;
}

.pos-cart-table .pos-col-discount {
    width: 11%;
}

.pos-cart-table .pos-col-tax {
    width: 9%;
}

.pos-cart-table .pos-col-subtotal {
    width: 18%;
}

.pos-cart-table .pos-col-action {
    width: 7%;
}

.pos-product-name {
    font-size: 12px;
    line-height: 1.3;
    font-weight: 600;
    color: var(--color-text);
}

.pos-stock-info {
    margin-top: 2px;
    font-size: 10px;
    color: var(--color-text-muted);
}

.pos-subtotal {
    white-space: nowrap;
    font-size: 12px;
    font-weight: 700;
    color: var(--color-primary);
}

.pos-remove-item,
.pos-remove-payment {
    width: 26px;
    height: 26px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    background: var(--color-white);

    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);

    color: var(--color-danger);

    font-size: 16px;
    line-height: 1;

    cursor: pointer;
}

.pos-remove-item:hover,
.pos-remove-payment:hover {
    background: var(--color-danger-light);
    border-color: var(--color-danger);
}


/* =========================================================
   POS EMPTY CART
   ========================================================= */

.pos-empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 4px;

    min-height: 150px;

    padding: 24px;

    text-align: center;

    border: 1px dashed var(--color-border);
    border-radius: var(--radius-sm);

    color: var(--color-text-muted);
}

.pos-empty-cart strong {
    font-size: 12px;
    color: var(--color-text-secondary);
}

.pos-empty-cart span {
    max-width: 320px;

    font-size: 10px;
    line-height: 1.5;
}

.pos-empty-icon {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 4px;

    background: var(--color-secondary-light);

    border-radius: 50%;

    color: var(--color-secondary);

    font-size: 20px;
}

.pos-empty-cart.is-hidden {
    display: none;
}


/* =========================================================
   POS CART TOTAL
   ========================================================= */

.pos-cart-total {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 20px;

    margin-top: 10px;
    padding: 12px 4px 2px;

    border-top: 2px solid var(--color-primary);
}

.pos-cart-total span {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.pos-cart-total strong {
    min-width: 170px;

    text-align: right;

    font-size: 21px;
    line-height: 1.2;

    color: var(--color-primary);
}


/* =========================================================
   POS PAYMENT
   ========================================================= */

.pos-payment-body {
    padding: 12px;
}

.pos-payment-total-box {
    margin-bottom: 14px;
    padding: 12px;

    background: var(--color-secondary-light);

    border: 1px solid #C8E0E4;
    border-radius: var(--radius-sm);
}

.pos-payment-total-label {
    margin-bottom: 4px;

    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;

    color: var(--color-text-muted);
}

.pos-payment-grand-total {
    font-size: 22px;
    line-height: 1.2;
    font-weight: 700;
    color: var(--color-primary);
}

.pos-payment-list-header {
    margin-bottom: 6px;

    font-size: 11px;
    font-weight: 700;

    color: var(--color-text-secondary);
}

.pos-payment-table {
    width: 100%;
    border-collapse: collapse;
}

.pos-payment-table td {
    padding: 0 0 8px;
}

.pos-payment-row {
    display: grid;

    grid-template-columns:
        90px
        minmax(0, 1fr)
        28px;

    gap: 5px;

    align-items: center;
}

.pos-payment-row .form-control {
    min-width: 0;
}

.pos-add-payment {
    width: 100%;
    margin-top: 3px;
}

.pos-payment-summary {
    margin-top: 14px;

    padding-top: 10px;

    border-top: 1px solid var(--color-border);
}

.pos-payment-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    padding: 4px 0;

    font-size: 12px;
}

.pos-payment-summary-row span {
    color: var(--color-text-secondary);
}

.pos-payment-summary-row strong {
    text-align: right;
    color: var(--color-text);
}

.pos-payment-difference {
    margin-top: 2px;

    padding-top: 8px;

    border-top: 1px dashed var(--color-border);
}

.pos-payment-difference-value.is-change {
    color: var(--color-success);
}

.pos-payment-difference-value.is-short {
    color: var(--color-danger);
}

.pos-submit {
    width: 100%;
    margin-top: 14px;

    min-height: 46px;

    font-size: 14px;
    font-weight: 700;
    letter-spacing: .03em;
}

.voucher-ref {
    margin-top: 5px;
}

.is-hidden {
    display: none !important;
}


/* =========================================================
   POS SMALL FORM CONTROL
   ========================================================= */

.form-control-sm {
    min-height: 30px;

    padding: 5px 7px;

    font-size: 11px;
}

.form-control-vsm {
    min-height: 1px;

    padding: 5px 7px;
}

.pos-cart-table .form-control-sm {
    width: 100%;
}


/* =========================================================
   POS RESPONSIVE
   ========================================================= */

@media (max-width: 1100px) {

    .pos-layout {
        grid-template-columns:
            220px
            minmax(0, 1fr);
    }

    .pos-payment-panel {
        grid-column: 1 / -1;
    }

    .pos-payment-panel .pos-panel {
        max-width: none;
    }
}


@media (max-width: 700px) {

    .pos-container {
        padding: 12px;
    }

    .pos-page-header {
        margin-bottom: 10px;
    }

    .pos-page-title {
        font-size: 18px;
    }

    .pos-info-bar {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .pos-transaction-info {
        width: 100%;
        justify-content: space-between;
        gap: 10px;
    }

    .pos-layout {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .pos-payment-panel {
        grid-column: auto;
    }

    .pos-cart-body {
        padding-left: 8px;
        padding-right: 8px;
    }

    .pos-cart-table {
        min-width: 720px;
    }

    .pos-cart-total {
        justify-content: space-between;
    }

    .pos-cart-total strong {
        min-width: 0;
        font-size: 18px;
    }

    .pos-payment-row {
        grid-template-columns:
            85px
            minmax(0, 1fr)
            28px;
    }
}

/* =========================================================
   PURCHASE / PEMBELIAN FORM
   ========================================================= */

.purchase-section {
    margin-bottom: 24px;
}

.purchase-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.purchase-meta-full {
    grid-column: 1 / -1;
}


/* =========================================================
   PURCHASE MAIN GRID
   ========================================================= */

.purchase-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}

.purchase-detail-card,
.purchase-summary-card {
    min-width: 0;
}


/* =========================================================
   CARD BODY WITHOUT PADDING
   ========================================================= */

.card-body-no-padding {
    padding: 0;
}


/* =========================================================
   PURCHASE TABLE
   ========================================================= */

.purchase-table {
    min-width: 900px;
}

.purchase-table th,
.purchase-table td {
    vertical-align: middle;
}

.purchase-table .form-control {
    min-height: 32px;
    padding: 5px 8px;
    font-size: 12px;
}

.purchase-table .product-select {
    min-width: 220px;
}

.purchase-table .qty-input {
    width: 72px;
    margin: 0 auto;
}

.purchase-table .harga-input,
.purchase-table .diskon-input,
.purchase-table .ppn-input,
.purchase-table .subtotal-input {
    width: 110px;
    margin-left: auto;
}


/* =========================================================
   TABLE ACTION
   ========================================================= */

.btn-table {
    min-height: 28px;
    padding: 4px 8px;
    font-size: 11px;
    white-space: nowrap;
}


/* =========================================================
   PURCHASE TOTAL
   ========================================================= */

.purchase-total-box {
    padding: 16px;
    background: var(--color-secondary-light);
    border: 1px solid #C9DEE2;
    border-radius: var(--radius-md);
}

.purchase-total-label {
    display: block;
    margin-bottom: 6px;
    color: var(--color-text-secondary);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.purchase-grand-total {
    display: block;
    color: var(--color-primary);
    font-size: 24px;
    line-height: 1.2;
    font-weight: 700;
}


/* =========================================================
   PAYMENT
   ========================================================= */

.purchase-payment-section {
    margin-top: 24px;
}

.purchase-payment-title {
    margin-bottom: 10px;
    color: var(--color-text);
    font-size: 13px;
    font-weight: 600;
}

.purchase-payment-summary {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

.purchase-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 6px 0;
}

.purchase-summary-row span {
    color: var(--color-text-secondary);
    font-size: 13px;
}

.purchase-summary-row strong {
    color: var(--color-text);
    font-size: 14px;
}

.purchase-summary-diff {
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px dashed var(--color-border);
}

.purchase-diff-positive {
    color: var(--color-success) !important;
}

.purchase-diff-negative {
    color: var(--color-danger) !important;
}


/* =========================================================
   SUBMIT
   ========================================================= */

.purchase-submit {
    width: 100%;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1000px) {

    .purchase-form-grid {
        grid-template-columns: 1fr;
    }

    .purchase-summary-card {
        order: -1;
    }

}


@media (max-width: 700px) {

    .purchase-meta-grid {
        grid-template-columns: 1fr;
    }

    .purchase-meta-full {
        grid-column: auto;
    }

    .purchase-form-grid {
        gap: 16px;
    }

    .purchase-grand-total {
        font-size: 21px;
    }

}

/* =========================================================
   LIST FILTER
   ========================================================= */

.list-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 320px;
}

.list-filter .form-control {
    min-width: 240px;
}


/* =========================================================
   TABLE REFINEMENT
   ========================================================= */

.table-col-no {
    width: 52px;
}

.table-col-action {
    width: 100px;
}

.table-primary-text {
    color: var(--color-primary);
}

.table-amount {
    color: var(--color-primary);
    white-space: nowrap;
}

/* .table-date {
    display: block;
    color: var(--color-text);
} */

.table-time {
    display: block;
    margin-top: 2px;
    color: var(--color-text-muted);
    font-size: 11px;
}


/* =========================================================
   TABLE BUTTON
   ========================================================= */

.btn-table {
    min-height: 28px;
    padding: 4px 9px;
    font-size: 11px;
    white-space: nowrap;
}


/* =========================================================
   PURCHASE DETAIL
   ========================================================= */

.purchase-detail-card {
    margin-bottom: var(--space-5);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.detail-item {
    padding: 14px 16px;
    border-bottom: 1px solid var(--color-border-light);
}

.detail-item:nth-child(odd) {
    border-right: 1px solid var(--color-border-light);
}

.detail-item-wide {
    grid-column: 1 / -1;
    border-right: 0;
}

.detail-label {
    margin-bottom: 5px;
    color: var(--color-text-muted);
    font-size: 12px;
}

.detail-value {
    color: var(--color-text);
    font-size: 14px;
    font-weight: 500;
}

.detail-value-primary {
    color: var(--color-primary);
    font-weight: 700;
}

.detail-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: var(--space-5);
}


/* =========================================================
   PURCHASE DETAIL TABLE
   ========================================================= */

.purchase-detail-table th {
    white-space: nowrap;
}

.purchase-detail-table td {
    vertical-align: middle;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 700px) {

    .list-filter {
        width: 100%;
        min-width: 0;
    }

    .list-filter .form-control {
        min-width: 0;
        flex: 1;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-item {
        border-right: 0 !important;
    }

    .detail-item-wide {
        grid-column: auto;
    }

}

/* =========================================================
   REPORT MENU
   ========================================================= */

.report-menu-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.report-menu-header {
    min-height: 56px;
}

.report-menu-heading {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
}

.report-menu-list {
    flex: 1;
}

.report-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);

    min-height: 72px;
    padding: 14px 16px;

    color: inherit;
    text-decoration: none;

    border-bottom: 1px solid var(--color-border-light);

    transition:
        background-color 120ms ease,
        border-color 120ms ease;
}

.report-menu-item:last-child {
    border-bottom: 0;
}

.report-menu-item:hover {
    background: var(--color-surface-soft);
    border-left: 3px solid var(--color-secondary);
    padding-left: 13px;
}

.report-menu-content {
    min-width: 0;
}

.report-menu-title {
    color: var(--color-text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.report-menu-item:hover .report-menu-title {
    color: var(--color-primary);
}

.report-menu-description {
    margin-top: 4px;

    color: var(--color-text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.report-menu-arrow {
    flex: 0 0 auto;

    color: var(--color-text-light);
    font-size: 18px;
    line-height: 1;
}

.report-menu-item:hover .report-menu-arrow {
    color: var(--color-secondary);
}

/* =========================================================
   REPORT FILTER
   ========================================================= */

.report-filter {
    margin-bottom: var(--space-5);
    padding: var(--space-4);

    background: var(--color-surface);

    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-sm);
}


/* GRID */

.report-filter-grid {
    display: grid;

    grid-template-columns:
        repeat(6, minmax(0, 1fr));

    gap: var(--space-4);

    align-items: end;
}


/* FORM GROUP */

.report-filter-grid .form-group {
    min-width: 0;
    margin: 0;
}


/* LABEL */

.report-filter-grid .form-label {
    display: block;

    margin-bottom: 6px;

    line-height: 1.2;
}


/* INPUT / SELECT */

.report-filter .form-control {
    display: block;

    width: 100%;
    height: 38px;
    min-height: 38px;

    padding: 8px 10px;

    box-sizing: border-box;

    background: #FFFFFF;

    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);

    color: var(--color-text);

    font-size: 13px;
    line-height: 20px;

    outline: none;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}


/* SEARCH */

.report-filter-search {
    grid-column: span 2;
}


/* ACTIONS */

.report-filter-actions {
    display: flex;
    flex-direction: column;
}

.report-filter-buttons {
    display: flex;

    align-items: center;

    gap: var(--space-2);

    height: 38px;
}


/* BUTTON */

.report-filter-buttons .btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    height: 38px;
    min-height: 38px;

    padding: 7px 14px;

    box-sizing: border-box;

    white-space: nowrap;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1000px) {

    .report-filter-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .report-filter-search {
        grid-column: span 2;
    }

}


@media (max-width: 700px) {

    .report-filter-grid {
        grid-template-columns: 1fr;
    }

    .report-filter-search {
        grid-column: auto;
    }

    .report-filter-buttons {
        width: 100%;
    }

    .report-filter-buttons .btn {
        flex: 1;
    }

}




/* =========================================================
   REPORT PAGINATION
   ========================================================= */

.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: var(--space-4);

    margin-top: var(--space-5);
    padding-top: var(--space-4);

    border-top: 1px solid var(--color-border);
}

.pagination-info {
    color: var(--color-text-muted);
    font-size: 13px;
}

.pagination-info strong {
    color: var(--color-text);
}

.pagination {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: var(--space-1);
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 34px;
    padding: 6px 10px;

    color: var(--color-text-secondary);
    background: var(--color-white);

    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);

    font-size: 12px;
    text-decoration: none;
}

.pagination-link:hover {
    color: var(--color-primary);
    background: var(--color-surface-soft);
    border-color: var(--color-primary-light);
}

.pagination-link.is-active {
    color: var(--color-white);
    background: var(--color-primary);
    border-color: var(--color-primary);
}

@media (max-width: 700px) {

    .pagination-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .pagination {
        justify-content: flex-start;
    }

}

/* =========================================================
   REPORT SUMMARY
   ========================================================= */

.report-summary {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: var(--space-4);

    margin-bottom: var(--space-5);
}

.report-summary-item {
    padding: var(--space-4);

    background: var(--color-surface);

    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);

    box-shadow: var(--shadow-sm);
}

.report-summary-label {
    margin-bottom: 6px;

    color: var(--color-text-muted);
    font-size: 12px;
}

.report-summary-value {
    color: var(--color-primary);

    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

@media (max-width: 1000px) {

    .report-summary {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 700px) {

    .report-summary {
        grid-template-columns: 1fr;
    }

}

/* =========================================================
   REPORT TABLE
   ========================================================= */

.report-table-wrapper {
    margin-bottom: var(--space-5);
}

.report-table {
    min-width: 760px;
}

.report-table th {
    white-space: nowrap;
}

.report-table td {
    vertical-align: middle;
}

.report-number-column {
    width: 52px;
    text-align: center !important;
}

.report-table-empty {
    padding: var(--space-6);

    color: var(--color-text-muted);
}

.report-table-footer td {
    padding: 10px 12px;

    background: var(--color-surface-soft);

    border-top: 2px solid var(--color-border);

    color: var(--color-text);
    font-weight: 700;
}

/* =========================================================
   REPORT TOOLBAR
   ========================================================= */

.report-toolbar {
    display: flex;
    justify-content: flex-end;

    margin-bottom: var(--space-5);
}

.report-toolbar-actions {
    display: flex;
    align-items: center;

    gap: var(--space-2);
}

@media (max-width: 700px) {

    .report-toolbar {
        justify-content: stretch;
    }

    .report-toolbar-actions {
        width: 100%;
    }

    .report-toolbar-actions .btn {
        flex: 1;
    }

}

/* =========================================================
   REPORT DETAIL / BUKU BESAR
   ========================================================= */

.report-ledger-card {
    margin-top: var(--space-5);
}

.report-card-meta {
    margin-top: 3px;

    color: var(--color-text-muted);
    font-size: 12px;
}

.report-reference {
    color: var(--color-text);
    font-weight: 500;
}

.report-reference-type {
    margin-top: 2px;

    color: var(--color-text-muted);
    font-size: 11px;
    text-transform: capitalize;
}

.report-balance {
    color: var(--color-primary);
    font-weight: 700;
}

.text-nowrap {
    white-space: nowrap;
}

/* =========================================================
   REPORT COMPONENTS
   ========================================================= */

.card-subtitle {
    margin-top: 3px;
    color: var(--color-text-muted);
    font-size: 12px;
    line-height: 1.4;
}


/* ---------------------------------------------------------
   Journal
   --------------------------------------------------------- */

.report-journal-card {
    margin-bottom: var(--space-6);
}

.report-journal-header {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-6);
}

.report-journal-meta {
    flex: 0 0 auto;
    text-align: right;
    color: var(--color-text-secondary);
    font-size: 12px;
    line-height: 1.6;
}

.report-journal-meta div {
    white-space: nowrap;
}

.report-journal-meta span {
    color: var(--color-text-muted);
    margin-right: 5px;
}

.report-journal-meta strong {
    color: var(--color-text);
}

.report-table-wrapper {
    border-top: 0;
}


/* ---------------------------------------------------------
   Report reference
   --------------------------------------------------------- */

.report-reference-type {
    margin-top: 2px;
    color: var(--color-text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .03em;
}


/* ---------------------------------------------------------
   Report account
   --------------------------------------------------------- */

.report-account-name {
    margin-left: 6px;
    color: var(--color-text-secondary);
}


/* ---------------------------------------------------------
   Section rows
   --------------------------------------------------------- */

.report-section-row th {
    padding: 11px 12px;
    background: var(--color-secondary-light);
    color: var(--color-primary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}


/* ---------------------------------------------------------
   Total rows
   --------------------------------------------------------- */

.report-total-row th {
    padding-top: 10px;
    padding-bottom: 10px;
    background: var(--color-surface-soft);
    border-top: 1px solid var(--color-border);
    color: var(--color-primary);
}

.report-total-highlight th {
    background: var(--color-secondary-light);
    color: var(--color-primary);
    font-weight: 700;
}


/* ---------------------------------------------------------
   Report spacer
   --------------------------------------------------------- */

.report-spacer-row td {
    height: 18px;
    padding: 0;
    background: var(--color-background);
    border: 0;
}


/* ---------------------------------------------------------
   Laba Rugi
   --------------------------------------------------------- */

.report-profit-row th {
    padding: 15px 12px;
    background: var(--color-primary);
    color: var(--color-white);
    border-top: 2px solid var(--color-primary-dark);
    font-size: 14px;
}

.report-profit-row th:last-child {
    font-size: 16px;
}


/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */

@media (max-width: 700px) {

    .report-journal-header {
        flex-direction: column;
        gap: var(--space-3);
    }

    .report-journal-meta {
        width: 100%;
        text-align: left;
    }

    .report-journal-meta div {
        white-space: normal;
    }

    .report-account-name {
        display: block;
        margin-left: 0;
        margin-top: 2px;
    }

}

/* =========================================================
   REPORT PRINT HEADER
   ========================================================= */

.print-header {
    display: none;
}

@media print {

    .print-header {
        display: block;

        margin-bottom: 20px;
        padding-bottom: 12px;

        text-align: center;

        border-bottom: 2px solid #000;
    }

    .print-company-name {
        font-size: 18px;
        font-weight: 700;
        text-transform: uppercase;
    }

    .print-company-subtitle {
        margin-top: 2px;

        font-size: 11px;
    }

    .print-report-title {
        margin-top: 12px;

        font-size: 16px;
        font-weight: 700;
        text-transform: uppercase;
    }

    .print-report-period,
    .print-report-date {
        margin-top: 3px;

        font-size: 10px;
    }


    .no-print {
        display: none !important;
    }

    body {
        background: #fff !important;
        color: #000 !important;
    }

    .app-header,
    .app-navbar,
    .app-footer {
        display: none !important;
    }

    .app-main {
        padding: 0 !important;
    }

    .app-container {
        max-width: none !important;
        padding: 0 !important;
    }

    .card {
        border: 0 !important;
        box-shadow: none !important;
    }

    .report-filter,
    .report-toolbar {
        display: none !important;
    }

    .table-wrapper {
        overflow: visible !important;
        border: 0 !important;
    }

    .report-table {
        width: 100% !important;
        min-width: 0 !important;
        border-collapse: collapse !important;
    }

    .report-table th,
    .report-table td {
        border: 1px solid #000 !important;
        padding: 6px 8px !important;

        color: #000 !important;
        background: #fff !important;
    }

    .report-table thead th {
        background: #f2f2f2 !important;
    }

    .report-table-footer td {
        background: #f2f2f2 !important;
        border-top: 2px solid #000 !important;
    }

    .report-summary {
        grid-template-columns: repeat(4, 1fr) !important;
    }

    .report-summary-item {
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }

}

/* =========================================================
   DASHBOARD
   ========================================================= */

.dashboard-stat-grid {
    margin-bottom: var(--space-6);
}

.dashboard-stat-card {
    padding: var(--space-5);
    border-top: 3px solid var(--color-primary);
}

.dashboard-stat-label {
    color: var(--color-text-muted);
    font-size: 13px;
    font-weight: 500;
}

.dashboard-stat-value {
    margin-top: 6px;
    color: var(--color-primary);
    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;
}


.dashboard-summary-grid {
    margin-bottom: var(--space-6);
}

.dashboard-summary-card {
    min-height: 110px;
}

.dashboard-summary-label {
    color: var(--color-text-muted);
    font-size: 13px;
}

.dashboard-summary-value {
    margin-top: 8px;
    color: var(--color-primary);
    font-size: 24px;
    line-height: 1.25;
    font-weight: 700;
}


.dashboard-shift {
    margin-bottom: var(--space-6);
}

.dashboard-shift .card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
}

.dashboard-shift-active {
    border-left: 4px solid var(--color-success);
}

.dashboard-shift-closed {
    border-left: 4px solid var(--color-warning);
}

.dashboard-shift-title {
    color: var(--color-primary);
    font-size: 14px;
    font-weight: 700;
}

.dashboard-shift-description {
    margin-top: 3px;
    color: var(--color-text-muted);
    font-size: 12px;
}

.dashboard-shift-balance {
    text-align: right;
}

.dashboard-shift-balance span {
    display: block;
    color: var(--color-text-muted);
    font-size: 12px;
}

.dashboard-shift-balance strong {
    display: block;
    margin-top: 3px;
    color: var(--color-primary);
    font-size: 18px;
}


@media (max-width: 700px) {

    .dashboard-shift .card-body {
        align-items: flex-start;
        flex-direction: column;
        gap: var(--space-4);
    }

    .dashboard-shift-balance {
        width: 100%;
        text-align: left;
    }

}

/* =========================================================
   AUTH / LOGIN
   ========================================================= */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
    background: var(--color-background);
}

.auth-card {
    width: 100%;
    max-width: 400px;
    padding: 32px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-top: 4px solid var(--color-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.auth-header {
    margin-bottom: var(--space-6);
    text-align: center;
}

.auth-brand-mark {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    background: var(--color-primary);
    color: var(--color-white);
    border-radius: var(--radius-md);
    font-size: 22px;
    font-weight: 700;
}

.auth-title {
    margin: 0;
    color: var(--color-primary);
    font-size: 24px;
    line-height: 1.25;
    font-weight: 700;
}

.auth-subtitle {
    margin: 5px 0 0;
    color: var(--color-text-muted);
    font-size: 13px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.auth-form .form-group {
    margin-bottom: 0;
}

.auth-submit {
    width: 100%;
    margin-top: var(--space-2);
}

.auth-footer {
    margin-top: var(--space-6);
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-border-light);
    color: var(--color-text-light);
    font-size: 11px;
    text-align: center;
}

.auth-body {
    margin: 0;
    min-height: 100vh;
    background: var(--color-background);
}


@media (max-width: 480px) {

    .auth-page {
        padding: var(--space-4);
    }

    .auth-card {
        padding: 24px 20px;
    }

}

/* =========================================================
   SETTINGS
   ========================================================= */

.settings-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: var(--space-5);

    margin-bottom: var(--space-5);
}

.settings-actions-card {
    margin-bottom: var(--space-5);
}

.settings-actions-card .card-footer {
    min-height: 60px;
}


@media (max-width: 900px) {

    .settings-grid {
        grid-template-columns: 1fr;
    }

}


@media (max-width: 700px) {

    .settings-actions-card .card-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .settings-actions-card .card-footer-actions {
        justify-content: stretch;
    }

    .settings-actions-card .btn {
        width: 100%;
    }

}