/* Global Styles */
body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: #f3f4f6;
    color: #1e293b;
    overflow: hidden;
}

#plan-container {
    position: absolute;
    top: 50px;
    /* Below toolbar */
    left: 0;
    width: 100vw;
    height: calc(100vh - 50px);
    background-color: #ffffff;
    /* White paper for 2D */
    z-index: 50;
    /* Above 3D canvas (0), below UI (90) */
    display: flex;
    justify-content: center;
    align-items: center;
}

.partitions-dock {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 120px);
    overflow: auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    padding: 10px 12px;
    z-index: 1001;
}

.partitions-dock-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.dock-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
    margin-bottom: 10px;
}

.dock-card:last-child {
    margin-bottom: 0;
}

.dock-card-header {
    width: 100%;
    height: 34px !important;
    padding: 0 10px !important;
    border: none !important;
    background: #f8fafc !important;
    color: #334155 !important;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    cursor: pointer;
    border-bottom: 1px solid #e2e8f0 !important;
}

.dock-card-header:hover {
    background: #f1f5f9 !important;
}

.dock-card-icon {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1;
}

.dock-card-body {
    padding: 6px 8px 8px;
    max-height: 280px;
    overflow: auto;
}

.dock-card.collapsed .dock-card-body {
    display: none;
}

.dock-card.collapsed .dock-card-header {
    border-bottom: none !important;
}

/* Estimate Modern Styles */
.estimate-toolbar {
    padding: 15px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

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

.filter-btn {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #64748b;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.filter-btn:hover {
    background: #e2e8f0;
    color: #334155;
}

.filter-btn.active {
    background: #3b82f6;
    color: #fff;
    border-color: #2563eb;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.estimate-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 20px;
    overflow-x: auto;
}

.estimate-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    color: #334155;
}

.estimate-table thead th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 16px;
    border-bottom: 2px solid #e2e8f0;
    text-align: left;
}

.estimate-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
}

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

.estimate-table .group-header td {
    background-color: #eef2ff;
    color: #4338ca;
    font-weight: 700;
    padding: 10px 16px;
    border-top: 2px solid #e0e7ff;
}

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

#plan-container.hidden {
    display: none;
}

.view-tabs {
    display: flex;
    background: #1a202c;
    border-radius: 6px;
    padding: 2px;
    gap: 2px;
}

.view-tab {
    background: transparent;
    border: none;
    color: #a0aec0;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}

.view-tab:hover {
    color: white;
}

.view-tab.active {
    background: #4a5568;
    color: white;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
    outline: none;
}

/* 2. Top Toolbar */
#top-toolbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background-color: #2d3748;
    color: #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    padding: 0 16px;
    box-sizing: border-box;
    z-index: 100;
    gap: 12px;
}

.tool-btn {
    background: transparent;
    border: none;
    color: #e2e8f0;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
    font-size: 0.9rem;
}

.tool-btn:hover {
    background-color: #4a5568;
}

.tool-btn.active {
    background-color: #3b82f6;
    color: white;
}

.tool-btn .icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-btn span {
    display: none;
}

@media (min-width: 768px) {
    .tool-btn span {
        display: inline;
    }
}

.toolbar-separator {
    width: 1px;
    height: 24px;
    background-color: rgba(255, 255, 255, 0.2);
    margin: 0 4px;
}

.toolbar-spacer {
    flex: 1;
}

/* 3. Settings Panel (Sidebar) */
#ui-container {
    position: absolute;
    top: 70px;
    left: 20px;
    width: 340px;
    max-height: calc(100vh - 90px);
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    z-index: 90;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#ui-container.hidden {
    transform: translateX(-20px);
    opacity: 0;
    pointer-events: none;
}

/* Estimate Panel (Full Screen Modal) */
#estimate-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #ffffff;
    z-index: 2000;
    /* Highest priority */
    display: flex;
    flex-direction: column;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 1;
    transform: translateY(0);
}

#estimate-container.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

/* Full Screen Layout */
.estimate-toolbar {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    gap: 16px;
}

.estimate-filters {
    display: flex;
    gap: 12px;
    flex: 1;
}

.filter-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
}

.filter-chip.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.filter-chip input {
    display: none;
}

.estimate-close-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #64748b;
    padding: 4px;
}

.estimate-close-btn:hover {
    color: #1e293b;
}

.estimate-content {
    flex: 1;
    overflow-y: auto;
    /* Scrollable content */
    padding: 24px;
    max-width: 1200px;
    /* Centered content max width */
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Styled Table */
.estimate-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9rem;
}

