* { box-sizing: border-box; }
body { font-family: 'Segoe UI', Arial, sans-serif; background: #f1f3f5; margin: 0; }

input[type="text"], input[type="email"], input[type="tel"], input[type="date"],
input[type="number"], textarea, select {
    width: 100%; padding: 8px 12px; border: 1px solid #dee2e6;
    border-radius: 8px; font-size: 14px; background: white; color: #333;
    transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus, select:focus {
    outline: none; border-color: #e63946;
    box-shadow: 0 0 0 3px rgba(230,57,70,.12);
}

label {
    font-size: 12px; font-weight: 600; color: #666;
    margin-bottom: 4px; display: block;
    text-transform: uppercase; letter-spacing: .4px;
}

.card {
    background: white; border-radius: 14px; padding: 22px;
    margin-bottom: 18px; box-shadow: 0 1px 4px rgba(0,0,0,.07);
}
.section-title {
    font-size: 15px; font-weight: 700; color: #222;
    display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
}
.section-sub { font-size: 12px; color: #999; margin-bottom: 18px; }

.btn {
    padding: 9px 18px; border-radius: 9px; border: none; cursor: pointer;
    font-size: 14px; font-weight: 600; transition: all .2s;
    display: inline-flex; align-items: center; gap: 7px;
}
.btn-red { background: #e63946; color: white; }
.btn-red:hover { background: #c1121f; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(230,57,70,.35); }
.btn-ghost { background: white; color: #555; border: 1px solid #dee2e6; }
.btn-ghost:hover { background: #f8f9fa; }
.btn-add {
    background: #f0f9ff; color: #0369a1; border: 1px dashed #7dd3fc;
    width: 100%; margin-top: 10px; justify-content: center;
}
.btn-add:hover { background: #e0f2fe; }
.btn-trash {
    background: #fee2e2; color: #dc2626; padding: 7px 10px;
    border-radius: 8px; border: none; cursor: pointer; transition: background .2s;
}
.btn-trash:hover { background: #fecaca; }

.upload-zone {
    border: 2px dashed #dee2e6; border-radius: 12px;
    cursor: pointer; text-align: center; padding: 18px 10px; transition: all .2s;
}
.upload-zone:hover { border-color: #e63946; background: #fff5f6; }

.photo-box {
    width: 72px; height: 72px; border: 2px dashed #dee2e6;
    border-radius: 10px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; overflow: hidden; flex-shrink: 0; transition: border-color .2s;
}
.photo-box:hover { border-color: #e63946; }
.photo-box img { width: 100%; height: 100%; object-fit: cover; }

.iva-pill {
    padding: 6px 15px; border-radius: 20px; border: 1.5px solid #dee2e6;
    cursor: pointer; font-size: 13px; font-weight: 600;
    background: white; color: #555; transition: all .2s;
}
.iva-pill.on { background: #e63946; color: white; border-color: #e63946; }

.summary-box {
    background: white; border-radius: 14px; padding: 22px;
    box-shadow: 0 1px 4px rgba(0,0,0,.07); position: sticky; top: 20px;
}
.quote-badge {
    background: #1d3557; color: white;
    border-radius: 10px; padding: 14px 16px; margin-bottom: 16px;
}
.sum-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 5px 0; font-size: 14px; color: #555;
}
.sum-row.grand {
    font-size: 19px; font-weight: 800; color: #e63946;
    padding-top: 14px; margin-top: 8px; border-top: 2px solid #f1f3f5;
}

.item-grid {
    display: grid;
    grid-template-columns: 78px 1fr 76px 106px 110px 36px;
    gap: 8px; align-items: center;
}
.col-label { font-size: 11px; font-weight: 700; color: #aaa; text-transform: uppercase; }
.item-card {
    border: 1px solid #e9ecef; border-radius: 10px;
    padding: 12px; margin-bottom: 10px; background: #fafafa;
}

.topbar {
    background: white; padding: 12px 28px;
    display: flex; align-items: center; justify-content: space-between;
    box-shadow: 0 1px 4px rgba(0,0,0,.08); position: sticky; top: 0; z-index: 200;
}

.main-layout {
    max-width: 1300px; margin: 0 auto; padding: 22px 20px;
    display: grid; grid-template-columns: 1fr 330px;
    gap: 20px; align-items: start;
}

@media (max-width: 900px) {
    .main-layout { grid-template-columns: 1fr; }
    .summary-box { position: static; }
    .item-grid { grid-template-columns: 60px 1fr 60px 90px 90px 36px; }
}
