
:root {
    --bg-color: #f1f5f9;
    --card-bg: #ffffff;
    --input-bg: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --primary-color: #3b82f6;
    --table-header-bg: #f1f5f9;
    --hover-bg: #f1f5f9;
}

body.dark-mode {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --input-bg: #0f172a;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #334155;
    --primary-color: #3b82f6;
    --table-header-bg: #0f172a;
    --hover-bg: #334155;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f1f5f9;
    color: #1e293b;
    line-height: 1.5;
}

a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.info-tooltip {
    position: relative;
    display: inline-flex;
    cursor: help;
    margin-left: 6px;
    vertical-align: middle;
}
.info-icon {
    width: 16px;
    height: 16px;
    min-width: 16px;
    border-radius: 50%;
    background: #3b82f6;
    color: white;
    font-size: 11px;
    font-style: normal;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.info-icon:hover {
    background: #2563eb;
}
.info-tooltip:focus {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
    border-radius: 50%;
}
.info-tooltip:focus .info-icon {
    background: #2563eb;
}
.info-tooltip-content {
    display: none;
}
.global-tooltip {
    position: fixed;
    display: none;
    padding: 12px 16px;
    background: #1e293b;
    color: white;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.6;
    border-radius: 8px;
    max-width: 320px;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    word-wrap: break-word;
}
.global-tooltip b,
.global-tooltip strong {
    color: #60a5fa;
    font-weight: 600;
}
body.dark-mode .global-tooltip {
    background: #0f172a;
    border: 1px solid #334155;
}

.image-tooltip {
    position: relative;
    display: inline-flex;
    cursor: pointer;
    margin-left: 6px;
    vertical-align: middle;
}
.image-tooltip-icon {
    width: 18px;
    height: 18px;
    min-width: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, color 0.15s;
    color: #3b82f6;
}
.image-tooltip:hover .image-tooltip-icon {
    transform: scale(1.15);
    color: #2563eb;
}
.image-tooltip:focus {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
    border-radius: 4px;
}

#image-tooltip-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    cursor: pointer;
}
#image-tooltip-overlay.visible {
    display: block;
}

#image-tooltip-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
    background: #1e293b;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    max-width: 90vw;
    max-height: 90vh;
}
#image-tooltip-modal img {
    max-width: 800px;
    max-height: 600px;
    border-radius: 8px;
    display: block;
}
#image-tooltip-modal.visible {
    display: block;
}
#image-tooltip-close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 32px;
    height: 32px;
    background: #ef4444;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.15s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
#image-tooltip-close:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    padding: 20px;
}

.auth-container {
    background: white;
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

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

.auth-header h1 {
    font-size: 28px;
    color: #1e40af;
    margin-bottom: 8px;
}

.auth-header p {
    color: #64748b;
}

.auth-tabs {
    display: flex;
    margin-bottom: 24px;
    border-bottom: 2px solid #e2e8f0;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: none;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn.active {
    color: #2563eb;
    border-bottom: 2px solid #2563eb;
    margin-bottom: -2px;
}

.tab-content {
    display: none;
}

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

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
    color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

.category-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    background: #1e293b;
    border-radius: 8px;
    border: 1px solid #334155;
}

.category-checkboxes .checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #334155;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 500;
}

.category-checkboxes .checkbox-label:hover {
    background: #475569;
}

.category-checkboxes .checkbox-label:has(input:checked) {
    background: #2563eb;
    color: white;
}

.category-checkboxes .checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
    cursor: pointer;
}

.switchboard-params-group {
    background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 16px 0;
    border: 1px solid #3b82f6;
}

.switchboard-params-group h4 {
    color: #93c5fd !important;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.switchboard-params-group h4::before {
    content: "⚡";
}

.switchboard-params-group .form-group {
    margin-bottom: 12px;
}

.switchboard-params-group .form-group label {
    color: #bfdbfe;
    font-weight: 500;
}

.switchboard-params-group .form-group input {
    background: #1e293b;
    border: 1px solid #3b82f6;
    color: white;
}

.switchboard-params-group .form-group input::placeholder {
    color: #64748b;
}

.switchboard-params-group .form-group input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
    outline: none;
}

.switchboard-params-group .form-hint {
    color: #93c5fd;
    font-size: 12px;
}

