/* ==========================================================================
   SPBU Professional Blue Dashboard — Design System
   ========================================================================== */

:root {
    /* Brand Colors */
    --primary: #1565C0;
    --primary-dark: #0D47A1;
    --primary-light: #42A5F5;
    --navy: #1A237E;
    --navy-light: #283593;

    /* Semantic Colors */
    --success: #2E7D32;
    --success-light: #E8F5E9;
    --warning: #F57C00;
    --warning-light: #FFF3E0;
    --danger: #C62828;
    --danger-light: #FFEBEE;
    --info: #0277BD;
    --info-light: #E1F5FE;

    /* Neutrals */
    --body-bg: #F0F4F8;
    --white: #FFFFFF;
    --gray-50: #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --gray-400: #94A3B8;
    --gray-500: #64748B;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1E293B;
    --gray-900: #0F172A;

    /* Layout */
    --sidebar-width: 260px;
    --navbar-height: 64px;
    --footer-height: 48px;
    --content-padding: 1.5rem;

    /* Typography */
    --font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;

    /* Spacing & Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;

    /* Sidebar */
    --sidebar-bg: linear-gradient(180deg, var(--navy) 0%, var(--primary-dark) 50%, var(--primary) 100%);
    --sidebar-text: rgba(255, 255, 255, 0.75);
    --sidebar-text-active: #FFFFFF;
    --sidebar-hover-bg: rgba(255, 255, 255, 0.1);
    --sidebar-active-bg: rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    color: var(--gray-700);
    background-color: var(--body-bg);
    line-height: 1.6;
    margin: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* ==========================================================================
   Layout Shell
   ========================================================================== */

.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-base);
    overflow: hidden;
}

.app-sidebar__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.app-sidebar__brand-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.25rem;
}

.app-sidebar__brand-text {
    color: var(--white);
    font-weight: 700;
    font-size: var(--font-size-lg);
    line-height: 1.2;
}

.app-sidebar__brand-sub {
    color: rgba(255, 255, 255, 0.6);
    font-size: var(--font-size-xs);
    font-weight: 400;
}

.app-sidebar__nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.75rem 0;
}

.app-sidebar__nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}

.app-sidebar__section {
    padding: 0.5rem 1.25rem 0.25rem;
    color: rgba(255, 255, 255, 0.4);
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.app-sidebar__link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1.25rem;
    color: var(--sidebar-text);
    font-size: var(--font-size-sm);
    font-weight: 500;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
    cursor: pointer;
}

.app-sidebar__link:hover {
    color: var(--sidebar-text-active);
    background: var(--sidebar-hover-bg);
}

.app-sidebar__link.active {
    color: var(--sidebar-text-active);
    background: var(--sidebar-active-bg);
    border-left-color: var(--white);
}

.app-sidebar__link i {
    width: 20px;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.85;
}

.app-sidebar__link .badge {
    margin-left: auto;
    font-size: 0.65rem;
}

.app-sidebar__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 0.625rem 1.25rem;
    color: var(--sidebar-text);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}

.app-sidebar__toggle:hover {
    color: var(--sidebar-text-active);
    background: var(--sidebar-hover-bg);
}

.app-sidebar__toggle.active,
.app-sidebar__toggle[aria-expanded="true"] {
    color: var(--sidebar-text-active);
}

.app-sidebar__toggle i.menu-icon {
    width: 20px;
    text-align: center;
    font-size: 0.9rem;
}

.app-sidebar__toggle .chevron {
    font-size: 0.7rem;
    transition: transform var(--transition-fast);
}

.app-sidebar__toggle[aria-expanded="true"] .chevron {
    transform: rotate(90deg);
}

.app-sidebar__submenu {
    background: rgba(0, 0, 0, 0.15);
}

.app-sidebar__submenu .app-sidebar__link {
    padding-left: 3rem;
    font-size: var(--font-size-xs);
    font-weight: 400;
}

.app-sidebar__user {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.app-sidebar__user-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
}

.app-sidebar__avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
    font-size: var(--font-size-sm);
    flex-shrink: 0;
}

.app-sidebar__user-info {
    flex: 1;
    min-width: 0;
}

.app-sidebar__user-name {
    color: var(--white);
    font-size: var(--font-size-sm);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-sidebar__user-role {
    color: rgba(255, 255, 255, 0.55);
    font-size: var(--font-size-xs);
}

.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left var(--transition-base);
}

.app-navbar {
    position: sticky;
    top: 0;
    height: var(--navbar-height);
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    padding: 0 var(--content-padding);
    gap: 1rem;
    z-index: 1030;
    box-shadow: var(--shadow-sm);
}

