:root {
  --bg: #f5f7f9;
  --panel: #ffffff;
  --panel-strong: #f9fbfc;
  --ink: #18202b;
  --muted: #667085;
  --line: #d9e0e8;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --green: #15803d;
  --orange: #c2410c;
  --red: #b42318;
  --shadow: 0 18px 44px rgba(24, 32, 43, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.app-shell {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: #111827;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  padding: 22px 18px;
  gap: 24px;
}

.brand {
  align-items: center;
  color: inherit;
  display: flex;
  gap: 12px;
  min-height: 52px;
  text-decoration: none;
}

.brand img {
  background: #ffffff;
  border-radius: 8px;
  height: 42px;
  object-fit: contain;
  padding: 4px;
  width: 42px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
  line-height: 1.2;
}

.brand small {
  color: #b7c2d0;
  font-size: 12px;
  margin-top: 3px;
}

.nav-tabs {
  display: grid;
  gap: 8px;
}

.nav-tab {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #d7dee8;
  display: flex;
  gap: 10px;
  min-height: 44px;
  padding: 10px;
  text-align: left;
}

.nav-tab:hover,
.nav-tab.active {
  background: #1f2937;
  border-color: #354154;
  color: #ffffff;
}

.tab-icon {
  align-items: center;
  background: #273449;
  border-radius: 6px;
  color: #ffffff;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.sidebar-footer {
  color: #b7c2d0;
  display: grid;
  font-size: 12px;
  gap: 8px;
  margin-top: auto;
}

.status-dot::before {
  background: #22c55e;
  border-radius: 999px;
  content: "";
  display: inline-block;
  height: 8px;
  margin-right: 8px;
  width: 8px;
}

.workspace {
  min-width: 0;
  padding: 26px;
}

.topbar {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.eyebrow {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  margin: 0 0 4px;
  text-transform: uppercase;
}

h1,
h2 {
  letter-spacing: 0;
  margin: 0;
}

h1 {
  font-size: 30px;
}

h2 {
  font-size: 18px;
}

.top-actions,
.section-toolbar,
.search-box {
  align-items: center;
  display: flex;
  gap: 10px;
}

.primary-button,
.ghost-button,
.icon-button {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-weight: 750;
  justify-content: center;
  min-height: 40px;
  text-decoration: none;
}

.primary-button {
  background: var(--blue);
  border: 1px solid var(--blue);
  color: #ffffff;
  padding: 0 16px;
}

.primary-button:hover {
  background: var(--blue-dark);
}

.ghost-button {
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0 14px;
}

.ghost-button:hover {
  border-color: #a7b3c3;
}

.link-button {
  white-space: nowrap;
}

.compact {
  min-height: 34px;
  padding: 0 12px;
}

.icon-button {
  background: #f1f5f9;
  border: 1px solid #d8e0ea;
  color: #526173;
  height: 34px;
  padding: 0;
  width: 34px;
}

.stats-row {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 18px;
}

.metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-height: 88px;
  padding: 16px;
}

.metric span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-bottom: 8px;
}

.metric strong {
  font-size: 24px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.quote-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
}

.work-panel,
.summary-panel,
.table-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.work-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.panel-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

label {
  color: #344054;
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 7px;
}

.full-label {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  background: #ffffff;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  color: var(--ink);
  min-height: 40px;
  padding: 9px 10px;
  width: 100%;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  outline: none;
}

.summary-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  position: sticky;
  top: 18px;
}

.price-card {
  background: #132033;
  border-radius: 8px;
  color: #ffffff;
  display: grid;
  min-height: 150px;
  padding: 18px;
}

.price-card span,
.price-card small {
  color: #cbd5e1;
}

.price-card strong {
  align-self: center;
  font-size: 34px;
}

.breakdown {
  display: grid;
  gap: 10px;
}

.breakdown-row,
.quote-meta {
  align-items: center;
  border-bottom: 1px solid #e7edf4;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 34px;
}

.breakdown-row:last-child {
  border-bottom: 0;
}

.breakdown-row span,
.quote-meta span {
  color: var(--muted);
  font-size: 13px;
}

.breakdown-row strong {
  font-size: 14px;
}

.quote-meta {
  border-bottom: 0;
  display: grid;
  gap: 8px;
}

.section-toolbar {
  justify-content: space-between;
  margin-bottom: 14px;
}

.toolbar-actions,
.sync-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.product-thumb {
  align-items: center;
  background: #eef4ff;
  border: 1px solid #d6e2f3;
  border-radius: 10px;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  height: 52px;
  justify-content: center;
  object-fit: cover;
  width: 52px;
}

