/* Price badge in the same row, red-themed */
.product-price-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #fce4e4;
    color: #b30000;
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 13px;
    border: 1px solid #ffb3b3;
}
/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f0f23;
    color: #e6e6e6;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Login page styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 100%);
    padding: 20px;
}

.login-card {
    background: #1e1e2e;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
    border: 1px solid #2d2d44;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: #64b5f6;
    margin-bottom: 8px;
}

.logo i {
    font-size: 28px;
}

.subtitle {
    color: #a0a0a0;
    font-size: 14px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #a0a0a0;
    font-size: 14px;
}

.input-group input,
.input-group select,
.input-group textarea {
    padding: 12px 16px;
    border: 1px solid #3a3a5a;
    border-radius: 8px;
    background: #2a2a3e;
    color: #e6e6e6;
    font-size: 14px;
    transition: all 0.3s ease;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #64b5f6;
    box-shadow: 0 0 0 3px rgba(100, 181, 246, 0.1);
}

.input-group input::placeholder {
    color: #808080;
}

.login-footer {
    text-align: center;
    margin-top: 30px;
    color: #a0a0a0;
    font-size: 12px;
}

/* Button styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    justify-content: center;
}

.btn-primary {
    background: #64b5f6;
    color: #0f0f23;
}

.btn-primary:hover {
    background: #42a5f5;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #3a3a5a;
    color: #e6e6e6;
}

.btn-secondary:hover {
    background: #4a4a6a;
}

.btn-success {
    background: #4caf50;
    color: white;
}

.btn-success:hover {
    background: #45a049;
}

.btn-warning {
    background: #ff9800;
    color: white;
}

.btn-warning:hover {
    background: #f57c00;
}

.btn-danger {
    background: #f44336;
    color: white;
}

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

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

.btn-full {
    width: 100%;
}

.btn-icon {
    background: none;
    border: none;
    color: #a0a0a0;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: #3a3a5a;
}

/* Header styles */
.header {
    background: #1e1e2e;
    border-bottom: 1px solid #2d2d44;
    padding: 16px 0;
    position: static; /* was: sticky */
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

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

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

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

.nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    color: #a0a0a0;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #e6e6e6;
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: #64b5f6;
    background: rgba(100, 181, 246, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #a0a0a0;
    font-size: 14px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #e6e6e6;
    margin: 0;
}

/* Dropdown Navigation */
.nav-dropdown {
    position: relative;
    display: inline-block;
    z-index: 1500; /* ensure dropdown is over sticky header and content */
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #2a2a3e;
    width: max-content;
    min-width: 100%;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1501;
    border-radius: 8px;
    border: 1px solid #3a3a5a;
    margin-top: 4px;
    padding-top: 8px; /* Add padding to bridge the gap */
    padding-bottom: 8px;
    top: 100%; /* Position it right below the nav link */
    left: 0;
}

.nav-dropdown.open .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: #a0a0a0;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    transition: all 0.3s ease;
}

.dropdown-content a:hover {
    background-color: #3a3a5a;
    color: #e6e6e6;
}

.dropdown-arrow {
    margin-left: 8px;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.nav-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

/* Access Denied Page */
.access-denied-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 20px;
}

.access-denied-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    max-width: 500px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.access-denied-icon {
    font-size: 64px;
    color: #ff6b6b;
    margin-bottom: 24px;
}

.access-denied-card h2 {
    color: #e6e6e6;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 16px;
}

.access-denied-card p {
    color: #b0b0b0;
    font-size: 16px;
    margin-bottom: 32px;
    line-height: 1.5;
}

.access-denied-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.access-denied-actions .btn {
    min-width: 140px;
}

/* Main content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Dashboard styles */
.dashboard-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.stat-card {
    background: #1e1e2e;
    border: 1px solid #2d2d44;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #64b5f6, #42a5f5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.stat-content h3 {
    font-size: 28px;
    font-weight: 700;
    color: #e6e6e6;
    margin-bottom: 4px;
}

