/* ====================================================
   DiPOS Premium V5 — Complete Design System
   ==================================================== */

/* 1. Imports & Variables */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Poppins:wght@600;700&display=swap');

:root {    --primary:       #4f46e5;
    --primary-dark:  #3730a3;
    --primary-light: #eef2ff;
    --secondary:     #9333ea;
    --success:       #10b981;
    --success-dark:  #065f46;
    --danger:        #ef4444;
    --warning:       #f59e0b;
    --info:          #0ea5e9;

    --sidebar-bg:    #0f172a;
    --sidebar-hover: rgba(255,255,255,0.05);
    --sidebar-width: 280px;

    --bg:            #f8fafc;
    --surface:       #ffffff;
    --surface-2:     #f1f5f9;
    --border:        #e2e8f0;
    --text:          #0f172a;
    --text-muted:    #64748b;

    --radius-sm:     10px;
    --radius-md:     14px;
    --radius-lg:     20px;
    --radius-xl:     28px;

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

    --transition:    all 0.3s cubic-bezier(0.4, 0, 0.2, 1);


    /* Compatibility aliases for legacy inline styles */
    --primary-color: var(--primary);
    --primary-color-dark: var(--primary-dark);
    --border-radius-lg: var(--radius-lg);
}

/* 2. Base Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    font-size: 0.9375rem;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins', 'Inter', sans-serif;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

p {
    color: var(--text-muted);
}

/* 3. Layout Wrapper */
#wrapper {
    display: flex;
    min-height: 100vh;
}

/* 4. Sidebar */
#sidebar-wrapper {
    width: var(--sidebar-width);
    height: 100vh;
    min-height: 100vh;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

/* Sidebar Brand */
.sidebar-brand {
    padding: 1.5rem 1.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.sidebar-brand .brand-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.sidebar-brand .brand-name {
    font-size: 1.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, rgba(255, 255, 255, 0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.sidebar-brand .brand-tag {
    font-size: 0.6rem;
    background: rgba(67, 97, 238, 0.3);
    color: #a5b4fc;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sidebar Nav */
.sidebar-nav {
    padding: 1rem 0;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
}

#sidebar-wrapper::-webkit-scrollbar,
.sidebar-nav::-webkit-scrollbar {
    width: 8px;
}

.sidebar-nav::-webkit-scrollbar-track,
#sidebar-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
}

.sidebar-nav::-webkit-scrollbar-thumb,
#sidebar-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover,
#sidebar-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.28);
}

.sidebar-section-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.25);
    padding: 1rem 1.75rem 0.4rem;
    display: block;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.7rem 1.25rem;
    margin: 2px 0.75rem;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: var(--transition);
    cursor: pointer;
}

.sidebar-item:hover {
    background: var(--sidebar-hover);
    color: white;
    padding-left: 1.5rem;
}

.sidebar-item.active {
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.25), rgba(114, 9, 183, 0.15));
    color: white;
    border-left: 3px solid var(--primary);
    margin-left: calc(0.75rem - 3px);
}

.sidebar-item .item-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.sidebar-item:hover .item-icon,
.sidebar-item.active .item-icon {
    background: rgba(67, 97, 238, 0.3);
    color: #a5b4fc;
}

.sidebar-footer {
    padding: 1rem 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
    background: var(--sidebar-bg);
}

/* 5. Main Content */
#page-content-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.main-content {
    padding: 1.75rem;
    flex: 1;
}

/* 6. Top Navbar */
.top-navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.68);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 0.875rem 1.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

#menu-toggle {
    width: 38px;
    height: 38px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-muted);
    font-size: 1.1rem;
}

#menu-toggle:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* 7. Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

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

.table-responsive {
    border-radius: var(--radius-md);
}

.card-body {
    padding: 1.5rem;
}

.card-header {
    padding: 1.25rem 1.5rem;
    background: transparent;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* KPI Cards */
.kpi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

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

.kpi-card .kpi-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.kpi-card .kpi-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}

.kpi-card .kpi-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-top: 2px;
}

.kpi-card .kpi-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* 8. Tables */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    padding: 0.875rem 1rem;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: middle;
}

.table tbody tr:hover {
    background: var(--surface-2);
}

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