.app-navbar__toggle {
    display: none;
    background: none;
    border: none;
    color: var(--gray-600);
    font-size: 1.25rem;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.app-navbar__toggle:hover {
    background: var(--gray-100);
}

.app-navbar__search {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.app-navbar__search input {
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    background: var(--gray-50);
    transition: all var(--transition-fast);
}

.app-navbar__search input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.15);
}

.app-navbar__search i {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: var(--font-size-sm);
}

.app-navbar__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.app-navbar__btn {
    position: relative;
    background: none;
    border: none;
    color: var(--gray-500);
    font-size: 1.1rem;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-navbar__btn:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.app-navbar__btn .notification-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: var(--radius-full);
    border: 2px solid var(--white);
}

.app-content {
    flex: 1;
    padding: var(--content-padding);
}

.app-footer {
    padding: 0.75rem var(--content-padding);
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    font-size: var(--font-size-sm);
    color: var(--gray-500);
    text-align: center;
    height: var(--footer-height);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1035;
}

/* ==========================================================================
   Breadcrumb
   ========================================================================== */

.breadcrumb-bar {
    margin-bottom: 1.25rem;
}

.breadcrumb {
    margin-bottom: 0;
    font-size: var(--font-size-sm);
}

.breadcrumb-item a {
    color: var(--gray-500);
}

.breadcrumb-item.active {
    color: var(--gray-700);
    font-weight: 500;
}

/* ==========================================================================
   Page Header
   ========================================================================== */

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.page-header__title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--gray-800);
    margin: 0 0 0.25rem;
}

.page-header__subtitle {
    color: var(--gray-500);
    font-size: var(--font-size-sm);
    margin: 0;
}

.page-header__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 1rem 1.25rem;
    background: transparent;
    border-bottom: 1px solid var(--gray-200);
    font-weight: 600;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    padding: 0.75rem 1.25rem;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Stat Cards */
.stat-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card--success::before { background: var(--success); }
.stat-card--warning::before { background: var(--warning); }
.stat-card--danger::before { background: var(--danger); }
.stat-card--info::before { background: var(--info); }

.stat-card__icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    background: rgba(21, 101, 192, 0.1);
    color: var(--primary);
}

.stat-card--success .stat-card__icon { background: var(--success-light); color: var(--success); }
.stat-card--warning .stat-card__icon { background: var(--warning-light); color: var(--warning); }
.stat-card--danger .stat-card__icon { background: var(--danger-light); color: var(--danger); }
.stat-card--info .stat-card__icon { background: var(--info-light); color: var(--info); }

.stat-card__content {
    flex: 1;
    min-width: 0;
}

.stat-card__label {
    font-size: var(--font-size-sm);
    color: var(--gray-500);
    margin-bottom: 0.25rem;
}

.stat-card__value {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--gray-800);
    line-height: 1.2;
}

.stat-card__change {
    font-size: var(--font-size-xs);
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-card__change--up { color: var(--success); }
.stat-card__change--down { color: var(--danger); }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    font-size: var(--font-size-sm);
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-navy {
    background-color: var(--navy);
    border-color: var(--navy);
    color: var(--white);
}

.btn-navy:hover {
    background-color: var(--navy-light);
    border-color: var(--navy-light);
    color: var(--white);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: var(--font-size-xs);
}

.btn-lg {
    padding: 0.625rem 1.25rem;
    font-size: var(--font-size-base);
}

/* ==========================================================================
   Badges
   ========================================================================== */

.badge {
    font-weight: 500;
    font-size: var(--font-size-xs);
    padding: 0.35em 0.65em;
    border-radius: var(--radius-sm);
}

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35em 0.75em;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
}

.badge-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background: currentColor;
}

.badge-status--active,
.badge-status--success {
    background: var(--success-light);
    color: var(--success);
}

.badge-status--pending,
.badge-status--warning {
    background: var(--warning-light);
    color: var(--warning);
}

.badge-status--inactive,
.badge-status--danger {
    background: var(--danger-light);
    color: var(--danger);
}

.badge-status--info {
    background: var(--info-light);
    color: var(--info);
}

.badge-status--draft {
    background: var(--gray-100);
    color: var(--gray-600);
}

/* ==========================================================================
   Tables
   ========================================================================== */

.table-responsive {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.table {
    margin-bottom: 0;
    font-size: var(--font-size-sm);
}

.table thead th {
    background: var(--gray-50);
    color: var(--gray-600);
    font-weight: 600;
    text-transform: uppercase;
    font-size: var(--font-size-xs);
    letter-spacing: 0.03em;
    border-bottom: 2px solid var(--gray-200);
    padding: 0.875rem 1rem;
    white-space: nowrap;
}

.table tbody td {
    padding: 0.875rem 1rem;
    vertical-align: middle;
    border-color: var(--gray-100);
    color: var(--gray-700);
}

.table tbody tr:hover {
    background: var(--gray-50);
}

.table-striped tbody tr:nth-of-type(odd) {
    background: rgba(240, 244, 248, 0.5);
}

.table-actions {
    display: flex;
    gap: 0.25rem;
}

.table-actions .btn {
    padding: 0.25rem 0.5rem;
}

/* DataTables overrides */
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 0.375rem 0.75rem;
}

