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

:root {
    --bg-primary: #0b0813;
    --bg-secondary: #130f26;
    --bg-card: #1b1635;
    --bg-card-hover: #231c44;
    --border-color: rgba(255, 255, 255, 0.08);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --primary: #8b5cf6;
    --primary-hover: #a78bfa;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --accent-gradient: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);

    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #0ea5e9;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.4);

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

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    line-height: 1.5;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.02em;
}

a {
    color: inherit;
    text-decoration: none;
}

/* App Layout */
.app-container {
    display: flex;
    width: 100vw;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 280px;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    padding: 2rem 1.5rem;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2.5rem;
}

.sidebar-logo i {
    background: var(--primary-gradient);
    -webkit-background-clip: initial;
    -webkit-text-fill-color: initial;
    color: #fff;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.menu-item a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
}

.menu-item a:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.04);
}

.menu-item.active a {
    color: #fff;
    background: var(--primary-gradient);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.menu-item a i {
    font-size: 1.2rem;
    width: 20px;
}

.sidebar-user {
    margin-top: auto;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: var(--font-heading);
}

.user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: capitalize;
}

/* Main Content Wrapper */
.main-content {
    flex-grow: 1;
    margin-left: 280px;
    padding: 2.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Header Area */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.page-title h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.page-title p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
}

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

.btn-danger:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Grid & Cards */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

.metric-card:hover {
    transform: translateY(-4px);
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.15);
}

.metric-info h3 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.metric-info .value {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--primary);
}

.metric-card:nth-child(2) .metric-icon {
    color: var(--success);
}

.metric-card:nth-child(3) .metric-icon {
    color: var(--warning);
}

.metric-card:nth-child(4) .metric-icon {
    color: var(--info);
}

/* Dash Layout Sections */
.dashboard-sections {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .dashboard-sections {
        grid-template-columns: 1fr;
    }
}

.section-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
}