/* 9. Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    text-decoration: none;
    white-space: nowrap;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(79, 70, 229, 0.3);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
    box-shadow: 0 4px 12px rgba(46, 196, 182, 0.3);
}

.btn-success:hover {
    background: var(--success-dark);
    transform: translateY(-1px);
    color: white;
    box-shadow: 0 6px 16px rgba(46, 196, 182, 0.4);
}

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

.btn-danger:hover {
    background: #c1121f;
    transform: translateY(-1px);
    color: white;
}

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

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

.btn-outline-secondary {
    border-color: var(--border);
    color: var(--text-muted);
    background: transparent;
}

.btn-outline-secondary:hover {
    background: var(--surface-2);
    color: var(--text);
}

.btn-outline-danger {
    border-color: var(--danger);
    color: var(--danger);
    background: transparent;
}

.btn-outline-danger:hover {
    background: var(--danger);
    color: white;
}

.btn-sm {
    padding: 0.375rem 0.875rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1rem;
}

.btn-xl {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: var(--radius-md);
}

/* 10. Form Controls */
.form-control,
.form-select {
    width: 100%;
    padding: 0.625rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.95);
    color: var(--text);
    font-family: inherit;
    font-size: 0.875rem;
    transition: var(--transition);
    outline: none;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    background: #fff;
}

.form-control::placeholder {
    color: #9aa1b5;
}

.form-control.form-control-lg,
.form-select.form-select-lg {
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    border-radius: var(--radius-md);
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
}

.input-group {
    display: flex;
}

.input-group .form-control {
    border-radius: 0;
}

.input-group .form-control:first-child {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.input-group .form-control:last-child {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.input-group-text {
    padding: 0.625rem 1rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.875rem;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    border-right: none;
}

/* 11. Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.25rem 0.625rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.bg-success {
    background: rgba(46, 196, 182, 0.15) !important;
    color: var(--success-dark) !important;
    border: 1px solid rgba(46, 196, 182, 0.3);
}

.badge.bg-danger {
    background: rgba(230, 57, 70, 0.12) !important;
    color: var(--danger) !important;
    border: 1px solid rgba(230, 57, 70, 0.25);
}

.badge.bg-primary {
    background: rgba(67, 97, 238, 0.12) !important;
    color: var(--primary) !important;
    border: 1px solid rgba(67, 97, 238, 0.25);
}

.badge.bg-warning {
    background: rgba(244, 162, 97, 0.15) !important;
    color: #c27d36 !important;
    border: 1px solid rgba(244, 162, 97, 0.3);
}

.badge.bg-info {
    background: rgba(76, 201, 240, 0.15) !important;
    color: #0891b2 !important;
    border: 1px solid rgba(76, 201, 240, 0.3);
}

.badge.bg-secondary {
    background: rgba(107, 114, 128, 0.1) !important;
    color: var(--text-muted) !important;
    border: 1px solid var(--border);
}

/* 12. Modals */
.modal-content {
    border-radius: var(--radius-xl);
    border: none;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
}

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

.modal-body {
    padding: 1.5rem 2rem;
}

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

/* 13. Alerts */
.alert {
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: rgba(46, 196, 182, 0.1);
    border-color: rgba(46, 196, 182, 0.3);
    color: var(--success-dark);
}

.alert-danger {
    background: rgba(230, 57, 70, 0.08);
    border-color: rgba(230, 57, 70, 0.25);
    color: var(--danger);
}

.alert-warning {
    background: rgba(244, 162, 97, 0.1);
    border-color: rgba(244, 162, 97, 0.3);
    color: #c27d36;
}

.alert-info {
    background: rgba(67, 97, 238, 0.08);
    border-color: rgba(67, 97, 238, 0.2);
    color: var(--primary);
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem 1rem;
}

.empty-state i {
    font-size: 2rem;
    color: #c6cce0;
    margin-bottom: 0.5rem;
}

/* 14. POS-Specific */
.pos-product-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.pos-product-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(67, 97, 238, 0.15);
}

.pos-product-card:active {
    transform: scale(0.97);
}

.pos-product-card .prod-name {
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text);
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.pos-product-card .prod-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
}

/* Cart */
.btn-qty {
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.8rem;
}

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

.input-qty {
    border: none !important;
    background: transparent !important;
    width: 36px;
    font-weight: 700;
    text-align: center;
}

/* 15. Tabs */
.nav-tabs {
    border-bottom: 2px solid var(--border);
    gap: 4px;
}

.nav-tabs .nav-link {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: var(--transition);
    background: transparent;
}

.nav-tabs .nav-link:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.nav-tabs .nav-link.active {
    color: var(--primary);
    background: var(--primary-light);
    border-bottom: 2px solid var(--primary);
    margin-bottom: -2px;
}

/* 16. Sidebar toggle */
#wrapper.toggled #sidebar-wrapper {
    transform: translateX(-100%);
}

