/* ============================================
   TECHSHOP LANKA — Light Theme Design System
   ============================================ */

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

/* ============ CSS VARIABLES — LIGHT THEME ============ */
:root {
    /* Backgrounds */
    --bg-primary:    #f1f5f9;
    --bg-secondary:  #e8eef5;
    --bg-card:       #ffffff;
    --bg-card-hover: #f8faff;

    /* Brand Colors */
    --accent:        #2563eb;
    --accent-dark:   #1d4ed8;
    --accent-light:  #dbeafe;
    --accent-glow:   rgba(37, 99, 235, 0.12);
    --orange:        #f97316;
    --orange-dark:   #ea6c0a;
    --orange-light:  #fff7ed;

    /* Status */
    --success:       #16a34a;
    --success-light: #dcfce7;
    --warning:       #d97706;
    --warning-light: #fef3c7;
    --danger:        #dc2626;
    --danger-light:  #fee2e2;
    --info:          #0891b2;
    --info-light:    #cffafe;

    /* Text */
    --text-primary:  #0f172a;
    --text-secondary:#475569;
    --text-muted:    #94a3b8;
    --text-inverse:  #ffffff;

    /* Borders */
    --border:        #e2e8f0;
    --border-light:  #cbd5e1;
    --border-focus:  #2563eb;

    /* Shadows */
    --shadow-xs:     0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow:        0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.05);
    --shadow-lg:     0 10px 40px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
    --shadow-card:   0 2px 8px rgba(0,0,0,0.06);
    --shadow-hover:  0 8px 30px rgba(37,99,235,0.15);

    /* Layout */
    --radius:        12px;
    --radius-sm:     8px;
    --radius-lg:     20px;
    --radius-xl:     28px;
    --transition:    all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    /* Topbar / Navbar */
    --topbar-bg:     #0f172a;
    --navbar-bg:     #ffffff;
    --navbar-height: 68px;
}

/* ============ RESET & BASE ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6 { font-family: 'Outfit', sans-serif; line-height: 1.3; font-weight: 700; color: var(--text-primary); }
a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-dark); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ============ CONTAINER ============ */
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 960px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 768px) { .container { padding: 0 28px; } }
@media (min-width: 1200px) { .container { padding: 0 40px; } }

/* ============ TOPBAR ============ */
.topbar {
    background: var(--topbar-bg);
    color: #cbd5e1;
    font-size: 12px;
    border-bottom: none;
}
.topbar .container { display: flex; align-items: center; justify-content: space-between; height: 38px; gap: 16px; }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 16px; }

