@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700&display=swap");
@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css");

:root {
    /* Layout */
    --ace-sidebar-width: 190px;
    --ace-sidebar-collapsed-width: 50px;
    --ace-navbar-height: 45px;

    /* Ace Default Skin Colors */
    --ace-primary: #438EB9;
    --ace-primary-dark: #2C6AA0;
    --ace-sidebar-bg: #F2F2F2;
    --ace-sidebar-active-bg: #FFF;
    --ace-sidebar-group-bg: #FAFAFA;
    --ace-sidebar-text: #585858;
    --ace-sidebar-group-text: #8089A0;

    /* Page / Text */
    --ace-breadcrumb-bg: #F2F2F2;
    --ace-body-bg: #E4E6E9;
    --ace-text-color: #393939;
    --ace-muted-color: #8089A0;
    --ace-link-color: #4C8FBD;

    /* Ace Color Palette (exact from ace.min.css) */
    --ace-green: #87B87F;
    --ace-green-dark: #6A9B62;
    --ace-blue: #6FB3E0;
    --ace-blue-dark: #519ACD;
    --ace-pink: #D6487E;
    --ace-pink-dark: #BF3D6E;
    --ace-red: #D15B47;
    --ace-red-dark: #BA4E3D;
    --ace-orange: #FFB752;
    --ace-orange-dark: #E5A03C;
    --ace-purple: #9585BF;
    --ace-purple-dark: #7D6FAA;
    --ace-grey: #A0A0A0;
    --ace-grey-dark: #888;

    /* Labels (exact from ace.min.css) */
    --ace-label-primary: #428BCA;
    --ace-label-success: #82AF6F;
    --ace-label-info: #3A87AD;
    --ace-label-warning: #F89406;
    --ace-label-danger: #D15B47;
    --ace-label-purple: #9585BF;
    --ace-label-pink: #D6487E;
    --ace-label-grey: #A0A0A0;

    /* Progress bars */
    --ace-progress: #2A91D8;
    --ace-progress-success: #59A84B;
    --ace-progress-warning: #F2BB46;
    --ace-progress-danger: #CA5952;

    /* Text accent colors */
    --ace-text-blue: #478FCA;
    --ace-text-green: #69AA46;
    --ace-text-red: #DD5A43;
    --ace-text-orange: #FF892A;
    --ace-text-purple: #A069C3;
    --ace-text-pink: #C6699F;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Open Sans", "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ace-text-color);
    background-color: var(--ace-body-bg);
    overflow-x: hidden;
}

a {
    color: var(--ace-link-color);
    text-decoration: none;
}

a:hover {
    color: #2C6AA0;
    text-decoration: none;
}

h1 { font-size: 26px; }
h2 { font-size: 22px; }
h3 { font-size: 19px; }
h4 { font-size: 17px; }
h5 { font-size: 15px; }
h6 { font-size: 14px; }

p { margin-bottom: 12px; }

/* ============================================================
   NAVBAR (Ace Top-Menu Style)
   ============================================================ */
.ace-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    height: var(--ace-navbar-height);
    min-height: var(--ace-navbar-height);
    background: #438EB9;
    border: none;
    display: flex;
    align-items: stretch;
    padding: 0;
}

@media (min-width: 992px) {
    .ace-navbar {
        box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.25);
    }
}

.ace-navbar-header {
    display: flex;
    align-items: stretch;
    flex-shrink: 0;
}

.ace-navbar-brand {
    display: flex;
    align-items: center;
    padding: 0 14px;
    color: #FFF;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    text-shadow: none;
    background: transparent;
    white-space: nowrap;
}

.ace-navbar-brand:hover,
.ace-navbar-brand:focus {
    color: #FFF;
    text-decoration: none;
    background: rgba(0, 0, 0, 0.15);
}

.ace-navbar-brand img {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    margin-right: 8px;
    object-fit: cover;
}

.ace-navbar-brand small {
    font-size: 14px;
    font-weight: 700;
    color: inherit;
}

.ace-navbar-toggle {
    display: none;
    background: #75B3D7;
    border: 1px solid transparent;
    padding: 0 12px;
    height: 100%;
    cursor: pointer;
    color: #FFF;
    font-size: 18px;
    line-height: 1;
}

.ace-navbar-toggle:hover {
    background: #61A8D1;
    border-color: rgba(255, 255, 255, 0.1);
    color: #FFF;
}

.ace-navbar-toggle:active {
    background: #4D9DCC;
    box-shadow: inset 1px 1px 2px 0 rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.35);
}

.ace-navbar-toggle .icon-bar {
    background-color: #FFF;
}

.ace-navbar-toggle-user {
    display: none;
}

.ace-navbar-menu {
    flex: 1;
    display: flex;
    align-items: stretch;
    overflow: hidden;
}

.ace-nav {
    display: flex;
    align-items: stretch;
    list-style: none;
    margin: 0 !important;
    padding: 0;
}

.ace-nav > li {
    display: flex;
    align-items: stretch;
    position: relative;
    border-left: 1px solid rgba(255, 255, 255, 0.4);
    padding: 0;
    line-height: var(--ace-navbar-height);
    height: var(--ace-navbar-height);
}

.ace-nav > li:first-child {
    border-left-width: 0;
}

.ace-nav > li > a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px;
    min-width: 50px;
    background-color: #2E6589;
    color: #FFF;
    font-size: 13px;
    font-weight: 400;
    text-decoration: none;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
    white-space: nowrap;
    height: 100%;
    transition: none;
    border-bottom: none;
}

.ace-nav > li > a:hover,
.ace-nav > li > a:focus {
    background-color: #2C5976;
    color: #FFF;
    text-decoration: none;
}

.ace-nav > li.active > a {
    background-color: #2C5976;
    color: #FFF;
}

.ace-nav > li > a .fa {
    font-size: 15px;
    color: #FFF;
    text-align: center;
    width: 20px;
}

.ace-nav > li > a .nav-text {
    font-size: 13px;
}

.ace-navbar-buttons {
    margin-left: auto;
    display: flex;
    align-items: stretch;
    padding: 0 0 0 4px;
    flex-shrink: 0;
}

.ace-nav-dropdown {
    position: relative;
    display: flex;
    align-items: stretch;
}

.ace-nav-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    background: #62A8D1;
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.4);
    cursor: pointer;
    color: #FFF;
    font-size: 13px;
    transition: none;
}

.ace-nav-user-btn:hover {
    background: #579EC8;
}

.ace-nav-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 100%;
    border: 2px solid #FFF;
    background: rgba(255, 255, 255, 0.2);
    color: #FFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
}

