/* Advance Tax Calculator */
.atx-page {
  padding-top: 24px;
  padding-bottom: 48px;
  background: #f4f6f8;
}

.atx-wizard {
  max-width: 960px;
  margin: 0 auto;
}

.atx-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 0;
  background: #fff;
  border-radius: 12px 12px 0 0;
  padding: 0 8px;
}

.atx-tab {
  flex: 1;
  min-width: 120px;
  padding: 14px 12px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}

.atx-tab.is-active {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

.atx-tab.is-done {
  color: #334155;
}

.atx-form,
.atx-summary {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-top: none;
  border-radius: 0 0 12px 12px;
  padding: 28px 32px 32px;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.06);
}

.atx-panel__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}

.atx-panel__actions--end {
  justify-content: flex-end;
}

.atx-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 24px;
}

.atx-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px 24px;
}

.atx-field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 8px;
}

.atx-field--wide {
  grid-column: span 1;
}

.atx-field--full {
  margin-bottom: 24px;
}

.atx-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  font-size: 0.6rem;
  font-weight: 700;
  font-style: normal;
  vertical-align: middle;
  cursor: help;
}

.atx-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
}

.atx-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.atx-input--plain {
  max-width: 100%;
}

.atx-money-input {
  display: flex;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.atx-money-input__sym {
  padding: 10px 10px 10px 12px;
  background: #f8fafc;
  color: #64748b;
  font-weight: 600;
}

.atx-money-input__field {
  flex: 1;
  border: none;
  padding: 10px 12px;
  font-size: 0.95rem;
  font-family: inherit;
  text-align: left;
  min-width: 0;
}

.atx-money-input__field:focus {
  outline: none;
}

.atx-subheading {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin: 28px 0 14px;
}

.atx-repeatable {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.atx-repeat-row {
  display: grid;
  grid-template-columns: 1fr 1fr 140px 36px;
  gap: 12px;
  align-items: end;
}

.atx-repeat-row--biz {
  grid-template-columns: 1fr 140px 36px;
}

.atx-repeat-row--advance {
  grid-template-columns: 180px 1fr 36px;
  max-width: 520px;
}

.atx-row-remove {
  width: 36px;
  height: 42px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff;
  color: #b91c1c;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  margin-bottom: 0;
}

.atx-add-row {
  width: 36px;
  height: 36px;
  margin-top: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  background: #fff;
  color: #2563eb;
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

.atx-link-btn {
  border: none;
  background: none;
  color: #2563eb;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: inherit;
  padding: 8px 0;
}

.atx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 28px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  border: 2px solid #2563eb;
  background: #fff;
  color: #2563eb;
}

.atx-btn--outline:hover {
  background: #eff6ff;
}

.atx-btn--block {
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
  display: flex;
}

/* Summary */
.atx-summary {
  border-radius: 12px;
  border-top: 1px solid #e2e8f0;
}

.atx-summary__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.atx-summary__head h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
}

.atx-regime-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.atx-regime-tab {
  padding: 10px 20px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  color: #64748b;
  cursor: pointer;
}

.atx-regime-tab.is-active {
  background: #fff;
  border-color: #2563eb;
  color: #2563eb;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}

.atx-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 0.72rem;
  font-weight: 700;
}

.atx-summary__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

.atx-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 12px;
  min-height: 220px;
  padding: 20px 12px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fafbfc;
}

.atx-chart-bar {
  flex: 1;
  max-width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.atx-chart-bar__fill {
  width: 100%;
  min-height: 4px;
  border-radius: 6px 6px 0 0;
  transition: height 0.3s ease;
}

.atx-chart-bar__fill--due { background: #93c5fd; }
.atx-chart-bar__fill--payable { background: #3b82f6; }
.atx-chart-bar__fill--paid { background: #86efac; }
.atx-chart-bar__fill--tax { background: #22c55e; }

.atx-chart-bar__label {
  font-size: 0.65rem;
  color: #64748b;
  text-align: center;
  line-height: 1.2;
}

.atx-chart-note {
  margin: 12px 0 0;
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.5;
}

.atx-tip {
  padding: 12px 14px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #166534;
  margin-bottom: 16px;
  line-height: 1.5;
}

.atx-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.atx-stat {
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fafbfc;
}

.atx-stat__label {
  display: block;
  font-size: 0.78rem;
  color: #64748b;
  margin-bottom: 6px;
}

.atx-stat__value {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.atx-stat__value--green {
  color: #16a34a;
}

.atx-stat__meta {
  display: block;
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 4px;
}

.atx-summary-foot {
  margin: 16px 0 0;
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.55;
}

.atx-summary__actions {
  display: flex;
  justify-content: center;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
}

.atx-disclaimer {
  max-width: 960px;
  margin: 20px auto 0;
  text-align: center;
  font-size: 0.8rem;
  color: #64748b;
}

@media (max-width: 768px) {
  .atx-grid-2,
  .atx-grid-3,
  .atx-summary__grid,
  .atx-stat-grid {
    grid-template-columns: 1fr;
  }

  .atx-repeat-row,
  .atx-repeat-row--biz,
  .atx-repeat-row--advance {
    grid-template-columns: 1fr;
  }

  .atx-row-remove {
    width: 100%;
    height: 36px;
  }
}
