.calc-page {
  padding: 40px 0;
  min-height: calc(100vh - var(--header-height));
}

.calc-header {
  text-align: center;
  margin-bottom: 40px;
}

.calc-header h1 {
  color: var(--primary);
  margin-bottom: 8px;
}

.calc-header p {
  color: var(--text-secondary);
}

.calc-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
}

.calc-tab {
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  transition: all 0.2s;
}

.calc-tab.active,
.calc-tab:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.calc-container {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 28px;
  align-items: start;
}

.calc-panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  padding: 28px;
}

.calc-section {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-light);
}

.calc-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.calc-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}

.calc-section-icon {
  width: 36px;
  height: 36px;
  background: var(--primary-soft);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.calc-section-icon svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.calc-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.calc-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.calc-field input,
.calc-field select {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s;
}

.calc-field input:focus,
.calc-field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.calc-results {
  position: sticky;
  top: calc(var(--header-height) + 20px);
}

.calc-result-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
}

.calc-result-header {
  padding: 24px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  text-align: center;
}

.calc-result-header h3 {
  color: white;
  font-family: var(--font-main);
  margin-bottom: 4px;
}

.calc-result-price {
  font-size: 2.8rem;
  font-weight: 700;
  margin-top: 8px;
}

.calc-result-total {
  margin-top: 8px;
  font-size: 1rem;
  opacity: 0.85;
}

.calc-result-body {
  padding: 24px;
}

.calc-breakdown {
  margin-bottom: 20px;
}

.calc-breakdown-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
}

.calc-breakdown-item:last-child {
  border-bottom: none;
}

.calc-breakdown-item .label {
  color: var(--text-secondary);
}

.calc-breakdown-item .value {
  font-weight: 600;
  color: var(--text);
}

.calc-breakdown-item.total {
  border-top: 2px solid var(--primary);
  margin-top: 8px;
  padding-top: 12px;
  font-size: 1rem;
}

.calc-breakdown-item.total .label {
  color: var(--text);
  font-weight: 600;
}

.calc-breakdown-item.total .value {
  color: var(--primary);
  font-size: 1.1rem;
}

.calc-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.calc-stat {
  background: var(--bg);
  padding: 12px;
  border-radius: var(--radius-sm);
  text-align: center;
}

.calc-stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}

.calc-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.calc-formula {
  margin-top: 16px;
  padding: 16px;
  background: var(--primary-soft);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--primary-dark);
  line-height: 1.7;
}

.calc-formula strong {
  display: block;
  margin-bottom: 4px;
}

/* Currency bar */
.currency-bar {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  padding: 14px 20px;
  margin-bottom: 28px;
}

.currency-bar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.currency-bar-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.currency-btn {
  padding: 8px 20px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.85rem;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  transition: all 0.2s;
}

.currency-btn.active {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.currency-btn:hover:not(.active) {
  border-color: var(--primary);
  color: var(--primary);
}

.currency-rate-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.currency-rate-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.currency-rate-input {
  width: 80px;
  padding: 6px 10px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  text-align: center;
  background: var(--bg);
}

.currency-rate-input:focus {
  outline: none;
  border-color: var(--primary);
}

.currency-rate-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Copy button */
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--primary-soft);
  color: var(--primary-dark);
  border: 1px solid var(--primary);
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 12px;
}

.copy-btn:hover {
  background: var(--primary);
  color: white;
}

.copy-btn.copied {
  background: var(--success);
  color: white;
  border-color: var(--success);
}

.copy-btn svg {
  width: 14px;
  height: 14px;
}

@media (max-width: 768px) {
  .currency-bar-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .currency-rate-wrap {
    margin-left: 0;
    justify-content: center;
  }
}