.stat-content p {
    color: #a0a0a0;
    font-size: 14px;
}

/* Charts section */
.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.chart-container {
    background: #1e1e2e;
    border: 1px solid #2d2d44;
    border-radius: 12px;
    padding: 24px;
}

.chart-container h3 {
    margin-bottom: 20px;
    color: #e6e6e6;
    font-size: 18px;
    font-weight: 600;
}

.chart-wrapper {
    position: relative;
    height: 400px;
    width: 100%;
}

/* Tabs styles */
.tabs-container {
    background: #1e1e2e;
    border: 1px solid #2d2d44;
    border-radius: 12px;
    overflow: hidden;
}

.tabs-header {
    display: flex;
    background: #2a2a3e;
    border-bottom: 1px solid #2d2d44;
}

.tab-btn {
    background: none;
    border: none;
    color: #a0a0a0;
    padding: 16px 24px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn.active {
    color: #64b5f6;
    background: #1e1e2e;
}

.tab-btn:hover {
    color: #e6e6e6;
}

.tab-content {
    display: none;
    padding: 24px;
}

.tab-content.active {
    display: block;
}

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.tab-header h3 {
    color: #e6e6e6;
    font-size: 18px;
    font-weight: 600;
}

/* Table styles */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #2a2a3e;
    border-radius: 8px;
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #3a3a5a;
}

.data-table th {
    background: #1e1e2e;
    color: #e6e6e6;
    font-weight: 600;
    font-size: 14px;
}

.data-table td {
    color: #e6e6e6;
    font-size: 14px;
}

.data-table td.actions-cell {
    gap: 8px;
}


.data-table tr:hover {
    background: #3a3a5a;
}

/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: #1e1e2e;
    border: 1px solid #2d2d44;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content.large {
    max-width: 800px;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #2d2d44;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #e6e6e6;
    font-size: 18px;
    font-weight: 600;
}

.close-button {
    background: none;
    border: none;
    color: #a0a0a0;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-button:hover {
    color: #e6e6e6;
}

.modal form {
    padding: 24px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* Product card styles */
.product-card {
    background: #1e1e2e;
    border: 1px solid #2d2d44;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.product-title {
    color: #e6e6e6;
    font-size: 20px;
    font-weight: 600;
}

.product-actions {
    display: flex;
    gap: 8px;
}

.product-name-container {
    margin-bottom: 24px;
}

/* Sticky product name block preserving original design */
.product-card.sticky-enabled .product-header,
.product-card.sticky-enabled .product-name-container {
    position: sticky;
    top: 64px;
    z-index: 5;
    background: inherit;
}

/* Simple tabs for multi SKU filters (preserve base look) */
.sku-filters-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 8px 0 12px 0;
}

.sku-filters-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sku-tab {
    padding: 6px 10px;
    border-radius: 14px;
    border: 1px solid #3a3a5a;
    background: #2a2a3e;
    color: #e6e6e6;
    font-size: 12px;
    cursor: pointer;
}

.sku-tab.active {
    border-color: #64b5f6;
    box-shadow: 0 0 0 3px rgba(100, 181, 246, 0.1);
}

.product-name {
    color: #e6e6e6;
    font-size: 18px;
    font-weight: 500;
    user-select: text; /* Allow text selection */
}

/* Preset search styles - SKU Tree style */
.preset-search-container {
    margin-bottom: 24px;
}

.preset-search-container label {
    display: block;
    margin-bottom: 8px;
    color: #e6e6e6;
    font-weight: 500;
}

.input-wrapper {
    position: relative;
}

.preset-search-input {
    background: #2a2a3e;
    border: 1px solid #3a3a5a;
    border-radius: 8px;
    padding: 16px;
    color: #e6e6e6;
    font-size: 14px;
    width: 100%;
    transition: all 0.3s ease;
}

.preset-search-input:focus {
    outline: none;
    border-color: #64b5f6;
    box-shadow: 0 0 0 3px rgba(100, 181, 246, 0.1);
}