.estimate-table th {
    position: sticky;
    top: 0;
    background: #f1f5f9;
    z-index: 10;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
}

.estimate-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
}

/* Group Headers */
tr.group-header td {
    background-color: #e2e8f0;
    font-weight: 700;
    color: #1e293b;
    padding: 10px 12px;
    border-bottom: 1px solid #cbd5e1;
}

/* Totals Row */
tr.total-row td {
    background-color: #f8fafc;
    font-weight: 700;
    border-top: 2px solid #cbd5e1;
}

/* Actions Footer */
.estimate-footer {
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 4. Accordion Sections */
.section {
    border-bottom: 1px solid #e5e7eb;
}

.section:last-child {
    border-bottom: none;
}

.section-title {
    padding: 12px 16px;
    background-color: #f9fafb;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: #374151;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
    user-select: none;
}

.section-title:hover {
    background-color: #f3f4f6;
}

.section-title::after {
    content: '▼';
    font-size: 0.7rem;
    transition: transform 0.3s ease;
    color: #9ca3af;
}

.section.active .section-title::after {
    transform: rotate(180deg);
}

.section-body {
    display: none;
    padding: 20px;
    background-color: white;
    animation: slideDown 0.3s ease-out;
}

.section.active .section-body {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 5. Form Elements */
.control-group {
    margin-bottom: 15px;
}

.control-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #4b5563;
    margin-bottom: 6px;
}

input[type="text"],
input[type="number"],
select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background-color: white;
    font-size: 0.9rem;
    color: #1e293b;
    box-sizing: border-box;
    /* Fix for width 100% + padding */
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.row {
    display: flex;
    gap: 12px;
}

.col {
    flex: 1;
}

/* Checkbox specific */
label.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
    color: #374151;
}

input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
    margin: 0;
}

/* 6. Buttons */
.btn {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    color: white;
    text-align: center;
    display: inline-block;
    box-sizing: border-box;
    margin-bottom: 8px;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: #3b82f6;
}

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

.btn-secondary {
    background-color: #10b981;
}

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

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

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

.panel-footer {
    padding: 16px;
    background-color: white;
    border-top: 1px solid #e5e7eb;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* Helper styles for Three.js labels */
.label {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #1e293b;
    background: rgba(255, 255, 255, 0.95);
    padding: 3px 6px;
    border-radius: 4px;
    white-space: pre-line;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    pointer-events: none;
    text-align: center;
    z-index: 10;
}

/* Table in materials */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    margin-bottom: 12px;
}

th,
td {
    padding: 8px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

th {
    font-weight: 600;
    color: #64748b;
    background-color: #f8fafc;
}

.estimate-table th,
.estimate-table td {
    padding: 10px;
}

.estimate-table th {
    background-color: #f1f5f9;
}

/* Info text */
#sipOut {
    font-family: 'Menlo', monospace;
    font-size: 0.8rem;
    line-height: 1.5;
    background: #f8fafc;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    white-space: pre-wrap;
}

p.hint {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 4px;
}


/* Compact UI Overrides from app.js */
#ui-container {
    width: 320px !important;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
}

