/* POS BKY v1.5 - Custom UI */

:root {
    --app-sidebar-width: 260px;
    --app-sidebar-collapsed: 78px;
    --app-topbar-height: 68px;

    --app-bg: #f5f7fb;
    --app-surface: #ffffff;
    --app-border: #e5e9f0;

    --app-text: #1f2937;
    --app-muted: #6b7280;

    --app-primary: #1f6feb;
    --app-primary-soft: #eaf2ff;

    --app-sidebar-bg: #111827;
    --app-sidebar-text: #cbd5e1;
    --app-sidebar-hover: rgba(255,255,255,.07);

    --app-radius: 14px;
    --app-shadow: 0 8px 26px rgba(15,23,42,.06);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;

    background: var(--app-bg);
    color: var(--app-text);

    font-family:
        system-ui,
        -apple-system,
        "Segoe UI",
        Tahoma,
        Arial,
        sans-serif;
}

/* Topbar */
.app-topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: var(--app-sidebar-width);
    z-index: 1030;

    height: var(--app-topbar-height);

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 20px;

    background: rgba(255,255,255,.97);
    border-bottom: 1px solid var(--app-border);

    transition: left .2s ease;
}

body.app-sidebar-collapsed .app-topbar {
    left: var(--app-sidebar-collapsed);
}

.app-topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-icon-btn {
    width: 40px;
    height: 40px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--app-border);
    border-radius: 10px;

    background: #fff;
    color: var(--app-text);

    font-size: 1.25rem;
}

.app-topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;

    color: var(--app-text);
    text-decoration: none;
}

.app-topbar-brand:hover {
    color: var(--app-text);
}

.app-brand-mark {
    width: 38px;
    height: 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background: var(--app-primary);
    color: #fff;
}

.app-topbar-brand > span:last-child {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.app-topbar-brand small {
    margin-top: 4px;
    color: var(--app-muted);
    font-size: .72rem;
}

.app-user-button {
    display: flex;
    align-items: center;
    gap: 9px;

    padding: 5px 8px;

    border: 0;
    border-radius: 12px;

    background: transparent;
}

.app-user-button:hover {
    background: #f8fafc;
}

.app-user-avatar {
    width: 38px;
    height: 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: var(--app-primary-soft);
    color: var(--app-primary);

    font-size: 1.15rem;
}

.app-user-meta {
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
}

.app-user-meta strong {
    max-width: 190px;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    font-size: .9rem;
}

.app-user-meta small {
    margin-top: 4px;
    color: var(--app-muted);
    font-size: .72rem;
}

/* Sidebar */
.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;

    width: var(--app-sidebar-width);

    flex-direction: column;

    background: var(--app-sidebar-bg);
    color: var(--app-sidebar-text);

    transition: width .2s ease;
}

.app-sidebar-brand {
    height: var(--app-topbar-height);

    display: flex;
    align-items: center;

    gap: 12px;
    padding: 0 17px;

    color: #fff;

    border-bottom:
        1px solid rgba(255,255,255,.07);
}

.app-sidebar-brand-icon {
    flex: 0 0 42px;

    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: var(--app-primary);
}

.app-sidebar-brand-text {
    min-width: 0;

    display: flex;
    flex-direction: column;

    line-height: 1.05;
    white-space: nowrap;
}

.app-sidebar-brand-text small {
    margin-top: 5px;
    color: #94a3b8;
    font-size: .7rem;
}

.app-sidebar-nav {
    flex: 1;
    overflow-y: auto;

    padding: 14px 10px;
}

.app-nav-section {
    padding: 16px 12px 7px;

    color: #64748b;

    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .09em;
}

.app-nav-link {
    min-height: 44px;

    display: flex;
    align-items: center;
    gap: 12px;

    margin-bottom: 4px;
    padding: 9px 12px;

    border-radius: 10px;

    color: var(--app-sidebar-text);
    text-decoration: none;

    transition:
        background .15s ease,
        color .15s ease;
}

