:root {
    --primary: #2563eb;       /* Xanh hoàng gia hiện đại */
    --primary-hover: #1d4ed8;
    --accent: #f59e0b;        /* Màu cam xây dựng */
    --bg-surface: #ffffff;
    --bg-app: #f1f5f9;        /* Xám xanh nhạt nền nã */
    --text-main: #0f172a;
    --text-sub: #64748b;
    --border: #e2e8f0;
    --radius-lg: 16px;
    --radius-sm: 8px;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* KHUNG CHÍNH APP */
.vncbc-app {
    max-width: 900px;
    margin: 40px auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    color: var(--text-main);
    overflow: hidden;
    border: 1px solid var(--border);
}

/* HEADER & STEPPER */
.vncbc-header {
    background: var(--bg-surface);
    padding: 20px 30px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.app-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex; align-items: center; gap: 8px;
}
.app-title span { color: var(--primary); }

.step-progress {
    display: flex;
    background: var(--bg-app);
    padding: 5px;
    margin: 0;
    list-style: none;
}
.step-item {
    flex: 1;
    text-align: center;
    padding: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-sub);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}
.step-item.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

/* LAYOUT CHÍNH */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr; /* Bên trái nhỏ hơn bên phải chút */
    gap: 0;
    min-height: 500px;
}
.panel-left {
    background: #f8fafc;
    border-right: 1px solid var(--border);
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}
.panel-right {
    padding: 30px;
    background: #fff;
}

/* MÔ PHỎNG TƯỜNG (PREVIEW) - ĐIỂM NHẤN */
.wall-visual-box {
    width: 100%;
    height: 300px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}
/* Tạo họa tiết gạch bằng CSS Gradient */
.wall-texture {
    background-color: #e5e5f7;
    background-image: linear-gradient(30deg, #d97706 12%, transparent 12.5%, transparent 87%, #d97706 87.5%, #d97706), linear-gradient(150deg, #d97706 12%, transparent 12.5%, transparent 87%, #d97706 87.5%, #d97706), linear-gradient(30deg, #d97706 12%, transparent 12.5%, transparent 87%, #d97706 87.5%, #d97706), linear-gradient(150deg, #d97706 12%, transparent 12.5%, transparent 87%, #d97706 87.5%, #d97706), linear-gradient(60deg, #f59e0b 25%, transparent 25.5%, transparent 75%, #f59e0b 75%, #f59e0b), linear-gradient(60deg, #f59e0b 25%, transparent 25.5%, transparent 75%, #f59e0b 75%, #f59e0b);
    background-size: 20px 35px;
    background-position: 0 0, 0 0, 10px 18px, 10px 18px, 0 0, 10px 18px;
    border: 4px solid #fff;
    box-shadow: 0 20px 40px -10px rgba(245, 158, 11, 0.4);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}
.wall-dimensions {
    position: absolute;
    width: 100%; height: 100%;
    pointer-events: none;
}
.dim-label {
    position: absolute;
    background: #0f172a; color: #fff;
    padding: 2px 6px; border-radius: 4px;
    font-size: 10px; font-weight: bold;
}
.door-hole {
    position: absolute;
    bottom: 0; left: 50%; transform: translateX(-50%);
    background: #f8fafc; /* Trùng màu nền panel-left để tạo cảm giác đục lỗ */
    border: 1px dashed #94a3b8;
    border-bottom: none;
    display: flex; justify-content: center; align-items: center;
    color: #94a3b8; font-size: 10px;
}

/* INPUT GROUP "SÁP NHẬP" (CỰC KỲ QUAN TRỌNG) */
.input-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-bottom: 15px;
    position: relative;
    transition: 0.2s;
}
.input-card:hover { border-color: var(--primary); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }

.card-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 15px; font-weight: 700; color: var(--text-main); font-size: 0.9rem;
}

.smart-input-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}
.smart-label {
    width: 60px; font-size: 0.9rem; font-weight: 600; color: var(--text-sub);
}
.smart-field-group {
    flex: 1;
    display: flex;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden; /* Bo tròn góc */
    transition: 0.2s;
}
.smart-field-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.smart-field-group input {
    flex: 1;
    border: none;
    padding: 10px 12px;
    font-size: 1rem;
    outline: none;
    width: 100%;
}
.smart-field-group select {
    background: #f1f5f9;
    border: none;
    border-left: 1px solid var(--border);
    padding: 0 10px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    outline: none;
    font-size: 0.85rem;
}
.smart-field-group .static-unit {
    background: #f1f5f9;
    border-left: 1px solid var(--border);
    padding: 10px 12px;
    font-weight: 600; color: var(--text-sub); font-size: 0.85rem;
}

/* NÚT BẤM */
.btn-new-wall {
    width: 100%;
    padding: 12px;
    background: white;
    border: 2px dashed #cbd5e1;
    color: var(--text-sub);
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: 0.2s;
}
.btn-new-wall:hover { border-color: var(--primary); color: var(--primary); background: #eff6ff; }

.action-bar { margin-top: 20px; display: flex; gap: 15px; }
.btn-action {
    flex: 1; padding: 14px;
    border-radius: 10px; font-weight: 700; font-size: 1rem;
    cursor: pointer; border: none; transition: 0.2s;
}
.btn-primary { background: var(--primary); color: white; box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3); }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); }
.btn-secondary { background: #fff; border: 1px solid var(--border); color: var(--text-main); }
.btn-secondary:hover { background: #f8fafc; }

/* KẾT QUẢ ĐẸP */
.result-card {
    text-align: center;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 30px;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}
.result-price { font-size: 2.5rem; font-weight: 800; margin: 10px 0; }
.result-grid { display: flex; justify-content: space-between; margin-top: 20px; background: rgba(255,255,255,0.1); padding: 15px; border-radius: 10px; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .main-grid { grid-template-columns: 1fr; }
    .panel-left { order: -1; padding: 20px; border-right: none; border-bottom: 1px solid var(--border); }
    .wall-visual-box { height: 200px; }
}