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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 11px;
    background: #c8d8e8;
    color: #000;
    overflow: hidden;
}

/* App Container */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Header */
.app-header {
    background: linear-gradient(to bottom, #f0f0f0 0%, #d8d8d8 100%);
    border-bottom: 1px solid #888;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    height: 32px;
}

.header-content {
    display: flex;
    width: 100%;
    align-items: center;
}

.toolbar {
    display: flex;
    gap: 2px;
}

.btn-icon {
    width: 24px;
    height: 24px;
    border: 1px solid #888;
    background: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%);
    border-radius: 2px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
}

.btn-icon:hover {
    background: linear-gradient(to bottom, #fff 0%, #d0d0d0 100%);
}

.btn-icon:active {
    background: #c0c0c0;
    border-color: #666;
}

/* Main Layout */
.main-layout {
    display: flex;
    height: calc(100vh - 32px);
    background: #c8d8e8;
}

/* Left Panel */
.sidebar-left {
    width: 240px;
    background: #c8d8e8;
    padding: 8px;
    overflow-y: auto;
    border-right: 1px solid #888;
}

.product-info-card {
    background: #c8d8e8;
}

.form-row {
    margin-bottom: 6px;
}

.form-row label {
    display: block;
    font-size: 11px;
    font-weight: normal;
    margin-bottom: 2px;
    color: #000;
}

.input-field,
.select-field,
.textarea-field {
    width: 100%;
    padding: 2px 4px;
    border: 1px solid #7f9db9;
    background: #fff;
    font-size: 11px;
    font-family: inherit;
}

.input-field:focus,
.select-field:focus,
.textarea-field:focus {
    outline: none;
    border-color: #4a90e2;
}

.dimensions-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4px;
}

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

.dim-group label {
    font-size: 11px;
    margin-bottom: 2px;
}

.input-small {
    width: 100%;
    padding: 2px 4px;
}

.dim-range {
    font-size: 9px;
    color: #666;
    margin-top: 1px;
}

.textarea-field {
    resize: vertical;
    min-height: 40px;
}

/* Center Panel */
.main-content {
    flex: 1;
    background: #c8d8e8;
    padding: 8px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.options-header {
    background: #c8d8e8;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

/* Option Item */
.option-item {
    background: linear-gradient(to bottom, #f8f8f8 0%, #e8e8e8 100%);
    border: 1px solid #a0a0a0;
    border-left: 3px solid #a0a0a0;
    padding: 6px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
}

.option-item:hover {
    background: linear-gradient(to bottom, #fff 0%, #f0f0f0 100%);
    border-color: #4a90e2;
    border-left-color: #4a90e2;
}

.option-item.selected {
    background: linear-gradient(to bottom, #e0f0ff 0%, #d0e8ff 100%);
    border-color: #4a90e2;
    border-left-color: #4a90e2;
}

.option-item.warning {
    border-left-color: #ff9800;
}

.option-item.numeric-input-item {
    cursor: default;
}

.option-item.numeric-input-item:hover {
    background: linear-gradient(to bottom, #f8f8f8 0%, #e8e8e8 100%);
    border-color: #a0a0a0;
    border-left-color: #a0a0a0;
}

.numeric-inputs {
    margin-top: 6px;
}

.numeric-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.numeric-input-row:last-child {
    margin-bottom: 0;
}

.numeric-input-row label {
    font-size: 10px;
    color: #666;
    min-width: 70px;
}

.numeric-input-row input[type="number"],
.numeric-inputs input[type="number"],
.numeric-input-row input[type="text"],
.numeric-inputs input[type="text"] {
    width: 150px;
    padding: 3px 6px;
    border: 1px solid #a0a0a0;
    border-radius: 2px;
    font-size: 11px;
    background: white;
}

.numeric-input-row input[type="number"]:focus,
.numeric-inputs input[type="number"]:focus,
.numeric-input-row input[type="text"]:focus,
.numeric-inputs input[type="text"]:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 3px rgba(74, 144, 226, 0.3);
}

.option-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.option-content {
    flex: 1;
    min-width: 0;
}

.option-title {
    font-size: 11px;
    font-weight: 600;
    color: #000;
    margin-bottom: 2px;
}

.option-value {
    font-size: 11px;
    color: #333;
}

.option-arrow {
    color: #666;
    font-size: 10px;
    flex-shrink: 0;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 11px;
}

/* Right Panel */
.sidebar-right {
    width: 380px;
    background: #c8d8e8;
    padding: 8px;
    overflow-y: auto;
    border-left: 1px solid #888;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Preview */
.preview-card {
    background: #fff;
    border: 2px solid #333;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.preview-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.window-svg {
    width: 100%;
    max-width: 300px;
    height: auto;
}

/* Summary */
.summary-card {
    background: #fff;
    border: 1px solid #888;
    flex: 1;
}

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

.summary-table td {
    padding: 4px 8px;
    font-size: 11px;
    border-bottom: 1px solid #d0d0d0;
}

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

.supplement-row td {
    color: #0066cc;
    font-size: 10px;
    padding: 3px 8px;
}

.supplement-row .price-cell {
    color: #008800;
}

.price-cell {
    text-align: right;
    font-weight: normal;
}

.summary-table tfoot {
    background: #f0f0f0;
    border-top: 2px solid #888;
}

.total-row td {
    padding: 6px 8px;
    font-weight: bold;
    font-size: 11px;
}

.total-row:last-child {
    background: #e8e8e8;
    border-top: 1px solid #888;
}

/* Feature Dropdown */
.feature-dropdown {
    background: #fff;
    border: 1px solid #888;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    margin-top: 2px;
    max-height: 300px;
    overflow-y: auto;
    position: relative;
    z-index: 1000;
}

.feature-option {
    padding: 6px 8px;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    font-size: 11px;
}

.feature-option:last-child {
    border-bottom: none;
}

.feature-option:hover {
    background: #e0f0ff;
}

.feature-option.selected {
    background: #d0e8ff;
    font-weight: 600;
}

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

::-webkit-scrollbar-track {
    background: #d0d0d0;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #f0f0f0 0%, #c0c0c0 100%);
    border: 1px solid #888;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #e0e0e0 0%, #b0b0b0 100%);
}

::-webkit-scrollbar-button {
    background: linear-gradient(to bottom, #f0f0f0 0%, #d0d0d0 100%);
    border: 1px solid #888;
    height: 16px;
}

/* Responsive */
@media (max-width: 1200px) {
    .sidebar-left {
        width: 200px;
    }
    
    .sidebar-right {
        width: 320px;
    }
}