.ace-nav-user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.ace-nav-user-info small {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

.ace-nav-user-info span {
    font-size: 13px;
    font-weight: 600;
    color: #FFF;
}

.ace-nav-user-btn .fa-caret-down {
    font-size: 11px;
    opacity: 0.7;
    margin-left: 2px;
}

.ace-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    background: #FFF;
    border: 1px solid #DDD;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    list-style: none;
    margin: 2px 0 0;
    padding: 4px 0;
    display: none;
    z-index: 1050;
}

.ace-dropdown-menu.show {
    display: block;
}

.ace-dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    color: #585858;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.1s;
}

.ace-dropdown-menu li a:hover {
    background: #F4F6F9;
    color: #393939;
    text-decoration: none;
}

.ace-dropdown-menu li a .fa {
    width: 16px;
    text-align: center;
    font-size: 13px;
    opacity: 0.7;
}

/* Mobile user menu toggle */
@media (max-width: 767.98px) {
    .ace-navbar-toggle-user {
        display: flex;
        align-items: center;
    }

    .ace-nav-user-info {
        display: none;
    }
}

/* ============================================================
   SIDEBAR (Ace Top-Menu Style)
   ============================================================ */
.ace-sidebar {
    position: fixed;
    top: var(--ace-navbar-height);
    left: 0;
    bottom: 0;
    width: var(--ace-sidebar-width);
    min-width: var(--ace-sidebar-width);
    background: #F2F2F2;
    border-right: 1px solid #CCC;
    z-index: 1020;
    display: flex;
    flex-direction: column;
    transition: width 0.2s ease, min-width 0.2s ease, transform 0.2s ease;
    overflow: hidden;
}

.ace-sidebar-header {
    display: none;
}

.ace-sidebar-nav {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    margin: 0;
    padding: 4px 0;
    list-style: none;
}

.ace-sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.ace-sidebar-nav::-webkit-scrollbar-thumb {
    background: #C8C8C8;
    border-radius: 4px;
}

.ace-sidebar-nav li {
    margin: 0;
    border-top: 1px solid #E5E5E5;
}

.ace-sidebar-nav li:first-child {
    border-top: none;
}

.ace-sidebar-nav li a {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background-color: #F8F8F8;
    color: #585858;
    font-size: 13px;
    font-weight: 400;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
    border-left: 3px solid transparent;
    cursor: pointer;
}

.ace-sidebar-nav li a:focus {
    background-color: #F8F8F8;
    color: #1963AA;
}

.ace-sidebar-nav li a:hover {
    background: #FFF;
    color: #266CAD;
    text-decoration: none;
}

.ace-sidebar-nav li.open > a {
    background-color: #FAFAFA;
    color: #1963AA;
}

.ace-sidebar-nav li a.active {
    background: #FFF;
    color: #2B7DBC;
    border-left-color: var(--ace-primary);
    font-weight: 700;
}

.ace-sidebar-nav li a.active:focus,
.ace-sidebar-nav li a.active:hover {
    background: #FFF;
}

.ace-sidebar-nav li a .menu-icon {
    width: 18px;
    min-width: 18px;
    margin-right: 10px;
    text-align: center;
    font-size: 14px;
    color: #6A9CC7;
}

.ace-sidebar-nav li a:hover .menu-icon {
    color: var(--ace-primary);
}

.ace-sidebar-nav li a.active .menu-icon {
    color: var(--ace-primary);
}

.ace-sidebar-nav li a .menu-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ace-sidebar-nav li a .arrow {
    margin-left: auto;
    font-size: 12px;
    opacity: 0.5;
    transition: transform 0.2s ease;
}

.ace-sidebar-nav li.open > a .arrow {
    transform: rotate(90deg);
}

.ace-sidebar-nav .nav-group-label {
    padding: 12px 14px 6px;
    color: #8089A0;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-top: 1px solid #DDD;
}

.ace-sidebar-nav .nav-group-label:first-child {
    border-top: none;
    padding-top: 8px;
}

.ace-sidebar-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #FFF;
    border-top: 1px solid #E5E5E5;
    display: none;
}

.ace-sidebar-nav li.open > .ace-sidebar-submenu {
    display: block;
}

.ace-sidebar-submenu li a {
    padding-left: 42px;
    font-size: 13px;
    background-color: #FFF;
    border-top: 1px solid #E4E4E4;
    color: #616161;
}

.ace-sidebar-submenu li a:hover {
    color: #4B88B7;
    background-color: #F1F5F9;
}

.ace-sidebar-submenu li a.active {
    color: #2B7DBC;
}

.ace-sidebar-submenu li a .menu-icon {
    font-size: 6px;
    min-width: 16px;
    margin-right: 8px;
    color: #AABED7;
}

/* Sidebar collapse toggle */
.ace-sidebar-collapse {
    padding: 10px 0;
    text-align: center;
    border-top: 1px solid #DDD;
    flex-shrink: 0;
    background: #F3F3F3;
}

.ace-sidebar-collapse-btn {
    background: none;
    border: none;
    color: #AAA;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 20px;
    border-top: 1px solid #E0E0E0;
    border-bottom: 1px solid #E0E0E0;
    width: 100%;
    background-color: #F3F3F3;
}

.ace-sidebar-collapse-btn i {
    background: #FFF;
    border: 1px solid #BBB;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 20px;
    color: #AAA;
}

.ace-sidebar-collapse-btn:hover i {
    background: #F5F5F5;
    color: #666;
}

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */
.ace-main {
    margin-left: var(--ace-sidebar-width);
    min-height: 100vh;
    padding-top: var(--ace-navbar-height);
    transition: margin-left 0.2s ease;
    display: flex;
    flex-direction: column;
}

/* Breadcrumbs */
.ace-breadcrumbs {
    background: #F2F2F2;
    border-bottom: 1px solid #DDD;
    padding: 9px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    flex-shrink: 0;
}

.ace-breadcrumbs .breadcrumb {
    background: none;
    margin: 0;
    padding: 0;
    font-size: 13px;
    border-radius: 0;
}

.ace-breadcrumbs .breadcrumb-item a {
    color: #4C8FBD;
    font-weight: 600;
}

.ace-breadcrumbs .breadcrumb-item a:hover {
    color: #2C6AA0;
}

.ace-breadcrumbs .breadcrumb-item.active {
    color: #8089A0;
}

.ace-breadcrumbs .breadcrumb-item + .breadcrumb-item::before {
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    padding: 0 6px;
    color: #CCC;
}

/* Page content */
.ace-page-content {
    flex: 1 1 auto;
    padding: 16px;
}

/* Page header */
.ace-page-header {
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #DDD;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.ace-page-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 400;
    color: #2679B5;
}

.ace-page-header h1 small {
    margin-left: 8px;
    font-size: 15px;
    color: #8089A0;
    font-weight: 300;
}

/* ============================================================
   WIDGET BOXES
   ============================================================ */
.ace-widget {
    background: #FFF;
    border: 1px solid #DDD;
    margin-bottom: 16px;
}