.app-nav-link > i {
    flex: 0 0 22px;
    text-align: center;
    font-size: 1.05rem;
}

.app-nav-link > span:not(.app-nav-badge) {
    min-width: 0;
    flex: 1;
}

.app-nav-link:hover {
    color: #fff;
    background: var(--app-sidebar-hover);
}

.app-nav-link.is-active {
    color: #fff;
    background: var(--app-primary);
}

.app-nav-link.is-disabled {
    opacity: .60;
    cursor: default;
}

.app-nav-badge {
    padding: 3px 7px;

    border-radius: 999px;

    background: rgba(255,255,255,.1);
    color: #dbeafe;

    font-size: .65rem;
}

.app-sidebar-footer {
    padding: 13px 20px;

    color: #64748b;

    border-top:
        1px solid rgba(255,255,255,.07);

    font-size: .72rem;
}

/* Collapsed */
body.app-sidebar-collapsed .app-sidebar {
    width: var(--app-sidebar-collapsed);
}

body.app-sidebar-collapsed .app-sidebar-brand {
    justify-content: center;
    padding: 0;
}

body.app-sidebar-collapsed .app-sidebar-brand-text,
body.app-sidebar-collapsed .app-nav-link > span,
body.app-sidebar-collapsed .app-nav-section,
body.app-sidebar-collapsed .app-sidebar-footer {
    display: none;
}

body.app-sidebar-collapsed .app-nav-link {
    justify-content: center;

    padding-left: 0;
    padding-right: 0;
}

body.app-sidebar-collapsed .app-nav-link > i {
    flex-basis: auto;
    font-size: 1.15rem;
}

/* Main */
.app-main {
    min-height: 100vh;

    padding-top: var(--app-topbar-height);
    margin-left: var(--app-sidebar-width);

    transition: margin-left .2s ease;
}

body.app-sidebar-collapsed .app-main {
    margin-left: var(--app-sidebar-collapsed);
}

.app-content {
    padding: 22px;
}

.app-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 16px;

    margin-bottom: 20px;
}

.app-page-title {
    margin: 0;

    font-size: 1.55rem;
    font-weight: 700;
}

.app-page-subtitle {
    margin: 6px 0 0;

    color: var(--app-muted);

    font-size: .9rem;
}

.app-footer {
    min-height: 54px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;
    padding: 12px 22px;

    border-top: 1px solid var(--app-border);
    background: var(--app-surface);

    font-size: .82rem;
}

/* Cards */
.app-card {
    background: var(--app-surface);

    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);

    box-shadow: var(--app-shadow);
}

.app-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    padding: 16px 18px;

    border-bottom: 1px solid var(--app-border);
}

.app-card-title {
    margin: 0;

    font-size: 1rem;
    font-weight: 700;
}

.app-card-body {
    padding: 18px;
}

/* Mobile Sidebar */
.app-mobile-sidebar {
    --bs-offcanvas-width: min(84vw, 300px);

    background: var(--app-sidebar-bg);
    color: var(--app-sidebar-text);
}

.app-mobile-sidebar .offcanvas-header {
    color: #fff;

    border-bottom:
        1px solid rgba(255,255,255,.08);
}

.app-mobile-sidebar .btn-close {
    filter: invert(1);
}

.app-mobile-sidebar .app-sidebar-brand {
    display: none;
}

.app-mobile-sidebar .app-sidebar-footer {
    margin-top: auto;
}

/* Responsive */
@media (max-width: 991.98px) {

    .app-topbar {
        left: 0;
        padding: 0 14px;
    }

    .app-main,
    body.app-sidebar-collapsed .app-main {
        margin-left: 0;
    }

    .app-content {
        padding: 16px;
    }
}