.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #2a2a3e;
    border: 1px solid #3a3a5a;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1500; /* Above sticky header (1000) */
    display: none;
    margin-top: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.autocomplete-suggestion {
    padding: 16px;
    cursor: pointer;
    border-bottom: 1px solid #3a3a5a;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.autocomplete-suggestion:hover {
    background: #3a3a5a;
}

.autocomplete-suggestion:last-child {
    border-bottom: none;
}

.autocomplete-suggestion .suggestion-name {
    font-weight: 500;
    color: #e6e6e6;
    flex: 1;
}

.autocomplete-suggestion .suggestion-id {
    color: #a0a0a0;
    font-size: 12px;
    background: #3a3a5a;
    padding: 2px 6px;
    border-radius: 4px;
}

.autocomplete-suggestion .suggestion-path {
    color: #64b5f6;
    font-size: 12px;
    font-weight: 500;
}

/* Filter builder styles */
.filter-builder {
    margin-bottom: 24px;
}

.filter-builder h4 {
    color: #e6e6e6;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.filter-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #2d2d44;
}

.filter-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-input-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.filter-input-group label {
    font-size: 12px;
    color: #a0a0a0;
    font-weight: 500;
}

.filter-input-group .filter-input {
    background: #1e1e2e;
    border: 1px solid #3a3a5a;
    border-radius: 8px;
    padding: 10px 14px;
    color: #e6e6e6;
    font-size: 14px;
    width: 100%;
}

.filter-input-group .filter-input:focus {
    border-color: #64b5f6;
    box-shadow: 0 0 0 3px rgba(100, 181, 246, 0.1);
    outline: none;
}

.filter-row-actions {
    display: flex;
    gap: 8px;
    padding-bottom: 10px;
}

.price-btn {
    font-size: 12px;
    font-weight: bold;
    color: #a0a0a0;
    background: none;
    border: 1px solid #3a3a5a;
    border-radius: 6px;
    padding: 8px 12px;
    height: 44px;
}

.price-btn.active {
    color: #0f0f23;
    background: #ffd700;
    border-color: #ffd700;
}

.delete-row-btn {
    color: #f44336;
    height: 44px;
}

.delete-row-btn:hover {
    background: #f44336;
    color: white;
}


/* New Tag styles */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    background: #1e1e2e;
    border: 1px solid #3a3a5a;
    border-radius: 8px;
    padding: 8px;
    cursor: text;
    min-height: 44px;
    width: 100%;
}

.tags-container:focus-within {
     border-color: #64b5f6;
    box-shadow: 0 0 0 3px rgba(100, 181, 246, 0.1);
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #4a4a6a;
    color: #e6e6e6;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
}

.remove-tag {
    background: none;
    border: none;
    color: #a0a0a0;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    margin-left: 4px;
    transition: color 0.2s;
}

.remove-tag:hover {
    color: #e6e6e6;
}

/* Progress styles */
.floating-progress-container {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    background: #1e1e2e;
    border: 1px solid #2d2d44;
    border-radius: 8px;
    padding: 12px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.progress-container {
    min-width: 300px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    color: #e6e6e6;
}

.progress-percentage {
    color: #64b5f6;
    font-weight: 600;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #3a3a5a;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #64b5f6, #42a5f5);
    transition: width 0.3s ease;
}

/* Floating actions */
.floating-actions-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 50;
}

.action-buttons {
    display: flex;
    gap: 12px;
}

/* Autosave indicator */
.autosave-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4caf50;
    font-size: 12px;
    font-weight: 500;
}

/* Error message */
.error-message {
    background: #f44336;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 14px;
}

/* Tree styles */
.tree-container {
    background: #1e1e2e;
    border: 1px solid #2d2d44;
    border-radius: 12px;
    overflow: hidden;
}

.tree-header {
    padding: 24px;
    border-bottom: 1px solid #2d2d44;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tree-header h2 {
    color: #e6e6e6;
    font-size: 20px;
    font-weight: 600;
}

.env-badge-inline {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    margin-left: 8px;
    vertical-align: middle;
}

