:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --success: #27ae60;
    --danger: #e74c3c;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --border: #ddd;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f6fa;
    color: var(--dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: var(--primary);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 { font-size: 1.5rem; }
header a { color: white; text-decoration: none; }

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.2s;
}

.btn-primary { background: var(--secondary); color: white; }
.btn-primary:hover { background: #2980b9; }

.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #219a52; }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #c0392b; }

.btn-sm { padding: 0.3rem 0.6rem; font-size: 0.875rem; }

main { padding: 2rem 0; }

.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.model-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.model-card:hover { transform: translateY(-4px); }

.model-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.model-card-body { padding: 1rem; }

.model-card h3 { margin-bottom: 0.5rem; }
.model-card .dimensions { color: #666; font-size: 0.875rem; }

.viewer-container {
    width: 100%;
    height: 400px;
    background: #1a1a2e;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.viewer-container geometry-viewer {
    width: 100%;
    height: 100%;
}

.dimensions-overlay {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1rem;
}

.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.color-option {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s;
}

.color-option.selected { border-color: var(--primary); transform: scale(1.1); }
.color-option:hover { transform: scale(1.1); }

.price-display {
    background: var(--success);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.price-display .amount { font-size: 2rem; font-weight: bold; }

table { width: 100%; border-collapse: collapse; }
table th, table td { padding: 0.75rem; text-align: left; border-bottom: 1px solid var(--border); }
table th { background: var(--light); }

.badge { padding: 0.25rem 0.5rem; border-radius: 4px; font-size: 0.75rem; }
.badge-pending { background: #f39c12; color: white; }
.badge-completed { background: var(--success); color: white; }
.badge-cancelled { background: var(--danger); color: white; }

.alert { padding: 1rem; border-radius: 4px; margin-bottom: 1rem; }
.alert-success { background: #d4edda; color: #155724; }
.alert-error { background: #f8d7da; color: #721c24; }
.alert-info { background: #d1ecf1; color: #0c5460; }

.text-center { text-align: center; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }
.hidden { display: none; }

@media (max-width: 768px) {
    .grid { grid-template-columns: 1fr; }
    .viewer-container { height: 300px; }
}