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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #e5e5e5;
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: #a8c5dd;
    color: #333;
    padding: 20px 40px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0;
    font-weight: 700;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.main-content {
    display: flex;
    gap: 0;
    height: calc(100vh - 160px);
    min-height: 600px;
}

.viewer-column {
    flex: 0 0 50%;
    position: sticky;
    top: 0;
    height: calc(100vh - 160px);
    background: #1a1a1a;
    display: flex;
    flex-direction: column;
}

.content-column {
    flex: 1;
    overflow-y: auto;
    padding: 40px 40px 0 40px;
    background: white;
    position: relative;
    display: flex;
    flex-direction: column;
}

section {
    margin-bottom: 40px;
}

section h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #4a4a4a;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

/* Upload Section */
.upload-section {
    margin-bottom: 30px;
}

.upload-area {
    border: 3px dashed #888;
    border-radius: 15px;
    padding: 40px 20px;
    text-align: center;
    background: #f5f5f5;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #666;
    background: #ececec;
}

.upload-area.dragover {
    border-color: #555;
    background: #e0e0e0;
    transform: scale(1.02);
}

.upload-label {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    color: #555;
}

.upload-label svg {
    color: #555;
}

.upload-label span {
    font-size: 1.1rem;
    font-weight: 500;
}

.file-info {
    font-size: 0.9rem !important;
    color: #888 !important;
}

.file-name {
    margin-top: 15px;
    font-weight: 600;
    color: #555;
    text-align: center;
}

/* 3D Viewer */
.viewer-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 10px 20px 20px 20px;
}