.panel-header {
    padding: 10px 16px !important;
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.panel-header h1 {
    font-size: 16px !important;
    margin: 0 !important;
    color: #1e293b;
}

.panel-header p {
    font-size: 11px !important;
    margin: 2px 0 0 0 !important;
    color: #64748b;
}

.section-title {
    padding: 8px 16px !important;
    font-size: 12px !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569 !important;
    background: #fff !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

.section-title:hover {
    background: #f8fafc !important;
    color: #2563eb !important;
}

.section-body {
    padding: 12px 16px !important;
    background: #fff;
}

.control-group {
    margin-bottom: 12px !important;
}

.control-group.row {
    display: flex;
    gap: 8px;
}

.control-group.row .col {
    flex: 1;
}

label {
    display: block;
    font-size: 11px !important;
    font-weight: 500 !important;
    margin-bottom: 4px !important;
    color: #64748b;
}

input[type="number"],
input[type="text"],
select {
    width: 100%;
    padding: 0 10px !important;
    font-size: 13px !important;
    line-height: 30px !important;
    height: 30px !important;
    border-radius: 4px !important;
    border: 1px solid #cbd5e1 !important;
    background: #fff;
    color: #334155;
    transition: border-color 0.15s;
}

input:focus,
select:focus {
    border-color: #3b82f6 !important;
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    height: 30px !important;
    border-radius: 4px !important;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

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

.btn-primary:hover {
    background-color: #1d4ed8 !important;
}

.btn-secondary {
    background-color: #fff !important;
    border: 1px solid #cbd5e1 !important;
    color: #475569 !important;
}

.btn-secondary:hover {
    background-color: #f8fafc !important;
    border-color: #94a3b8 !important;
    color: #1e293b !important;
}

.btn-danger {
    background-color: #fee2e2 !important;
    color: #ef4444 !important;
    border: 1px solid #fecaca !important;
}

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

.plan-context-menu {
    position: fixed;
    z-index: 9999;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
    padding: 4px;
    min-width: 140px;
}

.plan-context-menu button {
    width: 100%;
    text-align: left;
    padding: 6px 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    color: #0f172a;
}

.plan-context-menu button:hover {
    background: #f1f5f9;
}

.plan-context-menu.hidden {
    display: none;
}

/* Layer Panel */
.layer-panel {
    position: fixed;
    top: 60px;
    right: 20px;
    width: 250px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.layer-panel.hidden {
    display: none;
}

.layer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    background: #f9fafb;
    border-radius: 8px 8px 0 0;
}

.layer-header h3 {
    margin: 0;
    font-size: 1rem;
    color: #111827;
}

.layer-header button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #6b7280;
}

.layer-header button:hover {
    color: #ef4444;
}

.layer-list {
    padding: 8px 0;
    overflow-y: auto;
}

.layer-item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.layer-item:hover {
    background-color: #f3f4f6;
}

.layer-item input[type="checkbox"] {
    margin-right: 12px;
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.layer-item span {
    font-size: 0.9rem;
    color: #374151;
}

/* Add Layer Toggle Button to Toolbar */
.toolbar-btn-layer {
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.toolbar-btn-layer:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

.toolbar-btn-layer svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    width: 360px;
    max-width: calc(100vw - 24px);
    padding: 14px 16px;
}

.modal-header {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 10px;
}

.modal-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.modal-actions .btn {
    flex: 1;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

.modal-actions .btn.primary {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.modal-actions .btn.danger {
    background: #f87171;
    /* Brighter red */
    color: #fff;
    /* White text for contrast */
    border-color: #ef4444;
}

.modal-actions .btn.danger:hover {
    background: #ef4444;
}

.modal-actions .btn:not(.primary):not(.danger) {
    background: #f1f5f9;
    color: #475569;
    border-color: #cbd5e1;
}

.modal-actions .btn:not(.primary):not(.danger):hover {
    background: #e2e8f0;
    color: #1e293b;
}

.modal-overlay.hidden {
    display: none;
}

.control-group.hidden,
.btn.hidden {
    display: none !important;
}

/* Table Compactness */
#materialsBody tr td {
    padding: 6px 8px !important;
    font-size: 12px !important;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

#materialsBody tr:last-child td {
    border-bottom: none;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 7. Production View Styles */
#production-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #ffffff;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 1;
    transform: translateY(0);
}

#production-container.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

#production-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
}

.prod-tabs {
    display: flex;
    gap: 10px;
    padding: 10px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.prod-tab {
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    font-weight: 600;
    color: #64748b;
    transition: all 0.2s;
}

.prod-tab:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.prod-tab.active {
    background: #fff;
    border-color: #cbd5e1;
    border-bottom-color: transparent;
    color: #2563eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.prod-body {
    flex: 1;
    overflow: hidden;
    /* Scroll inside specific views */
    padding: 0;
}

/* Summary View */
.prod-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 24px;
}

.stat-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.stat-card h3 {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
}

.text-success {
    color: #10b981 !important;
}

.text-warning {
    color: #f59e0b !important;
}

/* Table View */
.prod-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.prod-table thead th {
    position: sticky;
    top: 0;
    background: #f1f5f9;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
}

.prod-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
}

.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

/* Visual View */
.visual-layout {
    display: flex;
    height: 100%;
}

.panel-list {
    width: 250px;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    overflow-y: auto;
}

.panel-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.2s;
}

.panel-item:hover {
    background: #f8fafc;
}

.panel-item b {
    display: block;
    color: #1e293b;
    font-size: 0.9rem;
}

.panel-item small {
    display: block;
    color: #64748b;
    font-size: 0.8rem;
    margin-top: 2px;
}

.panel-preview {
    flex: 1;
    background: #f1f5f9;
    padding: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}