/* ============ NAVBAR ============ */
.navbar {
    background: var(--navbar-bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: var(--shadow-xs);
    transition: box-shadow 0.3s;
}
.navbar.scrolled { box-shadow: var(--shadow); }

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 20px; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 600; cursor: pointer;
    border: none; transition: var(--transition); white-space: nowrap; text-decoration: none;
}
.btn:focus-visible { outline: 3px solid var(--accent-glow); outline-offset: 2px; }
.btn-primary { background: var(--accent); color: var(--accent-contrast, #ffffff); }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(37,99,235,0.3); color: var(--accent-contrast, #ffffff); }
.btn-orange { background: var(--orange); color: var(--orange-contrast, #ffffff); }
.btn-orange:hover { background: var(--orange-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(249,115,22,0.3); color: var(--orange-contrast, #ffffff); }
.btn-outline { background: transparent; color: var(--accent); border: 2px solid var(--accent); }
.btn-outline:hover { background: var(--accent); color: var(--accent-contrast, #ffffff); }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg-secondary); color: var(--text-primary); border-color: var(--border-light); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: var(--radius); }
.btn-block { width: 100%; }
.btn-icon { padding: 8px; width: 36px; height: 36px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }

/* ============ CARDS ============ */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 24px;
    box-shadow: var(--shadow-card);
}
.card-hover { transition: var(--transition); }
.card-hover:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }

/* ============ FORM ELEMENTS ============ */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.form-control {
    width: 100%; background: #fff; border: 1.5px solid var(--border); color: var(--text-primary);
    padding: 10px 14px; border-radius: var(--radius-sm); font-size: 14px; transition: var(--transition);
    outline: none;
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-glow); }
.form-control::placeholder { color: var(--text-muted); }
.form-control:disabled { background: var(--bg-secondary); cursor: not-allowed; }
textarea.form-control { resize: vertical; min-height: 90px; }
select.form-control { cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23475569' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 20px; padding-right: 36px; appearance: none; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ============ BADGES ============ */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .3px; }
.badge-primary   { background: var(--accent-light); color: var(--accent); }
.badge-success   { background: var(--success-light); color: var(--success); }
.badge-warning   { background: var(--warning-light); color: var(--warning); }
.badge-danger    { background: var(--danger-light); color: var(--danger); }
.badge-secondary { background: var(--bg-secondary); color: var(--text-secondary); }
.badge-info      { background: var(--info-light); color: var(--info); }
.badge-orange    { background: var(--orange-light); color: var(--orange); }

/* ============ TABLE ============ */
.table-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table thead th { background: var(--bg-secondary); color: var(--text-secondary); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.table tbody td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text-primary); }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--bg-secondary); }

/* ============ ALERTS ============ */
.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 16px; display: flex; align-items: flex-start; gap: 10px; border: 1px solid; font-size: 14px; }
.alert-success { background: var(--success-light); color: var(--success); border-color: #86efac; }
.alert-danger   { background: var(--danger-light); color: var(--danger); border-color: #fca5a5; }
.alert-warning  { background: var(--warning-light); color: var(--warning); border-color: #fcd34d; }
.alert-info     { background: var(--info-light); color: var(--info); border-color: #67e8f9; }

/* ============ MODALS ============ */
.modal-overlay { position: fixed; inset: 0; background: rgba(15,23,42,0.5); z-index: 500; display: none; align-items: center; justify-content: center; backdrop-filter: blur(4px); padding: 20px; }
.modal-overlay.active { display: flex; }
.modal { background: #fff; border-radius: var(--radius-lg); padding: 28px; width: 100%; max-width: 600px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); border: 1px solid var(--border); animation: modalIn .2s ease; }
@keyframes modalIn { from { opacity: 0; transform: scale(0.96) translateY(-10px); } to { opacity: 1; transform: none; } }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.modal-title { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.modal-close { background: var(--bg-secondary); border: none; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); font-size: 14px; transition: var(--transition); }
.modal-close:hover { background: var(--danger-light); color: var(--danger); }

/* ============ TOAST ============ */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.toast { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-lg); animation: toastIn .3s ease; font-size: 14px; }
.toast.hiding { animation: toastOut .3s ease forwards; }
@keyframes toastIn  { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px); } }
.toast-success { border-left: 4px solid var(--success); }
.toast-error   { border-left: 4px solid var(--danger); }
.toast-warning { border-left: 4px solid var(--warning); }
.toast-info    { border-left: 4px solid var(--accent); }

/* ============ TOGGLE SWITCH ============ */
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; inset: 0; background: var(--border-light); border-radius: 24px; transition: .3s; }
.toggle-slider::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: .3s; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.toggle-switch input:checked + .toggle-slider { background: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ============ SPINNER ============ */
.spinner { width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ PAGINATION ============ */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 32px; flex-wrap: wrap; }
.page-link { padding: 8px 14px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; border: 1.5px solid var(--border); color: var(--text-secondary); background: #fff; transition: var(--transition); }
.page-link:hover { border-color: var(--accent); color: var(--accent); }
.page-link.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ============ BREADCRUMB ============ */
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); padding: 12px 0 20px; flex-wrap: wrap; }
.breadcrumb a { color: var(--accent); font-weight: 500; }
.breadcrumb-sep { color: var(--border-light); }

/* ============ EMPTY STATE ============ */
.empty-state { text-align: center; padding: 64px 24px; }
.empty-state i { font-size: 56px; color: var(--border-light); display: block; margin-bottom: 20px; }
.empty-state h3 { font-size: 22px; font-weight: 700; margin-bottom: 8px; color: var(--text-primary); }
.empty-state p { color: var(--text-secondary); margin-bottom: 20px; }

/* ============ FLEX / GRID UTILITIES ============ */
.flex          { display: flex; }
.flex-center   { display: flex; align-items: center; justify-content: center; }
.grid-2        { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.mt-1          { margin-top: 8px; }
.mt-2          { margin-top: 16px; }
.mt-3          { margin-top: 24px; }
.text-center   { text-align: center; }
.text-muted    { color: var(--text-secondary) !important; }
.text-sm       { font-size: 13px; }
.text-xs       { font-size: 11px; }

/* ============ SECTION ============ */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.section-title  { font-size: clamp(20px, 3vw, 28px); font-weight: 800; color: var(--text-primary); }
.section-subtitle { font-size: 15px; color: var(--text-secondary); margin-top: 4px; }

/* ============ CART SIDEBAR ============ */
.cart-overlay { position: fixed; inset: 0; background: rgba(15,23,42,0.65); z-index: 399; display: none; }
.cart-overlay.open { display: block; }
.cart-sidebar { position: fixed; top: 0; right: 0; width: min(400px,95vw); height: 100vh; background: #fff; z-index: 400; transform: translateX(100%); transition: transform .35s cubic-bezier(0.4,0,0.2,1); display: flex; flex-direction: column; box-shadow: -8px 0 40px rgba(0,0,0,0.15); border-left: 1px solid var(--border); }
.cart-sidebar.open { transform: translateX(0); }
.cart-sidebar-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); background: var(--bg-secondary); }
.cart-sidebar-header h3 { font-size: 18px; font-weight: 700; }
.cart-items-wrap { flex: 1; overflow-y: auto; padding: 16px; }
.cart-footer { padding: 20px 24px; border-top: 1px solid var(--border); background: var(--bg-secondary); }
.cart-summary-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 14px; color: var(--text-secondary); }
.cart-summary-row.total { font-size: 20px; font-weight: 800; color: var(--text-primary); margin-bottom: 0; padding-top: 10px; border-top: 2px solid var(--border); }
.cart-item { display: flex; gap: 14px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; background: #fff; }
.cart-item-img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); flex-shrink: 0; }
.cart-item-img-placeholder { width: 64px; height: 64px; background: var(--bg-secondary); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; color: var(--border-light); flex-shrink: 0; font-size: 20px; }
.cart-item-info { flex: 1; }
.cart-item-name { font-weight: 600; font-size: 13px; color: var(--text-primary); line-height: 1.4; display: block; margin-bottom: 4px; }
.cart-item-price { font-size: 14px; font-weight: 700; color: var(--accent); margin-bottom: 8px; }
.cart-item-remove { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 14px; padding: 4px; transition: var(--transition); }
.cart-item-remove:hover { color: var(--danger); }
.qty-control { display: flex; align-items: center; border: 1.5px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.qty-btn { background: var(--bg-secondary); border: none; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 12px; color: var(--text-secondary); transition: var(--transition); }
.qty-btn:hover { background: var(--accent); color: #fff; }
.qty-btn:disabled { opacity: .4; cursor: not-allowed; }
.qty-value { width: 36px; text-align: center; font-weight: 700; font-size: 14px; color: var(--text-primary); }

/* ============ STATUS BADGES ============ */
.status-pending    { background: var(--warning-light); color: var(--warning); }
.status-processing { background: var(--info-light); color: var(--info); }
.status-shipped    { background: var(--accent-light); color: var(--accent); }
.status-delivered  { background: var(--success-light); color: var(--success); }
.status-cancelled  { background: var(--danger-light); color: var(--danger); }

/* ============ ROLE BADGES ============ */
.role-badge-admin   { background: #fef3c7; color: #92400e; border-radius: 999px; padding: 3px 10px; font-size: 11px; font-weight: 700; }
.role-badge-handler { background: var(--info-light); color: var(--info); border-radius: 999px; padding: 3px 10px; font-size: 11px; font-weight: 700; }
.role-badge-customer{ background: var(--accent-light); color: var(--accent); border-radius: 999px; padding: 3px 10px; font-size: 11px; font-weight: 700; }

/* ============ IMAGE UPLOAD ============ */
.image-upload-zone { border: 2px dashed var(--border); border-radius: var(--radius); padding: 32px 20px; text-align: center; cursor: pointer; transition: var(--transition); position: relative; background: var(--bg-secondary); }
.image-upload-zone:hover, .image-upload-zone.dragover { border-color: var(--accent); background: var(--accent-light); }
.image-upload-zone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.image-upload-icon { font-size: 36px; color: var(--accent); margin-bottom: 12px; display: block; }
.image-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.image-preview-item { position: relative; border-radius: var(--radius-sm); overflow: hidden; border: 2px solid var(--border); aspect-ratio: 1; background: var(--bg-secondary); }
.image-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.image-preview-item.primary { border-color: var(--success); box-shadow: 0 0 0 2px var(--success-light); }
.primary-badge { position: absolute; top: 0; left: 0; right: 0; background: var(--success); color: #fff; font-size: 8px; font-weight: 800; text-align: center; padding: 2px; }
.remove-img { position: absolute; top: 4px; right: 4px; background: var(--danger); color: #fff; border: none; border-radius: 50%; width: 20px; height: 20px; cursor: pointer; font-size: 10px; display: flex; align-items: center; justify-content: center; }

/* ============ PRODUCT TABLE IMG ============ */
.product-table-img { width: 50px; height: 50px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); flex-shrink: 0; }
.product-table-img-placeholder { width: 50px; height: 50px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; color: var(--border-light); flex-shrink: 0; }

/* ============ PRODUCT RANK ============ */
.product-rank { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; flex-shrink: 0; }
.rank-1 { background: #fef3c7; color: #92400e; }
.rank-2 { background: var(--bg-secondary); color: var(--text-secondary); }
.rank-3 { background: #fff7ed; color: #c2410c; }
.rank-4, .rank-5 { background: var(--bg-secondary); color: var(--text-muted); }

/* ============ ORDER QUEUE ============ */
.order-queue-item { display: flex; align-items: center; gap: 16px; padding: 16px 20px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; cursor: pointer; transition: var(--transition); }
.order-queue-item:hover { border-color: var(--accent); box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.order-queue-item.pending  { border-left: 4px solid var(--warning); }
.order-queue-item.processing { border-left: 4px solid var(--info); }
.order-queue-item.shipped   { border-left: 4px solid var(--accent); }
.order-queue-item.delivered { border-left: 4px solid var(--success); }
.order-queue-item.cancelled { border-left: 4px solid var(--danger); }
.order-queue-num    { font-weight: 700; font-size: 13px; min-width: 120px; }
.order-queue-customer h4 { font-size: 14px; font-weight: 600; }
.order-queue-customer p  { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.order-queue-total  { font-weight: 700; color: var(--accent); font-size: 15px; min-width: 100px; text-align: right; }
.order-queue-time   { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.order-queue-actions { margin-left: auto; }

/* ============ ORDER TRACKER ============ */
.order-tracker { display: flex; justify-content: center; gap: 0; margin: 8px 0; }
.tracker-step { display: flex; flex-direction: column; align-items: center; flex: 1; position: relative; }
.tracker-step::before { content: ''; position: absolute; top: 18px; left: -50%; right: 50%; height: 2px; background: var(--border); z-index: 0; }
.tracker-step:first-child::before { display: none; }
.tracker-step.done::before  { background: var(--success); }
.tracker-step.current::before { background: var(--accent); }
.tracker-icon { width: 36px; height: 36px; border-radius: 50%; background: var(--bg-secondary); border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--text-muted); position: relative; z-index: 1; transition: var(--transition); }
.tracker-step.done .tracker-icon    { background: var(--success); border-color: var(--success); color: #fff; }
.tracker-step.current .tracker-icon { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 4px var(--accent-glow); }
.tracker-label { font-size: 11px; font-weight: 600; color: var(--text-muted); margin-top: 6px; }
.tracker-step.done .tracker-label, .tracker-step.current .tracker-label { color: var(--text-primary); }

/* ============ ACCOUNT ============ */
.account-layout { display: grid; grid-template-columns: 260px 1fr; gap: 24px; padding: 24px 0; }
.account-sidebar {}
.account-menu-item { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; color: var(--text-secondary); transition: var(--transition); cursor: pointer; }
.account-menu-item:hover { background: var(--bg-secondary); color: var(--text-primary); }
.account-menu-item.active { background: var(--accent-light); color: var(--accent); font-weight: 700; }
.order-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.order-info-item label { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--text-muted); letter-spacing: .8px; }
.order-info-item span { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-top: 2px; display: block; }

/* ============ STATUS UPDATE FORM ============ */
.status-update-form { padding: 20px; background: var(--bg-secondary); border-radius: var(--radius-sm); margin-top: 16px; border: 1px solid var(--border); }
.status-update-form h4 { font-size: 15px; font-weight: 700; margin-bottom: 14px; color: var(--text-primary); }

/* ============ CHECKOUT ============ */
.checkout-wrap { display: grid; grid-template-columns: 1fr 380px; gap: 28px; padding: 24px 0; }
.checkout-section-title { font-size: 17px; font-weight: 700; margin-bottom: 20px; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
.checkout-summary-item { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.checkout-summary-item:last-child { border-bottom: none; }
.checkout-summary-item img { width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.checkout-summary-item-info { flex: 1; }
.checkout-summary-item-info h4 { font-size: 13px; font-weight: 600; }
.checkout-summary-item-info p  { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.checkout-summary-item-price { font-weight: 700; font-size: 14px; color: var(--accent); }
.payment-methods { display: grid; gap: 10px; }
.payment-method { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 2px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition); }
.payment-method:has(input:checked), .payment-method input:checked { border-color: var(--accent); background: var(--accent-light); }
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* ============ FILTER LAYOUT ============ */
.filter-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; padding: 16px 0; }
.filter-sidebar { }
.filter-group { border-bottom: 1px solid var(--border); padding: 16px 0; }
.filter-group:last-child { border-bottom: none; }
.filter-group-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--text-muted); margin-bottom: 12px; }
.filter-checkbox { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 14px; color: var(--text-secondary); cursor: pointer; }
.filter-checkbox:hover { color: var(--accent); }
.filter-subcategory { padding-left: 28px !important; font-size: 13px !important; position: relative; border-left: 2px solid var(--border); margin-left: 8px; }
.filter-subcategory:hover { border-left-color: var(--accent); }
.products-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.products-toolbar-left span { font-size: 14px; color: var(--text-secondary); }
.products-toolbar-right { display: flex; align-items: center; gap: 10px; }

/* ============ PRODUCT DETAIL ============ */
.product-detail-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 24px 0 40px; }
.product-gallery {}
.gallery-main { width: 100%; aspect-ratio: 1; background: var(--bg-secondary); border-radius: var(--radius); overflow: hidden; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); margin-bottom: 12px; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; transition: transform .3s; }
.gallery-main img:hover { transform: scale(1.05); }
.gallery-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.gallery-thumb { width: 72px; height: 72px; border: 2px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; transition: var(--transition); }
.gallery-thumb.active { border-color: var(--accent); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-detail-info {}
.product-detail-category { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--accent); letter-spacing: 1px; margin-bottom: 8px; }
.product-detail-title { font-size: clamp(20px, 3vw, 30px); font-weight: 800; margin-bottom: 12px; line-height: 1.25; }
.product-detail-price { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.product-detail-price .current { font-size: 32px; font-weight: 800; color: var(--orange); }
.product-detail-price .original { font-size: 18px; text-decoration: line-through; color: var(--text-muted); }
.product-detail-price .price-badge { background: var(--danger-light); color: var(--danger); border-radius: 6px; padding: 4px 10px; font-size: 13px; font-weight: 700; }
.product-detail-description { font-size: 15px; color: var(--text-secondary); line-height: 1.8; margin-bottom: 20px; }
.product-detail-meta { display: flex; flex-direction: column; gap: 10px; padding: 16px; background: var(--bg-secondary); border-radius: var(--radius-sm); border: 1px solid var(--border); margin-bottom: 20px; }
.product-detail-meta-row { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.qty-selector { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.qty-selector label { font-size: 14px; font-weight: 600; color: var(--text-secondary); }
.qty-input { display: flex; align-items: center; border: 1.5px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.qty-input input { width: 60px; text-align: center; border: none; font-size: 16px; font-weight: 700; color: var(--text-primary); padding: 10px; background: #fff; }
.product-action-btns { display: flex; gap: 12px; margin-bottom: 16px; }
.stars { color: #f59e0b; font-size: 16px; letter-spacing: 1px; }
.no-image-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 64px; color: var(--border-light); }

/* ============ DATA TOOLBAR ============ */
.data-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.data-toolbar-left { display: flex; gap: 10px; flex-wrap: wrap; }
.data-toolbar-right { display: flex; gap: 10px; }
.toolbar-search { position: relative; }
.toolbar-search input { background: #fff; border: 1.5px solid var(--border); color: var(--text-primary); padding: 9px 14px 9px 36px; border-radius: var(--radius-sm); font-size: 13px; width: 240px; outline: none; transition: var(--transition); }
.toolbar-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.toolbar-search .fa-search { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 13px; }

/* ============ FLASH MESSAGES ============ */
.flash-success { background: var(--success-light); color: var(--success); border: 1px solid #86efac; padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; }
.flash-error   { background: var(--danger-light); color: var(--danger); border: 1px solid #fca5a5; padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; }
