/* CSS Reset & Variable Definitions */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-main: #121214;
    --bg-card: rgba(15, 23, 42, 0.65);
    --bg-card-hover: rgba(30, 41, 59, 0.8);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(6, 182, 212, 0.4);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --color-primary: #06b6d4;      /* Cyan */
    --color-primary-glow: rgba(6, 182, 212, 0.15);
    --color-secondary: #4f46e5;    /* Indigo */
    --color-secondary-glow: rgba(79, 70, 229, 0.15);
    --color-success: #10b981;      /* Emerald */
    --color-success-glow: rgba(16, 185, 129, 0.15);
    --color-warning: #f59e0b;      /* Amber */
    --color-danger: #ef4444;       /* Rose */

    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius-lg: 16px;
    --border-radius-md: 10px;
    --border-radius-sm: 6px;

    /* Theme adaptive variables */
    --bg-sidebar: rgba(10, 15, 30, 0.8);
    --bg-chat-messages: rgba(0, 0, 0, 0.2);
    --bg-chat-msg-agent: rgba(255, 255, 255, 0.05);
    --bg-chat-input-wrapper: rgba(255, 255, 255, 0.02);
    --bg-chat-input: rgba(0, 0, 0, 0.3);
    --brand-gradient: linear-gradient(to right, #fff, #94a3b8);
    --bg-radio-card: rgba(0, 0, 0, 0.1);
}

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

body {
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(at 0% 0%, rgba(79, 70, 229, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.1) 0px, transparent 50%),
        linear-gradient(rgba(18, 18, 20, 0.25), rgba(18, 18, 20, 0.25)),
        url('../images/dark_satin_bg.jpg');
    background-blend-mode: normal, normal, normal, multiply;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

/* Layout Grid */
.app-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    width: 100%;
    min-height: 100vh;
    transition: grid-template-columns 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-container.sidebar-collapsed {
    grid-template-columns: 0px 1fr;
}

/* Sidebar Navigation */
.sidebar {
    background: var(--bg-sidebar);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100vh;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    position: sticky;
    top: 0;
}

.app-container.sidebar-collapsed .sidebar {
    transform: translateX(-260px);
    padding: 1.5rem 0;
    pointer-events: none;
    border-right-width: 0px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.brand-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px var(--color-primary-glow);
}

.brand-icon svg {
    width: 22px;
    height: 22px;
    fill: #fff;
}

.brand-text {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-text span {
    color: var(--color-primary);
}

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

.mobile-only-nav {
    display: none !important;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--border-radius-md);
    transition: var(--transition-smooth);
    position: relative;
}

.nav-item a svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    transition: var(--transition-smooth);
}

.nav-item.active a, .nav-item a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}

.nav-item.active a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 4px;
    background: var(--color-primary);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 10px var(--color-primary);
}

.nav-item.active a svg {
    stroke: var(--color-primary);
    filter: drop-shadow(0 0 5px var(--color-primary));
}

.nav-badge {
    margin-left: auto;
    background: var(--color-primary);
    color: #060913;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    box-shadow: 0 0 10px var(--color-primary-glow);
}

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

.manager-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.manager-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

.manager-info {
    display: flex;
    flex-direction: column;
}

.manager-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.manager-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Main Content Area */
.main-content {
    padding: 2.5rem 3rem;
    overflow-y: auto;
    height: 100vh;
}

/* Header Section */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.page-title h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.75px;
    margin-bottom: 0.25rem;
}

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

.client-status-badge {
    background: rgba(6, 182, 212, 0.06);
    border: 1px solid rgba(6, 182, 212, 0.15);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--color-success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--color-success);
}

.client-status-badge span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Glass Card Component */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.75rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.25);
    transition: var(--transition-smooth);
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.35);
}

/* Dashboard Home Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.dashboard-left {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, var(--color-primary-glow) 0%, transparent 70%);
    pointer-events: none;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.75rem;
}

.stat-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.stat-bar {
    height: 100%;
    background: linear-gradient(to right, var(--color-secondary), var(--color-primary));
    border-radius: 4px;
    box-shadow: 0 0 10px var(--color-primary-glow);
    transition: width 1s ease-in-out;
}

.stat-subtext {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

/* Recent Orders Section */
.recent-orders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.recent-orders-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
}