.tree-actions {
    display: flex;
    gap: 12px;
}

.tree-search {
    padding: 20px 24px;
    border-bottom: 1px solid #2d2d44;
    display: flex;
    gap: 12px;
}

.tree-search input {
    flex: 1;
}

.tree-content {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: auto; /* allow horizontal scroll for deep trees */
}

.sku-tree {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: max-content; /* expand to content width so horizontal scroll appears */
    min-width: 100%;
}

.tree-node {
    background: #2a2a3e;
    border: 1px solid #3a3a5a;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.3s ease;
}

.tree-node:hover {
    background: #3a3a5a;
}

.tree-node-header {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.tree-node-toggle {
    background: none;
    border: none;
    color: #a0a0a0;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.tree-node-toggle:hover {
    color: #e6e6e6;
    background: #4a4a6a;
}

.tree-node-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.tree-node-name {
    font-weight: 500;
    color: #e6e6e6;
    flex: 1;
}

.tree-node-id {
    color: #a0a0a0;
    font-size: 12px;
    background: #3a3a5a;
    padding: 2px 6px;
    border-radius: 4px;
}

.tree-node-stats {
    color: #64b5f6;
    font-size: 12px;
    font-weight: 500;
}

.tree-node-actions {
    display: flex;
    gap: 8px;
}

.tree-node-children {
    margin-left: 32px;
    margin-top: 8px;
    display: none;
}

.tree-node-children.expanded {
    display: block;
}

/* Activity list */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    background: #2a2a3e;
    border: 1px solid #3a3a5a;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.activity-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.activity-title {
    color: #e6e6e6;
    font-weight: 500;
}

.activity-meta {
    color: #a0a0a0;
    font-size: 12px;
}

.activity-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.activity-status.completed {
    background: #4caf50;
    color: white;
}

.activity-status.pending {
    background: #ff9800;
    color: white;
}

.activity-status.skipped {
    background: #f44336;
    color: white;
}

/* Responsive design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 12px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .charts-section {
        grid-template-columns: 1fr;
    }
    
    .tabs-header {
        flex-direction: column;
    }
    
    .tab-btn {
        width: 100%;
        justify-content: center;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .floating-progress-container {
        position: static;
        transform: none;
        margin-bottom: 20px;
    }
    
    .floating-actions-container {
        position: static;
        margin-top: 20px;
    }
    
    .action-buttons {
        justify-content: center;
    }
    
    .tree-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .tree-actions {
        justify-content: center;
    }
}

/* Utility classes */
.hidden {
    display: none !important;
}

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

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

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #3a3a5a;
    border-radius: 50%;
    border-top-color: #64b5f6;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Checkbox styles */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #64b5f6;
}

/* Permissions group */
.permissions-group {
    margin-top: 16px;
}

.permissions-group label {
    display: block;
    margin-bottom: 8px;
    color: #e6e6e6;
    font-weight: 500;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Warning text */
.warning {
    color: #ff9800;
    font-size: 14px;
    margin-top: 8px;
}

/* Products list */
.products-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.product-item {
    background: #2a2a3e;
    border: 1px solid #3a3a5a;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-item-name {
    color: #e6e6e6;
    font-weight: 500;
}

.product-item-meta {
    color: #a0a0a0;
    font-size: 12px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
}

#pageInfo {
    color: #a0a0a0;
    font-size: 14px;
}

/* Filters section */
.filters-section {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-group label {
    color: #e6e6e6;
    font-size: 12px;
    font-weight: 500;
}

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

.page-header h2 {
    color: #e6e6e6;
    font-size: 24px;
    font-weight: 600;
}

.task-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: right;
}

.task-info span {
    color: #e6e6e6;
    font-weight: 500;
}

.task-stats {
    color: #a0a0a0;
    font-size: 14px;
}

/* Move functionality styles */
.search-results {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 10px;
}

.search-result-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background-color: #f5f5f5;
}

.search-result-item.selected {
    background-color: #e3f2fd;
}

