/* ═══════════════════════════════════════════════════════════
   SETIA ABADI — Sewing Supply Store Design System
   Premium Dark Theme with Glassmorphism
   ═══════════════════════════════════════════════════════════ */

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

/* ── CSS Custom Properties ───────────────────────────────── */
:root {
    /* Primary Palette */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-glass: #ffffff;
    --bg-glass-hover: #f1f5f9;

    /* Accent Colors */
    --accent-primary: #1e3a8a;
    --accent-primary-light: #2563eb;
    --accent-primary-dark: #1e40af;
    --accent-secondary: #0f172a;
    --accent-secondary-light: #334155;
    --accent-warning: #d97706;
    --accent-danger: #dc2626;
    --accent-success: #16a34a;
    --accent-info: #2563eb;

    /* Text */
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-tertiary: #64748b;
    --text-accent: #1e3a8a;

    /* Borders */
    --border-subtle: #e2e8f0;
    --border-default: #cbd5e1;
    --border-accent: rgba(30, 58, 138, 0.3);

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

    /* Layout */
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --topbar-height: 64px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ────────────────────────────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

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

img {
    max-width: 100%;
}

/* ── Layout ──────────────────────────────────────────────── */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-subtle);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-normal);
}

.sidebar-brand {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.sidebar-brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
}

.sidebar-brand-text h1 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.sidebar-brand-text span {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-section-title {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 12px 12px 8px;
    margin-top: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    position: relative;
    margin-bottom: 2px;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-glass-hover);
}

.nav-link.active {
    color: var(--accent-primary);
    background: rgba(20, 184, 166, 0.1);
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--accent-primary);
    border-radius: 0 4px 4px 0;
}

.nav-link-icon {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.nav-link-badge {
    margin-left: auto;
    background: var(--accent-danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    min-width: 20px;
    text-align: center;
}

/* ── Main Content ────────────────────────────────────────── */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Top Bar ─────────────────────────────────────────────── */
.topbar {
    height: var(--topbar-height);
    background: rgba(81, 217, 255, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 6px;
}

.page-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ── Search Bar ──────────────────────────────────────────── */
.search-global {
    position: relative;
    width: 320px;
}

.search-global input {
    width: 100%;
    padding: 9px 14px 9px 38px;
    background: var(--bg-glass);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
    transition: all var(--transition-fast);
}

.search-global input::placeholder {
    color: var(--text-tertiary);
}

.search-global input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-tertiary);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

.search-global-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 0.9rem;
    pointer-events: none;
}

.search-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    max-height: 400px;
    overflow-y: auto;
    z-index: 200;
    display: none;
}

.search-results.active {
    display: block;
    animation: slideDown 0.2s ease-out;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.search-result-item:hover {
    background: var(--bg-glass-hover);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-color {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 2px solid var(--border-default);
    flex-shrink: 0;
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-meta {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.search-result-price {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-primary);
    white-space: nowrap;
}

/* ── Page Container ──────────────────────────────────────── */
.page-container {
    flex: 1;
    padding: 28px;
}

/* ── Breadcrumbs ─────────────────────────────────────────── */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 0.8rem;
}

.breadcrumbs a {
    color: var(--text-tertiary);
}

.breadcrumbs a:hover {
    color: var(--accent-primary);
}

.breadcrumbs span {
    color: var(--text-tertiary);
}

.breadcrumbs .current {
    color: var(--text-secondary);
}

/* ── Page Header ─────────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.page-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ── Stat Cards ──────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 22px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
}

.stat-card:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    border-radius: 0 0 0 80px;
    opacity: 0.08;
}

.stat-card.teal::after {
    background: var(--accent-primary);
}

.stat-card.purple::after {
    background: var(--accent-secondary);
}

.stat-card.amber::after {
    background: var(--accent-warning);
}

.stat-card.blue::after {
    background: var(--accent-info);
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.stat-card-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.stat-card.teal .stat-card-icon {
    background: rgba(20, 184, 166, 0.15);
    color: var(--accent-primary);
}

.stat-card.purple .stat-card-icon {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-secondary);
}

.stat-card.amber .stat-card-icon {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-warning);
}

.stat-card.blue .stat-card-icon {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-info);
}

.stat-card-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-card-sub {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* ── Cards & Panels ──────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.card-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: 22px;
}

.card-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ── Tables ──────────────────────────────────────────────── */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1px solid var(--border-default);
    white-space: nowrap;
}

tbody td {
    padding: 14px 16px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
}

tbody tr {
    transition: background var(--transition-fast);
}

tbody tr:hover {
    background: var(--bg-glass-hover);
}

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

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

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-dark));
    color: white;
    border-color: var(--accent-primary);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-primary-light), var(--accent-primary));
    box-shadow: 0 4px 15px rgba(20, 184, 166, 0.3);
    transform: translateY(-1px);
    color: white;
}

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-secondary);
    border-color: var(--border-default);
}