.btn-text {
    background: none;
    border: none;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-text:hover {
    color: #fff;
    text-shadow: 0 0 8px var(--color-primary);
}

.orders-table-wrapper {
    overflow-x: auto;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.orders-table th {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.orders-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-primary);
}

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

.po-number {
    font-weight: 600;
    color: #fff;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

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

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

.badge-pickup {
    background: rgba(6, 182, 212, 0.1);
    color: var(--color-primary);
    border: 1px solid rgba(6, 182, 212, 0.2);
}

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

/* Sidebar Manager Interactivity Widget */
.support-widget {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

.support-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

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

.support-title p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.chat-box {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 320px;
    background: var(--bg-chat-messages);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.chat-messages {
    flex-grow: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.message {
    max-width: 85%;
    padding: 0.75rem;
    border-radius: var(--border-radius-md);
    font-size: 0.85rem;
    line-height: 1.4;
}

.message.agent {
    background: var(--bg-chat-msg-agent);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.message.user {
    background: var(--color-secondary);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
    box-shadow: 0 2px 8px var(--color-secondary-glow);
}

.chat-input-wrapper {
    display: flex;
    padding: 0.75rem;
    background: var(--bg-chat-input-wrapper);
    border-top: 1px solid var(--border-color);
    gap: 0.5rem;
}

.chat-input {
    flex-grow: 1;
    background: var(--bg-chat-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 0.5rem 0.75rem;
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
    font-family: var(--font-sans);
}

.chat-input:focus {
    border-color: var(--color-primary);
}

.btn-icon {
    width: 32px;
    height: 32px;
    background: var(--color-primary);
    border: none;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #060913;
    transition: var(--transition-smooth);
}

.btn-icon:hover {
    filter: brightness(1.2);
    box-shadow: 0 0 8px var(--color-primary-glow);
}

.btn-icon svg {
    width: 16px;
    height: 16px;
}

/* Catalog View styles */
.catalog-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.search-bar {
    position: relative;
    flex-grow: 1;
    max-width: 450px;
}

.search-bar svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.search-input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 0.85rem 1rem 0.85rem 2.75rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-smooth);
}

.search-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 12px var(--color-primary-glow);
}

.category-filters {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.filter-chip {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1.25rem;
    border-radius: var(--border-radius-lg);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    white-space: nowrap;
}

.filter-chip:hover, .filter-chip.active {
    background: var(--color-primary-glow);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

/* Product Cards Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.product-category {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
}

.product-sku {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: monospace;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.product-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.product-warehouse {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.02);
    padding: 0.35rem 0.5rem;
    border-radius: var(--border-radius-sm);
    width: fit-content;
}

.product-warehouse svg {
    width: 14px;
    height: 14px;
}

/* Tiered Pricing List */
.price-tiers-box {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
}

.price-tiers-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.price-tier-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    padding: 0.25rem 0;
    color: var(--text-secondary);
    border-bottom: 1px dashed rgba(255, 255, 255, 0.03);
}

.price-tier-row:last-child {
    border-bottom: none;
}

.price-tier-row.active {
    color: var(--color-success);
    font-weight: 700;
}

.price-tier-row span.discount {
    background: var(--color-success-glow);
    color: var(--color-success);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
}

/* Card Controls */
.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    gap: 1rem;
}

.product-price-display {
    display: flex;
    flex-direction: column;
}

.current-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
}

.price-unit {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.qty-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
}

.qty-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 700;
    transition: var(--transition-smooth);
}

.qty-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.qty-input {
    width: 38px;
    border: none;
    background: none;
    color: var(--text-primary);
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    outline: none;
}

/* Chrome, Safari, Edge, Opera: remove spinner arrows */
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox: remove spinner arrows */
.qty-input[type=number] {
  -moz-appearance: textfield;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
    color: #fff;
    border: none;
    padding: 0.65rem 1rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 12px var(--color-primary-glow);
}

.btn-primary:hover {
    filter: brightness(1.15);
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.35);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.65rem 1.25rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

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

/* Stock Alerts */
.stock-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: auto;
}

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

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

/* Cart View Layout */
.cart-grid {
    display: grid;
    grid-template-columns: 2fr 1.2fr;
    gap: 2rem;
}

.cart-items-section {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.cart-item-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem;
}

.cart-item-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cart-item-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--color-primary);
}

