:root {
  --bg: #0b0b0d;
  --text: #f7f7fb;
  --muted: #b9b9c6;
  --line: rgba(255, 255, 255, 0.08);

  --red: #e30613;
  --red2: #ff2333;
  --white: #ffffff;

  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    Helvetica,
    sans-serif;
  background:
    radial-gradient(
      1100px 600px at 10% -10%,
      rgba(227, 6, 19, 0.28),
      transparent 55%
    ),
    radial-gradient(
      900px 540px at 90% 10%,
      rgba(227, 6, 19, 0.18),
      transparent 50%
    ),
    linear-gradient(180deg, #070708 0%, var(--bg) 100%);
  color: var(--text);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10, 10, 12, 0.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-title {
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.2px;
}
.brand-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.top-actions {
  display: flex;
  gap: 10px;
}

.container {
  max-width: 1180px;
  margin: 18px auto 34px;
  padding: 0 16px;
}

.grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 16px;
}
.col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.02)
  );
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.card-title {
  font-weight: 900;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.row {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}
.row.cols-2 {
  grid-template-columns: 1fr 1fr;
}
.row.between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.w-full {
  width: 100%;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.label {
  font-size: 12px;
  color: var(--muted);
}

.input {
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  outline: none;
}
.input:focus {
  border-color: rgba(227, 6, 19, 0.55);
  box-shadow: 0 0 0 4px rgba(227, 6, 19, 0.18);
}

.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
.checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--red);
}

.radio-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.radio {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
  cursor: pointer;
  user-select: none;
}
.radio input {
  width: 16px;
  height: 16px;
  accent-color: var(--red);
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.06s ease,
    filter 0.12s ease;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: linear-gradient(135deg, var(--red), var(--red2));
  color: var(--white);
}
.btn-outline {
  background: transparent;
  border: 1px solid rgba(227, 6, 19, 0.55);
  color: var(--white);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--white);
}
.btn:hover {
  filter: brightness(1.05);
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 14px 0;
}

.mini-title {
  font-weight: 900;
  font-size: 13px;
}
.mini-hint {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.hint-box {
  margin-top: 10px;
  border-radius: 14px;
  border: 1px dashed rgba(227, 6, 19, 0.35);
  background: rgba(227, 6, 19, 0.08);
  padding: 12px;
  color: rgba(255, 255, 255, 0.92);
}
.hint-line {
  margin-top: 6px;
  font-size: 12px;
}
.hint-line.small {
  color: rgba(255, 255, 255, 0.72);
}

.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}
.list-item {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
}
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  cursor: pointer;
}
.icon-btn:hover {
  filter: brightness(1.06);
}

.panel {
  margin-top: 10px;
  padding-top: 6px;
}

.kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
.kpi {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
  padding: 12px;
}
.kpi-label {
  font-size: 12px;
  color: var(--muted);
}
.kpi-value {
  font-size: 18px;
  font-weight: 950;
  margin-top: 6px;
}
.kpi-value.big {
  font-size: 26px;
  color: var(--white);
}

.summary {
  margin-top: 8px;
}
.summary-title {
  font-weight: 900;
  margin-bottom: 8px;
}
.summary-box {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px;
  color: rgba(255, 255, 255, 0.92);
  min-height: 120px;
  font-size: 12px;
  line-height: 1.4;
}

.footer-note {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
}

/* Taxes breakdown */
.tax-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 12px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.tax-name {
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
}
.tax-val {
  font-weight: 900;
  font-size: 12px;
  text-align: right;
}
.tax-muted {
  color: rgba(255, 255, 255, 0.6);
}

/* MOBILE */
@media (max-width: 980px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }
  .top-actions {
    width: 100%;
  }
  .top-actions .btn {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .row.cols-2 {
    grid-template-columns: 1fr;
  }
  .kpis {
    grid-template-columns: 1fr;
  }
  .list-item {
    grid-template-columns: 1fr;
  }
}