.dataTables_wrapper .dataTables_length select {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 0.25rem 0.5rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: var(--white) !important;
    border-radius: var(--radius-sm);
}

/* ==========================================================================
   Forms
   ========================================================================== */

.form-label {
    font-weight: 500;
    font-size: var(--font-size-sm);
    color: var(--gray-700);
    margin-bottom: 0.375rem;
}

.form-control,
.form-select {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    padding: 0.5rem 0.875rem;
    transition: all var(--transition-fast);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.15);
}

.form-control.is-invalid {
    border-color: var(--danger);
}

.input-group-text {
    background: var(--gray-50);
    border-color: var(--gray-200);
    font-size: var(--font-size-sm);
}

/* Select2 overrides */
.select2-container--bootstrap-5 .select2-selection {
    border-color: var(--gray-200);
    border-radius: var(--radius-md);
    min-height: 38px;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.15);
}

/* ==========================================================================
   Alerts
   ========================================================================== */

.alert {
    border: none;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-sm);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    animation: fadeIn 0.3s ease;
}

.alert-success {
    background: var(--success-light);
    color: var(--success);
}

.alert-danger {
    background: var(--danger-light);
    color: var(--danger);
}

.alert-warning {
    background: var(--warning-light);
    color: var(--warning);
}

.alert-info {
    background: var(--info-light);
    color: var(--info);
}

.alert .btn-close {
    margin-left: auto;
}

.alert-dismissible {
    padding-right: 3rem;
}

/* Toast container */
.toast-container {
    position: fixed;
    top: calc(var(--navbar-height) + 1rem);
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast-notification {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-lg);
    min-width: 300px;
    max-width: 400px;
    animation: slideUp 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.toast-notification--success { border-left: 4px solid var(--success); }
.toast-notification--error { border-left: 4px solid var(--danger); }
.toast-notification--warning { border-left: 4px solid var(--warning); }
.toast-notification--info { border-left: 4px solid var(--info); }

/* ==========================================================================
   Modals
   ========================================================================== */

.modal-content {
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

.modal-header {
    border-bottom: 1px solid var(--gray-200);
    padding: 1.25rem 1.5rem;
}

.modal-header .modal-title {
    font-weight: 600;
    color: var(--gray-800);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--gray-200);
    padding: 1rem 1.5rem;
}

/* ==========================================================================
   POS Layout
   ========================================================================== */

.pos-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: var(--body-bg);
    overflow: hidden;
}

.pos-header {
    height: 56px;
    background: var(--navy);
    color: var(--white);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    gap: 1rem;
    flex-shrink: 0;
}

.pos-header__brand {
    font-weight: 700;
    font-size: var(--font-size-lg);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pos-header__info {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: var(--font-size-sm);
}

.pos-body {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 0;
    overflow: hidden;
}

.pos-products {
    padding: 1rem;
    overflow-y: auto;
    background: var(--body-bg);
}

.pos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.pos-product-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pos-product-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.pos-product-card__icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.5rem;
    background: rgba(21, 101, 192, 0.1);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.25rem;
}

.pos-product-card__name {
    font-weight: 600;
    font-size: var(--font-size-sm);
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.pos-product-card__price {
    font-size: var(--font-size-xs);
    color: var(--primary);
    font-weight: 600;
}

.pos-cart {
    background: var(--white);
    border-left: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pos-cart__header {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
    font-weight: 600;
    color: var(--gray-800);
}

.pos-cart__items {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.pos-cart__footer {
    padding: 1rem;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.pos-cart__total {
    display: flex;
    justify-content: space-between;
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 1rem;
}

/* ==========================================================================
   Guest / Login Layout
   ========================================================================== */

.guest-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--navy) 0%, var(--primary-dark) 50%, var(--primary) 100%);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.guest-wrapper::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    top: -200px;
    right: -200px;
}

.guest-wrapper::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    bottom: -150px;
    left: -150px;
}

.guest-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 440px;
    padding: 2.5rem;
    position: relative;
    z-index: 1;
    animation: slideUp 0.5s ease;
}

.guest-card__logo {
    text-align: center;
    margin-bottom: 2rem;
}

.guest-card__logo-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--navy));
    border-radius: var(--radius-xl);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.guest-card__title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.guest-card__subtitle {
    color: var(--gray-500);
    font-size: var(--font-size-sm);
}

/* ==========================================================================
   Loading Overlay
   ========================================================================== */

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-overlay__text {
    margin-top: 1rem;
    color: var(--gray-600);
    font-size: var(--font-size-sm);
}