.selected-parent-info {
    margin-top: 15px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #007bff;
}

.move-info {
    margin-bottom: 20px;
}

.warning-box {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 15px;
    margin-top: 15px;
}

.warning-box p {
    margin: 5px 0;
    color: #856404;
}

.move-info p {
    margin: 8px 0;
    color: #333;
}

.move-info strong {
    color: #2c3e50;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-warning {
    background-color: #ffc107;
    color: #212529;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-warning:hover {
    background-color: #e0a800;
}

/* Add Presets Modal Styles */
.presets-preview {
    margin-top: 20px;
    padding: 15px;
    background: #2a2a3e;
    border: 1px solid #3a3a5a;
    border-radius: 8px;
}

.presets-preview h4 {
    color: #64b5f6;
    margin-bottom: 10px;
    font-size: 16px;
}

.presets-preview-content {
    max-height: 200px;
    overflow-y: auto;
    background: #1e1e2e;
    border: 1px solid #3a3a5a;
    border-radius: 4px;
    padding: 10px;
}

.preset-item {
    padding: 8px 12px;
    margin: 4px 0;
    background: #2d2d44;
    border-radius: 4px;
    border-left: 3px solid #64b5f6;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #e6e6e6;
}

.preset-item.new {
    border-left-color: #4caf50;
    background: #2d2d44;
}

.preset-item.existing {
    border-left-color: #ff9800;
    background: #2d2d44;
    opacity: 0.7;
}

.preset-item.error {
    border-left-color: #f44336;
    background: #2d2d44;
}

.preset-item .preset-path {
    font-weight: 500;
}