.ace-widget-header {
    padding: 10px 14px;
    background: #F8F8F8;
    border-bottom: 1px solid #DDD;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 40px;
}

.ace-widget-header h5,
.ace-widget-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #669FC7;
}

.ace-widget-header-flat {
    background: transparent;
    border-bottom: none;
}

.ace-widget-body {
    padding: 14px;
}

.ace-widget-main {
    padding: 14px;
}

.ace-widget-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ace-widget-toolbar .btn {
    padding: 2px 8px;
    font-size: 13px;
}

/* ============================================================
   INFOBOXES (Dashboard stat cards)
   ============================================================ */
.ace-infobox {
    background: #FFF;
    border: 1px solid #DDD;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
}

.ace-infobox::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.ace-infobox-green::before { background: var(--ace-green); }
.ace-infobox-blue::before { background: var(--ace-blue); }
.ace-infobox-pink::before { background: var(--ace-pink); }
.ace-infobox-red::before { background: var(--ace-red); }
.ace-infobox-orange::before { background: var(--ace-orange); }
.ace-infobox-purple::before { background: var(--ace-purple); }

.ace-infobox-icon {
    font-size: 24px;
    opacity: 0.8;
    width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.ace-infobox-green .ace-infobox-icon { color: var(--ace-green); }
.ace-infobox-blue .ace-infobox-icon { color: var(--ace-blue); }
.ace-infobox-pink .ace-infobox-icon { color: var(--ace-pink); }
.ace-infobox-red .ace-infobox-icon { color: var(--ace-red); }
.ace-infobox-orange .ace-infobox-icon { color: var(--ace-orange); }
.ace-infobox-purple .ace-infobox-icon { color: var(--ace-purple); }

.ace-infobox-data {
    flex: 1;
    min-width: 0;
}

.ace-infobox-number {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.1;
    color: #393939;
}

.ace-infobox-content {
    font-size: 13px;
    color: #8089A0;
    margin-top: 2px;
}

.ace-infobox-stat {
    padding: 3px 7px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 3px;
    white-space: nowrap;
    flex-shrink: 0;
}

.ace-infobox-stat.stat-success {
    background: #EDF3EA;
    color: #69AA46;
}

.ace-infobox-stat.stat-important {
    background: #FCF4F2;
    color: #DD5A43;
}

/* ============================================================
   BUTTONS (Ace Color Theme - exact hex values)
   ============================================================ */
.btn-ace {
    background: var(--ace-primary);
    border-color: var(--ace-primary);
    color: #fff;
}

.btn-ace:hover {
    background: var(--ace-primary-dark);
    border-color: var(--ace-primary-dark);
    color: #fff;
}

.btn-ace-outline {
    background: transparent;
    border: 1px solid var(--ace-primary);
    color: var(--ace-primary);
}

.btn-ace-outline:hover {
    background: var(--ace-primary);
    color: #fff;
}

/* Ace Button Color Overrides (exact from ace.min.css) */
.btn-success {
    background-color: #87B87F;
    border-color: #87B87F;
    color: #fff;
}

.btn-success:hover,
.btn-success:focus {
    background-color: #6A9B62;
    border-color: #6A9B62;
    color: #fff;
}

.btn-info {
    background-color: #6FB3E0;
    border-color: #6FB3E0;
    color: #fff;
}

.btn-info:hover,
.btn-info:focus {
    background-color: #519ACD;
    border-color: #519ACD;
    color: #fff;
}

.btn-warning {
    background-color: #FFB752;
    border-color: #FFB752;
    color: #fff;
}

.btn-warning:hover,
.btn-warning:focus {
    background-color: #E5A03C;
    border-color: #E5A03C;
    color: #fff;
}

.btn-danger {
    background-color: #D15B47;
    border-color: #D15B47;
    color: #fff;
}

.btn-danger:hover,
.btn-danger:focus {
    background-color: #BA4E3D;
    border-color: #BA4E3D;
    color: #fff;
}

.btn-purple {
    background-color: #9585BF;
    border-color: #9585BF;
    color: #fff;
}

.btn-purple:hover,
.btn-purple:focus {
    background-color: #7D6FAA;
    border-color: #7D6FAA;
    color: #fff;
}

.btn-pink {
    background-color: #D6487E;
    border-color: #D6487E;
    color: #fff;
}

.btn-pink:hover,
.btn-pink:focus {
    background-color: #BF3D6E;
    border-color: #BF3D6E;
    color: #fff;
}

.btn-grey,
.btn-default {
    background-color: #A0A0A0;
    border-color: #A0A0A0;
    color: #fff;
}

.btn-grey:hover,
.btn-default:hover {
    background-color: #888;
    border-color: #888;
    color: #fff;
}

.btn-inverse {
    background-color: #555;
    border-color: #555;
    color: #fff;
}

.btn-inverse:hover {
    background-color: #404040;
    border-color: #404040;
    color: #fff;
}

.btn-primary {
    background-color: #428BCA;
    border-color: #428BCA;
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #357EBD;
    border-color: #357EBD;
    color: #fff;
}

/* ============================================================
   TABLES (Ace Default Theme)
   ============================================================ */

/* Override Bootstrap .table with Ace defaults */
.table {
    background-color: #FFF;
    color: #393939;
}

.table > thead > tr {
    color: #707070;
    font-weight: 400;
    background-color: #F2F2F2;
    background-image: linear-gradient(to bottom, #F8F8F8, #ECECEC);
}

.table > thead > tr > th {
    border-bottom: 2px solid #DDD;
    border-color: #DDD;
    font-weight: 700;
    color: #707070;
    background-color: transparent;
}

.table > tbody > tr > td,
.table > tbody > tr > th {
    border-top: 1px solid #DDD;
    background-color: #FFF;
    color: #393939;
}

.table-hover > tbody > tr:hover {
    background-color: #F5F5F5;
}

.table-hover > tbody > tr:hover > td,
.table-hover > tbody > tr:hover > th {
    background-color: #F5F5F5;
}

.table-striped > tbody > tr:nth-of-type(odd) > td,
.table-striped > tbody > tr:nth-of-type(odd) > th {
    background-color: #F9F9F9;
}

.table > tbody > tr.active > td,
.table > tbody > tr.active > th {
    background-color: #F5F5F5;
}

.table-hover > tbody > tr.active:hover > td,
.table-hover > tbody > tr.active:hover > th {
    background-color: #E8E8E8;
}

.table-bordered,
.table-bordered > thead > tr > th,
.table-bordered > thead > tr > td,
.table-bordered > tbody > tr > td,
.table-bordered > tbody > tr > th {
    border: 1px solid #DDD;
}

.table-bordered > thead > tr > th:first-child,
.table-bordered > thead > tr > td:first-child {
    border-left-color: #F1F1F1;
}

.table-bordered > thead > tr > th:last-child,
.table-bordered > thead > tr > td:last-child {
    border-right-color: #F1F1F1;
}

.table-bordered > thead > tr > th {
    border-bottom-width: 2px;
}

/* Override table-dark (used in many pages) */
.thead-dark,
.table-dark thead {
    background-color: #F2F2F2 !important;
    background-image: linear-gradient(to bottom, #F8F8F8, #ECECEC) !important;
    color: #707070 !important;
}

.thead-dark th,
.table-dark thead th {
    background-color: transparent !important;
    color: #707070 !important;
    border-color: #DDD !important;
    font-weight: 700;
}

/* Table header bar (Ace style) */
.table-header {
    background-color: #307ECC;
    color: #FFF;
    font-size: 14px;
    line-height: 38px;
    padding-left: 12px;
    margin-bottom: 1px;
}

.table-header .close {
    margin-right: 8px;
    margin-top: 0;
    opacity: 0.45;
}

.table-header .close:hover {
    opacity: 0.75;
}

/* Ace custom table variants */
.ace-table {
    width: 100%;
    border-collapse: collapse;
}

.ace-table thead th {
    background: #F8F8F8;
    background-image: linear-gradient(to bottom, #F8F8F8, #ECECEC);
    border-bottom: 2px solid #DDD;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 700;
    color: #707070;
    text-transform: uppercase;
    white-space: nowrap;
}

.ace-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #EEE;
    font-size: 14px;
    vertical-align: middle;
    color: #393939;
}

.ace-table tbody tr:hover {
    background: #F5F5F5;
}

.ace-table .ace-table-info th {
    background: #307ECC;
    color: #FFF;
    border-bottom-color: #2A6BA9;
}

.ace-table .ace-table-success th {
    background: #87B87F;
    color: #FFF;
    border-bottom-color: #6A9B62;
}

.ace-table .ace-table-danger th {
    background: #D15B47;
    color: #FFF;
    border-bottom-color: #BA4E3D;
}

/* ============================================================
   LABELS & BADGES (Ace Color Theme - exact hex values)
   ============================================================ */
.ace-label {
    display: inline-block;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    border-radius: 2px;
    color: #FFF;
}

.ace-label-success { background: #82AF6F; }
.ace-label-danger { background: #D15B47; }
.ace-label-warning { background: #F89406; color: #FFF; }
.ace-label-info { background: #3A87AD; }
.ace-label-purple { background: #9585BF; }
.ace-label-pink { background: #D6487E; }
.ace-label-grey { background: #A0A0A0; }
.ace-label-primary { background: #428BCA; }
.ace-label-inverse { background: #333; }

.ace-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    border-radius: 10px;
    color: #fff;
}

/* ============================================================
   DROPDOWN MENUS (Ace style)
   ============================================================ */
.ace-nav-dropdown {
    position: relative;
}

.ace-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    background: #FFF;
    border: 1px solid #DDD;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    list-style: none;
    margin: 2px 0 0;
    padding: 4px 0;
    display: none;
    z-index: 1050;
}

.ace-dropdown-menu.show {
    display: block;
}

.ace-dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    color: #585858;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.1s;
}

.ace-dropdown-menu li a:hover {
    background: #F4F6F9;
    color: #393939;
    text-decoration: none;
}

.ace-dropdown-menu li a .fa {
    width: 16px;
    text-align: center;
    font-size: 13px;
    opacity: 0.7;
}

/* User menu */
.ace-user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    height: 100%;
    cursor: pointer;
    color: #585858;
    font-size: 14px;
}

.ace-user-menu:hover {
    color: #393939;
}

.ace-user-menu .user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.ace-user-menu .user-info small {
    font-size: 11px;
    color: #8089A0;
    font-weight: 600;
}

.ace-user-menu .user-info span {
    font-weight: 600;
}

.ace-user-menu img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

/* ============================================================
   FOOTER
   ============================================================ */
.ace-footer {
    background: #F5F5F5;
    border-top: 1px solid #DDD;
    padding: 12px 16px;
    text-align: center;
    font-size: 13px;
    color: #8089A0;
    flex-shrink: 0;
}

.ace-footer a {
    color: #585858;
    margin: 0 4px;
}

.ace-footer a:hover {
    color: var(--ace-primary);
}

/* ============================================================
   SCROLL TO TOP BUTTON
   ============================================================ */
.ace-scroll-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    display: none;
    align-items: center;
    justify-content: center;
    background: #555;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    z-index: 1040;
    font-size: 14px;
    transition: background 0.15s ease;
}

.ace-scroll-top:hover {
    background: var(--ace-primary);
}

/* ============================================================
   SIDEBAR STATE: COLLAPSED
   ============================================================ */
body.ace-sidebar-collapsed .ace-sidebar {
    width: var(--ace-sidebar-collapsed-width);
    min-width: var(--ace-sidebar-collapsed-width);
}

body.ace-sidebar-collapsed .ace-navbar-brand {
    width: var(--ace-sidebar-collapsed-width);
    min-width: var(--ace-sidebar-collapsed-width);
    justify-content: center;
    padding: 0;
}

body.ace-sidebar-collapsed .ace-navbar-brand .brand-text {
    display: none;
}

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

body.ace-sidebar-collapsed .ace-sidebar-nav li a {
    padding: 10px 0;
    justify-content: center;
    border-left: none;
}

body.ace-sidebar-collapsed .ace-sidebar-nav li a .menu-text,
body.ace-sidebar-collapsed .ace-sidebar-nav li a .arrow,
body.ace-sidebar-collapsed .ace-sidebar-nav .nav-group-label {
    display: none;
}

body.ace-sidebar-collapsed .ace-sidebar-nav li a .menu-icon {
    margin: 0;
    font-size: 16px;
    color: #6A9CC7;
}

body.ace-sidebar-collapsed .ace-sidebar-collapse-btn i {
    transform: rotate(180deg);
}

body.ace-sidebar-collapsed .ace-sidebar-submenu {
    display: none !important;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991.98px) {
    .ace-sidebar {
        transform: translateX(-100%);
    }

    .ace-sidebar.ace-sidebar-open {
        transform: translateX(0);
    }

    .ace-sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 1015;
    }

    .ace-sidebar-backdrop.show {
        display: block;
    }

    .ace-main {
        margin-left: 0 !important;
    }

    .ace-navbar-toggle {
        display: flex;
    }

    .ace-nav {
        display: none;
    }

    .ace-sidebar-collapsed-toggle {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .ace-page-content {
        padding: 10px;
    }

    .ace-breadcrumbs {
        padding: 6px 10px;
    }

    .ace-page-header h1 {
        font-size: 20px;
    }

    .ace-nav-user-info {
        display: none;
    }
}

/* ============================================================
   UTILITY CLASSES (Ace Color Theme - exact hex values)
   ============================================================ */
.text-ace { color: #438EB9 !important; }
.bg-ace { background-color: #438EB9 !important; }
.border-ace { border-color: #438EB9 !important; }

.text-blue { color: #478FCA !important; }
.text-green { color: #69AA46 !important; }
.text-red { color: #DD5A43 !important; }
.text-orange { color: #FF892A !important; }
.text-purple { color: #A069C3 !important; }
.text-pink { color: #C6699F !important; }
.text-grey { color: #777 !important; }

.bg-blue { background-color: #478FCA !important; }
.bg-green { background-color: #69AA46 !important; }
.bg-red { background-color: #DD5A43 !important; }
.bg-orange { background-color: #FF892A !important; }
.bg-purple { background-color: #A069C3 !important; }
.bg-pink { background-color: #C6699F !important; }

.space-6 { height: 24px; }
.space-12 { height: 48px; }

/* ============================================================
   PROGRESS BARS (Ace Color Theme - exact hex values)
   ============================================================ */
.progress-bar {
    background-color: #2A91D8;
}

.progress-bar-success {
    background-color: #59A84B;
}

.progress-bar-danger {
    background-color: #CA5952;
}

.progress-bar-warning {
    background-color: #F2BB46;
}

.progress-bar-info {
    background-color: #6FB3E0;
}

.progress-bar-purple {
    background-color: #9585BF;
}

.progress-bar-pink {
    background-color: #D6487E;
}

/* ============================================================
   FLASH MESSAGES (SweetAlert overrides if needed)
   ============================================================ */
.swal2-popup {
    font-family: "Open Sans", sans-serif !important;
}

/* ============================================================
   LEGACY / EXISTING COMPONENT COMPATIBILITY
   ============================================================ */

/* Keep existing POS-specific styles working */
.pos-login-page {
    min-height: 100vh;
    padding: 32px;
    display: grid;
    place-items: center;
    background:
        linear-gradient(135deg, rgba(67, 142, 185, 0.10), transparent 42%),
        linear-gradient(315deg, rgba(57, 57, 57, 0.08), transparent 38%),
        #E4E6E9;
}

.pos-login-shell {
    width: min(1080px, 100%);
    min-height: 640px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(57, 57, 57, 0.08);
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(57, 57, 57, 0.15);
}

.pos-login-brand {
    --pos-login-logo-size: 72px;
    --pos-login-brand-gap: 16px;
    padding: 48px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    background:
        linear-gradient(
            135deg,
            rgba(67, 142, 185, 0.95),
            rgba(44, 106, 160, 0.98)
        );
}

.pos-login-brand-header {
    display: flex;
    gap: var(--pos-login-brand-gap);
    align-items: center;
}

.pos-login-logo-wrap {
    width: var(--pos-login-logo-size);
    height: var(--pos-login-logo-size);
    padding: 7px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
}

.pos-login-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
    background: #fff;
}

.pos-login-kicker {
    display: block;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.pos-login-brand h1,
.pos-login-card h2 {
    margin: 0;
    font-weight: 800;
    letter-spacing: 0;
}

.pos-login-brand h1 {
    font-size: clamp(1.8rem, 3vw, 2.7rem);
    line-height: 1.08;
}

.pos-login-brand-copy {
    max-width: 430px;
    padding-left: calc(var(--pos-login-logo-size) + var(--pos-login-brand-gap));
}

.pos-login-brand-copy p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.04rem;
    font-weight: 600;
    line-height: 1.7;
}

.pos-login-card {
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
}

.pos-login-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 32px;
}

.pos-login-card-icon {
    width: 52px;
    height: 52px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    color: #438EB9;
    background: #F2F2F2;
    border-radius: 8px;
    font-size: 1.18rem;
}

.pos-login-card h2 {
    color: #393939;
    font-size: 1.8rem;
}

.pos-login-card p {
    margin: 6px 0 0;
    color: #8089A0;
    font-weight: 600;
}

.pos-login-form {
    display: grid;
    gap: 18px;
}

.pos-login-field label {
    display: block;
    margin-bottom: 8px;
    color: #393939;
    font-size: 0.95rem;
    font-weight: 800;
}

.pos-login-input {
    height: 52px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    background: #F2F2F2;
    border: 1px solid #CCC;
    border-radius: 8px;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.pos-login-input:focus-within {
    background: #fff;
    border-color: #438EB9;
    box-shadow: 0 0 0 4px rgba(67, 142, 185, 0.12);
}

.pos-login-input i {
    color: #438EB9;
    width: 18px;
    text-align: center;
}

.pos-login-input input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #393939;
    font-weight: 700;
}

.pos-login-input input::placeholder {
    color: #AAA;
}

.pos-login-error {
    margin-top: 8px;
    padding: 10px 12px;
    color: #D15B47;
    background: #F2DEDE;
    border: 1px solid #E8C4C4;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
}

.pos-login-button {
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
    color: #fff;
    background: #438EB9;
    border: 0;
    border-radius: 8px;
    font-weight: 800;
    transition:
        background 0.18s ease,
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.pos-login-button:hover,
.pos-login-button:focus {
    background: #2C6AA0;
    box-shadow: 0 12px 24px rgba(67, 142, 185, 0.24);
    color: #fff;
}

.pos-login-button:active {
    transform: translateY(1px);
}

@media (max-width: 991.98px) {
    .pos-login-page {
        padding: 18px;
        place-items: start center;
    }

    .pos-login-shell {
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .pos-login-brand,
    .pos-login-card {
        padding: 28px;
    }

    .pos-login-brand {
        background:
            linear-gradient(
                135deg,
                rgba(67, 142, 185, 0.95),
                rgba(44, 106, 160, 0.98)
            );
    }

    .pos-login-brand-copy {
        padding-left: calc(
            var(--pos-login-logo-size) + var(--pos-login-brand-gap)
        );
    }
}

@media (max-width: 575.98px) {
    .pos-login-page {
        padding: 0;
    }

    .pos-login-shell {
        min-height: 100vh;
        border: 0;
        border-radius: 0;
    }

    .pos-login-brand,
    .pos-login-card {
        padding: 24px 18px;
    }

    .pos-login-brand-header {
        align-items: flex-start;
    }

    .pos-login-brand {
        --pos-login-logo-size: 58px;
    }

    .pos-login-card-header {
        align-items: flex-start;
    }

    .pos-login-card h2 {
        font-size: 1.5rem;
    }
}

/* ============================================================
   POS CASHIER STYLES
   ============================================================ */
.pos-cashier-page {
    min-height: calc(100vh - var(--ace-navbar-height));
    padding: 18px 8px 24px;
    color: #2f1f1c;
}

.pos-cashier-page > .row {
    min-height: calc(100vh - var(--ace-navbar-height) - 64px);
    align-items: stretch;
}

.pos-cashier-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.pos-cashier-heading h4 {
    margin: 0;
    font-weight: 800;
    letter-spacing: 0;
}

.pos-cashier-heading span,
.pos-checkout-header span {
    color: #7a6b67;
    font-weight: 700;
    font-size: 0.88rem;
}

.pos-sale-panel,
.pos-checkout-panel {
    background: #fff;
    border: 1px solid rgba(66, 57, 55, 0.1);
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(66, 57, 55, 0.08);
}

.pos-sale-panel {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pos-sale-panel::after {
    content: none;
}

.pos-search-bar {
    padding: 14px;
    border-bottom: 1px solid rgba(66, 57, 55, 0.08);
}

.pos-search-bar .input-group {
    border: 1px solid rgba(66, 57, 55, 0.16);
    border-radius: 8px;
    overflow: hidden;
}

.pos-search-bar .input-group-text,
.pos-search-bar .form-control {
    border: 0;
    background: #fff;
}

.pos-search-bar .form-control {
    min-height: 44px;
    font-weight: 700;
}

.pos-search-bar .form-control:focus {
    box-shadow: none;
}

.pos-category-strip {
    display: flex;
    gap: 8px;
    padding: 12px 14px;
    overflow-x: auto;
    border-bottom: 1px solid rgba(66, 57, 55, 0.08);
    background: #fffaf8;
}

.pos-category-strip::-webkit-scrollbar {
    height: 0;
}

.pos-category-pill {
    min-height: 36px;
    padding: 7px 14px;
    color: #423937;
    background: #fff;
    border: 1px solid rgba(66, 57, 55, 0.16);
    border-radius: 8px;
    font-weight: 800;
    white-space: nowrap;
}

.pos-category-pill.active,
.pos-category-pill:hover {
    color: #fff;
    background: #8f4030;
    border-color: #8f4030;
}

.pos-product-grid {
    --pos-product-row-height: 220px;
    --pos-product-row-gap: 12px;
    min-height: 0;
    flex: 0 0 auto;
    max-height: calc(
        (var(--pos-product-row-height) * 3) + (var(--pos-product-row-gap) * 2) + 28px
    );
    padding: 14px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    grid-auto-rows: var(--pos-product-row-height);
    align-content: start;
    gap: var(--pos-product-row-gap);
    overflow-y: auto;
    background: #fff;
}

.pos-product-tile {
    min-height: 0;
    height: 100%;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
    background: #fff;
    border: 1px solid rgba(66, 57, 55, 0.1);
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(66, 57, 55, 0.06);
    transition:
        transform 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.pos-product-tile:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: rgba(143, 64, 48, 0.4);
    box-shadow: 0 10px 20px rgba(66, 57, 55, 0.1);
}

.pos-product-tile.is-disabled {
    cursor: not-allowed;
    opacity: 0.58;
}

.pos-product-image {
    position: relative;
    height: 98px;
    display: grid;
    place-items: center;
    background: #fffaf8;
    border: 1px solid rgba(66, 57, 55, 0.08);
    border-radius: 8px;
}

.pos-product-image img {
    width: 100%;
    height: 86px;
    object-fit: contain;
}

.pos-product-image > i {
    color: rgba(66, 57, 55, 0.32);
    font-size: 2rem;
}

.pos-product-empty {
    position: absolute;
    inset: auto 10px 10px;
    padding: 4px 8px;
    color: #fff;
    background: #dc3545;
    border-radius: 6px;
    font-size: 0.76rem;
    font-weight: 800;
    text-align: center;
}

.pos-product-name {
    min-height: 42px;
    color: #2f1f1c;
    font-weight: 800;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pos-product-meta {
    margin-top: auto;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 8px;
}

.pos-product-meta span {
    color: #7a6b67;
    font-size: 0.78rem;
    font-weight: 800;
}

.pos-product-meta strong {
    color: #8f4030;
    font-size: 0.92rem;
    white-space: nowrap;
}

.pos-pagination {
    margin-top: auto;
    padding: 12px 14px;
    display: flex;
    justify-content: center;
    border-top: 1px solid rgba(66, 57, 55, 0.08);
}

.pos-checkout-panel {
    position: sticky;
    top: 76px;
    max-height: calc(100vh - 112px);
    display: flex;
    flex-direction: column;
}

.pos-checkout-header {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(66, 57, 55, 0.08);
}

.pos-checkout-header h5 {
    margin: 0;
    font-weight: 800;
    letter-spacing: 0;
}

.pos-cart-count {
    min-width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    color: #fff !important;
    background: #8f4030;
    border-radius: 8px;
}

.pos-cart-list {
    flex: 0 1 auto;
    min-height: 170px;
    max-height: 28vh;
    overflow-y: auto;
}

.pos-cart-row {
    padding: 12px 16px;
    display: grid;
    gap: 10px;
    border-bottom: 1px solid rgba(66, 57, 55, 0.08);
}

.pos-cart-main {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.pos-cart-main strong {
    min-width: 0;
    color: #2f1f1c;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pos-cart-main span {
    color: #7a6b67;
    font-weight: 800;
    white-space: nowrap;
}

.pos-cart-actions {
    display: grid;
    grid-template-columns: 110px minmax(88px, 1fr) 34px;
    align-items: center;
    gap: 10px;
}

.pos-cart-actions > strong {
    text-align: right;
    color: #8f4030;
    white-space: nowrap;
}

.pos-qty-stepper {
    height: 34px;
    display: grid;
    grid-template-columns: 32px 1fr 32px;
    align-items: center;
    overflow: hidden;
    border: 1px solid rgba(66, 57, 55, 0.16);
    border-radius: 8px;
    background: #fffaf8;
}

.pos-qty-stepper button,
.pos-cart-delete {
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
}

.pos-qty-stepper span {
    text-align: center;
    font-weight: 800;
}

.pos-cart-delete {
    width: 34px;
    height: 34px;
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.22);
    border-radius: 8px;
}

.pos-payment-form {
    padding: 14px 16px 16px;
    background: #fffaf8;
    border-top: 1px solid rgba(66, 57, 55, 0.08);
    overflow-y: auto;
}

.pos-payment-form .form-label {
    margin-bottom: 6px;
    color: #7a6b67;
    font-size: 0.82rem;
    font-weight: 800;
}

.pos-payment-form .form-control,
.pos-payment-form .form-select {
    min-height: 40px;
    border-radius: 8px;
    font-weight: 800;
}

.pos-method-toggle {
    min-height: 40px;
    display: flex;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(66, 57, 55, 0.28);
    border-radius: 8px;
}

.pos-method-toggle .btn-check {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.pos-method-option {
    flex: 1;
    min-width: 0;
    min-height: 40px;
    margin: 0;
    display: grid;
    place-items: center;
    color: #5f666d;
    background: #fff;
    border: 0;
    border-right: 1px solid rgba(66, 57, 55, 0.28);
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

.pos-method-option:last-child {
    border-right: 0;
}

.pos-method-toggle .btn-check:checked + .pos-method-option {
    color: #fff;
    background: #8f4030;
    border-color: #8f4030;
}

.pos-method-option {
    min-width: 0;
    min-height: 40px;
    margin: 0;
    display: grid;
    place-items: center;
    color: #5f666d;
    background: #fff;
    border: 0;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

.pos-method-option + .btn-check + .pos-method-option,
.pos-method-option:last-child {
    border-left: 1px solid rgba(66, 57, 55, 0.28);
}

.pos-method-toggle .btn-check:checked + .pos-method-option {
    color: #fff;
    background: #8f4030;
    border-color: #8f4030;
}

.pos-cash-input {
    font-size: 1.25rem;
    color: #2f1f1c;
}

.pos-cash-shortcuts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-top: 8px;
}

.pos-cash-shortcuts button {
    min-height: 34px;
    padding: 4px 6px;
    color: #423937;
    background: #fff;
    border: 1px solid rgba(66, 57, 55, 0.16);
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 800;
}

.pos-summary-box {
    padding: 12px;
    display: grid;
    gap: 8px;
    background: #fff;
    border: 1px solid rgba(66, 57, 55, 0.1);
    border-radius: 8px;
}

.pos-summary-box > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.pos-summary-box span {
    color: #7a6b67;
    font-weight: 800;
}

.pos-summary-box strong {
    color: #2f1f1c;
    white-space: nowrap;
}

.pos-summary-total {
    padding-top: 10px;
    border-top: 1px solid rgba(66, 57, 55, 0.1);
}

.pos-summary-total strong {
    color: #8f4030;
    font-size: 1.55rem;
}

.pos-pay-button {
    min-height: 50px;
    margin-top: 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    font-weight: 800;
}

.pos-empty-state,
.pos-empty-cart {
    min-height: 180px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    color: #7a6b67;
    text-align: center;
}

.pos-empty-state i,
.pos-empty-cart i {
    font-size: 2.1rem;
    color: rgba(66, 57, 55, 0.28);
}

@media (max-width: 1199.98px) {
    .pos-cashier-page > .row {
        min-height: 0;
    }

    .pos-sale-panel {
        min-height: auto;
    }

    .pos-product-grid {
        max-height: calc(
            (var(--pos-product-row-height) * 3) + (var(--pos-product-row-gap) * 2) + 28px
        );
    }

    .pos-checkout-panel {
        position: static;
        max-height: none;
    }

    .pos-cart-list {
        max-height: none;
    }
}

@media (max-width: 575.98px) {
    .pos-cashier-page {
        padding-inline: 0;
    }

    .pos-cashier-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .pos-product-grid {
        --pos-product-row-height: 205px;
        --pos-product-row-gap: 8px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 10px;
        max-height: calc(
            (var(--pos-product-row-height) * 3) + (var(--pos-product-row-gap) * 2) + 20px
        );
    }

    .pos-product-tile {
        padding: 10px;
    }

    .pos-cart-actions {
        grid-template-columns: 104px minmax(78px, 1fr) 34px;
    }

    .pos-cash-shortcuts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ============================================================
   TRANSACTION SHOW PAGE
   ============================================================ */
.transaction-show-page {
    padding: 20px 0 32px;
}

.transaction-show-shell {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.transaction-show-header,
.transaction-action-card,
.transaction-summary-card,
.transaction-receipt-panel {
    background: #fff;
    border: 1px solid rgba(66, 57, 55, 0.1);
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(66, 57, 55, 0.08);
}

.transaction-show-header {
    margin-bottom: 14px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.transaction-show-heading {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.transaction-back-button {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(66, 57, 55, 0.18);
    border-radius: 8px;
    background: #fff;
    color: #5f5552;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.transaction-back-button:hover {
    border-color: rgba(66, 57, 55, 0.28);
    background: #f8f5f3;
    color: #2f1f1c;
}

.transaction-show-title {
    min-width: 0;
}

.transaction-show-title span {
    color: #7a6b67;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
}

.transaction-show-title h4 {
    margin: 3px 0;
    color: #2f1f1c;
    font-weight: 800;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.transaction-show-title small {
    color: #7a6b67;
    font-weight: 700;
}

.transaction-status-chip {
    min-height: 38px;
    padding: 8px 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 800;
    white-space: nowrap;
}

.transaction-status-chip.is-success {
    color: #0f7a4a;
    background: #e8fff2;
}

.transaction-status-chip.is-warning {
    color: #9a5b00;
    background: #fff4e5;
}

.transaction-status-chip.is-danger {
    color: #b42318;
    background: #ffe5e5;
}

.transaction-show-workspace {
    display: grid;
    grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
    align-items: start;
    gap: 18px;
}

.transaction-action-panel {
    position: sticky;
    top: 76px;
    display: grid;
    gap: 14px;
}

.transaction-action-card,
.transaction-summary-card {
    padding: 14px;
}

.transaction-action-card__header {
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.transaction-action-card__header span {
    color: #7a6b67;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
}

.transaction-action-card__header strong {
    color: #8f4030;
    text-align: right;
    white-space: nowrap;
}

.transaction-action-list {
    display: grid;
    gap: 8px;
}

.transaction-action-list .btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-radius: 8px;
    box-shadow: none !important;
}

.transaction-summary-card {
    display: grid;
    gap: 10px;
}

.transaction-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.transaction-summary-row span {
    color: #7a6b67;
    font-weight: 800;
}

.transaction-summary-row strong {
    min-width: 0;
    color: #2f1f1c;
    text-align: right;
    overflow-wrap: anywhere;
}

.transaction-receipt-panel {
    overflow: hidden;
}

.transaction-receipt-panel__header {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(66, 57, 55, 0.08);
}

.transaction-receipt-panel__header span {
    display: block;
    color: #2f1f1c;
    font-weight: 800;
}

.transaction-receipt-panel__header small {
    color: #7a6b67;
    font-weight: 700;
}

.receipt-stage {
    padding: 18px;
    display: flex;
    justify-content: center;
    background: #fffaf8;
}

.receipt-paper {
    position: relative;
    width: 100%;
    max-width: 430px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(66, 57, 55, 0.12);
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(66, 57, 55, 0.14);
}

.receipt-paper::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 6px;
    background: #8f4030;
}

.receipt-paper.is-voided::before {
    background: #dc3545;
}

.receipt-paper__body {
    padding: 28px 24px 24px;
}

.receipt-header {
    text-align: center;
}

.receipt-logo-frame {
    width: 78px;
    height: 78px;
    margin: 0 auto 14px;
    padding: 10px;
    display: grid;
    place-items: center;
    background: #fffaf8;
    border: 1px solid rgba(66, 57, 55, 0.1);
    border-radius: 8px;
    box-shadow: 0 12px 25px rgba(66, 57, 55, 0.08);
}

.receipt-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.receipt-logo-placeholder {
    color: #8f4030;
    font-size: 1.7rem;
}

.receipt-store-name {
    margin-bottom: 6px;
    color: #2f1f1c;
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 0;
}

.receipt-store-meta {
    margin: 0;
    color: #7a6b67;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-line;
}

.receipt-status-pill {
    margin-top: 14px;
    padding: 6px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.receipt-status-pill.is-paid {
    color: #0f7a4a;
    background: #e8fff2;
}

.receipt-status-pill.is-pending {
    color: #9a5b00;
    background: #fff4e5;
}

.receipt-status-pill.is-voided {
    color: #b42318;
    background: #ffe5e5;
}

.receipt-divider {
    margin: 18px 0;
    border-top: 1px dashed rgba(47, 31, 28, 0.24);
}

.receipt-meta,
.receipt-summary {
    display: grid;
    gap: 8px;
    font-size: 13px;
}

.receipt-meta-row,
.receipt-summary-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.receipt-meta-row span:first-child,
.receipt-summary-row span:first-child {
    color: #7a6b67;
}

.receipt-meta-row span:last-child,
.receipt-summary-row span:last-child {
    text-align: right;
}

.receipt-section-title {
    margin-bottom: 12px;
    color: #7a6b67;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.receipt-items {
    display: grid;
    gap: 12px;
}

.receipt-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.receipt-item__main {
    min-width: 0;
    flex: 1;
}

.receipt-item__name {
    margin-bottom: 2px;
    color: #2f1f1c;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

.receipt-item__meta {
    color: #7a6b67;
    font-size: 12px;
}

.receipt-item__subtotal {
    font-size: 13px;
    font-weight: 800;
    text-align: right;
    white-space: nowrap;
}

.receipt-summary {
    padding: 14px 14px 12px;
    background: #fffaf8;
    border: 1px solid rgba(66, 57, 55, 0.1);
    border-radius: 8px;
}

.receipt-summary-row--total {
    margin-top: 2px;
    padding-top: 10px;
    border-top: 1px dashed rgba(47, 31, 28, 0.18);
    font-size: 16px;
    font-weight: 800;
}

.receipt-note {
    color: #423937;
    font-size: 12px;
    line-height: 1.6;
}

.receipt-footer {
    text-align: center;
}

.receipt-footer__headline {
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 800;
}

.receipt-footer__text {
    margin-bottom: 12px;
    color: #7a6b67;
    font-size: 11px;
    white-space: pre-line;
}

.receipt-footer__code {
    padding: 6px 10px;
    display: inline-block;
    color: #2f1f1c;
    background: #f5ece9;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

@media (max-width: 991.98px) {
    .transaction-show-workspace {
        grid-template-columns: 1fr;
    }

    .transaction-action-panel {
        position: static;
    }

    .transaction-action-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .transaction-show-page {
        padding-top: 12px;
    }

    .transaction-show-header {
        align-items: stretch;
        flex-direction: column;
    }

    .transaction-status-chip {
        align-self: flex-start;
    }

    .transaction-action-list {
        grid-template-columns: 1fr;
    }

    .transaction-receipt-panel__header {
        padding: 12px 14px;
    }

    .receipt-stage {
        padding: 10px;
    }

    .receipt-paper__body {
        padding: 24px 18px 20px;
    }

    .receipt-meta-row,
    .receipt-summary-row {
        gap: 10px;
    }
}

@media print {
    body.printing-receipt * {
        visibility: hidden;
    }

    body.printing-receipt .no-print {
        display: none !important;
    }

    body.printing-receipt #print-area,
    body.printing-receipt #print-area * {
        visibility: visible;
    }

    body.printing-receipt #print-area {
        position: absolute;
        top: 0;
        left: 50%;
        width: 80mm;
        max-width: 80mm;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        transform: translateX(-50%);
    }

    body.printing-receipt #print-area::before {
        display: none !important;
    }

    body.printing-receipt .receipt-paper__body {
        padding: 0;
    }

    body.printing-receipt .receipt-summary {
        padding: 0;
        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;
    }

    body.printing-receipt .receipt-logo-frame {
        box-shadow: none !important;
    }

    @page {
        size: 80mm auto;
        margin: 6mm 4mm;
    }

    body.printing-receipt {
        margin: 0;
    }
}

/* ============================================================
   PAGINATION (Ace-themed)
   ============================================================ */
.page-link {
    color: #428BCA;
}

.page-item.active .page-link {
    background-color: #428BCA;
    border-color: #428BCA;
}

.page-link:hover {
    color: #23527C;
    background-color: #F4F6F9;
}

/* ============================================================
   MISC COMPATIBILITY
   ============================================================ */
.modal-backdrop.show {
    opacity: 0 !important;
}

.body.modal-open .container,
.body.modal-open footer {
    filter: blur(2.5px);
}

/* Image gallery styles (keep for compatibility) */
.image-gallery-slide .image-gallery-image {
    height: 350px;
    width: 100%;
    object-fit: cover;
    border-radius: 0.5rem;
}

.image-gallery-thumbnail {
    opacity: 0.3;
}

.image-gallery-thumbnail.active {
    opacity: 1;
    border: none;
}

.image-gallery-thumbnail:hover {
    border: none;
    transition: none;
}

.image-gallery-thumbnail-image {
    border-radius: 0.5rem !important;
    height: 70px;
    object-fit: cover;
}

.image-gallery-left-nav .image-gallery-svg,
.image-gallery-right-nav .image-gallery-svg {
    width: 50px;
    height: 50px;
    z-index: 9;
    top: 50%;
    background: white;
    border: none;
    border-radius: 30px;
}

.image-gallery-icon {
    color: #A069C3;
}

.image-gallery-icon:hover {
    color: #A069C3;
    transition: none !important;

}

/* Chosen fix agar dropdown tidak tertimpa kontainer */
.chosen-container {
    min-width: 200px;
}
.chosen-container .chosen-drop {
    z-index: 9999;
}
.chosen-container.chosen-with-drop .chosen-drop {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 9999;
    background: #fff;
    border: 1px solid #aaa;
    border-top: 0;
    box-shadow: 0 4px 8px rgba(0,0,0,.15);
}
.chosen-container .chosen-results {
    max-height: 250px;
}
.pos-sale-panel {
    overflow: visible !important;
}


/* Quill editor */
.ql-editor {
    min-height: 200px !important;
    max-height: 300px;
    overflow: hidden;
    overflow-y: scroll;
    overflow-x: scroll;
}

/* Map */
.map-container {
    height: 300px;
    width: 100%;
}

/* SweetAlert overrides */
.swal2-popup {
    font-family: "Open Sans", sans-serif !important;
}