.cart-item-details {
    flex-grow: 1;
}

.cart-item-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.cart-item-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    gap: 1rem;
}

.cart-item-pricing {
    text-align: right;
    display: flex;
    flex-direction: column;
    min-width: 140px;
}

.cart-item-price-calc {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.cart-item-total {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1rem;
    margin-top: 0.15rem;
}

.cart-item-discount {
    color: var(--color-success);
    font-size: 0.75rem;
    font-weight: 600;
}

.btn-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.btn-remove:hover {
    color: var(--color-danger);
    background: rgba(239, 68, 68, 0.1);
}

.btn-remove svg {
    width: 18px;
    height: 18px;
}

/* Empty Cart State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: var(--border-radius-lg);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    stroke: var(--text-muted);
    stroke-width: 1.5;
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* Checkout Panel */
.checkout-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 2.5rem;
}

.checkout-section-title {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

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

.form-control {
    background: var(--bg-chat-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    font-family: var(--font-sans);
    transition: var(--transition-smooth);
}

.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 8px var(--color-primary-glow);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.radio-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.radio-card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: var(--bg-radio-card);
    transition: var(--transition-smooth);
}

.radio-card input {
    accent-color: var(--color-primary);
}

.radio-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.radio-card.active {
    border-color: var(--color-primary);
    background: var(--color-primary-glow);
    color: #fff;
}

/* Order Summary Details */
.summary-totals {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.summary-row.discount {
    color: var(--color-success);
}

.summary-row.total {
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
}

/* Credit limit check alert box */
.credit-warning-box {
    display: flex;
    gap: 0.75rem;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--border-radius-md);
    padding: 0.85rem 1rem;
    font-size: 0.8rem;
    color: var(--color-warning);
    line-height: 1.4;
    margin-top: 0.5rem;
}

.credit-warning-box svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.credit-success-box {
    display: flex;
    gap: 0.75rem;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--border-radius-md);
    padding: 0.85rem 1rem;
    font-size: 0.8rem;
    color: var(--color-success);
    line-height: 1.4;
    margin-top: 0.5rem;
}

.credit-success-box svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Order Success Screen */
.success-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    max-width: 600px;
    margin: 2rem auto;
    text-align: center;
}

.success-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--color-success-glow);
    border: 2px solid var(--color-success);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    box-shadow: 0 0 20px var(--color-success-glow);
}

.success-icon-wrapper svg {
    width: 40px;
    height: 40px;
    stroke: var(--color-success);
    stroke-width: 2.5;
}

.success-screen h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.success-screen p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.success-actions {
    display: flex;
    gap: 1rem;
}

/* Printable PDF Invoice View */
.invoice-container {
    background: #fff;
    color: #0f172a;
    padding: 3rem;
    border-radius: var(--border-radius-md);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    max-width: 800px;
    margin: 1.5rem auto;
    font-size: 0.85rem;
    line-height: 1.4;
    border: 1px solid #e2e8f0;
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.invoice-logo {
    display: flex;
    flex-direction: column;
}

.invoice-logo-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e1b4b;
}

.invoice-logo-sub {
    font-size: 0.75rem;
    color: #64748b;
    letter-spacing: 1px;
    font-weight: 700;
}

.invoice-title-block {
    text-align: right;
}

.invoice-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1e1b4b;
}

.invoice-id {
    font-size: 0.95rem;
    font-family: monospace;
    font-weight: 700;
    color: #64748b;
}

.invoice-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    background: #f8fafc;
    padding: 1rem;
    border-radius: var(--border-radius-sm);
    border: 1px solid #e2e8f0;
}

.invoice-meta-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.invoice-meta-val {
    font-weight: 600;
    color: #0f172a;
}

.invoice-addresses {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.invoice-address-col h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.25rem;
}

.invoice-address-col p {
    color: #334155;
    white-space: pre-line;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.invoice-table th {
    background: #f1f5f9;
    padding: 0.75rem 1rem;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: #475569;
    text-align: left;
    border-bottom: 2px solid #cbd5e1;
}

.invoice-table td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
}