#wrapper.toggled #page-content-wrapper {
    margin-left: 0;
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* 18. Utilities */
.text-primary {
    color: var(--primary) !important;
}

.text-success {
    color: var(--success) !important;
}

.text-danger {
    color: var(--danger) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.bg-primary-subtle {
    background: var(--primary-light) !important;
}

.border {
    border: 1px solid var(--border) !important;
}

.rounded-3 {
    border-radius: var(--radius-md) !important;
}

.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

/* 19. Progress bars */
.progress {
    height: 6px;
    border-radius: 100px;
    background: var(--border);
    overflow: visible;
}

.progress-bar {
    border-radius: 100px;
}

/* 20. List group */
.list-group-item {
    padding: 0.875rem 1.25rem;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
}

.list-group-item:hover {
    background: var(--surface-2);
}

.list-group-item-action {
    transition: var(--transition);
    cursor: pointer;
}

/* 21. Dropdown menus */
.dropdown-menu {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0.875rem;
    transition: var(--transition);
    color: var(--text);
}

.dropdown-item:hover {
    background: var(--primary-light);
    color: var(--primary);
}

/* 22. Spinner / Loading */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* 23. Page headers */
.page-header {
    margin-bottom: 1.75rem;
}

.page-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.page-header p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

/* Responsive */
@media (max-width: 992px) {
    #sidebar-wrapper {
        transform: translateX(-100%);
    }

    #page-content-wrapper {
        margin-left: 0;
    }

    #wrapper.toggled #sidebar-wrapper {
        transform: translateX(0);
    }

    .top-navbar {
        padding: 0.75rem 1rem;
    }

    .main-content {
        padding: 1rem;
    }
}

/* 24. Toast notifications */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ui-toast {
    min-width: 280px;
    max-width: 360px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    padding: 12px 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: slideInRight .24s ease;
}

.ui-toast .ui-toast-icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ui-toast.ui-toast-success .ui-toast-icon {
    background: rgba(46, 196, 182, .16);
    color: var(--success-dark);
}

.ui-toast.ui-toast-danger .ui-toast-icon {
    background: rgba(230, 57, 70, .12);
    color: var(--danger);
}

.ui-toast.ui-toast-warning .ui-toast-icon {
    background: rgba(244, 162, 97, .14);
    color: #c27d36;
}

.ui-toast.ui-toast-info .ui-toast-icon {
    background: rgba(67, 97, 238, .12);
    color: var(--primary);
}

.ui-toast .ui-toast-body {
    font-size: .86rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
}

.toolbar-search {
    position: relative;
}

.toolbar-search .bi {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.toolbar-search .form-control {
    padding-left: 2.2rem;
    border-radius: 12px;
}

.metric-tile {
    background: linear-gradient(180deg, #ffffff, #f9fbff);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px;
}

.metric-tile .label {
    font-size: .72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700;
}

.metric-tile .value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text);
    margin-top: 2px;
}

.fade-in-up {
    animation: fadeInUp .32s ease both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
        transform: translateY(10px);
    }
}

/* 25. Auth Screen */
.auth-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(700px 350px at 0% 0%, rgba(67, 97, 238, 0.20), transparent 45%),
        radial-gradient(700px 350px at 100% 100%, rgba(46, 196, 182, 0.16), transparent 45%),
        linear-gradient(180deg, #f7f9ff, #eef2fb);
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(29, 41, 81, 0.14);
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 10px;
}

/* 26. Mobile-First Application Overrides */
:root {
    --primary-color: var(--primary);
    --primary-color-dark: var(--primary-dark);
    --border-radius-lg: var(--radius-lg);
}

#wrapper {
    position: relative;
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(11, 15, 26, 0.45);
    backdrop-filter: blur(2px);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

#sidebar-wrapper {
    transform: translateX(-100%);
}

#page-content-wrapper {
    margin-left: 0;
    padding-bottom: 72px;
}

#wrapper.toggled #sidebar-wrapper {
    transform: translateX(0);
}

#wrapper.toggled .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
}

.app-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 70;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.94);
    border-top: 1px solid var(--border);
    backdrop-filter: blur(8px);
    scroll-snap-type: x mandatory;
}

.app-bottom-nav a {
    text-decoration: none;
    color: var(--text-muted);
    border-radius: 12px;
    min-height: 56px;
    min-width: 82px;
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    scroll-snap-align: start;
}

.app-bottom-nav::-webkit-scrollbar {
    display: none;
}

.app-bottom-nav a i {
    font-size: 1.05rem;
}

.app-bottom-nav a.active {
    background: var(--primary-light);
    color: var(--primary);
}

