:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #192036;
  background: #f4f6fb;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at top left, #eef2ff 0, transparent 32%), #f5f7fb; }
button, input, select { font: inherit; }
.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 48px 0 64px; }
.hero { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 30px; }
.brand-mark { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; color: white; font-size: 28px; background: linear-gradient(145deg, #6f77f7, #5a39d8); box-shadow: 0 14px 30px #6758e340; }
.eyebrow { margin: 0 0 5px; color: #6962d9; font-size: 12px; letter-spacing: .14em; font-weight: 800; }
h1 { margin: 0; font-size: clamp(32px, 5vw, 48px); letter-spacing: -.04em; }
.intro { margin: 9px 0 0; color: #667085; max-width: 680px; font-size: 17px; line-height: 1.55; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr); gap: 22px; align-items: start; }
.panel { border: 1px solid #e2e6ef; border-radius: 22px; background: #fff; box-shadow: 0 18px 50px #27345a12; }
.controls { padding: 28px; }
.section-heading { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.section-heading.compact { margin-top: 30px; }
.section-heading > span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #eeedff; color: #5f55d7; font-size: 12px; font-weight: 800; }
.section-heading h2, .preview-header h2 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.section-heading p { margin: 3px 0 0; font-size: 13px; color: #7a8294; }
.upload-card { position: relative; min-height: 92px; display: flex; gap: 15px; align-items: center; margin-bottom: 24px; padding: 18px; border: 1.5px dashed #b7bce8; border-radius: 16px; background: #fafaff; cursor: pointer; transition: .18s ease; }
.upload-card:hover { border-color: #645be0; background: #f7f6ff; transform: translateY(-1px); }
.upload-card input { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.upload-card strong, .upload-card small { display: block; }
.upload-card small { margin-top: 4px; color: #7d8495; }
.upload-icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: white; border: 1px solid #e2e3f5; color: #635ad8; font-size: 22px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label > span { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 750; color: #4c566f; }
input, select { width: 100%; height: 46px; padding: 0 13px; border: 1px solid #dce1eb; border-radius: 11px; background: #fff; color: #1e263c; outline: none; transition: .15s; }
input:focus, select:focus { border-color: #6b63df; box-shadow: 0 0 0 4px #7069dd18; }
.suffix { position: relative; }
.suffix input { padding-right: 38px; }
.suffix b { position: absolute; right: 14px; top: 13px; color: #7b8190; }
.actions { display: flex; gap: 11px; margin-top: 28px; }
button { border: 0; height: 48px; padding: 0 20px; border-radius: 12px; font-weight: 800; cursor: pointer; transition: .16s ease; }
button:disabled { opacity: .6; cursor: wait; }
.primary { flex: 1; color: white; background: linear-gradient(135deg, #6a63e6, #5147c8); box-shadow: 0 10px 20px #5b52d62b; }
.secondary { color: #5149c3; background: #efefff; }
button:hover:not(:disabled) { transform: translateY(-1px); }
.status { min-height: 20px; margin: 12px 0 0; color: #657087; font-size: 13px; }
.status.error { color: #c23a52; }
.preview-panel { overflow: hidden; position: sticky; top: 24px; }
.preview-header { padding: 24px; display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid #e9ecf2; }
.pill { padding: 7px 10px; border-radius: 999px; color: #636b7c; background: #f1f3f7; font-size: 11px; font-weight: 800; }
.empty-state { padding: 76px 40px 84px; text-align: center; color: #7c8394; }
.empty-state div { width: 54px; height: 54px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; color: #746be1; background: #f1f0ff; font-size: 25px; }
.empty-state h3 { margin: 0; color: #384158; font-size: 16px; }
.empty-state p { margin: 8px auto 0; max-width: 300px; font-size: 13px; line-height: 1.55; }
.hidden { display: none; }
.table-wrap { padding: 8px 18px 18px; }
table { width: 100%; border-collapse: collapse; }
th { padding: 13px 8px; text-align: left; color: #8a91a1; font-size: 10px; letter-spacing: .09em; text-transform: uppercase; }
td { padding: 14px 8px; border-top: 1px solid #edf0f4; font-size: 13px; }
td:first-child { color: #6259d5; font-weight: 800; }
td:nth-child(2) { font-weight: 750; }
td:last-child, th:last-child { text-align: right; }
.totals { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding: 17px 9px 5px; border-top: 1px solid #dfe3ea; }
.totals span { color: #747c8e; font-size: 12px; font-weight: 700; }
.totals strong { font-size: 19px; }

@media (max-width: 880px) {
  .workspace { grid-template-columns: 1fr; }
  .preview-panel { position: static; }
}
@media (max-width: 560px) {
  .shell { width: min(100% - 22px, 1180px); padding-top: 26px; }
  .field-grid { grid-template-columns: 1fr; }
  .actions { flex-direction: column; }
  .controls { padding: 21px; }
}