.invoice-table-totals {
    margin-left: auto;
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius-sm);
    margin-bottom: 2rem;
}

.invoice-total-row {
    display: flex;
    justify-content: space-between;
}

.invoice-total-row.grand-total {
    border-top: 1px solid #cbd5e1;
    padding-top: 0.5rem;
    font-size: 1.1rem;
    font-weight: 800;
    color: #1e1b4b;
}

.invoice-total-row.discount {
    color: #16a34a;
    font-weight: 600;
}

.invoice-footer {
    border-top: 1px solid #cbd5e1;
    padding-top: 1.5rem;
    text-align: center;
    color: #64748b;
    font-size: 0.75rem;
}

.invoice-terms-notice {
    font-style: italic;
    background: #fffbeb;
    border: 1px solid #fef3c7;
    color: #b45309;
    padding: 0.75rem;
    border-radius: var(--border-radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.75rem;
}

.signature-blocks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.sig-line {
    border-top: 1px solid #94a3b8;
    margin-top: 3rem;
    padding-top: 0.5rem;
    text-align: center;
    font-size: 0.75rem;
    color: #475569;
}

.print-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Order History Details Sub-view */
.order-details-card {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.order-details-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.25rem;
}

.timeline {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background: var(--border-color);
}

.timeline-event {
    position: relative;
    margin-bottom: 1.25rem;
}

.timeline-event:last-child {
    margin-bottom: 0;
}

.timeline-point {
    position: absolute;
    left: -2rem;
    top: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-main);
    border: 2px solid var(--color-primary);
}

.timeline-point.active {
    background: var(--color-primary);
    box-shadow: 0 0 8px var(--color-primary);
}

.timeline-content {
    display: flex;
    flex-direction: column;
}

.timeline-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
}

.timeline-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.timeline-comment {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.view-section {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Hide print layout in normal display */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }
    
    /* Hide everything else */
    body * {
        visibility: hidden;
    }
    
    #invoice-print-area, #invoice-print-area * {
        visibility: visible;
    }
    
    /* Remove layout elements from document flow */
    .sidebar,
    .content-header,
    .print-actions,
    .theme-toggle-btn,
    #chat-assistant-widget,
    .brand {
        display: none !important;
    }
    
    .app-container {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
        grid-template-columns: none !important;
    }
    
    .main-content {
        padding: 0 !important;
        margin: 0 !important;
        height: auto !important;
        overflow: visible !important;
        display: block !important;
    }
    
    #invoice-print-area {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 2.5rem !important;
        box-shadow: none !important;
        border: none !important;
        background: #ffffff !important;
        color: #000000 !important;
    }
    
    .print-hide-logistics {
        display: none !important;
    }
}

/* Theme Toggle Button Styling */
.theme-toggle-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.theme-toggle-btn:hover {
    border-color: var(--color-primary);
    transform: rotate(30deg) scale(1.05);
    box-shadow: 0 4px 15px var(--color-primary-glow);
}

.theme-toggle-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transition: var(--transition-smooth);
}

/* Light Mode Overrides */
body.light-mode {
    --bg-main: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --border-color: rgba(15, 23, 42, 0.08);
    --border-hover: rgba(6, 182, 212, 0.6);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    --bg-sidebar: rgba(255, 255, 255, 0.92);
    --bg-chat-messages: rgba(0, 0, 0, 0.02);
    --bg-chat-msg-agent: rgba(0, 0, 0, 0.03);
    --bg-chat-input-wrapper: rgba(0, 0, 0, 0.01);
    --bg-chat-input: rgba(255, 255, 255, 0.95);
    --brand-gradient: linear-gradient(to right, #0f172a, #475569);
    --bg-radio-card: rgba(0, 0, 0, 0.02);
    
    background-image: 
        radial-gradient(at 0% 0%, rgba(79, 70, 229, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.04) 0px, transparent 50%),
        linear-gradient(rgba(241, 245, 249, 0.45), rgba(241, 245, 249, 0.45)),
        url('../images/main_bg.jpg');
    background-blend-mode: normal, normal, normal, normal;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

body.light-mode .badge-completed {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

body.light-mode .orders-table tr:hover td {
    background: rgba(255, 255, 255, 0.4);
}

body.light-mode .po-number {
    color: #0f172a;
}

/* Auth Screen Styles */
.auth-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.7)), url('/images/login_bg.jpg') no-repeat center center;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    overflow-y: auto;
    padding: 2rem;
}