.btn-secondary:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
    border-color: var(--border-accent);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-danger);
    border-color: rgba(239, 68, 68, 0.3);
}

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

.btn-sm {
    padding: 5px 12px;
    font-size: 0.78rem;
}

.btn-icon {
    padding: 8px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

.btn-ghost:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
}

/* ── Badges ──────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-teal {
    background: rgba(20, 184, 166, 0.15);
    color: var(--accent-primary);
}

.badge-purple {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-secondary);
}

.badge-amber {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-warning);
}

.badge-red {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-danger);
}

.badge-green {
    background: rgba(34, 197, 94, 0.15);
    color: var(--accent-success);
}

.badge-blue {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-info);
}

/* ── Forms ────────────────────────────────────────────────── */
.form-group {
    margin-bottom: 20px;
}

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

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-glass);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
    background: var(--bg-tertiary);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-tertiary);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 36px;
}

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

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 4px;
}

.form-error {
    font-size: 0.75rem;
    color: var(--accent-danger);
    margin-top: 4px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.form-check input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-default);
    border-radius: 4px;
    background: var(--bg-glass);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.form-check input[type="checkbox"]:checked {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.form-check input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

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

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

/* ── Color Swatch ────────────────────────────────────────── */
.color-swatch {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 2px solid var(--border-default);
    vertical-align: middle;
    margin-right: 8px;
}

.color-swatch-lg {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

/* ── Price Display ───────────────────────────────────────── */
.price-display {
    font-weight: 700;
    color: var(--accent-primary);
}

.price-display.special {
    color: var(--accent-warning);
}

.price-type-badge {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 6px;
}

.price-type-badge.default {
    background: rgba(20, 184, 166, 0.15);
    color: var(--accent-primary);
}

.price-type-badge.special {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-warning);
}

.price-type-badge.bulk {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-secondary);
}

/* ── Stock Indicator ─────────────────────────────────────── */
.stock-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stock-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.stock-dot.good {
    background: var(--accent-success);
}

.stock-dot.warning {
    background: var(--accent-warning);
    animation: pulse 2s infinite;
}

.stock-dot.danger {
    background: var(--accent-danger);
    animation: pulse 1.5s infinite;
}

/* ── Tabs ────────────────────────────────────────────────── */
.tabs {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 22px;
    overflow-x: auto;
}

.tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text-secondary);
}

.tab-btn.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.25s ease-out;
}

/* ── Pagination ──────────────────────────────────────────── */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.pagination-wrapper nav {
    display: flex;
    gap: 4px;
}

.pagination-wrapper .page-link,
.pagination-wrapper a,
.pagination-wrapper span[aria-current] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    background: var(--bg-glass);
    text-decoration: none;
}

.pagination-wrapper a:hover {
    background: var(--bg-glass-hover);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.pagination-wrapper span[aria-current],
.pagination-wrapper .active span {
    background: var(--accent-primary) !important;
    border-color: var(--accent-primary) !important;
    color: white !important;
}

.pagination-wrapper .disabled span {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ── Product Grid ────────────────────────────────────────── */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
}

.product-card:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-glow);
    transform: translateY(-3px);
}

.product-card-body {
    padding: 18px;
}

.product-card-category {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-secondary);
    margin-bottom: 6px;
}

.product-card-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.3;
}

.product-card-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--accent-primary);
    margin-bottom: 12px;
}

.product-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: var(--text-tertiary);
}

.product-card-footer {
    padding: 12px 18px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    gap: 8px;
}

.product-card-footer .btn {
    flex: 1;
    justify-content: center;
    font-size: 0.78rem;
}

/* ── Category Cards ──────────────────────────────────────── */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 22px;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
}