.table-mobile-cards thead {
    display: none;
}

.table-mobile-cards tbody,
.table-mobile-cards tr,
.table-mobile-cards td {
    display: block;
    width: 100%;
}

.table-mobile-cards tr {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.75rem;
    box-shadow: var(--shadow-sm);
}

.table-mobile-cards td {
    border: none !important;
    padding: 0.45rem 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    text-align: right !important;
}

.table-mobile-cards td::before {
    content: attr(data-label);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
    flex: 1;
}

.pos-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.pos-products-pane,
.pos-cart-pane {
    min-width: 0;
}

.pos-search .form-control,
.pos-search .input-group-text,
.pos-cart-footer .btn,
.pos-cart-footer .form-select {
    min-height: 50px;
}

.pos-products-grid {
    content-visibility: auto;
    contain-intrinsic-size: 1px 700px;
}

.pos-cart-footer {
    position: sticky;
    bottom: 72px;
    z-index: 15;
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid var(--border);
    box-shadow: 0 -10px 24px rgba(19, 30, 56, 0.08);
}

.pos-total-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pos-quick-actions {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.pos-quick-actions .btn {
    flex: 0 0 auto;
}

.ticket-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.card,
.table tbody tr {
    content-visibility: auto;
    contain-intrinsic-size: 1px 120px;
}

/* 320px */
@media (min-width: 320px) {
    .main-content {
        padding: 0.85rem;
    }

    .top-navbar {
        padding: 0.65rem 0.85rem;
    }

    .btn,
    .form-control,
    .form-select {
        font-size: 0.9rem;
    }
}

/* 480px */
@media (min-width: 480px) {
    .main-content {
        padding: 1rem;
    }

    .pos-layout {
        gap: 1.1rem;
    }

    .app-bottom-nav a {
        font-size: 0.72rem;
    }
}

/* 768px */
@media (min-width: 768px) {
    #page-content-wrapper {
        padding-bottom: 0;
    }

    .app-bottom-nav {
        display: none;
    }

    .top-navbar {
        padding: 0.8rem 1.2rem;
    }

    .main-content {
        padding: 1.2rem;
    }

    .pos-cart-footer {
        bottom: 0;
    }
}

/* 1024px */
@media (min-width: 1024px) {
    #sidebar-wrapper {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        display: none;
    }

    #page-content-wrapper {
        margin-left: var(--sidebar-width);
    }

    #wrapper.toggled #sidebar-wrapper {
        transform: translateX(-100%);
    }

    #wrapper.toggled #page-content-wrapper {
        margin-left: 0;
    }

    .main-content {
        padding: 1.5rem;
    }

    .pos-layout {
        grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
        gap: 1.25rem;
    }
}

/* 27. Public Landing */
.landing-wrapper {
    display: block !important;
    min-height: 100vh;
}

.landing-content-wrapper {
    margin-left: 0 !important;
    width: 100%;
    padding-bottom: 0 !important;
}

.landing-top-navbar {
    background: rgba(255, 255, 255, 0.78);
    border-bottom: 1px solid rgba(22, 34, 60, 0.08);
}

.landing-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.landing-brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f766e, #22c55e);
    color: #fff;
    font-size: 1rem;
}

.landing-brand-text {
    font-weight: 800;
    font-size: 1.1rem;
    color: #0f172a;
}

.landing-nav-links {
    gap: 1.25rem;
    margin-left: 2rem;
}

.landing-nav-links a {
    color: #475569;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.landing-nav-links a:hover {
    color: #0f766e;
}

.landing-login-btn {
    background: linear-gradient(135deg, #0f766e, #16a34a);
    border: none;
    box-shadow: 0 8px 20px rgba(22, 163, 74, 0.24);
}

.landing-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(900px 420px at 90% 0%, rgba(16, 185, 129, 0.20), transparent 50%),
        radial-gradient(850px 400px at 0% 10%, rgba(20, 184, 166, 0.18), transparent 48%),
        linear-gradient(180deg, #f8fffc 0%, #eefaf5 100%);
}

.landing-hero::before {
    content: "";
    position: absolute;
    inset: auto -10% -120px auto;
    width: 320px;
    height: 320px;
    background: rgba(15, 118, 110, 0.08);
    border-radius: 50%;
    filter: blur(2px);
}

.py-lg-6 {
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
}

.landing-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.12);
    color: #0f766e;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.landing-title {
    font-size: clamp(2rem, 4vw, 3.05rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 0.95rem;
}