.auth-card {
    width: 100%;
    max-width: 580px;
    padding: 2.5rem;
    animation: fadeIn 0.4s ease-out forwards;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.auth-brand svg {
    width: 32px;
    height: 32px;
    stroke: var(--color-primary);
}

.auth-brand span {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.auth-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

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

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 0.25rem;
    margin-bottom: 2rem;
}

.auth-tab {
    padding: 0.6rem;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.auth-tab.active {
    background: var(--color-primary);
    color: #fff;
}

.auth-error-msg {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--color-danger);
    font-size: 0.8rem;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-md);
    margin-bottom: 1.5rem;
    display: none;
    line-height: 1.4;
}

.auth-btn {
    width: 100%;
    padding: 0.85rem;
    font-size: 0.95rem;
    font-weight: 700;
    justify-content: center;
    margin-top: 1rem;
}

/* App Logo Styling & Light/Dark adaptation */
.app-logo {
    height: 52px;
    width: auto;
    object-fit: contain;
    filter: invert(1) brightness(1.5);
    transition: var(--transition-smooth);
}

body.light-mode .app-logo {
    filter: none;
}

/* Header Navigation Buttons */
.header-nav-btn {
    background: rgba(59, 73, 153, 0.1);
    color: var(--color-primary);
    border: 1px solid rgba(59, 73, 153, 0.25);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
    height: 38px;
    box-sizing: border-box;
    position: relative;
    outline: none;
}
.header-nav-btn:hover {
    background: rgba(59, 73, 153, 0.22);
}
.header-nav-btn.active {
    background: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
}

/* Sidebar backdrop styling */
#sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 998; /* just below sidebar which has z-index 1000 */
    display: none;
    backdrop-filter: blur(4px);
    transition: opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

/* Responsive adjustments for mobile screens */
@media (max-width: 768px) {
    /* Show backdrop when sidebar is NOT collapsed */
    .app-container:not(.sidebar-collapsed) #sidebar-backdrop {
        display: block !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    .app-container,
    .app-container.sidebar-collapsed {
        grid-template-columns: 0px 1fr !important;
    }
    
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 1000;
        box-shadow: 5px 0 15px rgba(0,0,0,0.5);
        transform: translateX(-260px);
        width: 260px !important;
    }
    
    .app-container:not(.sidebar-collapsed) {
        grid-template-columns: 0px 1fr !important;
    }
    
    .app-container:not(.sidebar-collapsed) .sidebar {
        transform: translateX(0) !important;
        pointer-events: auto !important;
    }
    
    /* Show mobile navigation links inside the sidebar drawer on mobile */
    .mobile-only-nav {
        display: block !important;
    }
    ul.nav-menu li.mobile-only-nav {
        display: list-item !important;
    }
    
    .main-content {
        padding: 1.5rem 1rem !important;
        width: 100%;
        box-sizing: border-box;
    }
    
    .content-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .content-header > div {
        width: 100% !important;
        justify-content: space-between !important;
    }
    
    /* Hide page subtitle on mobile to save vertical space */
    .page-title p {
        display: none !important;
    }
    .page-title h1 {
        font-size: 1.25rem !important;
        line-height: 1.2;
    }
    
    /* Hide duplicate header navigation buttons on mobile */
    .header-cart-btn,
    .header-orders-btn,
    .logout-btn {
        display: none !important;
    }
    
    /* Hide profile badge in mobile header to prevent row overflow */
    .client-status-badge {
        display: none !important;
    }
    
    /* Hide label text to make active cart select fit portrait width */
    .header-cart-selector span {
        display: none !important;
    }
    
    .header-cart-selector {
        flex-grow: 1 !important;
        margin-right: 0.5rem;
    }
    
    #header-default-cart-select {
        width: 100% !important;
    }
    
    .header-nav-btn {
        padding: 0.5rem 0.75rem !important;
    }
}