.product-thumb.placeholder {
  background: linear-gradient(135deg, rgba(61, 124, 255, 0.12), rgba(25, 201, 145, 0.12));
}

.file-input {
  display: none;
}

.file-button {
  font-size: 13px;
}

.search-box {
  flex: 1;
}

.search-box input {
  max-width: 360px;
}

.search-box select {
  max-width: 210px;
}

.table-wrap {
  overflow: auto;
}

table {
  border-collapse: collapse;
  min-width: 720px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid #e8eef5;
  padding: 12px;
  text-align: left;
  vertical-align: middle;
}

th {
  background: var(--panel-strong);
  color: #536174;
  font-size: 12px;
  text-transform: uppercase;
}

td {
  font-size: 14px;
}

.row-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.chip {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  min-height: 26px;
  padding: 0 9px;
}

.chip.draft {
  background: #eef2f6;
  color: #475467;
}

.chip.sent {
  background: #dbeafe;
  color: #1d4ed8;
}

.chip.approved,
.chip.done,
.chip.active,
.chip.ready,
.chip.completed {
  background: #dcfce7;
  color: var(--green);
}

.chip.rejected,
.chip.inactive,
.chip.cancelled {
  background: #fee2e2;
  color: var(--red);
}

.management-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 390px minmax(0, 1fr);
  align-items: start;
}

.management-grid.product-grid {
  grid-template-columns: 360px minmax(0, 1fr);
}

.wide-table {
  min-width: 960px;
}

.integration-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(280px, 0.8fr) minmax(420px, 1.2fr);
  margin-bottom: 18px;
}

.integration-card {
  align-content: start;
}

.detail-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.detail-list div {
  border-bottom: 1px solid #e7edf4;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding-bottom: 10px;
}

.detail-list dt {
  color: var(--muted);
  font-size: 13px;
}

.detail-list dd {
  font-size: 13px;
  font-weight: 800;
  margin: 0;
  text-align: right;
}

.copy {
  line-height: 1.55;
  margin: 8px 0 0;
}

.notice {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #9a3412;
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
  padding: 12px;
}

.notice:empty {
  display: none;
}

.csv-help {
  margin-top: 0;
}

.check-row {
  align-items: center;
  display: flex;
  gap: 10px;
}

.check-row input {
  min-height: auto;
  width: auto;
}

.swatch {
  border: 1px solid #d0d7e2;
  border-radius: 999px;
  display: inline-block;
  height: 14px;
  margin-right: 8px;
  vertical-align: -2px;
  width: 14px;
}

.toast {
  background: #111827;
  border-radius: 8px;
  bottom: 20px;
  box-shadow: var(--shadow);
  color: #ffffff;
  left: 50%;
  max-width: min(520px, calc(100% - 32px));
  opacity: 0;
  padding: 12px 14px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 16px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 20;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .nav-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .stats-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nav-tab {
    justify-content: center;
  }

  .nav-tab .tab-icon {
    display: none;
  }

  .quote-grid,
  .management-grid,
  .management-grid.product-grid,
  .integration-grid,
  .form-grid.three {
    grid-template-columns: 1fr;
  }

  .summary-panel {
    position: static;
  }
}

