/* Admin Panel Styles */
:root {
    --admin-primary: #e80052;
    --admin-primary-dark: #c70046;
    --admin-bg: #f5f7fa;
    --admin-sidebar-bg: #1e2530;
    --admin-sidebar-text: #8b95a5;
    --admin-sidebar-active: #ffffff;
    --admin-card-bg: #ffffff;
    --admin-border: #e5e9ef;
    --admin-text: #2d3748;
    --admin-text-muted: #718096;
    --admin-success: #10b981;
    --admin-warning: #f59e0b;
    --admin-danger: #ef4444;
    --admin-info: #3b82f6;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--admin-bg);
    color: var(--admin-text);
    line-height: 1.5;
}

#admin-app {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: 250px;
    background: var(--admin-sidebar-bg);
    color: var(--admin-sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow: hidden;
    z-index: 100;
}

.admin-sidebar__header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-logo {
    color: white;
    text-decoration: none;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-logo strong {
    background: var(--admin-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
}

.admin-sidebar__nav {
    flex: 1;
    padding: 1rem 0;
    min-height: 0;
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.admin-sidebar__nav::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.admin-sidebar__nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: var(--admin-sidebar-text);
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
}

.admin-sidebar__nav a:hover {
    background: rgba(255,255,255,0.05);
    color: white;
}

.admin-sidebar__nav a.active {
    background: rgba(232, 0, 82, 0.15);
    color: var(--admin-primary);
    border-right: 3px solid var(--admin-primary);
}

.admin-sidebar__nav a svg {
    flex-shrink: 0;
}

.admin-sidebar__nav .badge {
    background: var(--admin-primary);
    color: white;
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    margin-left: auto;
}

.admin-sidebar__footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.admin-sidebar__footer a,
.admin-sidebar__footer button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--admin-sidebar-text);
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.5rem 0;
    background: none;
    border: none;
    cursor: pointer;
    width: 100%;
}

.admin-sidebar__footer a:hover,
.admin-sidebar__footer button:hover {
    color: white;
}

.logout-btn {
    color: var(--admin-danger) !important;
}

/* Main Content */
.admin-main {
    flex: 1;
    margin-left: 250px;
    min-height: 100vh;
}

/* Mobile Menu Toggle */
.admin-menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--admin-text);
}

.admin-menu-toggle svg {
    display: block;
}

.admin-header {
    background: white;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--admin-border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.admin-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.admin-header__user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--admin-text-muted);
}

