:root {
    /* Core Colors */
    --primary: #4F46E5;
    /* Indigo */
    --primary-hover: #4338CA;
    --primary-light: #EEF2FF;

    --secondary: #1E293B;
    --secondary-hover: #0F172A;

    /* Backgrounds */
    --bg-body: #F8FAFC;
    --bg-card: #FFFFFF;
    --bg-header: rgba(255, 255, 255, 0.85);

    /* Text */
    --text-primary: #0F172A;
    --text-secondary: #64748B;
    --text-tertiary: #94A3B8;

    /* Statuses */
    --success: #10B981;
    --success-bg: #ECFDF5;
    --warning: #F59E0B;
    --warning-bg: #FFFBEB;
    --info: #3B82F6;
    --info-bg: #EFF6FF;
    --danger: #EF4444;
    --danger-bg: #FEF2F2;

    /* UI Elements */
    --border: #E2E8F0;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
}

/* Dark Mode Variables */
body.dark-mode {
    --bg-body: #0F172A;
    --bg-card: #1E293B;
    --bg-header: rgba(30, 41, 59, 0.85);

    --text-primary: #F8FAFC;
    --text-secondary: #CBD5E1;
    --text-tertiary: #64748B;

    --border: #334155;
    --primary-light: rgba(79, 70, 229, 0.15);
    --success-bg: rgba(16, 185, 129, 0.1);
    --warning-bg: rgba(245, 158, 11, 0.1);
    --info-bg: rgba(59, 130, 246, 0.1);
    --danger-bg: rgba(239, 68, 68, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Typography */
h1 {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.2);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.25);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-body);
    border-color: var(--text-tertiary);
}

.btn-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--primary-light);
}

.pagination-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.pagination-btn.btn-primary {
    box-shadow: none;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ---------------------------------
   TOP HEADER NAVIGATION
--------------------------------- */
.header-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-header);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), #8B5CF6);
    border-radius: 10px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

@media (min-width: 1025px) {
    .brand-name {
        min-width: 140px;
        max-width: 220px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Nav Menu */
.top-menu {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-body);
}

.nav-link.active {
    color: var(--primary);
    background: var(--primary-light);
}

/* Header Right Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-field {
    position: relative;
    display: flex;
    align-items: center;
}

.search-field i {
    position: absolute;
    left: 1rem;
    color: var(--text-tertiary);
}

.search-field input {
    background: var(--bg-body);
    border: 1px solid var(--border);
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    width: 240px;
    transition: all 0.2s;
    color: var(--text-primary);
}

.search-field input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.user-dropdown {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-md);
    transition: background 0.2s;
    position: relative;
}

.user-dropdown .user-chevron {
    color: var(--text-tertiary);
    font-size: 0.8rem;
    margin-left: 0.25rem;
}

.user-dropdown:hover {
    background: var(--bg-body);
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1.5rem;
}

.modal-backdrop.active {
    display: flex;
}

.modal-card {
    width: min(420px, 100%);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 1.5rem;
    color: var(--text-primary);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.modal-hint {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.modal-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.filters-compact .form-label {
    font-size: 0.8rem;
}

.filters-compact .form-input {
    padding: 0.45rem 0.75rem;
    font-size: 0.85rem;
    height: 36px;
}

.filters-compact .form-group {
    margin-bottom: 0;
}

.filters-compact #acts-status {
    min-width: 150px;
}

.filters-compact #acts-date-from,
.filters-compact #acts-date-to {
    min-width: 160px;
}

@media (min-width: 1025px) {
    .filters-compact {
        flex-wrap: nowrap;
    }
}

.category-link {
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.category-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.category-toggle {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-body);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
    line-height: 1;
}

.category-toggle-spacer {
    width: 20px;
    height: 20px;
    display: inline-block;
}

.category-sublist {
    padding-left: 0;
    margin-left: 0;
}

.category-link.active {
    color: var(--primary);
    font-weight: 600;
}

.product-category-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
}

.product-category-link:hover,
.product-category-link:focus-visible {
    text-decoration: underline;
}

.support-btn {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
    z-index: 1200;
    cursor: pointer;
}

.support-window {
    position: fixed;
    right: 24px;
    bottom: 90px;
    width: min(380px, calc(100vw - 48px));
    max-height: min(560px, calc(100vh - 140px));
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1201;
}

.support-window.active {
    display: flex;
}

.support-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.support-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.support-operator-btn {
    border: 1px solid var(--border);
    background: var(--bg-body);
    color: var(--text-primary);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    cursor: pointer;
}

.support-header-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.support-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.support-title {
    font-weight: 700;
    color: var(--text-primary);
}

.support-status {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.support-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
}

.support-messages {
    padding: 1rem 1.25rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
    background: var(--bg-body);
}

.message {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-width: 85%;
}

.message.sent {
    align-self: flex-end;
    text-align: right;
}

.message.received {
    align-self: flex-start;
    text-align: left;
}

.message-bubble {
    padding: 0.75rem 1rem;
    border-radius: 16px;
    line-height: 1.4;
    font-size: 0.9rem;
    white-space: pre-wrap;
}

.message.sent .message-bubble {
    background: var(--primary);
    color: #fff;
    border-bottom-right-radius: 6px;
}

.message.received .message-bubble {
    background: var(--bg-card);
    color: var(--text-primary);
    border-bottom-left-radius: 6px;
}

.message-meta {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-end;
}

.message.received .message-meta {
    justify-content: flex-start;
}

.support-input {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.5rem;
    align-items: center;
    background: var(--bg-card);
}

.support-input input {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.55rem 1rem;
    background: var(--bg-body);
    color: var(--text-primary);
}

.support-input button {
    border: none;
    background: var(--primary);
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

@media (max-width: 640px) {
    .support-window {
        right: 12px;
        left: 12px;
        width: auto;
    }
    .support-btn {
        right: 16px;
        bottom: 16px;
    }
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-info .name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.user-info .company {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.user-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 0.35rem;
    display: none;
    flex-direction: column;
    gap: 0.1rem;
    z-index: 120;
}

.user-dropdown.open .user-menu {
    display: flex;
}

.user-menu-link {
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-md);
    cursor: pointer;
}

.user-menu-link:hover {
    background: var(--bg-body);
}

.user-menu-logout {
    color: var(--danger);
}

/* ---------------------------------
   MAIN LAYOUT & CARDS
--------------------------------- */
.main-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    min-height: calc(100vh - 80px);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
}