.view-controls {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.btn-view {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-view:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.viewer-container {
    flex: 1;
    width: 100%;
    background: #1a1a1a;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    cursor: default;
    user-select: none;
    transition: outline 0.3s ease;
}

.viewer-container canvas {
    display: block;
}

.viewer-bottom-controls {
    margin-top: 10px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 50px;
}

.viewer-bottom-left {
    flex: 0 0 auto;
}

.viewer-bottom-left .btn {
    font-size: 13px;
    padding: 8px 16px;
}

.viewer-bottom-center {
    flex: 1;
    text-align: center;
    font-weight: 500;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    padding: 0 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.viewer-bottom-right {
    flex: 0 0 auto;
    display: flex;
    gap: 8px;
}

.viewer-bottom-right .btn {
    font-size: 13px;
    padding: 8px 16px;
}

.file-name {
    margin-bottom: 15px;
    font-weight: 600;
    color: #667eea;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 8px;
    color: white;
}

/* Parts List */
.parts-list {
    display: grid;
    gap: 15px;
}

.part-item {
    background: #f8f9ff;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 220px;
    align-items: start;
    gap: 20px;
    transition: all 0.3s ease;
}

.part-item:hover {
    border-color: #888;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.part-item.selected {
    border-color: #666;
    background: #ececec;
}

.part-info h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #333;
}

.part-info p {
    font-size: 0.9rem;
    color: #666;
    margin: 4px 0;
}

.part-info .part-weight {
    font-weight: 600;
    color: #555;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
}

.part-material select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.part-material select:focus {
    outline: none;
    border-color: #888;
}

.part-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.visibility-btn-top {
    width: 100%;
}

.part-actions {
    display: flex;
    gap: 10px;
}

/* Parts List - Accordion Style */
.parts-list-accordion {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.part-accordion-item {
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.part-accordion-item:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.part-accordion-header {
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background 0.2s ease;
}

.part-accordion-header:hover {
    background: #f8f9fa;
}

.part-accordion-title {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.accordion-icon {
    transition: transform 0.3s ease;
    display: inline-block;
    font-size: 12px;
    color: #666;
}

.part-accordion-item.expanded .accordion-icon {
    transform: rotate(90deg);
}

.part-name-compact {
    font-weight: 500;
    color: #333;
    font-size: 14px;
    flex: 1;
}

.part-material-badge {
    font-size: 12px;
    color: #666;
    background: #f0f0f0;
    padding: 4px 10px;
    border-radius: 12px;
    margin-left: auto;
}

.part-accordion-detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-top: 1px solid #f0f0f0;
}

.part-accordion-item.expanded .part-accordion-detail {
    max-height: 1000px;
}

.part-accordion-item.selected {
    border-color: #a8c5dd;
    background: #f0f7fb;
    box-shadow: 0 3px 8px rgba(168, 197, 221, 0.3);
}

.part-detail-wrapper {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 0;
}

.part-detail-info {
    padding: 15px;
    background: #f8f9fa;
    border-right: 1px solid #f0f0f0;
}

.part-detail-controls {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: white;
}

.part-detail-info p {
    font-size: 13px;
    color: #666;
    margin: 6px 0;
}

.part-detail-info .part-weight {
    font-weight: 600;
    color: #555;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}

.part-detail-info .part-cost {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
    color: #1976D2;
}

/* Material Types */
.material-types {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.material-type {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #f8f9ff;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
}

.material-color {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #ddd;
}

/* Summary */
.summary-section {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 3px solid #888;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 0;
    margin-top: auto;
    margin-left: -40px;
    margin-right: -40px;
    padding: 15px 40px;
    z-index: 10;
}

.material-summary-sticky {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 2px solid #a8c5dd;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    margin: 20px -20px 0 -20px;
    padding: 15px 20px;
    z-index: 10;
}

.summary-content {
    background: #f5f5f5;
    border-radius: 6px;
    padding: 12px 15px;
}

.material-summary-sticky .summary-content {
    margin-bottom: 0;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.9rem;
}

.summary-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.material-visibility-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.material-visibility-toggle:hover {
    transform: scale(1.2);
}

.summary-item-label {
    font-weight: 600;
    color: #333;
    min-width: 120px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.part-count {
    font-size: 0.75rem;
    font-weight: 400;
    color: #777;
}

.summary-item-actions {
    flex-shrink: 0;
}

.material-swap-select {
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.8rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s ease;
    color: #555;
    max-width: 120px;
}

.material-swap-select:hover {
    border-color: #888;
}

.material-swap-select:focus {
    outline: none;
    border-color: #666;
}

.summary-item-value {
    color: #555;
    font-weight: 600;
    text-align: right;
    margin-left: auto;
}

/* Buttons */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #4a4a4a;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    background: #333;
}

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

.btn-secondary {
    background: white;
    color: #555;
    border: 2px solid #888;
}

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

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-icon {
    padding: 8px 12px;
}

/* Actions Section */
.actions-section {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding-top: 0;
}

/* Empty State */
.empty-state {
    text-align: center;
    color: #999;
    padding: 40px;
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
        height: auto;
    }

    .viewer-column {
        position: relative;
        width: 100%;
        height: 500px;
        flex: none;
    }

    .content-column {
        overflow-y: visible;
    }

    .part-item {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    header {
        padding: 30px 20px;
    }

    header h1 {
        font-size: 1.8rem;
    }

    .viewer-column {
        height: 400px;
    }

    .content-column {
        padding: 20px;
    }

    .upload-area {
        padding: 30px 15px;
    }

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

    .material-types {
        grid-template-columns: 1fr;
    }
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* ===== TABBED INTERFACE STYLES ===== */

/* Left Column with Tabs */
.left-column {
    flex: 0 0 45%;
    display: flex;
    flex-direction: column;
    background: white;
    height: calc(100vh - 160px);
    overflow: hidden;
}

/* Compact Upload Section */
.upload-section-compact {
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.file-name-compact {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    text-align: center;
    font-weight: 500;
}

.upload-area-compact {
    display: flex;
    justify-content: center;
}

.upload-label-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #2196F3;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.upload-label-compact:hover {
    background: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.upload-label-compact svg {
    width: 20px;
    height: 20px;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
    padding: 0 10px;
}

.tab-btn {
    flex: 1;
    padding: 15px 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
    position: relative;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    background: rgba(33, 150, 243, 0.05);
    color: #2196F3;
}

.tab-btn.active {
    color: #2196F3;
    border-bottom-color: #2196F3;
    background: white;
}

/* Tab Content Wrapper */
.tab-content-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    position: relative;
}

.tab-content {
    display: none;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

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

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

/* Settings Tab Content */
.settings-content {
    max-width: 100%;
}

.settings-content h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #4a4a4a;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

#settingsPriceForm {
    display: grid;
    gap: 25px;
}

/* Settings Sub-tabs */
.settings-subtab-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0;
}

.settings-subtab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    margin-bottom: -2px;
}

.settings-subtab-btn:hover {
    color: #1976D2;
    background: #f5f5f5;
}

.settings-subtab-btn.active {
    color: #1976D2;
    border-bottom-color: #1976D2;
    background: #f0f7fb;
}

.settings-subtab-content {
    display: none;
    padding-top: 20px;
}

.settings-subtab-content.active {
    display: block;
}

.settings-category {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.settings-category h4 {
    margin: 0 0 15px 0;
    color: #1976D2;
    font-size: 1.1rem;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.settings-input-group {
    display: flex;
    flex-direction: column;
}

.settings-input-group label {
    font-weight: 500;
    margin-bottom: 5px;
    font-size: 13px;
    color: #333;
}

.settings-input-group input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.settings-input-group input:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.settings-input-group input:disabled {
    background: #f0f0f0;
    color: #888;
    cursor: not-allowed;
    opacity: 0.7;
}

.settings-input-group small {
    font-size: 11px;
    color: #999;
    margin-top: 3px;
}

/* Cost Breakdown Content */
.cost-breakdown-content {
    padding: 0;
}

.cost-breakdown-header {
    background: #a8c5dd;
    color: #333;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(168, 197, 221, 0.3);
}

.cost-breakdown-header h2 {
    margin: 0;
    color: #333;
    border: none;
    padding: 0;
    font-size: 1.4rem;
    font-weight: 500;
}

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

.cost-total-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 15px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cost-total-item strong {
    font-size: 16px;
    font-weight: 500;
    opacity: 0.9;
}

.cost-total-item .amount {
    font-size: 24px;
    font-weight: 600;
}

.cost-centers {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.cost-centers h3 {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 1.1rem;
    font-weight: 500;
}

.cost-center-item {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: white;
    border-radius: 6px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e8e8e8;
}

.cost-center-item.accordion-item {
    flex-direction: column;
    align-items: stretch;
}

.cost-center-item:last-child {
    margin-bottom: 0;
}

.cost-center-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.cost-center-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 400;
    color: #555;
}

.cost-center-percentage {
    background: #e3f2fd;
    color: #1976D2;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.cost-center-amount {
    font-size: 16px;
    font-weight: 500;
    color: #1976D2;
}

/* Accordion functionality */
.accordion-item {
    cursor: pointer;
}

.accordion-icon {
    transition: transform 0.3s ease;
    display: inline-block;
    font-size: 12px;
}

.accordion-item.expanded .accordion-icon {
    transform: rotate(90deg);
}

.accordion-detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-top: 0;
}

.accordion-item.expanded .accordion-detail {
    max-height: 1000px;
    margin-top: 15px;
}

.material-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-left: 3px solid #66bb6a;
    margin-bottom: 8px;
    border-radius: 4px;
}

.material-detail-row:last-child {
    margin-bottom: 0;
}

.material-detail-info {
    flex: 1;
}

.material-detail-name {
    font-weight: 500;
    color: #444;
    margin-bottom: 4px;
}

.material-detail-stats {
    font-size: 12px;
    color: #777;
}

.material-detail-cost {
    font-size: 15px;
    font-weight: 500;
    color: #4caf50;
}

/* Cushion detail rows */
.cushion-detail-row {
    background: #fff8e1;
    border-left: 3px solid #ffb74d;
}

.cushion-detail-row .material-detail-cost {
    color: #ff9800;
}

/* Cushion breakdown section inside accordion */
.cushion-breakdown-section {
    padding: 10px 0;
}

.cost-breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #fff9f0;
    border-radius: 4px;
    margin-bottom: 6px;
}

.cost-breakdown-row:last-of-type {
    margin-bottom: 0;
}

.cost-breakdown-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
}

.cost-breakdown-percentage {
    background: #ffe0b2;
    color: #e65100;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.cost-breakdown-amount {
    font-size: 14px;
    font-weight: 500;
    color: #e65100;
}

.material-breakdown {
    margin-top: 25px;
}

.material-breakdown h3 {
    margin: 0 0 15px 0;
    color: #4a4a4a;
    font-size: 1.4rem;
}

.material-cost-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.material-cost-item:hover {
    border-color: #2196F3;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.1);
}

.material-cost-label {
    font-weight: 600;
    color: #333;
}

.material-cost-details {
    text-align: right;
}

.material-cost-total {
    font-size: 18px;
    font-weight: 700;
    color: #1976D2;
}

.material-cost-stats {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

/* Cost Section Styling */
.cost-section {
    margin-bottom: 30px;
    padding: 20px;
    border-radius: 12px;
    background: #fafafa;
}

.cost-section.furniture-section {
    background: #e8f2f7;
    border: 1px solid #a8c5dd;
}

.cost-section.materials-detail-section {
    background: #e8f5e9;
    border: 2px solid #66bb6a;
}

.cost-section.cushion-detail-section {
    background: #fff8e1;
    border: 2px solid #ffd54f;
}

.cost-section h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.4rem;
}

.cost-section h4 {
    margin: 15px 0 10px 0;
    color: #666;
    font-size: 1rem;
    font-weight: 500;
}

.materials-line-item {
    background: #e8f5e9 !important;
    border-color: #66bb6a !important;
    font-weight: 600;
}

.materials-line-item:hover {
    border-color: #4caf50 !important;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2) !important;
}

.cushion-line-item {
    background: #fff3e0 !important;
    border-color: #ffb74d !important;
    font-weight: 600;
}

.cushion-line-item:hover {
    border-color: #ff9800 !important;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.2) !important;
}

/* Actions Section Fixed at Bottom */
.actions-section-fixed {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 2px solid #e0e0e0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.actions-section-fixed .btn {
    flex: 1;
    min-width: 150px;
}

/* Right Column: Viewer */
.viewer-column-right {
    flex: 0 0 55%;
    position: sticky;
    top: 0;
    height: calc(100vh - 160px);
    background: #1a1a1a;
    display: flex;
    flex-direction: column;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .left-column {
        flex: 0 0 50%;
    }

    .viewer-column-right {
        flex: 0 0 50%;
    }
}

@media (max-width: 900px) {
    .main-content {
        flex-direction: column;
        height: auto;
    }

    .left-column {
        flex: 1;
        height: 500px;
    }

    .viewer-column-right {
        flex: 1;
        height: 400px;
        position: relative;
    }

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

/* Password Gateway */
.password-gateway {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(10px);
}

.password-gateway.hidden {
    display: none;
}

.password-modal {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 400px;
    width: 90%;
    animation: slideIn 0.3s ease-out;
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.password-modal h2 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 24px;
}

.password-modal p {
    margin: 0 0 25px 0;
    color: #666;
    font-size: 14px;
}

.password-modal input[type="text"],
.password-modal input[type="password"] {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 15px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.password-modal input[type="text"]:focus,
.password-modal input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
}

.password-modal .btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.password-error {
    margin-top: 15px;
    color: #e53935;
    font-size: 14px;
    font-weight: 500;
    min-height: 20px;
}