.preset-item .preset-details {
    font-size: 11px;
    color: #a0a0a0;
    margin-top: 2px;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-info:hover {
    background-color: #138496;
}

.btn-success {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-success:hover {
    background-color: #218838;
}

/* All products page styles */
.all-products-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.page-header {
    margin-bottom: 30px;
}

.page-header h2 {
    margin: 0 0 10px 0;
    color: #e6e6e6;
    font-size: 28px;
    font-weight: 600;
}

.page-description {
    color: #a0a0a0;
    margin: 0;
    font-size: 16px;
}

.filters-section {
    background: #1e1e2e;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border: 1px solid #2d2d44;
}

.filters-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-weight: 500;
    color: #e6e6e6;
    margin-bottom: 8px;
    font-size: 14px;
}

.filter-select,
.filter-input {
    padding: 10px 12px;
    border: 2px solid #3a3a5a;
    border-radius: 8px;
    font-size: 14px;
    background: #2a2a3e;
    color: #e6e6e6;
    transition: border-color 0.3s ease;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #64b5f6;
}

.filters-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.stats-section {
    margin-bottom: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: #1e1e2e;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    border: 1px solid #2d2d44;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #64b5f6;
    margin-bottom: 8px;
}

.stat-label {
    color: #a0a0a0;
    font-size: 14px;
    font-weight: 500;
}

.table-container {
    background: #1e1e2e;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border: 1px solid #2d2d44;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #3a3a5a;
}

.table-actions {
    display: flex;
    gap: 15px;
}

.pagination-info {
    color: #a0a0a0;
    font-size: 14px;
}

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

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

.data-table th {
    background: #2a2a3e;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    color: #e6e6e6;
    border-bottom: 2px solid #3a3a5a;
    font-size: 14px;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid #3a3a5a;
    font-size: 14px;
    color: #e6e6e6;
}

.data-table tr:hover {
    background: #2a2a3e;
}

.product-name-cell {
    max-width: 450px;
    min-width: 200px;
}

.sku-path-cell {
    max-width: 300px;
}

.product-name {
    white-space: normal;
    word-wrap: break-word;
    max-width: 400px;
    line-height: 1.4;
}

.sku-path {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-completed {
    background: #1b5e20;
    color: #4caf50;
}

.status-pending {
    background: #f57f17;
    color: #ffeb3b;
}

.status-skipped {
    background: #c62828;
    color: #f44336;
}

.status-unknown {
    background: #424242;
    color: #9e9e9e;
}

.no-access {
    color: #6c757d;
    font-size: 16px;
}

.no-data {
    text-align: center;
    padding: 40px;
}

.no-data-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    color: #a0a0a0;
}

.no-data-content i {
    font-size: 48px;
    opacity: 0.5;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #3a3a5a;
}

.page-numbers {
    display: flex;
    gap: 5px;
    align-items: center;
}

.page-btn {
    padding: 8px 12px;
    border: 1px solid #3a3a5a;
    background: #2a2a3e;
    color: #e6e6e6;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.page-btn:hover:not(:disabled) {
    background: #3a3a5a;
    border-color: #64b5f6;
}

.page-btn.active {
    background: #64b5f6;
    color: #1e1e2e;
    border-color: #64b5f6;
}

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

.page-ellipsis {
    padding: 8px 4px;
    color: #a0a0a0;
}

.btn-icon {
    background: none;
    border: none;
    color: #64b5f6;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: #2a2a3e;
    color: #90caf9;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: #fff;
    font-weight: 500;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.info {
    background: #2196f3;
}

.notification.success {
    background: #4caf50;
}

.notification.warning {
    background: #ff9800;
}

.notification.error {
    background: #f44336;
}

/* Questions Page Styles */
.questions-container {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.questions-container .page-stats {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.questions-container .stat-item {
    background: #2a2a3e;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    font-weight: 500;
    color: #e6e6e6;
    border: 1px solid #3a3a5a;
}

.question-cell, .answer-cell {
    max-width: 300px;
    word-wrap: break-word;
}

.question-text, .answer-text {
    white-space: normal;
    line-height: 1.4;
    max-height: 100px;
    overflow-y: auto;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-discussion {
    background: #d1ecf1;
    color: #0c5460;
}

.status-answered {
    background: #d4edda;
    color: #155724;
}

.edit-question-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Modal Styles for Questions */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #2a2a3e;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid #3a3a5a;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #3a3a5a;
}

.modal-header h3 {
    margin: 0;
    color: #e6e6e6;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #a0a0a0;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #3a3a5a;
    color: #e6e6e6;
}

.modal-body {
    padding: 2rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #e6e6e6;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #3a3a5a;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: #2a2a3e;
    color: #e6e6e6;
}

.form-control:focus {
    outline: none;
    border-color: #64b5f6;
    box-shadow: 0 0 0 3px rgba(100, 181, 246, 0.2);
}

.form-control option {
    background: #2a2a3e;
    color: #e6e6e6;
}

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

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #2a2a3e;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    padding: 1rem 1.5rem;
    z-index: 1001;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 400px;
    border: 1px solid #3a3a5a;
    color: #e6e6e6;
}

.notification.show {
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification-success {
    border-left: 4px solid #4caf50;
    background: #1e3a1e;
}

.notification-error {
    border-left: 4px solid #f44336;
    background: #3e1e1e;
}

.notification-info {
    border-left: 4px solid #2196f3;
    background: #1e3a3e;
}

.csv-instructions {
    margin-top: 15px;
    padding: 10px;
    background-color: #2a2a3e;
    border-radius: 4px;
    font-size: 14px;
    border: 1px solid #3a3a5a;
}

.csv-instructions p {
    margin: 5px 0;
}

.csv-instructions code {
    background-color: #4f4f7a;
    padding: 2px 5px;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
}

/* Table link styles */
.table-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.table-link:hover {
    color: #64b5f6;
    text-decoration: underline;
}

/* Environment badge styles */
.env-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    margin-left: 12px;
    vertical-align: middle;
}

.env-dev {
    background-color: #f44336;
    color: white;
}

.env-temp {
    background-color: #ffd700;
    color: #333;
}

.env-approval {
    background-color: #4caf50;
    color: white;
}

.env-badge-inline {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    margin-left: 8px;
    vertical-align: middle;
}

.actions-cell {
    text-align: center;
}