@media (max-width: 575.98px) {

    .app-topbar-brand small {
        display: none;
    }

    .app-page-title {
        font-size: 1.3rem;
    }

    .app-page-header {
        margin-bottom: 15px;
    }

    .app-card-header,
    .app-card-body {
        padding-left: 14px;
        padding-right: 14px;
    }

    .app-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* ========================================================================== */
/* POS BKY v1.20.2 - Global Prompt Typography                                 */
/*                                                                            */
/* Force Prompt on every text UI surface.                                     */
/* Icon font classes are excluded so Bootstrap Icons / Font Awesome survive.  */
/* ========================================================================== */

html,
body,
body *:not(.bi):not([class^="bi-"]):not([class*=" bi-"]):not(.fa):not(.fas):not(.far):not(.fal):not(.fab):not([class^="fa-"]):not([class*=" fa-"]) {
    font-family:
        "Prompt",
        sans-serif !important;
}

/* Native form controls */
button,
input,
select,
textarea,
optgroup,
option,
label,
legend,
fieldset,
.form-control,
.form-select,
.input-group-text,
.btn {
    font-family:
        "Prompt",
        sans-serif !important;
}

/* Bootstrap */
.modal,
.modal-title,
.modal-body,
.modal-footer,
.dropdown-menu,
.dropdown-item,
.nav,
.nav-link,
.navbar,
.breadcrumb,
.pagination,
.page-link,
.badge,
.tooltip,
.popover {
    font-family:
        "Prompt",
        sans-serif !important;
}

/* DataTables */
div.dt-container,
div.dt-container *,
table.dataTable,
table.dataTable th,
table.dataTable td,
.dt-info,
.dt-search,
.dt-length,
.dt-paging,
.dt-button {
    font-family:
        "Prompt",
        sans-serif !important;
}

/* Select2 */
.select2-container,
.select2-container *,
.select2-results,
.select2-results *,
.select2-selection,
.select2-selection *,
.select2-search,
.select2-search * {
    font-family:
        "Prompt",
        sans-serif !important;
}

/* SweetAlert2 */
.swal2-container,
.swal2-popup,
.swal2-title,
.swal2-html-container,
.swal2-actions,
.swal2-input,
.swal2-textarea,
.swal2-select,
.swal2-confirm,
.swal2-cancel,
.swal2-deny {
    font-family:
        "Prompt",
        sans-serif !important;
}

/* Toastr */
#toast-container,
#toast-container *,
.toast,
.toast-title,
.toast-message {
    font-family:
        "Prompt",
        sans-serif !important;
}

/* POS / cards / tables / forms */
.app-main,
.app-content,
.app-card,
.app-card *,
.table,
.table *,
.card,
.card *,
.form-label,
.form-text,
.offcanvas,
.offcanvas *,
.accordion,
.accordion *,
.list-group,
.list-group *,
.alert {
    font-family:
        "Prompt",
        sans-serif !important;
}


.app-sidebar-brand-logo {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    padding: 4px;
    border-radius: inherit;
}


/* =========================================================
   v1.26.3 Report Hub - Sidebar Submenu
========================================================= */
.app-nav-group { margin: 0; }
.app-nav-group > summary { list-style: none; cursor: pointer; }
.app-nav-group > summary::-webkit-details-marker { display: none; }
.app-nav-group-arrow { margin-left: auto; font-size: .75rem; transition: transform .18s ease; }
.app-nav-group[open] .app-nav-group-arrow { transform: rotate(180deg); }
.app-nav-submenu { display: grid; gap: 3px; margin: 2px 8px 8px 18px; padding-left: 12px; border-left: 1px solid rgba(255,255,255,.12); }
.app-nav-sublink { min-height: 36px; display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 8px; color: rgba(255,255,255,.72); text-decoration: none; font-size: .9rem; }
.app-nav-sublink:hover { color: #fff; background: rgba(255,255,255,.10); }
.app-nav-sublink.is-active {
    color: #172033;
    background: #fff;
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .10);
}
.app-nav-sublink.is-active > i { color: var(--bs-primary, #0d6efd); }
.app-nav-sublink > i { width: 18px; text-align: center; }
body.app-sidebar-collapsed .app-nav-group-arrow, body.app-sidebar-collapsed .app-nav-submenu { display: none; }