@media (max-width: 680px) {
  .workspace,
  .sidebar {
    padding: 16px;
  }

  .topbar,
  .section-toolbar,
  .search-box {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .stats-row,
  .form-grid.two {
    grid-template-columns: 1fr;
  }

  .nav-tabs {
    grid-template-columns: 1fr 1fr;
  }

  .metric {
    min-height: 78px;
  }

  h1 {
    font-size: 25px;
  }
}

.session-actions {
  align-items: center;
  display: flex;
  gap: 12px;
  margin-left: auto;
}

.session-actions span,
.session-actions strong,
.session-actions small {
  display: block;
  text-align: right;
}

.session-actions small {
  color: var(--muted);
  margin-top: 2px;
}

.sales-layout {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.history-stack {
  display: grid;
  gap: 18px;
}

.muted-note {
  color: var(--muted);
  font-size: 13px;
  margin: 12px 0 0;
}

.sale-add-row {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 2fr) minmax(100px, .5fr) minmax(130px, .7fr) auto;
  margin: 18px 0;
}

.compact-table {
  margin-bottom: 18px;
}

.sale-totals-input {
  align-items: start;
}

.sale-total-card {
  align-items: flex-end;
  background: linear-gradient(145deg, rgba(25, 201, 145, 0.13), rgba(57, 116, 255, 0.1));
  border: 1px solid rgba(25, 201, 145, 0.25);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  margin: 17px 0;
  padding: 18px;
}

.sale-total-card span,
.sale-total-card small { color: var(--muted); }
.sale-total-card strong { color: var(--green); font-size: 30px; margin: 4px 0; }
.sale-submit { width: 100%; }
.payment-management { margin-top: 18px; }
td small { color: var(--muted); display: block; margin-top: 3px; }

.check-label {
  align-items: center;
  display: flex;
  gap: 9px;
  margin: 14px 0;
}

.check-label input[type="checkbox"] {
  accent-color: var(--blue);
  height: 18px;
  margin: 0;
  min-height: 18px;
  padding: 0;
  width: 18px;
}

.login-page {
  background:
    linear-gradient(90deg, rgba(5, 9, 19, .05), rgba(5, 9, 19, .08) 45%, rgba(5, 9, 19, .28)),
    url("/assets/fg-login-bg.png") center / cover no-repeat,
    #050913;
  min-height: 100vh;
}

.login-shell {
  align-items: center;
  display: flex;
  justify-content: flex-end;
  margin: 0 auto;
  min-height: 100vh;
  max-width: 1070px;
  padding: 40px 24px;
}

.login-copy {
  display: none;
}

.login-copy h1 {
  font-size: clamp(44px, 7vw, 76px);
  margin: 10px 0;
}

.login-copy > p {
  color: #9ba9bd;
  font-size: 19px;
  line-height: 1.6;
  max-width: 620px;
}

.login-feature {
  border-left: 3px solid var(--green);
  display: grid;
  gap: 5px;
  margin-top: 36px;
  padding: 4px 0 4px 18px;
}

.login-feature span { color: var(--muted); }

.login-card {
  backdrop-filter: blur(14px);
  background: linear-gradient(145deg, rgba(18, 27, 44, .88), rgba(12, 20, 34, .94));
  border: 1px solid #263753;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .4);
  display: grid;
  gap: 18px;
  padding: 30px;
  width: min(430px, 100%);
}

.login-brand { margin-bottom: 8px; }
.login-brand img {
  height: 48px;
  width: 76px;
}
.login-card .primary-button { width: 100%; }
.login-error { color: #ff8295; margin: 0; min-height: 18px; }
.login-security { color: var(--muted); text-align: center; }

@media (max-width: 860px) {
  .login-shell { justify-content: center; max-width: 520px; }
  .sale-add-row { grid-template-columns: 1fr 1fr; }
  .session-actions span { display: none; }
}

@media (max-width: 560px) {
  .sale-add-row { grid-template-columns: 1fr; }
  .session-actions { width: 100%; }
}

.integration-heading {
  align-items: flex-end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}

.integration-heading h2 {
  font-size: 24px;
  margin: 5px 0;
}

.integration-heading p {
  color: var(--muted);
  margin: 0;
}

.security-badge {
  background: rgba(25, 201, 145, 0.09);
  border: 1px solid rgba(25, 201, 145, 0.24);
  border-radius: 999px;
  color: #8ce3c8;
  font-size: 11px;
  font-weight: 750;
  padding: 8px 12px;
}

.marketplace-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

.marketplace-card {
  display: flex;
  flex-direction: column;
  gap: 17px;
  min-height: 390px;
  padding: 20px;
}

.marketplace-brand {
  align-items: center;
  display: grid;
  gap: 11px;
  grid-template-columns: auto 1fr auto;
}

.marketplace-brand h2,
.marketplace-brand small {
  display: block;
  margin: 0;
}

.marketplace-brand small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}

.marketplace-logo {
  align-items: center;
  border-radius: 12px;
  display: inline-flex;
  font-size: 16px;
  font-weight: 900;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.shopee-logo { background: rgba(238, 77, 45, 0.14); color: #ff765d; }
.meli-logo { background: rgba(255, 230, 0, 0.14); color: #ffe554; font-size: 12px; }
.tiktok-logo { background: rgba(37, 244, 238, 0.1); color: #5ef3ee; }

.marketplace-card .notice {
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 9px;
  color: #8390a5;
  flex: 1;
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
  overflow-wrap: anywhere;
  padding: 12px;
}

.marketplace-card .authorize-link {
  display: none;
  width: 100%;
}

.marketplace-card .authorize-link.ready {
  display: inline-flex;
}

.marketplace-card .sync-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.marketplace-card .sync-actions .primary-button {
  grid-column: 1 / -1;
}

.marketplace-card .detail-list {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  margin: 0;
  padding: 8px 0;
}

@media (max-width: 1200px) {
  .marketplace-grid { grid-template-columns: 1fr; }
  .marketplace-card { min-height: auto; }
}

@media (max-width: 680px) {
  .integration-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .marketplace-brand { grid-template-columns: auto 1fr; }
  .marketplace-brand .chip { grid-column: 1 / -1; justify-self: start; }
}

@media print {
  .sidebar,
  .top-actions,
  .stats-row,
  .nav-tabs,
  .section-toolbar,
  .toast {
    display: none !important;
  }

  .app-shell {
    display: block;
  }

  .workspace {
    padding: 0;
  }

  .tab-panel {
    display: none !important;
  }

  #tab-quote {
    display: block !important;
  }

  .work-panel,
  .summary-panel,
  .table-wrap {
    box-shadow: none;
  }
}

/* Painel 2026: identidade propria inspirada no fluxo mapeado no MakerFlow. */
:root {
  --bg: #050913;
  --panel: #101827;
  --panel-strong: #0b1220;
  --ink: #f3f6fb;
  --muted: #8f9bae;
  --line: #223047;
  --blue: #3974ff;
  --blue-dark: #265de2;
  --green: #19c991;
  --orange: #f59e0b;
  --red: #ff647c;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
}

body {
  background:
    radial-gradient(circle at 85% -10%, rgba(39, 93, 226, 0.12), transparent 32%),
    var(--bg);
}

.app-shell {
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  background: #0e1625;
  border-right: 1px solid #1b2940;
  padding: 24px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand img {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(57, 116, 255, 0.35);
}

.brand small,
.sidebar-footer {
  color: var(--muted);
}

.nav-tabs {
  gap: 5px;
}

.nav-tab {
  border-radius: 9px;
  color: #9ca9ba;
  min-height: 43px;
}

.nav-tab:hover,
.nav-tab.active {
  background: color-mix(in srgb, var(--menu-color, #3974ff) 18%, transparent);
  border-color: color-mix(in srgb, var(--menu-color, #3974ff) 42%, transparent);
  color: #e9f0ff;
}

.nav-tab.active {
  box-shadow: inset 3px 0 0 var(--menu-color, var(--blue));
}

.tab-icon {
  background: transparent;
  color: #8390a5;
  font-size: 16px;
}

.nav-tab.active .tab-icon {
  color: var(--menu-color, #5c8bff);
}

.nav-tab .tab-icon {
  color: color-mix(in srgb, var(--menu-color, #8390a5) 72%, #ffffff);
}

.brand img,
.login-brand img {
  object-fit: contain;
}

.menu-settings-panel {
  margin-top: 18px;
}

.menu-editor {
  display: grid;
  gap: 10px;
}

.menu-editor-row {
  align-items: center;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 12px;
  grid-template-columns: 18px minmax(160px, 1fr) 120px 120px;
  padding: 12px;
}

.menu-editor-row label {
  margin: 0;
}

.menu-editor-row input[type="color"] {
  min-height: 40px;
  padding: 4px;
}

.menu-color-dot {
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(15, 23, 42, .08);
  height: 14px;
  width: 14px;
}

.workspace {
  padding: 30px 34px 60px;
}

.topbar {
  margin-bottom: 22px;
}

.eyebrow {
  color: var(--green);
}

h1 {
  font-size: clamp(25px, 2.5vw, 34px);
}

.primary-button {
  background: linear-gradient(135deg, #2870ff, #3d7cff);
  border-color: #4d84ff;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.22);
}

.ghost-button,
.icon-button {
  background: #111a2a;
  border-color: var(--line);
  color: #dce5f2;
}

.ghost-button:hover,
.icon-button:hover {
  background: #17243a;
}

.stats-row {
  grid-template-columns: repeat(5, minmax(130px, 1fr));
}

.metric,
.work-panel,
.summary-panel,
.table-wrap {
  background: linear-gradient(145deg, rgba(18, 27, 44, 0.98), rgba(13, 21, 35, 0.98));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.metric {
  border-radius: 12px;
}

.metric span,
.breakdown-row span,
.quote-meta span {
  color: var(--muted);
}

.calculator-intro {
  align-items: flex-end;
  background: linear-gradient(100deg, rgba(23, 201, 145, 0.08), rgba(57, 116, 255, 0.08));
  border: 1px solid rgba(48, 154, 139, 0.26);
  border-radius: 14px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 20px 22px;
}

.calculator-intro h2 {
  font-size: 22px;
  margin-top: 4px;
}

.calculator-intro p {
  color: var(--muted);
  margin: 7px 0 0;
}

.section-kicker {
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.live-calculation {
  align-items: center;
  color: #9ee9d2;
  display: flex;
  font-size: 12px;
  gap: 8px;
  white-space: nowrap;
}

.live-calculation i {
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(25, 201, 145, 0.12);
  height: 7px;
  width: 7px;
}

.quote-grid {
  align-items: start;
  grid-template-columns: minmax(0, 1fr) 360px;
}

#quoteForm {
  display: grid;
  gap: 16px;
}

.calculator-section {
  padding: 22px;
}

.calculator-section .panel-heading > div {
  align-items: center;
  display: flex;
  gap: 10px;
}

.section-number {
  align-items: center;
  background: rgba(25, 201, 145, 0.1);
  border: 1px solid rgba(25, 201, 145, 0.25);
  border-radius: 7px;
  color: var(--green);
  display: inline-flex;
  font-size: 10px;
  font-weight: 850;
  height: 27px;
  justify-content: center;
  width: 32px;
}

.calculator-section h2 {
  font-size: 16px;
}

.form-grid {
  gap: 15px;
}

label {
  color: #b4c0d1;
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

label small {
  color: #65738a;
  float: right;
  font-size: 10px;
  font-weight: 650;
  text-transform: none;
}

input,
select,
textarea {
  background: #070c16;
  border-color: #25334a;
  color: var(--ink);
  min-height: 45px;
}

input::placeholder,
textarea::placeholder {
  color: #4f5e73;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #3974ff;
  box-shadow: 0 0 0 3px rgba(57, 116, 255, 0.14);
}

.editable-badge {
  background: rgba(57, 116, 255, 0.1);
  border: 1px solid rgba(57, 116, 255, 0.25);
  border-radius: 999px;
  color: #8aabff;
  font-size: 10px;
  font-weight: 800;
  padding: 5px 9px;
  text-transform: uppercase;
}

.margin-control {
  align-items: center;
  background: #080f1c;
  border: 1px solid #21314a;
  border-radius: 12px;
  display: grid;
  gap: 12px 18px;
  grid-template-columns: 1fr auto;
  margin-top: 18px;
  padding: 18px;
}

.margin-control strong,
.margin-control span {
  display: block;
}

.margin-control span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.margin-control output {
  color: var(--green);
  font-size: 24px;
  font-weight: 850;
}

.margin-control input[type="range"] {
  accent-color: var(--green);
  grid-column: 1 / -1;
  min-height: auto;
  padding: 0;
}

.rate-note {
  color: #718098;
  font-size: 11px;
  line-height: 1.5;
  margin: 12px 2px 0;
}

.summary-panel {
  padding: 18px;
  position: sticky;
  top: 24px;
}

.price-card {
  background: linear-gradient(145deg, rgba(25, 201, 145, 0.13), rgba(57, 116, 255, 0.12));
  border: 1px solid rgba(25, 201, 145, 0.28);
  border-radius: 14px;
  padding: 24px 18px;
}

.price-card span,
.price-card small {
  color: #9fb1c6;
}

.price-card strong {
  color: #74e5c3;
  font-size: 36px;
}

.result-grid {
  display: grid;
  gap: 9px;
  grid-template-columns: 1fr 1fr;
  margin: 14px 0 20px;
}

.result-grid > div {
  background: #080f1c;
  border: 1px solid #1d2a40;
  border-radius: 10px;
  padding: 12px;
}

.result-grid span,
.result-grid strong {
  display: block;
}

.result-grid span {
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.result-grid strong {
  font-size: 14px;
}

.result-grid .profit-result strong {
  color: var(--green);
}

.summary-title {
  color: #aab6c8;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.09em;
  margin-bottom: 7px;
  text-transform: uppercase;
}

.breakdown-row {
  border-color: #1d2a40;
  padding: 9px 0;
}

.table-wrap table,
.table-wrap th,
.table-wrap td {
  border-color: var(--line);
}

.table-wrap th {
  color: #8491a5;
}

.toast {
  background: #152238;
  border: 1px solid #2e466b;
  color: #edf4ff;
}

@media (max-width: 1200px) {
  .quote-grid {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
  .form-grid.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stats-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .sidebar {
    height: auto;
    position: static;
  }
  .quote-grid {
    grid-template-columns: 1fr;
  }
  .summary-panel {
    position: static;
  }
}

@media (max-width: 680px) {
  .workspace {
    padding: 18px 14px 42px;
  }
  .calculator-intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }
  .form-grid.three,
  .result-grid {
    grid-template-columns: 1fr;
  }
  .calculator-section {
    padding: 17px;
  }
  .price-card strong {
    font-size: 30px;
  }
}