.readonly-input {
    background-color: #f1f5f9 !important;
    cursor: not-allowed;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

button.btn {
    font-family: inherit;
}

.btn-primary {
    background-color: #2563eb;
    color: white;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    text-decoration: none;
}

.btn-secondary {
    background-color: #64748b;
    color: white;
}

.btn-secondary:hover {
    background-color: #475569;
}

.btn-outline {
    background-color: white;
    border: 1px solid #d1d5db;
    color: #374151;
}

.btn-outline:hover {
    background-color: #f9fafb;
    text-decoration: none;
}

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

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

.btn-info {
    background-color: #0ea5e9;
    color: white;
}

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

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

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

.btn:disabled,
.btn-primary:disabled,
.btn-secondary:disabled,
.btn-info:disabled,
.btn-warning:disabled,
.btn-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-block {
    width: 100%;
}

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

.btn-logout {
    width: 100%;
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #ef4444;
    margin-top: 12px;
}

.btn-logout:hover {
    background-color: #ef4444;
    color: white;
}

.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.alert-success {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background-color: #0f172a;
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: 20px;
    margin-bottom: 4px;
}

.sidebar-header p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.sidebar-logo {
    max-width: 100%;
    height: auto;
    max-height: 50px;
    display: block;
}

.sidebar-nav {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    margin-bottom: 4px;
    transition: all 0.2s;
}
.nav-item svg,
.nav-section-toggle svg {
    flex-shrink: 0;
    opacity: 0.85;
}
.nav-icon-blue { color: #3b82f6; }
.nav-icon-amber { color: #f59e0b; }
.nav-icon-violet { color: #8b5cf6; }
.nav-icon-green { color: #059669; }
.nav-icon-cyan { color: #06b6d4; }
.nav-icon-slate { color: #94a3b8; }
.nav-item:hover svg,
.nav-item.active svg,
.nav-section-toggle:hover svg,
.nav-section.expanded > .nav-section-toggle svg {
    opacity: 1;
}
.sidebar-header h2 svg {
    vertical-align: middle;
    margin-right: 4px;
    opacity: 0.9;
}
.nav-section-toggle > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
}

.nav-item.active {
    background-color: #1e40af;
    color: white;
}

.nav-divider {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px 16px 8px 16px;
    margin-top: 8px;
}

.nav-back {
    background: rgba(59, 130, 246, 0.15);
    border-left: 3px solid #60a5fa;
    font-weight: 500;
}

.nav-back:hover {
    background: rgba(59, 130, 246, 0.25);
}

.nav-section {
    margin-bottom: 4px;
}

.nav-section-toggle {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
    text-align: left;
    gap: 8px;
}

.nav-section-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-section.expanded > .nav-section-toggle {
    color: white;
    background-color: rgba(255, 255, 255, 0.05);
}

.nav-section-toggle .nav-arrow {
    margin-left: auto;
    font-size: 10px;
    transition: transform 0.2s;
}

.nav-section.expanded > .nav-section-toggle .nav-arrow {
    transform: rotate(90deg);
}

.nav-section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease-out;
}

.nav-section.expanded > .nav-section-content {
    max-height: 500px;
    transition: max-height 0.3s ease-in;
}

.nav-item-sub {
    padding-left: 32px;
    font-size: 13px;
    position: relative;
}

.nav-item-sub::before {
    display: none;
}

.nav-item-sub svg {
    width: 16px;
    height: 16px;
}

.pro-badge-small,
.plus-badge-small {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-left: 4px;
    vertical-align: middle;
    flex-shrink: 0;
}

.pro-badge-small {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    box-shadow: 0 1px 3px rgba(245, 158, 11, 0.4);
}

.plus-badge-small {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.4);
}

.enterprise-badge-small {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-left: auto;
    vertical-align: middle;
    flex-shrink: 0;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #fff;
    box-shadow: 0 1px 3px rgba(5, 150, 105, 0.4);
}

.nav-item-sub .plus-badge-small,
.nav-item-sub .pro-badge-small,
.nav-item-sub .enterprise-badge-small {
    margin-left: auto;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background-color: #2563eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.user-name {
    font-size: 14px;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 32px;
}

.no-sidebar-page .sidebar {
    display: none;
    transform: translateX(-100%);
    z-index: 1000;
}

.no-sidebar-page .sidebar.active {
    display: flex;
    transform: translateX(0);
}

.no-sidebar-page .main-content {
    margin-left: 0;
    padding-top: 16px;
}

.no-sidebar-page .hamburger-btn {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.page-header {
    margin-bottom: 32px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.page-header h1 {
    font-size: 28px;
    color: #0f172a;
    margin-bottom: 8px;
}

.page-header p {
    color: #64748b;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.category-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 2px solid transparent;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
    cursor: pointer;
}

.category-card:hover {
    border-color: var(--card-color, #2563eb);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.category-icon {
    font-size: 32px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(37, 99, 235, 0.05));
    border-radius: 12px;
}

.category-info h3 {
    font-size: 18px;
    color: #0f172a;
    margin-bottom: 4px;
}

.category-info p {
    font-size: 13px;
    color: #64748b;
}

.category-arrow {
    margin-left: auto;
    font-size: 20px;
    color: #94a3b8;
}

.draft-offer-card {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.draft-offer-icon {
    font-size: 32px;
    width: 56px;
    height: 56px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.draft-offer-info {
    flex: 1;
}

.draft-offer-info h3 {
    font-size: 17px;
    color: #92400e;
    margin-bottom: 4px;
    font-weight: 600;
}

.draft-offer-info p {
    font-size: 13px;
    color: #78350f;
}

.draft-offer-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.draft-offer-actions .btn {
    padding: 10px 18px;
    font-weight: 600;
}

.draft-offer-actions .btn-outline {
    background: white;
    border-color: #d97706;
    color: #92400e;
}

.draft-offer-actions .btn-outline:hover {
    background: #fffbeb;
}

.table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

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

.data-table th {
    background-color: #f8fafc;
    font-weight: 600;
    font-size: 13px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.product-name {
    font-weight: 500;
    color: #0f172a;
}

.product-desc {
    font-size: 12px;
    color: #64748b;
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    background-color: #e0e7ff;
    color: #3730a3;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.badge-pending {
    display: inline-block;
    background: #ef4444;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
    flex-shrink: 0;
}

.badge-plus-btn {
    display: inline-block;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 4px;
    vertical-align: middle;
    letter-spacing: 0.5px;
}

body.dark-mode .badge-plus-btn {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
}

.badge-pro-btn {
    display: inline-block;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 4px;
    vertical-align: middle;
    letter-spacing: 0.5px;
}

body.dark-mode .badge-pro-btn {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.allocator-badge {
    display: inline-block;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 4px;
    margin-top: 4px;
}

body.dark-mode .allocator-badge {
    background: linear-gradient(135deg, #34d399, #10b981);
}

body.dark-mode .btn-move {
    border-color: #374151;
    color: #9ca3af;
}

body.dark-mode .btn-move:hover {
    background: #374151;
    color: #e5e7eb;
    border-color: #4b5563;
}

.subcategory {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
}

.price {
    font-family: 'Consolas', monospace;
    font-weight: 500;
}

.actions {
    white-space: nowrap;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #94a3b8;
}

.filters-bar {
    margin-bottom: 24px;
}

.filters-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.filter-select {
    padding: 10px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    min-width: 180px;
}

.modal,
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header h2,
.modal-header h3 {
    font-size: 18px;
    margin: 0;
}

.modal-body {
    padding: 24px;
}

.modal-close {
    font-size: 24px;
    color: #94a3b8;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
}

.modal-close:hover {
    color: #64748b;
}

.modal-content form {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}


.filter-modal-content {
    max-width: 550px;
    min-width: 400px;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.filter-modal .modal-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 16px 16px 0 0;
    padding: 24px 28px;
}

.filter-modal .modal-header h2 {
    font-size: 20px;
    color: #1e293b;
}

.filter-modal-body {
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: 400px;
    overflow-y: auto;
}

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

.filter-group label {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    letter-spacing: -0.01em;
}

.filter-group select {
    padding: 12px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-group select:hover {
    border-color: #cbd5e1;
}

.filter-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.filter-modal-footer {
    padding: 20px 28px;
    margin-top: 0;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 0 0 16px 16px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.filter-modal-footer .btn {
    flex: 1;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
}

.btn-filter {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.btn-filter:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.filter-count {
    background: white;
    color: #2563eb;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    min-width: 20px;
    text-align: center;
    margin-left: 2px;
}

.setup-container {
    max-width: 640px;
    margin: 0 auto;
}

.setup-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.form-card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.form-card-icon {
    font-size: 24px;
}

.form-card-header h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.form-card-header p {
    font-size: 13px;
    color: #64748b;
}

.form-card-body {
    padding: 24px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.valuation-page {
    padding: 24px;
    height: calc(100vh - 0px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

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

.valuation-header-info h1 {
    font-size: 22px;
    margin-top: 8px;
}

.editing-badge {
    display: inline-block;
    background: #f59e0b;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 10px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.editing-info {
    font-size: 13px;
    color: #f59e0b;
    margin-top: 4px;
    font-weight: 500;
}

.shared-badge {
    display: inline-block;
    background: #0ea5e9;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-top: 8px;
}

.supervisor-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.supervisor-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.supervisor-checkbox:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.supervisor-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #2563eb;
}

.supervisor-name {
    font-weight: 500;
    color: #1e293b;
}

.supervisor-company {
    color: #64748b;
    font-size: 13px;
}

.shared-offers-section h2 {
    font-size: 20px;
    color: #1e40af;
    margin-bottom: 8px;
}

.back-link {
    font-size: 13px;
    color: #64748b;
}

.back-link:hover {
    color: #2563eb;
}

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

.valuation-content {
    display: flex;
    gap: 24px;
    flex: 1;
    min-height: 0;
    margin-bottom: 0;
    overflow: hidden;
}

.product-picker {
    width: 380px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.picker-header {
    padding: 16px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.picker-header h3 {
    margin: 0;
    font-size: 15px;
}

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

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

.picker-filter label {
    font-size: 12px;
    color: #64748b;
}

.picker-filter select {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 13px;
}

.picker-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.product-group {
    margin-bottom: 4px;
}

.group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
}

.group-header:hover {
    background: #f1f5f9;
}

.group-toggle {
    transition: transform 0.2s;
    font-size: 10px;
}

.product-group.collapsed .group-toggle {
    transform: rotate(-90deg);
}

.product-group.collapsed .group-products {
    display: none;
}

.group-products {
    padding: 8px 0 8px 8px;
}

.picker-product {
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.picker-product:hover {
    border-color: #2563eb;
    background: #f8fafc;
}

.picker-product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
}

.picker-product-name {
    font-weight: 500;
    font-size: 13px;
    color: #2563eb;
}

.picker-product-manufacturer {
    font-size: 10px;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 3px;
    color: #64748b;
}

.picker-product-desc {
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.picker-product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.picker-product-price {
    font-family: 'Consolas', monospace;
    font-size: 12px;
    color: #0f172a;
}

.picker-product-add {
    display: inline-block;
    padding: 4px 10px;
    background: #e0e7ff;
    border-radius: 4px;
    color: #3730a3;
    font-weight: 500;
    font-size: 11px;
    opacity: 0;
    transition: opacity 0.2s;
}

.picker-product:hover .picker-product-add {
    opacity: 1;
}

[data-theme="dark"] .picker-product-add {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
}

.empty-picker {
    text-align: center;
    padding: 40px;
    color: #94a3b8;
}

.valuation-table-container {
    flex: 1;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.valuation-table-scroll {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

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

.valuation-table th {
    background: #f8fafc;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
}

.valuation-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
}

.product-meta {
    font-size: 11px;
    color: #94a3b8;
}

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

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

.cell-mono {
    font-family: 'Consolas', monospace;
}

.cell-bold {
    font-weight: 600;
}

.table-input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 13px;
    text-align: right;
}

.table-input:focus {
    outline: none;
    border-color: #2563eb;
}

.table-input-small {
    width: 70px;
    text-align: center;
}

.btn-remove {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.btn-remove:hover {
    opacity: 1;
}

.lp-cell {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
}

.lp-arrows {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.btn-move {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    cursor: pointer;
    padding: 1px 2px;
    line-height: 1;
    color: #64748b;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-move:hover {
    background: #e2e8f0;
    color: #1e293b;
    border-color: #cbd5e1;
}

.btn-move-placeholder {
    display: block;
    width: 18px;
    height: 16px;
}

.lp-number {
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

.cart-context-menu {
    position: absolute;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 1000;
    min-width: 200px;
    overflow: hidden;
}

.context-menu-header {
    font-weight: 600;
    font-size: 12px;
    color: var(--text-muted, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 16px 6px;
    cursor: default;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.context-menu-item.context-menu-header:hover {
    background: none;
    cursor: default;
}

.context-menu-item {
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-color, #1e293b);
    transition: background 0.15s;
}

.context-menu-item:hover {
    background: var(--hover-bg, #f1f5f9);
}

.packing-toolbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.packing-toolbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.packing-toolbar-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

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

.packing-toolbar .btn-outline {
    color: white;
    border-color: rgba(255,255,255,0.4);
    background: transparent;
}

.packing-toolbar .btn-outline:hover {
    background: rgba(255,255,255,0.15);
    border-color: white;
}

.packing-toolbar .btn-primary {
    background: white;
    color: #2563eb;
}

.packing-toolbar .btn-primary:hover {
    background: #f0f4ff;
}

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

tr.packing-selectable {
    cursor: pointer;
    transition: background 0.15s;
}

tr.packing-selectable:hover {
    background: rgba(59, 130, 246, 0.06);
}

tr.packing-selected {
    background: rgba(59, 130, 246, 0.12);
    cursor: pointer;
}

tr.packing-selected:hover {
    background: rgba(59, 130, 246, 0.18);
}

tr.packing-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.packing-checkbox {
    font-size: 18px;
    line-height: 1;
    color: #3b82f6;
}

.pack-row {
    cursor: pointer;
    background: rgba(168, 85, 247, 0.04);
    transition: background 0.15s;
}

.pack-row:hover {
    background: rgba(168, 85, 247, 0.08);
}

.pack-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #7c3aed;
}

.pack-count-badge {
    font-size: 11px;
    background: rgba(124, 58, 237, 0.12);
    color: #7c3aed;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.pack-expand-icon {
    font-size: 10px;
    color: #a78bfa;
    margin-left: auto;
}

.cart-toolbar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    min-height: 0;
}

.cart-toolbar-row:has(#packingToolbarSlot:empty) {
    justify-content: flex-end;
}

.cart-settings-wrapper {
    position: relative;
}

.btn-cart-settings {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #64748b;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.btn-cart-settings:hover {
    background: #f1f5f9;
    color: #334155;
}

.cart-settings-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 50;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    padding: 12px 16px;
    min-width: 220px;
}

.cart-settings-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    user-select: none;
}

.cart-settings-toggle input[type="checkbox"] {
    display: none;
}

.cart-toggle-track {
    position: relative;
    width: 40px;
    height: 22px;
    background: #cbd5e1;
    border-radius: 11px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.cart-toggle-track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.cart-settings-toggle input[type="checkbox"]:checked + .cart-toggle-track {
    background: #3b82f6;
}

.cart-settings-toggle input[type="checkbox"]:checked + .cart-toggle-track::after {
    transform: translateX(18px);
}

.group-header-row {
    cursor: pointer;
    user-select: none;
}

.group-header-row td {
    background: #f1f5f9;
    border-top: 2px solid #e2e8f0;
    border-bottom: 2px solid #e2e8f0;
    padding: 8px 16px;
}

.group-header-row:hover td {
    background: #e2e8f0;
}

.group-header-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.group-header-chevron {
    display: flex;
    align-items: center;
    color: #64748b;
}

.group-header-label {
    font-weight: 600;
    font-size: 13px;
    color: #1e293b;
}

.group-header-badge {
    font-size: 11px;
    background: #dbeafe;
    color: #2563eb;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.group-header-total {
    margin-left: auto;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

body.dark-mode .btn-cart-settings {
    color: #94a3b8;
}

body.dark-mode .btn-cart-settings:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
}

body.dark-mode .cart-settings-dropdown {
    background: var(--card-bg, #1e293b);
    border-color: var(--border-color, #334155);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

body.dark-mode .cart-settings-toggle {
    color: var(--text-color, #e2e8f0);
}

body.dark-mode .cart-toggle-track {
    background: #475569;
}

body.dark-mode .group-header-row td {
    background: rgba(51, 65, 85, 0.6);
    border-top-color: var(--border-color, #334155);
    border-bottom-color: var(--border-color, #334155);
}

body.dark-mode .group-header-row:hover td {
    background: rgba(51, 65, 85, 0.8);
}

body.dark-mode .group-header-label {
    color: #e2e8f0;
}

body.dark-mode .group-header-badge {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

body.dark-mode .group-header-total {
    color: #cbd5e1;
}

body.dark-mode .group-header-chevron {
    color: #94a3b8;
}

.pack-sub-row {
    background: rgba(168, 85, 247, 0.03);
    border-left: 3px solid #a78bfa;
}

.pack-sub-lp {
    color: #a78bfa;
    font-size: 16px;
}

body.dark-mode .cart-context-menu {
    background: var(--card-bg);
    border-color: var(--border-color);
}

body.dark-mode .context-menu-item {
    color: var(--text-color, #e2e8f0);
}

body.dark-mode .context-menu-header {
    color: var(--text-muted, #94a3b8);
}

body.dark-mode .context-menu-item:hover {
    background: var(--hover-bg);
}

body.dark-mode .context-menu-item.context-menu-header:hover {
    background: none;
}

body.dark-mode .pack-name-row {
    color: #a78bfa;
}

body.dark-mode .pack-count-badge {
    background: rgba(167, 139, 250, 0.15);
    color: #c4b5fd;
}

body.dark-mode .pack-row {
    background: rgba(167, 139, 250, 0.06);
}

body.dark-mode .pack-row:hover {
    background: rgba(167, 139, 250, 0.1);
}

body.dark-mode .pack-sub-row {
    background: rgba(167, 139, 250, 0.04);
}

body.dark-mode tr.packing-selected {
    background: rgba(96, 165, 250, 0.15);
}

body.dark-mode tr.packing-selectable:hover {
    background: rgba(96, 165, 250, 0.08);
}

.empty-cart {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    padding: 60px;
}

.empty-cart-hint {
    font-size: 13px;
    margin-top: 8px;
}

.valuation-summary {
    padding: 20px 24px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    width: 280px;
    padding: 6px 0;
    font-size: 14px;
}

.summary-row span:first-child {
    color: #64748b;
}

.summary-row span:last-child {
    font-family: 'Consolas', monospace;
}

.summary-total {
    font-size: 18px;
    font-weight: bold;
    border-top: 2px solid #e2e8f0;
    margin-top: 8px;
    padding-top: 12px;
}

.summary-total span:last-child {
    color: #2563eb;
}

@media (max-width: 1366px) {
    .valuation-page {
        padding: 20px;
    }

    .valuation-header {
        margin-bottom: 10px;
    }

    .valuation-header-info h1 {
        font-size: 20px;
        margin-top: 6px;
    }

    .valuation-content {
        gap: 16px;
    }

    .product-picker {
        width: 320px;
    }
}

@media (max-width: 1024px) {
    .valuation-page {
        padding: 16px;
    }

    .valuation-header {
        margin-bottom: 8px;
    }

    .valuation-header-info h1 {
        font-size: 18px;
        margin-top: 4px;
    }

    .valuation-content {
        flex-direction: column;
    }

    .product-picker {
        width: 100%;
        max-height: 200px;
        flex-shrink: 0;
    }

    .valuation-table-container {
        flex: 1;
        min-height: 0;
    }
}

@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
    }

    .page-header {
        flex-direction: column;
        gap: 16px;
    }

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

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

    .valuation-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease;
}

.notification.success {
    background: #10b981;
    color: white;
}

.notification.error {
    background: #ef4444;
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.history-table th {
    background: #f8fafc;
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
}

.history-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}

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

.offer-number {
    font-family: 'Consolas', monospace;
    font-weight: 600;
    color: #2563eb;
}

.offer-value {
    font-family: 'Consolas', monospace;
    font-weight: 600;
}

.btn-view {
    padding: 6px 12px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
}

.btn-view:hover {
    background: #1d4ed8;
    text-decoration: none;
}

.empty-history {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.empty-history h3 {
    margin-bottom: 8px;
    color: #64748b;
}

.history-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.category-badge {
    display: inline-block;
    padding: 4px 10px;
    background-color: #e0e7ff;
    color: #3730a3;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    vertical-align: middle;
}
.btn-small svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    vertical-align: middle;
}

button.btn-small {
    font-family: inherit;
}

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

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

.text-bold {
    font-weight: 600;
}

.offer-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.offer-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.info-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.info-card h3 {
    font-size: 16px;
    color: #0f172a;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.info-label {
    color: #64748b;
}

.info-value {
    color: #0f172a;
    font-weight: 500;
}

.offer-items {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.offer-items h3 {
    font-size: 16px;
    color: #0f172a;
    margin-bottom: 16px;
}

.offer-summary {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.picker-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.param-filter {
    min-width: 150px;
}

.multi-select {
    position: relative;
    display: block;
    width: 100%;
}

.multi-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    width: 100%;
    transition: all 0.2s;
}

.multi-select-trigger:hover {
    border-color: #cbd5e1;
}

.multi-select.open .multi-select-trigger {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.multi-select-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #1e293b;
    flex: 1;
}

.multi-select-arrow {
    font-size: 10px;
    color: #64748b;
    margin-left: 8px;
    transition: transform 0.2s;
}

.multi-select.open .multi-select-arrow {
    transform: rotate(180deg);
}

.multi-select-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    max-height: 220px;
    overflow-y: auto;
    margin-top: 6px;
}

.multi-select.open .multi-select-dropdown {
    display: block;
}

.multi-select-option {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.15s;
    color: #374151;
}

.multi-select-option:first-child {
    border-radius: 8px 8px 0 0;
}

.multi-select-option:last-child {
    border-radius: 0 0 8px 8px;
}

.multi-select-option:hover {
    background: #f1f5f9;
}

.multi-select-option input {
    margin-right: 10px;
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
}

.picker-product-params {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 6px 0;
}

.param-badge {
    display: inline-block;
    padding: 2px 6px;
    background: #e0f2fe;
    color: #0369a1;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.status-badge-view {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.status-pending {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.status-accepted {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
}

.status-rejected {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

.btn-success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
    text-decoration: none;
}

.theme-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    border: none;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 24px;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
    z-index: 1000;
}

.theme-toggle:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.5);
}

.theme-toggle:active {
    transform: translateY(0) scale(0.98);
}

body.dark-mode {
    background-color: #0f172a;
    color: #e2e8f0;
}

body.dark-mode .main-content {
    background-color: #0f172a;
}

body.dark-mode .sidebar {
    background-color: #020617;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

body.dark-mode .page-header h1 {
    color: #f1f5f9;
}

body.dark-mode .page-header p {
    color: #94a3b8;
}

body.dark-mode .back-link {
    color: #94a3b8;
}

body.dark-mode .back-link:hover {
    color: #60a5fa;
}

#moduleSlotsInfo {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 12px;
    color: #1e40af;
    font-size: 13px;
    font-weight: 500;
    align-items: center;
    gap: 8px;
}

body.dark-mode .info-card,
body.dark-mode .offer-items,
body.dark-mode .offer-summary,
body.dark-mode .form-card {
    background: #1e293b;
    border: 1px solid #334155;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    color: #e2e8f0;
}

body.dark-mode #moduleSlotsInfo {
    background: #1e293b;
    border-color: #334155;
    color: #93c5fd;
}

body.dark-mode .table-container,
body.dark-mode .history-container,
body.dark-mode .product-picker,
body.dark-mode .valuation-table-container {
    background: #1e293b;
    border: 1px solid #334155;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

body.dark-mode .info-card h3,
body.dark-mode .offer-items h3 {
    color: #f1f5f9;
    border-bottom-color: #334155;
}

body.dark-mode .info-label {
    color: #94a3b8;
}

body.dark-mode .info-value {
    color: #f1f5f9;
}

body.dark-mode .category-card {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .category-card:hover {
    border-color: var(--card-color, #3b82f6);
}

body.dark-mode .category-info h3 {
    color: #f1f5f9;
}

body.dark-mode .category-info p {
    color: #94a3b8;
}

body.dark-mode .category-arrow {
    color: #64748b;
}

body.dark-mode .history-table,
body.dark-mode .data-table,
body.dark-mode .valuation-table {
    background: #1e293b;
}

body.dark-mode .history-table th,
body.dark-mode .data-table th,
body.dark-mode .valuation-table th {
    background: #0f172a;
    color: #94a3b8;
    border-bottom-color: #334155;
}

body.dark-mode .history-table td,
body.dark-mode .data-table td,
body.dark-mode .valuation-table td {
    border-bottom-color: #334155;
    color: #e2e8f0;
}

body.dark-mode .history-table tr:hover,
body.dark-mode .data-table tbody tr:hover {
    background: #334155;
}

body.dark-mode .offer-number {
    color: #60a5fa;
}

body.dark-mode .form-group label {
    color: #e2e8f0;
}

body.dark-mode .form-group input,
body.dark-mode .form-group select,
body.dark-mode .form-group textarea,
body.dark-mode .search-input,
body.dark-mode .filter-select,
body.dark-mode .table-input,
body.dark-mode .filter-input,
body.dark-mode #productSearchInput,
body.dark-mode #moduleSearchInput {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

body.dark-mode .form-group input:focus,
body.dark-mode .form-group select:focus,
body.dark-mode .form-group textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

body.dark-mode .form-card-header {
    background: #0f172a;
    border-bottom-color: #334155;
}

body.dark-mode .form-card-header h3 {
    color: #f1f5f9;
}

body.dark-mode .form-card-header p {
    color: #94a3b8;
}

body.dark-mode .form-card-body {
    background: #1e293b;
}

body.dark-mode .btn-outline {
    background: #1e293b;
    border-color: #475569;
    color: #e2e8f0;
}

body.dark-mode .btn-outline:hover {
    background: #334155;
}

body.dark-mode .modal-content {
    background: #1e293b;
    border: 1px solid #334155;
}

body.dark-mode .modal-header {
    border-bottom-color: #334155;
}

body.dark-mode .modal-header h2,
body.dark-mode .modal-header h3 {
    color: #f1f5f9;
}

body.dark-mode .modal-footer {
    border-top-color: #334155;
}

body.dark-mode .filter-modal .modal-header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

body.dark-mode .filter-modal-body {
    background: #1e293b;
}

body.dark-mode .filter-modal-footer {
    background: #0f172a;
}

body.dark-mode .filter-group label {
    color: #e2e8f0;
}

body.dark-mode .filter-group select {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

body.dark-mode select.form-control,
body.dark-mode .modal-body select {
    background: #0f172a;
    border: 1px solid #334155;
    color: #e2e8f0;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
}

body.dark-mode select.form-control:focus,
body.dark-mode .modal-body select:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.template-option {
    background: #ffffff !important;
    transition: all 0.2s ease;
}

body.dark-mode .template-option {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #e2e8f0;
}

body.dark-mode .template-option.selected {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

body.dark-mode .template-lock-overlay {
    background: rgba(15, 23, 42, 0.7) !important;
}

body.dark-mode .picker-header {
    border-bottom-color: #334155;
}

body.dark-mode .picker-header h3 {
    color: #f1f5f9;
}

body.dark-mode .group-header {
    background: #0f172a;
    color: #e2e8f0;
}

body.dark-mode .group-header:hover {
    background: #1e293b;
}

body.dark-mode .picker-product {
    border-color: #334155;
    background: #1e293b;
}

body.dark-mode .picker-product:hover {
    border-color: #3b82f6;
    background: #334155;
}

body.dark-mode .picker-product-name {
    color: #60a5fa;
}

body.dark-mode .picker-product-manufacturer {
    background: #334155;
    color: #94a3b8;
}

body.dark-mode .picker-product-desc {
    color: #64748b;
}

body.dark-mode .picker-product-price {
    color: #e2e8f0;
}

body.dark-mode .alert-success {
    background-color: #064e3b;
    border-color: #047857;
    color: #34d399;
}

body.dark-mode .alert-error {
    background-color: #7f1d1d;
    border-color: #dc2626;
    color: #fca5a5;
}

body.dark-mode .valuation-summary {
    background: #0f172a;
    border-top-color: #334155;
}

body.dark-mode .summary-row span:first-child {
    color: #94a3b8;
}

body.dark-mode .summary-row span:last-child {
    color: #e2e8f0;
}

body.dark-mode .summary-total {
    border-top-color: #334155;
}

body.dark-mode .summary-total span:last-child {
    color: #60a5fa;
}

body.dark-mode .offer-notes {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .offer-notes h3 {
    color: #94a3b8;
}

body.dark-mode .notes-content {
    color: #e2e8f0;
}

body.dark-mode .notes-textarea {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

body.dark-mode .text-muted {
    color: #64748b;
}

body.dark-mode .empty-state,
body.dark-mode .empty-cart,
body.dark-mode .empty-history,
body.dark-mode .empty-picker {
    color: #64748b;
}

body.dark-mode .badge {
    background-color: #312e81;
    color: #a5b4fc;
}

body.dark-mode .category-badge {
    background-color: #312e81;
    color: #a5b4fc;
}

body.dark-mode .shared-badge {
    background: #0c4a6e;
    color: #7dd3fc;
}

body.dark-mode .draft-offer-card {
    background: linear-gradient(135deg, #422006 0%, #78350f 100%);
    border-color: #d97706;
}

body.dark-mode .draft-offer-icon {
    background: #1e293b;
}

body.dark-mode .draft-offer-info h3 {
    color: #fbbf24;
}

body.dark-mode .draft-offer-info p {
    color: #fcd34d;
}

body.dark-mode .multi-select-trigger {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .multi-select-text {
    color: #e2e8f0;
}

body.dark-mode .multi-select-dropdown {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .multi-select-option {
    color: #e2e8f0;
}

body.dark-mode .multi-select-option:hover {
    background: #334155;
}

body.dark-mode .row-new {
    background: #1e3a5f;
}

body.dark-mode .theme-toggle {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 4px 20px rgba(251, 191, 36, 0.4);
}

body.dark-mode .theme-toggle:hover {
    box-shadow: 0 8px 30px rgba(251, 191, 36, 0.5);
}

body.dark-mode .supervisor-checkbox {
    background: #0f172a;
    border-color: #334155;
}

body.dark-mode .supervisor-checkbox:hover {
    background: #1e293b;
    border-color: #475569;
}

body.dark-mode .supervisor-name {
    color: #f1f5f9;
}

body.dark-mode .supervisor-company {
    color: #94a3b8;
}

body.dark-mode .creator-info strong {
    color: #f1f5f9;
}

body.dark-mode .creator-info small {
    color: #94a3b8;
}

body.dark-mode .settings-card {
    background: #1e293b;
    border: 1px solid #334155;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .settings-card h3 {
    color: #f1f5f9;
}

body.dark-mode .settings-desc {
    color: #94a3b8;
}

.offer-token-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease;
}

.offer-token-chip:hover {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(59,130,246,0.25);
}

.offer-token-chip.offer-token-custom {
    background: transparent;
    border-style: dashed;
    border-color: #3b82f6;
    color: #3b82f6;
    cursor: pointer;
}

.offer-token-chip.offer-token-custom:hover {
    background: rgba(59,130,246,0.08);
    color: #3b82f6;
    border-color: #3b82f6;
    border-style: dashed;
    transform: translateY(-1px);
}

.offer-token-chip.offer-token-used {
    background: #fef2f2;
    border-color: #ef4444;
    color: #ef4444;
}

.offer-token-chip.offer-token-used:hover {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
}

body.dark-mode .logo-preview {
    background: #0f172a;
    border-color: #334155;
}

body.dark-mode .logo-preview.empty {
    color: #64748b;
}

body.dark-mode .info-row {
    border-bottom-color: #334155;
}

body.dark-mode .info-list .info-label {
    color: #94a3b8;
}

body.dark-mode .info-list .info-value {
    color: #f1f5f9;
}

body.dark-mode .user-details {
    background: #064e3b !important;
    border-color: #047857 !important;
}

body.dark-mode .user-details p {
    color: #d1fae5;
}

body.dark-mode .user-details strong {
    color: #34d399;
}

body.dark-mode .product-name {
    color: #f1f5f9;
}

body.dark-mode .product-desc {
    color: #94a3b8;
}

body.dark-mode .data-table td .product-name {
    color: #f1f5f9;
}

body.dark-mode .data-table td .product-desc {
    color: #94a3b8;
}

body.dark-mode .valuation-table .product-name,
body.dark-mode .offer-items .product-name {
    color: #60a5fa;
}

body.dark-mode .valuation-table .product-desc,
body.dark-mode .offer-items .product-desc {
    color: #94a3b8;
}

body.dark-mode .readonly-input {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #94a3b8 !important;
}

body.dark-mode input[readonly],
body.dark-mode select[disabled],
body.dark-mode textarea[readonly] {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #94a3b8 !important;
}

body.dark-mode .actions-cell {
    vertical-align: middle;
}

.actions-cell {
    vertical-align: middle;
    white-space: nowrap;
}

.actions-cell form {
    display: inline-flex;
    gap: 6px;
    vertical-align: middle;
}

.actions-cell .btn {
    vertical-align: middle;
}

.history-table td {
    vertical-align: middle;
}

.history-table .actions-cell {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

body.dark-mode .form-hint {
    color: #94a3b8 !important;
}

body.dark-mode tr.row-highlight {
    background: #1e3a5f;
    border-left: 4px solid #3b82f6;
}

tr.row-highlight {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
}

body.dark-mode .shared-offers-section h2 {
    color: #93c5fd !important;
}

body.dark-mode .shared-offers-section .text-muted {
    color: #94a3b8 !important;
}

body.dark-mode .installer-offers-section h2 {
    color: #93c5fd !important;
}

body.dark-mode .installer-offers-section .text-muted {
    color: #94a3b8 !important;
}

.card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 20px;
}

.card-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.card-body {
    padding: 20px;
}

.card-body p {
    margin: 8px 0;
    color: #475569;
}

.card-body p strong {
    color: #1e293b;
}

.supervisor-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.supervisor-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.supervisor-checkbox:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

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

.supervisor-name {
    font-weight: 500;
    color: #1e293b;
}

.supervisor-company {
    color: #64748b;
    font-size: 13px;
}

body.dark-mode .card {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

body.dark-mode .card-header {
    background: #0f172a;
    border-color: #334155;
}

body.dark-mode .card-header h3 {
    color: #e2e8f0;
}

body.dark-mode .card-body {
    color: #cbd5e1;
}

body.dark-mode .card-body p {
    color: #94a3b8;
}

body.dark-mode .card-body p strong {
    color: #e2e8f0;
}

body.dark-mode .supervisor-checkbox {
    background: #0f172a;
    border-color: #334155;
}

body.dark-mode .supervisor-checkbox:hover {
    background: #1e293b;
    border-color: #475569;
}

body.dark-mode .supervisor-name {
    color: #e2e8f0;
}

body.dark-mode .supervisor-company {
    color: #94a3b8;
}

.user-info-wrapper {
    position: relative;
}
.sidebar-footer .user-info {
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}
.sidebar-footer .user-info:hover {
    background: rgba(0,0,0,0.05);
}
.user-dropdown {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 8px;
    overflow: hidden;
    z-index: 100;
}
.user-dropdown.show {
    display: block;
}
.user-dropdown-item {
    display: block;
    padding: 12px 16px;
    color: #1f2937;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}
.user-dropdown-item:hover {
    background: #f3f4f6;
    text-decoration: none;
}
body.dark-mode .user-dropdown {
    background: #1e293b;
    border-color: #374151;
}
body.dark-mode .user-dropdown-item {
    color: #f1f5f9;
}
body.dark-mode .sidebar-footer .user-info:hover {
    background: rgba(255,255,255,0.05);
}
body.dark-mode .user-dropdown-item:hover {
    background: #374151;
}
.user-dropdown-item-plus,
.user-dropdown-item-pro {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
}
.dropdown-plus-badge {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 3px;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}
.dropdown-pro-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 3px;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}
.user-dropdown-item-enterprise {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
}
.dropdown-enterprise-badge {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 3px;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.hamburger-btn {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 9999;
    background: #0f172a;
    border: none;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hamburger-btn span {
    display: block;
    width: 24px;
    height: 3px;
    background: white;
    margin: 4px 0;
    border-radius: 2px;
    transition: all 0.3s;
}

.hamburger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar-overlay.active {
    display: block;
}

@media screen and (max-width: 768px) {
    .hamburger-btn {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .sidebar {
        transform: translateX(-100%);
        z-index: 1000;
        height: 100%;
        height: 100vh;
        height: 100dvh;
        max-height: 100%;
        max-height: 100vh;
        max-height: 100dvh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

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

    .sidebar-nav {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 20px;
    }

    .sidebar-footer {
        flex-shrink: 0;
    }

    .main-content {
        margin-left: 0;
        padding: 70px 16px 24px 16px;
    }

    .page-header {
        flex-direction: column;
        gap: 16px;
    }

    .page-header h1 {
        font-size: 22px;
    }

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

    .filters-form {
        flex-direction: column;
    }

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

    .valuation-page {
        padding: 12px;
    }

    .valuation-header {
        margin-bottom: 6px;
    }

    .valuation-header-info h1 {
        font-size: 16px;
        margin-top: 2px;
    }

    .valuation-content {
        flex-direction: column;
        gap: 12px;
    }

    .product-picker {
        width: 100%;
        max-height: 180px;
    }

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

    
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .data-table {
        font-size: 12px;
        min-width: 600px;
    }

    .data-table th,
    .data-table td {
        padding: 8px 6px;
        white-space: nowrap;
    }

    .data-table .product-desc {
        max-width: 150px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .data-table .actions {
        white-space: nowrap;
    }

    .data-table .actions .btn {
        padding: 4px 8px;
        font-size: 11px;
    }

    .draft-offer-card {
        flex-direction: column;
        text-align: center;
    }

    .draft-offer-actions {
        width: 100%;
        flex-direction: column;
    }

    .valuation-header {
        flex-direction: column;
        gap: 12px;
    }

    .valuation-header-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .valuation-header-actions .btn {
        flex: 1;
        min-width: 100px;
        padding: 8px 12px;
        font-size: 12px;
    }

    
    .cart-section {
        width: 100%;
    }

    .summary-section {
        width: 100%;
    }

    .cart-item {
        flex-direction: column;
        gap: 8px;
    }

    .cart-item-info {
        width: 100%;
    }

    .cart-item-controls {
        width: 100%;
        justify-content: space-between;
    }

    
    .picker-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .picker-item-info {
        width: 100%;
    }

    .picker-item-price {
        width: 100%;
        text-align: left;
    }

    
    .btn-block-mobile {
        width: 100%;
    }

    
    .history-filters {
        flex-direction: column;
        gap: 12px;
    }

    .history-filters input,
    .history-filters select,
    .history-filters button {
        width: 100%;
    }

    
    .offer-details {
        flex-direction: column;
    }

    .detail-card {
        width: 100%;
    }

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

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

    .tool-card {
        padding: 16px;
    }

    
    .admin-shortcuts {
        grid-template-columns: 1fr;
    }

    .shortcut-card {
        padding: 16px;
    }
}

@media screen and (max-width: 480px) {
    .main-content {
        padding: 60px 12px 20px 12px;
    }

    .auth-container {
        padding: 24px;
    }

    .modal-content {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }

    .filter-modal-content {
        min-width: unset;
    }
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #22c55e;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

[data-theme="dark"] .toggle-slider {
    background-color: #4a5568;
}

[data-theme="dark"] .toggle-switch input:checked + .toggle-slider {
    background-color: #22c55e;
}

.cert-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.cert-badge-large {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 8px;
}

.cert-icon {
    font-size: 1.1em;
}

.cert-ampio {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}

.cert-starlight {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

[data-theme="dark"] .cert-ampio {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
}

[data-theme="dark"] .cert-starlight {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
}

@media (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="tel"],
    input[type="url"],
    input[type="search"],
    input[type="date"],
    textarea,
    select {
        font-size: 16px !important;
    }
}

@supports (-webkit-touch-callout: none) {
    input, textarea, select {
        font-size: 16px !important;
    }
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.company-data-option {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
}

.company-data-title {
    font-weight: 600;
    color: #0369a1;
}

.company-data-desc {
    margin: 4px 0 0 0;
    font-size: 11px;
    color: #64748b;
}

body.dark-mode .company-data-option,
[data-theme="dark"] .company-data-option {
    background: #1e3a5f;
    border-color: #2563eb;
}

body.dark-mode .company-data-title,
[data-theme="dark"] .company-data-title {
    color: #93c5fd;
}

body.dark-mode .company-data-desc,
[data-theme="dark"] .company-data-desc {
    color: #94a3b8;
}

.place-all-btn {
    transition: background 0.2s ease, transform 0.1s ease;
}

.place-all-btn:hover {
    background: #059669 !important;
    transform: scale(1.1);
}

.place-all-btn:active {
    transform: scale(0.95);
}

body.dark-mode .place-all-btn,
[data-theme="dark"] .place-all-btn {
    background: #10b981;
    box-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

body.dark-mode .place-all-btn:hover,
[data-theme="dark"] .place-all-btn:hover {
    background: #34d399 !important;
}