.category-card:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.category-card-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    background: rgba(20, 184, 166, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.category-card-info {
    flex: 1;
}

.category-card-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.category-card-count {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

/* ── Alerts / Flash Messages ─────────────────────────────── */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease-out;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: var(--accent-success);
}

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

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

.alert-close {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1.1rem;
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}

.alert-close:hover {
    opacity: 1;
}

/* ── Modal ───────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    transform: scale(0.9) translateY(20px);
    transition: transform var(--transition-normal);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 22px;
}

.modal-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ── Empty State ─────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-tertiary);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.875rem;
    margin-bottom: 20px;
}

/* ── Filter Bar ──────────────────────────────────────────── */
.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 22px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-bar .form-input,
.filter-bar .form-select {
    width: auto;
    min-width: 200px;
}

/* ── Savings Badge ───────────────────────────────────────── */
.savings-badge {
    background: rgba(34, 197, 94, 0.15);
    color: var(--accent-success);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}

/* ── Unit Conversion Card ────────────────────────────────── */
.unit-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all var(--transition-fast);
}

.unit-card:hover {
    border-color: var(--border-accent);
    background: var(--bg-glass-hover);
}

.unit-card-info h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.unit-card-info p {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.unit-card-price {
    text-align: right;
}

.unit-card-price .price {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent-primary);
}

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

    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

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

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

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

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

    .mobile-toggle {
        display: block;
    }

    .search-global {
        width: 200px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-row,
    .form-row-3 {
        grid-template-columns: 1fr;
    }

    .page-container {
        padding: 16px;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

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

    .filter-bar .form-input,
    .filter-bar .form-select {
        width: 100%;
        min-width: unset;
    }
}

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

    .search-global {
        display: none;
    }

    .topbar {
        padding: 0 16px;
    }
}

/* ── Utility ─────────────────────────────────────────────── */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

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

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

.text-warning {
    color: var(--accent-warning);
}

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

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

.fw-bold {
    font-weight: 700;
}

.fw-semibold {
    font-weight: 600;
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.gap-1 {
    gap: 8px;
}

.gap-2 {
    gap: 16px;
}

.d-flex {
    display: flex;
}

.align-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.w-full {
    width: 100%;
}

.hidden {
    display: none !important;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--border-default);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* ── Conversion Definition Form ─────────────────────────── */
.conversion-definition {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
}

.conversion-def-label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.conversion-def-unit {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-primary);
    flex-shrink: 0;
    min-width: 40px;
}

/* ── Unit Hierarchy ─────────────────────────────────────── */
.unit-hierarchy {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.unit-hierarchy-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    position: relative;
    transition: background var(--transition-fast);
    border-radius: var(--radius-sm);
}

.unit-hierarchy-item:hover {
    background: var(--bg-glass-hover);
}

.unit-hierarchy-item.base {
    border-left: 3px solid var(--accent-primary);
    padding-left: 13px;
}

.unit-hierarchy-item.derived {
    border-left: 3px solid var(--accent-secondary);
    padding-left: 13px;
    margin-left: 20px;
}

.unit-hierarchy-item.derived-2 {
    border-left: 3px solid var(--accent-warning);
    padding-left: 13px;
    margin-left: 40px;
}

.unit-hierarchy-connector {
    position: absolute;
    left: -12px;
    top: 50%;
    width: 12px;
    height: 1px;
    background: var(--border-default);
}

.unit-hierarchy-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.unit-hierarchy-dot.base {
    background: var(--accent-primary);
}

.unit-hierarchy-dot.derived {
    background: var(--accent-secondary);
}

.unit-hierarchy-dot.derived-2 {
    background: var(--accent-warning);
}

.unit-hierarchy-info {
    flex: 1;
}

.unit-hierarchy-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.unit-hierarchy-formula {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.unit-hierarchy-price {
    text-align: right;
}

.unit-hierarchy-price .price {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.unit-hierarchy-price .per-unit {
    font-size: 0.72rem;
    color: var(--text-tertiary);
}

/* ── Unit Examples ──────────────────────────────────────── */
.unit-example {
    padding: 8px 12px;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent-primary);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.unit-example:hover {
    background: var(--bg-glass-hover);
    border-left-color: var(--accent-primary-light);
}

.unit-example strong {
    color: var(--accent-primary);
}

/* ═══════════════════════════════════════════════════════════
   AUTH PAGES — Login, Setup
   ═══════════════════════════════════════════════════════════ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-primary) 0%, #1a1040 50%, var(--bg-primary) 100%);
    padding: 20px;
}

.auth-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.5s ease;
}

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

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

.auth-logo {
    font-size: 3rem;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 20px rgba(20, 184, 166, 0.4));
}

.auth-card h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.auth-subtitle {
    color: var(--accent-primary);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 24px;
}

.auth-card .form-input {
    text-align: left;
}

.auth-card .form-group {
    text-align: left;
    margin-bottom: 16px;
}

.w-full {
    width: 100%;
}

.auth-links {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.auth-links a {
    color: var(--text-tertiary);
    font-size: 0.8rem;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-links a:hover {
    color: var(--accent-primary);
}

/* ═══════════════════════════════════════════════════════════
   CUSTOMER LAYOUT
   ═══════════════════════════════════════════════════════════ */
.customer-layout {
    min-height: 100vh;
    background: var(--bg-primary);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
}

.customer-header {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 16px 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.customer-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.customer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
}

.customer-brand-icon {
    font-size: 1.8rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-dark));
    box-shadow: 0 4px 15px rgba(20, 184, 166, 0.3);
}