.landing-subtitle {
    max-width: 580px;
    font-size: 1.03rem;
    color: #475569;
}

.landing-cta-primary {
    background: linear-gradient(135deg, #0f766e, #16a34a);
    border: none;
}

.landing-cta-primary:hover {
    background: linear-gradient(135deg, #0d5f59, #15803d);
}

.landing-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    max-width: 560px;
}

.landing-stat-card {
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(15, 118, 110, 0.12);
    border-radius: 14px;
    padding: 0.8rem;
}

.landing-stat-card strong {
    display: block;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 800;
}

.landing-stat-card span {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 600;
}

.landing-showcase {
    border: 1px solid rgba(15, 118, 110, 0.15);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.10);
    overflow: hidden;
}

.landing-showcase-header {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(15, 118, 110, 0.1);
    font-size: 0.84rem;
    color: #475569;
    font-weight: 700;
}

.landing-showcase-header .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-right: 6px;
    background: #cbd5e1;
}

.landing-showcase-grid {
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.landing-showcase-grid article {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.8rem;
}

.landing-showcase-grid h6 {
    margin: 0;
    font-size: 0.76rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.landing-showcase-grid p {
    margin: 0.25rem 0 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
}

.landing-section {
    padding: 4rem 0;
}

.landing-section-alt {
    background: linear-gradient(180deg, #ffffff 0%, #f7fbf9 100%);
    border-top: 1px solid rgba(15, 118, 110, 0.08);
    border-bottom: 1px solid rgba(15, 118, 110, 0.08);
}

.landing-section-head h2 {
    font-size: clamp(1.6rem, 2.8vw, 2.3rem);
    margin-bottom: 0.35rem;
}

.landing-section-head p {
    max-width: 640px;
    margin: 0 auto;
}

.landing-feature-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.3rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.landing-feature-card .icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 184, 166, 0.13);
    color: #0f766e;
    margin-bottom: 0.7rem;
}

.landing-feature-card h5 {
    margin-bottom: 0.5rem;
}

.landing-check-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.65rem;
}

.landing-check-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0f172a;
    font-weight: 600;
}

.landing-check-list i {
    color: #0f766e;
}

.landing-panel {
    background: #ffffff;
    border: 1px solid #dbe7e3;
    border-radius: 16px;
    padding: 1.2rem;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.flow-step {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-top: 1px dashed #d1d5db;
}

.flow-step:first-of-type {
    border-top: none;
}

.flow-step span {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #0f766e;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.74rem;
    font-weight: 700;
    margin-top: 1px;
}

.flow-step small {
    display: block;
    color: #64748b;
    font-size: 0.78rem;
}

.landing-cta-box {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #e2e8f0;
    border-radius: 20px;
    padding: 2.2rem 1.2rem;
}

.landing-cta-box h3,
.landing-cta-box p {
    color: inherit;
}

.landing-proof-strip {
    padding-top: 2.2rem;
    padding-bottom: 2.2rem;
}

.landing-proof-title {
    text-align: center;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 1rem;
}

.landing-proof-logos {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.landing-proof-logos span {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 46px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    font-size: 0.78rem;
    color: #334155;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.landing-testimonial {
    background: #ffffff;
    border: 1px solid #dbe7e3;
    border-radius: 16px;
    padding: 1.15rem;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

.landing-testimonial p {
    color: #334155;
    font-size: 0.93rem;
    margin-bottom: 1rem;
}

.landing-testimonial .who {
    border-top: 1px dashed #d1d5db;
    padding-top: 0.7rem;
}

.landing-testimonial .who strong {
    display: block;
    color: #0f172a;
    font-size: 0.88rem;
}

.landing-testimonial .who span {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 600;
}

.landing-faq {
    max-width: 880px;
    margin-left: auto;
    margin-right: auto;
    display: grid;
    gap: 0.75rem;
}

.landing-faq details {
    background: #ffffff;
    border: 1px solid #dbe7e3;
    border-radius: 14px;
    padding: 0.9rem 1rem;
}

.landing-faq summary {
    cursor: pointer;
    color: #0f172a;
    font-weight: 700;
    list-style: none;
}

.landing-faq summary::-webkit-details-marker {
    display: none;
}

.landing-faq details p {
    margin: 0.7rem 0 0;
    color: #475569;
    font-size: 0.9rem;
}

@media (max-width: 767px) {
    .landing-stats {
        grid-template-columns: 1fr;
    }

    .landing-showcase-grid {
        grid-template-columns: 1fr;
    }

    .landing-top-navbar {
        padding: 0.7rem 1rem;
    }

    .landing-proof-logos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}