@media (max-width: 600px) {
    /* Always keep a beautiful 2-column grid on mobile down to 320px screen width */
    .category-tiles-container,
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }
    
    /* Make product card highly compact on small portrait mobile screens */
    .product-card-view {
        padding: 0.5rem !important;
        border-radius: 8px !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Shrink product image container on mobile */
    .product-card-view div[onclick*="openProductModal"] {
        height: 110px !important;
        margin-bottom: 0.5rem !important;
    }
    
    .product-card-view h3 {
        font-size: 0.8rem !important;
        min-height: 2.2rem !important;
        margin-bottom: 0.25rem !important;
        line-height: 1.2 !important;
    }
    
    /* SKU/ID text */
    .product-card-view div[style*="font-size: 0.9rem"][style*="color: #64748b"] {
        font-size: 0.75rem !important;
        margin-bottom: 0.35rem !important;
    }
    
    /* Stock info row */
    .product-card-view div[style*="display: flex; align-items: center"][style*="margin-bottom: 1.25rem"] {
        margin-bottom: 0.5rem !important;
        font-size: 0.75rem !important;
    }
    .product-card-view div[style*="display: flex; align-items: center"][style*="margin-bottom: 1.25rem"] svg {
        width: 14px !important;
        height: 14px !important;
    }
    
    /* Price text size */
    .product-card-view div[style*="display: flex; align-items: baseline"] {
        margin-bottom: 0.75rem !important;
    }
    .product-card-view div[style*="display: flex; align-items: baseline"] span[style*="font-size: 1.35rem"] {
        font-size: 1.05rem !important; 
    }
    .product-card-view div[style*="display: flex; align-items: baseline"] span[style*="font-size: 0.8rem"] {
        font-size: 0.7rem !important; 
    }
    
    /* Action button */
    .product-card-view .btn-primary {
        padding: 0.45rem !important;
        font-size: 0.75rem !important;
        height: auto !important;
    }
    .product-card-view .btn-primary svg {
        width: 14px !important;
        height: 14px !important;
    }

    /* Cart card item grid layout transformation for mobile screens */
    .cart-item-card {
        display: grid !important;
        grid-template-columns: 80px 1fr !important;
        grid-template-rows: auto auto !important;
        gap: 0.75rem !important;
        padding: 0.75rem !important;
    }
    
    .cart-item-icon {
        grid-column: 1 !important;
        grid-row: 1 !important;
    }
    
    .cart-item-details {
        grid-column: 2 !important;
        grid-row: 1 !important;
    }
    
    .cart-item-card > div[style*="display: flex; align-items: center"] {
        grid-column: 1 / span 2 !important;
        grid-row: 2 !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        border-top: 1px dashed var(--border-color);
        padding-top: 0.75rem;
        margin-top: 0.25rem;
    }

    /* Catalog search & filter toolbar stacked layout transformation for mobile screens */
    .glass-card > div[style*="display: flex; gap: 1rem"] {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    
    .glass-card > div[style*="display: flex; gap: 1rem"] > div[style*="flex-grow: 1"] {
        width: 100% !important;
    }
    
    .glass-card div[style*="display: flex; border: 1px solid var(--border-color)"] {
        width: 100% !important;
    }
    .glass-card div[style*="display: flex; border: 1px solid var(--border-color)"] button {
        flex-grow: 1 !important;
        text-align: center !important;
    }
    
    .glass-card > div[style*="border-top"] {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
    }
    
    .glass-card > div[style*="border-top"] > div[style*="display: flex; align-items: center"] {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
    }
    
    .glass-card select[id="catalog-sort"] {
        width: 100% !important;
    }
}

/* Print Utilities & Compact print styling */
@media print {
    .print-hide,
    #invoice-print-area .print-hide {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: none !important;
    }
    
    #invoice-print-area .invoice-table th,
    #invoice-print-area .invoice-table td {
        padding: 0.35rem 0.5rem !important;
        font-size: 0.75rem !important;
        line-height: 1.2 !important;
    }
    
    #invoice-print-area .invoice-header {
        padding-bottom: 0.5rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    #invoice-print-area .invoice-meta-grid {
        margin-bottom: 0.75rem !important;
        gap: 0.5rem !important;
    }
    
    #invoice-print-area .invoice-addresses {
        margin-bottom: 0.75rem !important;
    }
    
    #invoice-print-area .invoice-footer {
        margin-top: 1rem !important;
        padding-top: 0.75rem !important;
    }
}