.customer-brand h1 {
    font-size: 1.2rem;
    font-weight: 700;
}

.customer-brand span {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.customer-nav {
    display: flex;
    gap: 8px;
}

.customer-main {
    flex: 1;
}

.customer-hero {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.15) 0%, rgba(99, 102, 241, 0.1) 100%);
    padding: 40px 24px;
    text-align: center;
    border-bottom: 1px solid var(--border-subtle);
}

.customer-hero h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.customer-hero p {
    color: var(--text-secondary);
}

.customer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px;
}

.customer-filter {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.customer-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 0 12px;
    flex: 1;
    min-width: 200px;
}

.customer-search-box .form-input {
    border: none;
    background: transparent;
    padding-left: 0;
}

.customer-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-subtle);
    padding: 20px;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.8rem;
}

/* Product Grid (Customer) */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: all 0.3s;
}

.product-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(20, 184, 166, 0.15);
}

.product-card-body {
    padding: 20px;
}

.product-card-category {
    font-size: 0.7rem;
    color: var(--accent-secondary-light);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.product-card-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.product-card-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 8px;
}

.product-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* Product Detail Grid */
.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
    }

    .customer-header-inner {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .customer-brand {
        justify-content: center;
    }

    .customer-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .customer-nav .btn {
        flex: 1 1 calc(50% - 8px);
        text-align: center;
        justify-content: center;
    }

    .customer-filter {
        flex-direction: column;
        align-items: stretch;
    }

    .customer-search-box {
        width: 100%;
    }
}

/* ═══════════════════════════════════════════════════════════
   FORM HELPERS
   ═══════════════════════════════════════════════════════════ */
.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

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

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

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

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

.text-right {
    text-align: right;
}

/* ═══════════════════════════════════════════════════════════
   PROFIT & LOSS TABLE
   ═══════════════════════════════════════════════════════════ */
.pnl-statement .card-body {
    padding: 0;
}

.pnl-table {
    width: 100%;
    border-collapse: collapse;
}

.pnl-table td {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.pnl-section-header td {
    background: rgba(99, 102, 241, 0.08);
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--accent-secondary-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 20px;
}

.pnl-total td {
    background: var(--bg-glass);
    border-bottom: 2px solid var(--border-default);
}

.pnl-grand-total td {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.08), rgba(99, 102, 241, 0.05));
    border-bottom: 3px solid var(--accent-primary);
    padding: 16px 20px;
}

/* ═══════════════════════════════════════════════════════════
   FINANCIAL FILTER BAR
   ═══════════════════════════════════════════════════════════ */
.filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    padding: 12px 16px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
}

/* ── Cart Badge ──────────────────────────────────── */
.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--accent-danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ── Order Status Card ───────────────────────────── */
.order-status-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 20px 24px;
    margin: 16px 0;
}

.order-status-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.order-status-icon {
    font-size: 2.5rem;
}

.order-status-total {
    margin-left: auto;
    text-align: right;
}

.order-total-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
}

/* ── Order Timeline ──────────────────────────────── */
.order-timeline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 20px 0;
    margin: 16px 0;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 70px;
}

.timeline-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 2px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.timeline-step.active .timeline-dot {
    background: rgba(20, 184, 166, 0.15);
    border-color: var(--accent-primary);
}

.timeline-step.current .timeline-dot {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 12px rgba(20, 184, 166, 0.4);
    transform: scale(1.1);
}

.timeline-label {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    text-align: center;
}

.timeline-step.active .timeline-label {
    color: var(--text-secondary);
}

.timeline-step.current .timeline-label {
    color: var(--accent-primary);
    font-weight: 600;
}

.timeline-line {
    width: 30px;
    height: 2px;
    background: var(--border-subtle);
    margin-bottom: 20px;
}