/* ==========================================================================
   Print Layout
   ========================================================================== */

.print-wrapper {
    background: var(--white);
    padding: 2rem;
    max-width: 210mm;
    margin: 0 auto;
}

.print-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-800);
}

.print-header__title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--gray-800);
    margin: 0;
}

.print-header__subtitle {
    color: var(--gray-500);
    font-size: var(--font-size-sm);
}

.print-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
    font-size: var(--font-size-xs);
    color: var(--gray-500);
    text-align: center;
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.text-primary { color: var(--primary) !important; }
.text-navy { color: var(--navy) !important; }
.bg-primary { background-color: var(--primary) !important; }
.bg-body { background-color: var(--body-bg) !important; }

.fw-semibold { font-weight: 600; }
.fs-sm { font-size: var(--font-size-sm); }
.fs-xs { font-size: var(--font-size-xs); }

.rounded-lg { border-radius: var(--radius-lg) !important; }
.shadow-sm { box-shadow: var(--shadow-sm) !important; }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }

.animate-fadeIn { animation: fadeIn 0.3s ease; }
.animate-slideUp { animation: slideUp 0.3s ease; }

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--gray-500);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.empty-state__title {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 991px) {
    .app-sidebar {
        transform: translateX(-100%);
    }

    .app-sidebar.show {
        transform: translateX(0);
    }

    .sidebar-overlay.show {
        display: block;
    }

    .app-main {
        margin-left: 0;
    }

    .app-navbar__toggle {
        display: flex;
    }

    .app-navbar__search {
        display: none;
    }

    .pos-body {
        grid-template-columns: 1fr;
    }

    .pos-cart {
        border-left: none;
        border-top: 1px solid var(--gray-200);
        max-height: 50vh;
    }
}

@media (max-width: 575px) {
    :root {
        --content-padding: 1rem;
    }

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

    .page-header__actions {
        width: 100%;
    }

    .page-header__actions .btn {
        flex: 1;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-card__value {
        font-size: var(--font-size-xl);
    }

    .guest-card {
        padding: 1.5rem;
    }

    .pos-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }

    .table-responsive {
        font-size: var(--font-size-xs);
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    body {
        background: white;
        color: black;
        font-size: 12pt;
    }

    .app-sidebar,
    .app-navbar,
    .app-footer,
    .sidebar-overlay,
    .breadcrumb-bar,
    .page-header__actions,
    .no-print,
    .btn,
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_paginate {
        display: none !important;
    }

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

    .app-content {
        padding: 0 !important;
    }

    .card {
        border: 1px solid #ddd;
        box-shadow: none;
        break-inside: avoid;
    }

    .table thead th {
        background: #f5f5f5 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    a[href]::after {
        content: none;
    }

    .print-wrapper {
        padding: 0;
        max-width: none;
    }

    @page {
        margin: 15mm;
    }
}

/* ==========================================================================
   Design System v2 — Filter, Detail, Form Sections
   ========================================================================== */

.filter-panel {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.filter-panel__header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    font-size: var(--font-size-sm);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-panel__body {
    padding: 1.25rem;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
}

.filter-panel__actions {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.datatable-card .card-header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.datatable-card .card-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-800);
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 0.375rem 0.75rem;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.12);
    outline: none;
}

table.dataTable thead th {
    background: #E3F2FD !important;
    color: var(--primary-dark) !important;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 2px solid var(--primary-light) !important;
    vertical-align: middle;
}

table.dataTable tbody tr:hover {
    background-color: #F5F9FF !important;
}

table.dataTable.stripe tbody tr:nth-child(odd) {
    background-color: #FAFCFF;
}

.form-section {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.form-section__title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #E3F2FD;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-page__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem 1.5rem;
}

.detail-field__label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gray-500);
    margin-bottom: 0.25rem;
}

.detail-field__value {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--gray-800);
}

.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem 0;
    border-top: 1px solid var(--gray-200);
    margin-top: 1.5rem;
}

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--gray-500);
}

.empty-state__icon {
    font-size: 3rem;
    color: var(--gray-300);
    margin-bottom: 1rem;
}

.outlet-switcher select {
    min-width: 180px;
    max-width: 240px;
    font-size: 0.8125rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--gray-200);
    padding: 0.35rem 0.75rem;
    background: var(--gray-50);
}

.print-document {
    max-width: 210mm;
    margin: 0 auto;
    padding: 1rem;
    font-size: 11pt;
}

.print-document__header {
    text-align: center;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.print-document__watermark {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 4rem;
    color: rgba(0, 0, 0, 0.06);
    font-weight: 800;
    pointer-events: none;
    z-index: 0;
}

.print-thermal {
    max-width: 80mm;
    font-family: monospace;
    font-size: 10pt;
}