.admin-content {
    padding: 2rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stats-grid--secondary {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stat-card {
    background: var(--admin-card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-card--small {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
}

.stat-card--small .stat-card__label {
    order: -1;
    font-size: 0.75rem;
}

.stat-card--small .stat-card__value {
    font-size: 1.5rem;
}

.stat-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card__icon.orders { background: #e0f2fe; color: #0284c7; }
.stat-card__icon.new { background: #fef3c7; color: #d97706; }
.stat-card__icon.customers { background: #d1fae5; color: #059669; }
.stat-card__icon.revenue { background: #ede9fe; color: #7c3aed; }

.stat-card__content {
    display: flex;
    flex-direction: column;
}

.stat-card__value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--admin-text);
}

.stat-card__label {
    font-size: 0.875rem;
    color: var(--admin-text-muted);
}

/* Filters Bar */
.filters-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    flex: 1;
    min-width: 250px;
    max-width: 400px;
}

.search-box input {
    flex: 1;
    padding: 0.625rem 1rem;
    border: 1px solid var(--admin-border);
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-size: 0.875rem;
    outline: none;
}

.search-box input:focus {
    border-color: var(--admin-primary);
}

.search-box button {
    padding: 0.625rem 1.25rem;
    background: var(--admin-primary);
    color: white;
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-weight: 500;
}

.search-box button:hover {
    background: var(--admin-primary-dark);
}

.filters-bar select {
    padding: 0.625rem 1rem;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    font-size: 0.875rem;
    background: white;
    cursor: pointer;
    min-width: 150px;
}

/* Tables */
.table-container {
    background: var(--admin-card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

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

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--admin-border);
}

.admin-table th {
    background: #f8fafc;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--admin-text-muted);
}

.admin-table tbody tr:hover {
    background: #f8fafc;
}

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

.admin-table .price {
    font-weight: 600;
    color: var(--admin-text);
}

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

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.contact-info small {
    color: var(--admin-text-muted);
    font-size: 0.75rem;
}

.loading-cell,
.empty-cell {
    text-align: center;
    padding: 3rem !important;
    color: var(--admin-text-muted);
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.new { background: #fef3c7; color: #92400e; }
.status-badge.confirmed { background: #dbeafe; color: #1e40af; }
.status-badge.paid { background: #ccfbf1; color: #0f766e; }
.status-badge.packing { background: #fef3c7; color: #92400e; }
.status-badge.packed { background: #ffedd5; color: #9a3412; }
.status-badge.handed_to_delivery { background: #e0e7ff; color: #3730a3; }
.status-badge.in_transit { background: #ede9fe; color: #5b21b6; }
.status-badge.delivered { background: #d1fae5; color: #065f46; }
.status-badge.cancelled { background: #fee2e2; color: #991b1b; }
.status-badge.return { background: #ffe4e6; color: #9f1239; }
.status-badge.archive { background: #e5e7eb; color: #374151; }

/* Status Select */
.status-select {
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--admin-border);
    font-size: 0.8125rem;
    cursor: pointer;
    background: white;
}

.status-select.new { border-color: #fcd34d; background: #fef3c7; }
.status-select.confirmed { border-color: #60a5fa; background: #dbeafe; }
.status-select.paid { border-color: #2dd4bf; background: #ccfbf1; }
.status-select.packing { border-color: #f59e0b; background: #fef3c7; }
.status-select.packed { border-color: #fb923c; background: #ffedd5; }
.status-select.handed_to_delivery { border-color: #818cf8; background: #e0e7ff; }
.status-select.in_transit { border-color: #a78bfa; background: #ede9fe; }
.status-select.delivered { border-color: #34d399; background: #d1fae5; }
.status-select.cancelled { border-color: #f87171; background: #fee2e2; }
.status-select.return { border-color: #fb7185; background: #ffe4e6; }
.status-select.archive { border-color: #9ca3af; background: #e5e7eb; }

/* Buttons */
.btn-icon {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--admin-text-muted);
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--admin-bg);
    color: var(--admin-primary);
}

.btn-primary {
    background: var(--admin-primary);
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--admin-primary-dark);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 1rem;
}

.pagination button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--admin-border);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
}

.pagination button:hover:not(:disabled) {
    background: var(--admin-bg);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination span {
    font-size: 0.875rem;
    color: var(--admin-text-muted);
}

/* Catalog Grid */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.catalog-card {
    background: var(--admin-card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.catalog-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.catalog-card__image {
    aspect-ratio: 1;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.catalog-card__image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.catalog-card__content {
    padding: 1rem;
}

.catalog-card__title {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.catalog-card__sku {
    font-size: 0.75rem;
    color: var(--admin-text-muted);
    margin-bottom: 0.75rem;
}

.catalog-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.catalog-card__price {
    font-weight: 700;
    color: var(--admin-primary);
}

.catalog-card__stock {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.catalog-card__stock.in-stock {
    background: #d1fae5;
    color: #065f46;
}

.catalog-card__stock.out-of-stock {
    background: #fee2e2;
    color: #991b1b;
}

/* Recent Section */
.recent-section {
    background: var(--admin-card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.recent-section h2 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 2rem;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: slideUp 0.25s ease-out;
}

.modal-header,
.modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--admin-border);
    background: linear-gradient(to bottom, #fafafa, #fff);
}

.modal-header h2,
.modal-header h3,
.modal__header h2,
.modal__header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.modal-close,
.modal__close {
    background: none;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    color: var(--admin-text-muted);
    padding: 0.25rem;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.modal-close:hover,
.modal__close:hover {
    color: var(--admin-text);
    background: #f1f5f9;
}

.modal-body,
.modal__body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal__body h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
}

.modal__body h3:first-child {
    margin-top: 0;
}

.modal__body h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #334155;
    margin: 1.25rem 0 0.75rem 0;
}

.modal__footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--admin-border);
    background: #fafafa;
}

.modal-body h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
}

.modal-body h3:first-child {
    margin-top: 0;
}

.order-details-grid,
.customer-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.order-details-grid p,
.customer-details-grid p {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--admin-border);
}

/* Product Management Styles */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.page-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--admin-primary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--admin-primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--admin-border);
    color: var(--admin-text);
}

.btn-secondary:hover:not(:disabled) {
    background: #d1d5db;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

.btn-edit {
    background: var(--admin-info);
    color: white;
}

.btn-edit:hover {
    background: #2563eb;
}

.btn-delete {
    background: var(--admin-danger);
    color: white;
}

.btn-delete:hover {
    background: #dc2626;
}

.catalog-card__actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.catalog-card__actions button {
    flex: 1;
}

/* Product Modal */
.admin-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
}

.modal-content {
    background: var(--admin-card-bg);
    border-radius: 12px;
    padding: 0;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

.product-modal {
    max-width: 800px;
}

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

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--admin-text-muted);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--admin-bg);
    color: var(--admin-text);
}

/* Product Form */
.product-form {
    padding: 1.5rem;
}

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

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--admin-text);
    margin-bottom: 0.5rem;
}

.form-group .required {
    color: var(--admin-danger);
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--admin-primary);
}

.form-group textarea {
    resize: vertical;
    font-family: inherit;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Characteristics Section */
.characteristics-section {
    padding: 1rem;
    background: var(--admin-bg);
    border-radius: 8px;
}

.characteristic-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.characteristic-row input {
    padding: 0.5rem;
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    font-size: 0.875rem;
}

.characteristic-row button {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive */
@media (max-width: 1024px) {
    .admin-sidebar {
        width: 80px;
    }
    
    .admin-sidebar__header {
        padding: 0.75rem 0.5rem;
        text-align: center;
    }
    
    .admin-logo strong {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
    
    .admin-sidebar__nav a {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 0.75rem 0.5rem;
        gap: 0.35rem;
    }
    
    .admin-sidebar__nav a span {
        font-size: 0.625rem;
        line-height: 1.2;
        text-align: center;
    }
    
    .admin-sidebar__footer span {
        display: none;
    }
    
    .admin-sidebar__nav .badge {
        position: absolute;
        top: 0.25rem;
        right: 0.25rem;
        margin: 0;
        font-size: 0.625rem;
        padding: 0.1rem 0.35rem;
    }
    
    .admin-main {
        margin-left: 80px;
    }
}

@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
        width: 250px;
        z-index: 200;
    }
    
    .admin-sidebar.open {
        transform: translateX(0);
    }

    /* Overlay when sidebar is open */
    .admin-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 150;
        opacity: 0;
        transition: opacity 0.3s;
        pointer-events: none;
    }

    .admin-overlay.visible {
        opacity: 1;
        pointer-events: auto;
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .admin-header {
        padding: 1rem;
        gap: 0.75rem;
    }

    .admin-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .admin-header h1 {
        font-size: 1.1rem;
        flex: 1;
    }
    
    .admin-content {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .stat-card__icon {
        width: 40px;
        height: 40px;
    }

    .stat-card__value {
        font-size: 1.5rem;
    }
    
    .filters-bar {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .search-box {
        max-width: none;
    }

    .filters-bar select {
        width: 100%;
    }
    
    .modal {
        max-height: 100vh;
        border-radius: 0;
    }

    .modal-overlay {
        padding: 0;
    }
    
    .order-details-grid,
    .customer-details-grid {
        grid-template-columns: 1fr;
    }
    
    /* Tables become card-based on mobile */
    .admin-table {
        display: block;
    }
    
    .admin-table thead {
        display: none;
    }
    
    .admin-table tbody {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .admin-table tbody tr {
        display: flex;
        flex-wrap: wrap;
        background: var(--admin-card-bg);
        border-radius: 10px;
        padding: 1rem;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        gap: 0.5rem;
    }
    
    .admin-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.375rem 0;
        border-bottom: none;
        font-size: 0.875rem;
        width: 100%;
    }
    
    .admin-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--admin-text-muted);
        font-size: 0.75rem;
        text-transform: uppercase;
    }

    .admin-table tbody td:empty::before {
        display: none;
    }

    /* Specific order table adjustments */
    .orders-table tbody td {
        border-bottom: 1px solid var(--admin-border);
    }
    
    .orders-table tbody td:last-child {
        border-bottom: none;
    }

    /* Catalog grid on mobile */
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .catalog-card__content {
        padding: 0.75rem;
    }

    .catalog-card__title {
        font-size: 0.8125rem;
    }

    /* Settings mobile */
    .settings-section {
        padding: 1rem;
    }

    .setting-item input[type="text"],
    .setting-item input[type="number"],
    .setting-item select {
        max-width: none;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-header h1 {
        font-size: 1rem;
    }
    
    .admin-content {
        padding: 0.75rem;
    }
    
    .filters-bar input,
    .filters-bar select {
        padding: 0.75rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    /* Catalog grid single column */
    .catalog-grid {
        grid-template-columns: 1fr;
    }

    /* Table card full width */
    .admin-table tbody tr {
        padding: 0.875rem;
    }

    /* Pagination mobile */
    .pagination {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .pagination button {
        flex: 1;
        min-width: 80px;
    }

    /* Modal mobile */
    .modal-header {
        padding: 1rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-actions button {
        width: 100%;
    }

    /* Settings mobile */
    .settings-section {
        padding: 0.875rem;
    }

    .setting-item {
        padding: 0.5rem;
    }

    .setting-item input,
    .setting-item select,
    .setting-item textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Hide elements initially to prevent FOUC */
[v-cloak] {
    display: none;
}

/* ==================== CRM STYLES ==================== */

/* Sidebar Section Divider & Label */
.admin-sidebar__divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 0.5rem 1.5rem;
}

.admin-sidebar__label {
    padding: 0.5rem 1.5rem 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.3);
}

/* CRM Topbar Stats */
.crm-content {
    padding-top: 0 !important;
}

.crm-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.crm-topbar__stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.crm-stat {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.crm-stat__value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--admin-text);
}

.crm-stat__label {
    font-size: 0.75rem;
    color: var(--admin-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.crm-stat--success .crm-stat__value { color: var(--admin-success); }
.crm-stat--warning .crm-stat__value { color: #f59e0b; }
.crm-stat--info .crm-stat__value { color: var(--admin-info); }
.crm-stat--danger .crm-stat__value { color: var(--admin-danger); }

/* Kanban Board */
.kanban-board {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    min-height: calc(100vh - 220px);
    align-items: flex-start;
    cursor: grab;
}

.kanban-board:active {
    cursor: grabbing;
}

.kanban-column {
    min-width: 300px;
    max-width: 300px;
    flex: 0 0 300px;
    background: #f0f2f5;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    border-top: 3px solid transparent;
    transition: background 0.2s, box-shadow 0.2s;
}

.kanban-column--dragover {
    background: #e8ecf1;
    box-shadow: inset 0 0 0 2px var(--admin-primary);
}

.kanban-column__header {
    padding: 0.875rem 1rem;
    border-top: 3px solid;
    border-radius: 12px 12px 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.kanban-column__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--admin-text);
}

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

.kanban-column__count {
    background: rgba(0, 0, 0, 0.08);
    color: var(--admin-text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0 0.5rem;
    border-radius: 10px;
    margin-left: auto;
}

.kanban-column__sum {
    font-size: 0.8rem;
    color: var(--admin-text-muted);
    padding-left: 1rem;
}

.kanban-column__body {
    padding: 0.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 60px;
}

/* Kanban Card */
.kanban-card {
    background: #fff;
    border-radius: 8px;
    padding: 0.75rem;
    cursor: grab;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s, transform 0.15s;
    border-left: 3px solid transparent;
}

.kanban-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.kanban-card:active {
    cursor: grabbing;
}

.kanban-card--high {
    border-left-color: var(--admin-danger);
}

.kanban-card--low {
    border-left-color: #cbd5e1;
}

.kanban-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.375rem;
}

.kanban-card__title {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--admin-text);
    line-height: 1.3;
}

.kanban-card__amount {
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--admin-success);
    white-space: nowrap;
}

.kanban-card__client {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--admin-text-muted);
    margin-bottom: 0.375rem;
}

.kanban-card__company {
    color: #a0aec0;
}

.kanban-card__footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #a0aec0;
}

.kanban-card__date {
    color: #a0aec0;
}

.kanban-card__due {
    color: var(--admin-info);
}

.kanban-card__due.overdue {
    color: var(--admin-danger);
    font-weight: 600;
}

.kanban-card__priority {
    margin-left: auto;
}

.kanban-card__priority--high {
    color: var(--admin-danger);
    font-weight: 700;
    font-size: 0.7rem;
}

.kanban-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    color: #c4c9d4;
    font-size: 0.85rem;
    border: 2px dashed #dde1e8;
    border-radius: 8px;
    text-align: center;
    min-height: 80px;
}

/* CRM Customer Table */
.clickable-row {
    cursor: pointer;
    transition: background 0.15s;
}

.clickable-row:hover {
    background: #f8f9fc !important;
}

.client-name-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.client-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: white;
    flex-shrink: 0;
    background: var(--admin-info);
}

.client-avatar--vip {
    background: linear-gradient(135deg, #f59e0b, #ec4899);
}

.client-avatar--inactive {
    background: #a0aec0;
}

.source-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
    background: #eee;
    color: #666;
}

.source--website { background: #dbeafe; color: #1d4ed8; }
.source--phone { background: #dcfce7; color: #15803d; }
.source--referral { background: #fef3c7; color: #92400e; }
.source--ad { background: #fce7f3; color: #9d174d; }

.client-status-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
}

.cstatus--active { background: #dcfce7; color: #15803d; }
.cstatus--vip { background: linear-gradient(135deg, #fef3c7, #fce7f3); color: #92400e; font-weight: 600; }
.cstatus--inactive { background: #f1f5f9; color: #64748b; }

/* CRM Modal Tabs */
.crm-modal-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e5e9ef;
    margin-bottom: 1.5rem;
}

.crm-modal-tabs button {
    padding: 0.75rem 1.25rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--admin-text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
}

.crm-modal-tabs button:hover {
    color: var(--admin-text);
}

.crm-modal-tabs button.active {
    color: var(--admin-primary);
    border-bottom-color: var(--admin-primary);
    font-weight: 600;
}

/* CRM Forms */
.crm-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.crm-form .form-group {
    margin-bottom: 0.75rem;
}

.crm-form label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 500;
    font-size: 0.85rem;
    color: #555;
}

.crm-form input,
.crm-form select,
.crm-form textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.crm-form input:focus,
.crm-form select:focus,
.crm-form textarea:focus {
    outline: none;
    border-color: var(--admin-primary);
}

.required { color: var(--admin-danger); }

/* CRM Mini Cards (in client modal, deals tab) */
.crm-mini-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8f9fc;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: background 0.15s;
}

.crm-mini-card:hover {
    background: #eef0f6;
}

.crm-mini-card__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.crm-mini-card__content {
    flex: 1;
}

.crm-mini-card__content strong {
    display: block;
    font-size: 0.9rem;
}

.crm-mini-card__content small {
    color: var(--admin-text-muted);
    font-size: 0.8rem;
}

.crm-mini-card__date {
    font-size: 0.8rem;
    color: #a0aec0;
}

/* CRM Activity */
.crm-activity-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.crm-activity-type-select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.85rem;
    min-width: 130px;
}

.crm-activity-input {
    flex: 1;
    min-width: 200px;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.85rem;
}

.crm-activity-date {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.85rem;
}

.crm-activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.crm-activity-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8f9fc;
    border-radius: 8px;
    transition: background 0.15s;
}

.crm-activity-item:hover {
    background: #eef0f6;
}

.crm-activity-item.completed {
    opacity: 0.6;
}

.crm-activity-item.completed .crm-activity-text {
    text-decoration: line-through;
}

.crm-activity-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}

.crm-activity-content {
    flex: 1;
}

.crm-activity-text {
    font-size: 0.9rem;
    color: var(--admin-text);
    margin-bottom: 0.2rem;
}

.crm-activity-meta {
    font-size: 0.75rem;
    color: var(--admin-text-muted);
}

.crm-activity-actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

/* Wide modal for CRM */
.modal--wide {
    max-width: 720px;
    width: 90vw;
}

/* Page header with button */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

/* Button styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    white-space: nowrap;
}

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

.btn-primary:hover {
    background: var(--admin-primary-dark);
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

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

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

.btn-icon--danger {
    color: var(--admin-danger);
}

.btn-icon--danger:hover {
    background: #fef2f2;
}

/* Kanban Order Card extras */
.kanban-card__items {
    font-size: 0.75rem;
    color: var(--admin-text-muted);
    background: #f1f5f9;
    padding: 0.15rem 0.5rem;
    border-radius: 8px;
}

.kanban-card__priority--paid {
    color: var(--admin-success);
    font-weight: 600;
    font-size: 0.75rem;
}

/* Badge variant */
.badge--warning {
    background: #fef3c7 !important;
    color: #92400e !important;
}

/* ==================== TICKET STYLES ==================== */

/* Ticket Filters */
.ticket-filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.ticket-filters select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.85rem;
    background: white;
}

/* Priority Badge */
.priority-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.priority--urgent { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.priority--high   { background: #fff7ed; color: #ea580c; border: 1px solid #fed7aa; }
.priority--medium { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.priority--low    { background: #f8fafc; color: #64748b; border: 1px solid #e2e8f0; }

/* Ticket Status Badge */
.ticket-status-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.tstatus--open        { background: #dcfce7; color: #15803d; }
.tstatus--in_progress { background: #dbeafe; color: #1d4ed8; }
.tstatus--waiting     { background: #fef3c7; color: #92400e; }
.tstatus--resolved    { background: #ccfbf1; color: #0f766e; }
.tstatus--closed      { background: #f1f5f9; color: #64748b; }

/* Ticket Messages (chat-like view) */
.ticket-messages {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
    background: #f8f9fc;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.ticket-message {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    position: relative;
}

.ticket-message--admin {
    background: #dbeafe;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.ticket-message--customer {
    background: #fff;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid #e5e9ef;
}

.ticket-message__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
    font-size: 0.8rem;
}

.ticket-message__header strong {
    font-weight: 600;
    color: var(--admin-text);
}

.ticket-message__date {
    color: var(--admin-text-muted);
    font-size: 0.75rem;
}

.ticket-message__body {
    font-size: 0.9rem;
    color: var(--admin-text);
    line-height: 1.5;
    white-space: pre-wrap;
}

/* Ticket Reply Form */
.ticket-reply {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.ticket-reply__input {
    flex: 1;
    padding: 0.65rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.ticket-reply__input:focus {
    outline: none;
    border-color: var(--admin-primary);
}

/* CRM responsive */
@media (max-width: 768px) {
    .kanban-board {
        min-height: auto;
    }

    .kanban-column {
        min-width: 260px;
        max-width: 260px;
        flex: 0 0 260px;
    }

    .crm-topbar {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .modal--wide {
        width: 95vw;
    }

    .crm-activity-form {
        flex-direction: column;
        align-items: stretch;
    }

    .ticket-message {
        max-width: 90%;
    }

    .ticket-reply {
        flex-direction: column;
    }
}

/* ================= WMS ================= */

/* Scanner input */
.wms-scanner-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--admin-card-bg, #fff);
    border-radius: 12px;
    border: 2px solid var(--admin-primary, #4f46e5);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.wms-scanner-input {
    flex: 1;
    font-size: 22px;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    letter-spacing: 1px;
    transition: border-color 0.2s;
    background: #f8fafc;
}
.wms-scanner-input:focus {
    outline: none;
    border-color: var(--admin-primary, #4f46e5);
    background: #fff;
}
.wms-scanner-input::placeholder {
    font-size: 16px;
    letter-spacing: 0;
    font-family: inherit;
    color: #94a3b8;
}

.wms-scanner-label {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Active box indicator */
.wms-active-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}
.wms-active-box__label { font-weight: 600; color: #1e40af; }
.wms-active-box__code { font-family: monospace; font-size: 16px; font-weight: 700; color: #1d4ed8; }
.wms-active-box__btn { margin-left: auto; }

/* Last scan feedback */
.wms-last-scan {
    padding: 10px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 15px;
    font-weight: 500;
    animation: wms-flash 0.3s ease;
}
.wms-last-scan--ok { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.wms-last-scan--error { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
.wms-last-scan--unknown { background: #fefce8; color: #854d0e; border: 1px solid #fde047; }

@keyframes wms-flash {
    0% { transform: scale(1.02); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* Status badges */
.wms-status { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.wms-status--open { background: #dbeafe; color: #1e40af; }
.wms-status--closed { background: #fef3c7; color: #92400e; }
.wms-status--placed { background: #d1fae5; color: #065f46; }

/* Match status */
.wms-match { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.wms-match--matched { background: #d1fae5; color: #065f46; }
.wms-match--not_found { background: #fee2e2; color: #991b1b; }
.wms-match--created { background: #e0e7ff; color: #3730a3; }

/* Progress bar */
.wms-progress { width: 100%; height: 24px; background: #e2e8f0; border-radius: 12px; overflow: hidden; position: relative; }
.wms-progress__bar { height: 100%; border-radius: 12px; transition: width 0.4s ease; background: linear-gradient(90deg, #22c55e, #16a34a); }
.wms-progress__bar--warning { background: linear-gradient(90deg, #f59e0b, #d97706); }
.wms-progress__bar--danger { background: linear-gradient(90deg, #ef4444, #dc2626); }
.wms-progress__text {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; color: #1e293b; text-shadow: 0 0 2px rgba(255,255,255,0.8);
}

/* Sessions list */
.wms-sessions-grid {
    display: grid;
    gap: 12px;
}

.wms-session-card {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--admin-card-bg, #fff);
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.wms-session-card:hover {
    border-color: var(--admin-primary, #4f46e5);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.08);
}
.wms-session-card__title { font-weight: 700; font-size: 15px; color: #1e293b; }
.wms-session-card__sub { font-size: 13px; color: #64748b; margin-top: 2px; }
.wms-session-card__stats { font-size: 13px; color: #475569; text-align: center; }
.wms-session-card__stats strong { font-size: 18px; display: block; color: #1e293b; }

/* Comparison table */
.wms-comparison { 
    border-collapse: collapse; 
    width: 100%; 
    font-size: 14px; 
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}
.wms-comparison th { 
    background: linear-gradient(to bottom, #f8fafc, #f1f5f9); 
    padding: 12px 16px; 
    text-align: left; 
    font-weight: 600; 
    color: #334155; 
    border-bottom: 2px solid #e2e8f0; 
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}
.wms-comparison td { 
    padding: 10px 16px; 
    border-bottom: 1px solid #f1f5f9; 
}
.wms-comparison tr.wms-row--match { 
    background: #f0fdf4; 
}
.wms-comparison tr.wms-row--match td:first-child {
    border-left: 3px solid #22c55e;
}
.wms-comparison tr.wms-row--shortage { 
    background: #fef2f2; 
}
.wms-comparison tr.wms-row--shortage td:first-child {
    border-left: 3px solid #ef4444;
}
.wms-comparison tr.wms-row--surplus { 
    background: #fffbeb; 
}
.wms-comparison tr.wms-row--surplus td:first-child {
    border-left: 3px solid #f59e0b;
}
.wms-comparison tr:hover { 
    background: #f8fafc; 
}
.wms-comparison tbody tr:last-child td {
    border-bottom: none;
}

/* Scanned items table */
.wms-scanned-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.wms-scanned-table th { background: #f1f5f9; padding: 8px 12px; text-align: left; font-weight: 600; color: #475569; border-bottom: 2px solid #e2e8f0; position: sticky; top: 0; }
.wms-scanned-table td { padding: 6px 12px; border-bottom: 1px solid #f1f5f9; }
.wms-scanned-table .qty-controls { display: flex; align-items: center; gap: 6px; }
.wms-scanned-table .qty-btn {
    width: 28px; height: 28px; border-radius: 6px; border: 1px solid #d1d5db;
    background: #fff; cursor: pointer; font-size: 16px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
}
.wms-scanned-table .qty-btn:hover { background: #f1f5f9; border-color: #94a3b8; }
.wms-scanned-table .qty-value { font-size: 16px; font-weight: 700; min-width: 30px; text-align: center; }

/* Toolbar */
.wms-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* Create session modal form */
.wms-form-grid {
    display: grid;
    gap: 16px;
}
.wms-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}
.wms-form-group input,
.wms-form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}
.wms-form-group input:focus,
.wms-form-group select:focus {
    outline: none;
    border-color: var(--admin-primary, #4f46e5);
}

.wms-file-upload {
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.wms-file-upload:hover { border-color: var(--admin-primary, #4f46e5); background: #f8fafc; }
.wms-file-upload.has-file { border-color: #22c55e; background: #f0fdf4; }
.wms-file-upload__icon { font-size: 32px; margin-bottom: 8px; }
.wms-file-upload__text { font-size: 14px; color: #64748b; }
.wms-file-upload__filename { font-size: 14px; font-weight: 600; color: #1e293b; margin-top: 4px; }

/* Tabs */
.wms-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 20px;
}
.wms-tab {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}
.wms-tab:hover { color: #1e293b; }
.wms-tab.active {
    color: var(--admin-primary, #4f46e5);
    border-bottom-color: var(--admin-primary, #4f46e5);
}

/* Location cards */
.wms-locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}
.wms-location-card {
    padding: 14px;
    background: var(--admin-card-bg, #fff);
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    text-align: center;
    transition: border-color 0.2s;
    cursor: pointer;
}
.wms-location-card:hover { border-color: var(--admin-primary, #4f46e5); }
.wms-location-card.selected { border-color: var(--admin-primary, #4f46e5); background: #eef2ff; }
.wms-location-card__code { font-family: monospace; font-size: 16px; font-weight: 700; color: #1e293b; }
.wms-location-card__zone { font-size: 12px; color: #64748b; margin-top: 4px; }
.wms-location-card__delete { margin-top: 8px; }

/* Summary stats row */
.wms-stats-row {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.wms-stat-box {
    flex: 1;
    min-width: 140px;
    padding: 16px 24px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-align: center;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.wms-stat-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}
.wms-stat-box__value { 
    font-size: 28px; 
    font-weight: 700; 
    color: #1e293b; 
    line-height: 1.2;
    margin-bottom: 4px;
}
.wms-stat-box__label { 
    font-size: 12px; 
    color: #64748b; 
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Empty state */
.wms-empty {
    text-align: center;
    padding: 48px 24px;
    color: #94a3b8;
}
.wms-empty__icon { font-size: 48px; margin-bottom: 12px; }
.wms-empty__text { font-size: 16px; }

/* Discrepancy badge */
.wms-disc-type { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 700; }
.wms-disc-type--shortage { background: #fee2e2; color: #991b1b; }
.wms-disc-type--surplus { background: #fef3c7; color: #92400e; }
.wms-disc-type--match { background: #d1fae5; color: #065f46; }

/* Modal enhancements for WMS */
.modal__header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal__body details {
    cursor: pointer;
}

.modal__body details summary {
    transition: background 0.2s;
}

.modal__body details summary:hover {
    background: #e2e8f0 !important;
}

.modal__body details[open] summary {
    margin-bottom: 8px;
}

.modal__body code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: 0.9em;
    color: #4f46e5;
}

.modal__body ol, 
.modal__body ul {
    line-height: 1.7;
}

.modal__body strong {
    color: #1e293b;
    font-weight: 600;
}

/* WMS Modal Buttons */
.modal__footer .btn {
    min-width: 100px;
}

/* Print styles for discrepancy report */
@media print {
    body { background: white; }
    .admin-sidebar, .admin-header, .wms-toolbar, .wms-scanner-wrapper,
    .wms-tabs, .admin-sidebar__footer, .no-print, .modal-overlay { 
        display: none !important; 
    }
    .modal {
        position: static !important;
        max-width: none !important;
        max-height: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }
    .modal__header {
        border-bottom: 2px solid #000 !important;
        background: none !important;
        padding: 10px 0 !important;
    }
    .modal__header h3 {
        font-size: 18px !important;
        color: #000 !important;
    }
    .modal__body {
        padding: 15px 0 !important;
    }
    .modal__footer {
        display: none !important;
    }
    .admin-main { 
        margin: 0 !important; 
        padding: 20px !important; 
    }
    .admin-content { 
        padding: 0 !important; 
    }
    .wms-stats-row {
        display: flex !important;
        gap: 10px !important;
        page-break-inside: avoid;
        margin-bottom: 15px !important;
    }
    .wms-stat-box {
        border: 1px solid #000 !important;
        padding: 8px 12px !important;
        background: none !important;
        box-shadow: none !important;
    }
    .wms-stat-box__value {
        font-size: 18px !important;
        color: #000 !important;
    }
    .wms-stat-box__label {
        font-size: 10px !important;
        color: #333 !important;
    }
    .wms-comparison { 
        font-size: 11px !important; 
        page-break-inside: avoid;
        border: 1px solid #000 !important;
    }
    .wms-comparison th { 
        background: #f0f0f0 !important;
        padding: 6px 10px !important;
        border: 1px solid #000 !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .wms-comparison td { 
        padding: 5px 10px !important;
        border: 1px solid #ccc !important;
    }
    .wms-comparison tr.wms-row--match { 
        background: #f0f0f0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .wms-comparison tr.wms-row--shortage { 
        background: #ffebee !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .wms-comparison tr.wms-row--surplus { 
        background: #fff9c4 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .wms-disc-type {
        border: 1px solid #000 !important;
        background: #f0f0f0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* WMS responsive */
@media (max-width: 768px) {
    .wms-scanner-wrapper { flex-direction: column; }
    .wms-scanner-input { font-size: 18px; }
    .wms-session-card { grid-template-columns: 1fr; gap: 8px; }
    .wms-stats-row { flex-direction: column; }
    .wms-locations-grid { grid-template-columns: 1fr 1fr; }
    .wms-toolbar { flex-direction: column; align-items: stretch; }
}

/* ===== Dashboard Charts ===== */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.chart-card {
    background: var(--admin-card-bg, #fff);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    padding: 0;
    overflow: hidden;
}

.chart-card__header {
    padding: 16px 20px 0;
}

.chart-card__header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--admin-text, #1e293b);
}

.chart-card__body {
    padding: 12px 16px 16px;
    height: 220px;
    position: relative;
}

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