.timeline-line.active {
    background: var(--accent-primary);
}

/* ── Payment Info Row ────────────────────────────── */
.payment-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.payment-info-row:last-child {
    border-bottom: none;
}

/* ── Picking Checklist ───────────────────────────── */
.picking-list {
    padding: 0;
}

.picking-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-subtle);
    transition: background 0.2s ease;
}

.picking-item:last-child {
    border-bottom: none;
}

.picking-item.picked {
    background: rgba(20, 184, 166, 0.05);
}

.picking-item.picked .picking-item-info strong {
    text-decoration: line-through;
    opacity: 0.6;
}

.picking-toggle-form {
    flex-shrink: 0;
}

.picking-checkbox {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 2px solid var(--border-subtle);
    background: transparent;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.picking-checkbox:hover {
    border-color: var(--accent-primary);
    background: rgba(20, 184, 166, 0.1);
}

.picking-checkbox.checked {
    border-color: var(--accent-primary);
    background: rgba(20, 184, 166, 0.15);
}

.picking-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.picking-item-qty {
    flex-shrink: 0;
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* ── Picking Progress Bar ────────────────────────── */
.picking-progress-bar {
    width: 80px;
    height: 6px;
    background: var(--bg-elevated);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
}

.picking-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), #2dd4bf);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* ── Product Detail Grid ─────────────────────────── */
.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 20px;
    margin-top: 16px;
}

@media (max-width: 768px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
    }

    .order-timeline {
        flex-wrap: wrap;
    }
}

/* ── Unit Card ───────────────────────────────────── */
.unit-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--bg-elevated);
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
}

.unit-card-info h4 {
    font-size: 0.9rem;
}

.unit-card-info p {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.unit-card-price .price {
    font-weight: 700;
    color: var(--accent-primary);
}

.savings-badge {
    display: inline-block;
    background: rgba(20, 184, 166, 0.15);
    color: var(--accent-primary);
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

/* ── Breadcrumbs ─────────────────────────────────── */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.breadcrumbs a {
    color: var(--accent-primary);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs .current {
    color: var(--text-secondary);
}

/* ── Alert Variants ──────────────────────────────── */
.alert-info {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--accent-secondary);
    padding: 12px 16px;
    border-radius: 10px;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--accent-danger);
    padding: 12px 16px;
    border-radius: 10px;
}

.alert-success {
    background: rgba(20, 184, 166, 0.1);
    border: 1px solid rgba(20, 184, 166, 0.3);
    color: var(--accent-primary);
    padding: 12px 16px;
    border-radius: 10px;
}

/* ── Add to Cart Form ────────────────────────────── */
.add-to-cart-form .form-input,
.add-to-cart-form .form-select {
    background: var(--bg-elevated);
    border-color: var(--border-subtle);
}

/* ── Badge Variants ──────────────────────────────── */
.badge-green {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.badge-red {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* ── Mobile Responsiveness (Responsive Overrides) ────────── */
@media screen and (max-width: 768px) {
    /* Layout Overrides */
    .app-wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        box-shadow: var(--shadow-xl);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0 !important; /* Force override inline styles or wide layout */
        width: 100%;
    }
    
    /* Topbar */
    .topbar {
        padding: 0 16px;
    }
    
    .mobile-toggle {
        display: block !important;
    }
    
    /* Page & Grids */
    .page-container {
        padding: 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .page-header-actions {
        width: 100%;
        flex-wrap: wrap;
    }
    
    /* Form Rows */
    .form-row,
    .form-row-3 {
        grid-template-columns: 1fr !important;
        gap: 12px;
        display: grid;
    }
    
    /* Touch Targets UIUX.md compliance */
    .btn, 
    .form-input, 
    .form-select {
        min-height: 44px;
    }
    
    .tab-btn {
        flex: 1 1 100%;
        text-align: center;
        margin-bottom: 4px;
        border-radius: var(--radius-sm);
        min-height: 48px;
    }

    .tabs {
        flex-wrap: wrap;
        border-bottom: none;
    }
    
    /* Search */
    .search-global {
        width: 200px;
    }

    /* Modal */
    .modal {
        width: 95%;
        margin: 10px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    /* Tables horizontal scroll */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-right: 1px solid var(--border-subtle);
    }
}

@media screen and (min-width: 769px) and (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .form-row-3 {
        grid-template-columns: repeat(2, 1fr) !important;
        display: grid;
    }
}