:root {
    --primary: #2563eb;
    --danger: #e11d48;
    --warning: #f59e0b;
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #1e293b;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.config-panel {
    width: 420px;
    background: var(--card);
    border-right: 1px solid #e2e8f0;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 10px rgba(0,0,0,0.02);
    z-index: 10;
    overflow-y: auto;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.logo { font-weight: 800; font-size: 1.5rem; color: var(--primary); }

.auth-status button {
    background: #e2e8f0; border: none; padding: 6px 12px;
    border-radius: 6px; cursor: pointer; font-size: 0.8rem; font-weight: 600;
}
.auth-status button:hover { background: #cbd5e1; }

.upload-area {
    border: 2px dashed #cbd5e1; padding: 2rem; border-radius: 12px;
    text-align: center; cursor: pointer; transition: all 0.2s; margin-bottom: 1.5rem;
}
.upload-area:hover { border-color: var(--primary); background: #eff6ff; }

.form-group { margin-bottom: 1.5rem; }
label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 0.5rem; }
select, input { width: 100%; padding: 0.75rem; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 1rem; box-sizing: border-box;}

.model-info { background: #f1f5f9; border-radius: 12px; padding: 1rem; margin-bottom: 1.5rem; font-size: 0.875rem; }
.info-row { display: flex; justify-content: space-between; margin-bottom: 0.5rem; border-bottom: 1px solid #e2e8f0; padding-bottom: 0.25rem; }
.info-row:last-child { border-bottom: none; }

.price-display { margin-top: auto; padding: 1.5rem; background: #f1f5f9; border-radius: 12px; text-align: center; }
.price-value { font-size: 2rem; font-weight: 800; color: var(--primary); }

.order-btn {
    width: 100%; background: var(--primary); color: white; border: none;
    padding: 1rem; border-radius: 8px; font-weight: 700; margin-top: 1rem; cursor: pointer;
}

.viewer-panel { flex-grow: 1; position: relative; background: #ebf0f5; }
#canvas-container { width: 100%; height: 100%; }

.alert-box {
    position: absolute; top: 20px; left: 20px; right: 20px;
    padding: 1rem; border-radius: 8px; font-weight: 600; display: none; z-index: 20; background: #fee2e2; color: #b91c1c; border-left: 5px solid #ef4444;
}

/* AUTH MODAL STYLES */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); display: none; justify-content: center; align-items: center; z-index: 1000;
}
.modal-content {
    background: white; padding: 2rem; border-radius: 12px; width: 350px; max-width: 90%;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1); position: relative;
}
.close-modal {
    position: absolute; top: 15px; right: 15px; cursor: pointer; font-weight: bold; color: #64748b; font-size: 1.2rem;
}
.modal-tabs { display: flex; margin-bottom: 1.5rem; border-bottom: 2px solid #e2e8f0; }
.modal-tab {
    flex: 1; text-align: center; padding: 10px; cursor: pointer; font-weight: 600; color: #64748b;
}
.modal-tab.active { color: var(--primary); border-bottom: 2px solid var(--primary); margin-bottom: -2px; }

.auth-btn {
    width: 100%; background: var(--primary); color: white; border: none; padding: 10px; border-radius: 8px; font-weight: 600; cursor: pointer; margin-top: 10px;
}
.google-btn {
    width: 100%; background: white; color: #333; border: 1px solid #cbd5e1; padding: 10px; border-radius: 8px; font-weight: 600; cursor: pointer; margin-top: 15px; display: flex; align-items: center; justify-content: center; gap: 10px;
}
.google-btn:hover { background: #f8fafc; }

.sidebar-progress { display: none; margin-bottom: 1.5rem; background: #eff6ff; border: 1px solid #bfdbfe; padding: 1rem; border-radius: 8px; }
.progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.progress-container { width: 100%; height: 10px; background: #e2e8f0; border-radius: 5px; overflow: hidden; }
.progress-bar { width: 0%; height: 100%; background: var(--primary); transition: width 0.2s ease; }
.loading-text { font-size: 0.875rem; font-weight: 600; color: #1e3a8a; margin: 0; }
.loading-percent { font-size: 0.875rem; font-weight: 800; color: var(--primary); margin: 0; }

.viewport-controls { position: absolute; bottom: 20px; right: 20px; z-index: 50; background: rgba(255, 255, 255, 0.9); padding: 10px; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); display: flex; gap: 10px; align-items: center; }
.viewport-controls label { margin: 0; cursor: pointer; font-size: 0.875rem; display: flex; align-items: center; gap: 5px; }