.page-title p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-top: 0.25rem;
}

/* Stat Cards Widget */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-widget {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 1.75rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-widget:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(79, 70, 229, 0.3);
}

.stat-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), #8B5CF6);
    opacity: 0;
    transition: opacity 0.3s;
}

.stat-widget:hover::before {
    opacity: 1;
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.widget-title {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
}

.widget-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.widget-value {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.widget-trend {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Common Card Panel */
.panel {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding: 2rem;
    margin-bottom: 2rem;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.panel-title {
    font-size: 1.25rem;
    font-weight: 700;
}

/* Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 1rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border);
}

.data-table td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
    vertical-align: middle;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr {
    transition: background 0.2s;
}

.data-table tbody tr:hover {
    background: var(--bg-body);
}

.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.badge-pending {
    background: var(--warning-bg);
    color: var(--warning);
}

.badge-success {
    background: var(--success-bg);
    color: var(--success);
}

.badge-info {
    background: var(--info-bg);
    color: var(--info);
}

/* Forms */
.form-group {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: block;
    text-align: left;
}

.form-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.form-input-wrapper i {
    position: absolute;
    left: 1rem;
    color: var(--text-tertiary);
    font-size: 1.1rem;
    pointer-events: none;
}

.form-input {
    width: 100%;
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border);
    background: var(--bg-body);
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.form-input-wrapper .form-input {
    padding-left: 2.75rem;
}

.form-input:hover {
    border-color: var(--text-tertiary);
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light), inset 0 1px 2px rgba(0, 0, 0, 0.02);
    background: var(--bg-card);
}

/* Utility */
.flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.items-center {
    align-items: center;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.text-danger {
    color: var(--danger);
}

.text-success {
    color: var(--success);
}

.address-autocomplete {
    position: relative;
}

.address-suggestions {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-height: 240px;
    overflow-y: auto;
    z-index: 50;
    display: none;
}

.address-suggestion {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 0.9rem;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.92rem;
}

.address-suggestion:hover {
    background: var(--bg-body);
}

.address-suggestion-tag {
    font-size: 0.7rem;
    color: var(--primary);
    background: var(--primary-light);
    padding: 2px 6px;
    border-radius: 999px;
}

.product-tabs {
    flex-wrap: wrap;
}

/* Responsive */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
}

@media (max-width: 1024px) {

    .top-menu,
    .search-field {
        display: none;
        /* Hide on tablet/mobile, need a drawer */
    }

    .mobile-menu-btn {
        display: block;
    }
}

@media (max-width: 1280px) {
    .header-container {
        height: auto;
        flex-wrap: wrap;
        gap: 0.75rem;
        padding: 1rem;
        position: relative;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 0.75rem;
    }
}

@media (max-width: 1200px) {
    .header-container {
        padding: 0 1rem;
    }
}

@media (max-width: 1024px) {

    .top-menu.mobile-open {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        position: absolute;
        top: calc(100% + 0.5rem);
        left: 1rem;
        right: 1rem;
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        padding: 1rem;
        box-shadow: var(--shadow-lg);
        z-index: 110;
    }

    .main-container {
        padding: 1.75rem 1rem;
    }

    .main-container .flex {
        flex-wrap: wrap;
    }

    .main-container .flex > * {
        flex: 1 1 100%;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .layout-col {
        min-width: 100% !important;
        flex: 1 1 100% !important;
    }

    .main-container div[style*="min-width: 600px"],
    .main-container div[style*="min-width: 500px"],
    .main-container div[style*="min-width: 400px"],
    .main-container div[style*="min-width: 350px"],
    .main-container div[style*="min-width: 320px"],
    .main-container div[style*="min-width: 300px"],
    .main-container div[style*="min-width: 240px"],
    .main-container div[style*="min-width: 200px"],
    .main-container div[style*="min-width: 180px"],
    .main-container select[style*="min-width: 240px"],
    .main-container select[style*="min-width: 200px"],
    .main-container select[style*="min-width: 180px"] {
        min-width: 100% !important;
        flex: 1 1 100% !important;
    }
}

.product-image-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.product-image-thumbs {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.product-thumb {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    background: var(--bg-body);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    cursor: pointer;
    overflow: hidden;
    transition: 0.2s;
    padding: 0;
    appearance: none;
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-thumb.is-active {
    border: 2px solid var(--primary);
    background: var(--bg-card);
    color: var(--primary);
}

@media (max-width: 768px) {
    .table-cards {
        border: 0;
    }

    .table-cards thead {
        display: none;
    }

    .table-cards tbody,
    .table-cards tr,
    .table-cards td {
        display: block;
        width: 100%;
    }

    .table-cards tr {
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        padding: 0.75rem 1rem;
        margin-bottom: 1rem;
    }

    .table-cards td {
        display: grid;
        grid-template-columns: minmax(120px, 40%) 1fr;
        gap: 0.35rem 1rem;
        padding: 0.5rem 0;
        border-bottom: 1px dashed var(--border);
        align-items: center;
    }

    .table-cards td::before {
        content: attr(data-label);
        font-size: 0.75rem;
        color: var(--text-tertiary);
        font-weight: 600;
    }

    .table-cards td > * {
        grid-column: 2;
        max-width: 100%;
    }

    .table-cards td:last-child {
        border-bottom: 0;
    }

    .table-cards td[data-cell="actions"],
    .table-cards td[data-cell="title"] {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .table-cards td[data-cell="actions"]::before,
    .table-cards td[data-cell="title"]::before {
        margin-bottom: 0.35rem;
    }

    .table-cards td[data-cell="actions"] > *,
    .table-cards td[data-cell="title"] > * {
        grid-column: 1;
        width: 100%;
    }

    .table-cards td[data-cell="status"] .badge {
        justify-self: end;
    }

    h1 {
        font-size: 1.75rem;
    }

    .panel {
        padding: 1.25rem;
    }

    .search-field input {
        width: 100%;
    }

    .cart-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .cart-controls {
        width: 100%;
        justify-content: space-between;
    }

    .cart-price {
        text-align: left;
        min-width: 0 !important;
    }

    .cart-thumb {
        width: 100%;
        max-width: 180px;
    }

    .test-equip-row {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 640px) {
    .btn {
        width: 100%;
    }

    .data-table th,
    .data-table td {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
}

body[data-ready="false"] #page-root {
    opacity: 0;
    pointer-events: none;
}

body[data-ready="true"] #page-root {
    opacity: 1;
    transition: opacity 0.15s ease;
}