/* Forms */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-control {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
    width: 100%;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

select.form-control option {
    background: var(--bg-card);
    color: var(--text-primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.custom-table th {
    background: rgba(255, 255, 255, 0.02);
    padding: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    font-family: var(--font-heading);
}

.custom-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    vertical-align: middle;
}

.custom-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.01);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-ready {
    background: rgba(14, 165, 233, 0.15);
    color: var(--info);
    border: 1px solid rgba(14, 165, 233, 0.3);
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Thumbnails & Lightbox */
.product-thumbnail {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.product-thumbnail:hover {
    transform: scale(1.1);
    border-color: var(--primary);
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(11, 8, 19, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
}

.lightbox.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.lightbox-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.lightbox-body {
    display: flex;
    flex-direction: column;
}

.lightbox-img-container {
    width: 100%;
    height: 300px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lightbox-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.lightbox-details {
    padding: 1.5rem;
}

.lightbox-details h2 {
    margin-bottom: 0.5rem;
}

.lightbox-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
    background: rgba(0, 0, 0, 0.15);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.lightbox-meta-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.lightbox-meta-item span:first-child {
    color: var(--text-secondary);
}

.lightbox-meta-item span:last-child {
    font-weight: 600;
}

.lightbox-meta-item a {
    color: var(--primary);
    text-decoration: underline;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

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

/* Login Page Styling */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 50%, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 420px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    backdrop-filter: blur(10px);
}

@media (max-width: 480px) {
    .login-card {
        padding: 1.5rem;
    }
}

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

.login-header .logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 2rem;
    font-weight: 800;
    font-family: var(--font-heading);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Products catalog filter responsive grid */
.products-filter-grid {
    display: grid;
    grid-template-columns: 1fr 250px;
    gap: 1rem;
}

@media (max-width: 600px) {
    .products-filter-grid {
        grid-template-columns: 1fr;
    }
}

/* Reports dashboard charts grid */
.reports-charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .reports-charts-grid {
        grid-template-columns: 1fr;
    }
}

.mobile-header {
    display: none;
}

.sidebar-backdrop {
    display: none;
}

/* Responsive elements */
@media (max-width: 768px) {
    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.75rem 1rem;
        background-color: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 60px;
        z-index: 999;
    }

    .mobile-toggle {
        background: transparent;
        border: none;
        color: var(--text-primary);
        font-size: 1.5rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: var(--radius-sm);
        transition: var(--transition);
    }

    .mobile-toggle:hover {
        background: rgba(255, 255, 255, 0.05);
    }

    .mobile-logo {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-family: var(--font-heading);
        font-size: 1.25rem;
        font-weight: 800;
        background: var(--primary-gradient);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .mobile-logo i {
        background: var(--primary-gradient);
        -webkit-background-clip: initial;
        -webkit-text-fill-color: initial;
        color: #fff;
        padding: 0.35rem;
        border-radius: var(--radius-sm);
        font-size: 1rem;
    }

    .sidebar-backdrop {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
        z-index: 998;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .sidebar-backdrop.active {
        display: block;
        opacity: 1;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        box-shadow: var(--shadow-lg);
        padding: 2rem 1.5rem;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-logo span,
    .menu-item span,
    .sidebar-user .user-info {
        display: inline !important;
    }

    .sidebar-logo {
        justify-content: flex-start;
        margin-bottom: 2.5rem;
    }

    .menu-item a {
        justify-content: flex-start;
        padding: 0.85rem 1rem;
    }

    .sidebar-user {
        justify-content: flex-start;
        padding: 1rem;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 1.5rem 1rem;
        padding-top: 5rem;
        width: 100%;
        max-width: 100%;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .header-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .pos-category-row {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        padding: 1rem !important;
    }

    .category-qty-gauge {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        padding: 0.75rem 1rem !important;
    }

    .category-qty-gauge .qty-num {
        font-size: 1.8rem !important;
        margin-bottom: 0 !important;
    }

    .selected-product-card {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
        text-align: center;
        padding: 1rem !important;
    }

    .selected-product-card img {
        justify-self: center !important;
    }

    .selected-product-card .qty-control {
        margin: 0.5rem auto !important;
    }

    .selected-product-card .item-price-calc {
        text-align: center !important;
        font-size: 1.1rem;
    }
}

/* Build queue items grid */
.build-queue-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.build-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    transition: var(--transition);
}

.build-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.build-card-img {
    height: 160px;
    border-radius: var(--radius-md);
    background: #000;
    overflow: hidden;
    position: relative;
}

.build-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.build-card-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.build-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.build-card-qty {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
}

.build-card-qty span:first-child {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.build-card-qty span:last-child {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--success);
}

/* Custom Multiselect / Product selection for orders */
.order-product-row {
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.order-product-row select {
    flex-grow: 1;
}

.order-product-row input {
    width: 100px;
}

.remove-product-row {
    color: var(--danger);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
}

/* Notification Toast */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 2000;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 280px;
    animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast-success {
    border-left-color: var(--success);
}

.toast-error {
    border-left-color: var(--danger);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

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


/* ====================================================
   POS ADVANCED CUSTOM ORDER GRID LAYOUT (NEW)
   ==================================================== */
.pos-container {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 1100px) {
    .pos-container {
        grid-template-columns: 1fr;
    }
}

.pos-sidebar {
    position: sticky;
    top: 2rem;
}

.pos-workspace {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Category Autocomplete Rows */
.pos-category-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    align-items: start;
    transition: var(--transition);
}

.pos-category-row:hover {
    border-color: rgba(139, 92, 246, 0.2);
    background: rgba(255, 255, 255, 0.03);
}

.category-qty-gauge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem 0.75rem;
    text-align: center;
}

.category-qty-gauge .qty-num {
    font-size: 2.2rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--primary-hover);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.category-qty-gauge .qty-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.category-search-wrapper {
    position: relative;
    width: 100%;
}

/* Autocomplete suggestion dropdowns */
.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 500;
    max-height: 250px;
    overflow-y: auto;
    display: none;
}

.autocomplete-suggestions.active {
    display: block;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    transition: var(--transition);
}

.suggestion-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.suggestion-item img {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.suggestion-title {
    font-weight: 500;
    font-size: 0.85rem;
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-price {
    font-size: 0.85rem;
    color: var(--success);
    font-weight: 600;
}

/* Selected Items lists */
.selected-products-list {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    grid-column: 1 / -1;
}

.selected-product-card {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    display: grid;
    grid-template-columns: 48px 1fr 110px 110px 30px;
    gap: 1rem;
    align-items: center;
    position: relative;
    transition: var(--transition);
}

@media (max-width: 600px) {
    .selected-product-card {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        text-align: center;
    }
}

.selected-product-card img {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.selected-product-card .item-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.selected-product-card .item-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.selected-product-card .item-sku {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.selected-product-card .qty-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    width: 95px;
    justify-self: center;
}

.qty-control button {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-primary);
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    transition: var(--transition);
}

.qty-control button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.qty-control input {
    width: 39px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
}

.item-price-calc {
    font-weight: 700;
    color: var(--success);
    font-family: var(--font-heading);
    text-align: right;
}

.item-remove-btn {
    color: var(--danger);
    cursor: pointer;
    text-align: center;
    font-size: 1.2rem;
    transition: var(--transition);
}

.item-remove-btn:hover {
    transform: scale(1.15);
}

.item-notes-field {
    grid-column: 1 / -1;
    margin-top: 0.25rem;
}

@media (max-width: 768px) {
    .pos-sidebar.section-card {
        position: static;
    }

    .section-card {
        padding: 1rem 15px;
    }

    .section-title {
        font-size: 1rem;
        font-weight: 700;
    }

    .page-title h1 {
        font-size: 1.5rem;

    }

    .dashboard-sections {
        display: flex;
        grid-template-columns: 2fr 1fr;
        gap: 1.5rem;
        flex-direction: column;
    }
}