* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0f172a;
  color: #f9fafb;
}

.app-header {
  position: relative;
  padding: 1rem 1.25rem 0.75rem;
  background: #0f172a;
  border-bottom: 1px solid #1f2937;
}

/* containerul cu titlu + subtitlu */
.brand-header {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.brand-header h1 {
  margin: 0;
  font-size: 1.6rem;
}

.subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: #9ca3af;
}

/* buton donații sus-dreapta, peste header */
.donate-top-btn {
  position: absolute;
  top: 0.9rem;
  right: 1.25rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid #0d9488;
  background: transparent;
  color: #f9fafb;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.donate-top-btn:hover {
  background: #0d9488;
}

/* pe ecrane foarte mici micșorăm un pic textul butonului */
@media (max-width: 480px) {
  .donate-top-btn {
    font-size: 0.75rem;
    padding: 0.3rem 0.7rem;
  }
}


.ad-card {
  padding-top: 0.3rem;
  padding-bottom: 0.3rem;
}



main {
  padding: 1rem 1rem 4.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.card {
  background: #020617;
  border-radius: 0.9rem;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid #1f2937;
}

.card h2, .card h3 {
  margin-top: 0;
}

.btn {
  display: inline-block;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  text-align: center;
}

.btn.primary {
  background: #0d9488;
  color: white;
}

.btn.primary:hover {
  background: #0f766e;
}

.btn.secondary {
  background: #111827;
  color: #e5e7eb;
  border: 1px solid #1f2937;
}

.btn.secondary:hover {
  background: #020617;
}

.btn.full-width {
  width: 100%;
}

.form {
  background: #020617;
  border-radius: 0.9rem;
  padding: 1rem;
  border: 1px solid #1f2937;
  margin-bottom: 1rem;
}

fieldset {
  border: 1px solid #1f2937;
  border-radius: 0.8rem;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
}

legend {
  padding: 0 0.25rem;
  font-size: 0.9rem;
  color: #9ca3af;
}

label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

input[type="number"] {
  width: 100%;
  padding: 0.4rem 0.5rem;
  border-radius: 0.6rem;
  border: 1px solid #1f2937;
  background: #020617;
  color: #f9fafb;
  margin-top: 0.25rem;
}

input[type="number"]:focus {
  outline: 2px solid #0d9488;
  border-color: #0d9488;
}

.result {
  background: #020617;
  border-radius: 0.9rem;
  padding: 1rem;
  border: 1px solid #1f2937;
  margin-bottom: 1rem;
}

.result.hidden {
  display: none;
}

.status {
  font-weight: 600;
  margin-top: 0.5rem;
}

.hint {
  font-size: 0.85rem;
  color: #9ca3af;
  margin-top: 0.5rem;
}

.info {
  font-size: 0.9rem;
  color: #9ca3af;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.tab-btn {
  flex: 1;
  padding: 0.5rem;
  border-radius: 999px;
  border: 1px solid #1f2937;
  background: #020617;
  color: #e5e7eb;
  cursor: pointer;
  font-size: 0.9rem;
}

.tab-btn.tab-active {
  background: #0d9488;
  border-color: #0d9488;
}

.tab {
  display: none;
}

.tab.active {
  display: block;
}

/* Bottom nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #020617;
  border-top: 1px solid #1f2937;
  display: flex;
  justify-content: space-around;
  padding: 0.4rem 0.3rem;
  z-index: 10;
}

.bottom-nav .nav-btn {
  flex: 1;
  margin: 0 0.2rem;
  padding: 0.4rem 0.3rem;
  font-size: 0.85rem;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: #e5e7eb;
  cursor: pointer;
}

.bottom-nav .nav-btn.nav-active {
  background: #0d9488;
  color: white;
}

/* Layout pentru ecrane mai mari */
@media (min-width: 768px) {
  body {
    background: radial-gradient(circle at top, #0f172a, #020617);
  }

  .app-header {
    text-align: center;
  }
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-top: 0.5rem;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.table th,
.table td {
  border: 1px solid #1f2937;
  padding: 0.35rem 0.4rem;
  text-align: right;
}

.table th:first-child,
.table td:first-child {
  text-align: left;
}

.table th {
  background: #020617;
  color: #e5e7eb;
}

.chart-wrapper {
  position: relative;
  width: 100%;
  height: 240px;
  margin-top: 0.75rem;
}

.loan-summary p {
  margin: 0.2rem 0;
  font-size: 0.9rem;
}

.loan-summary strong {
  font-weight: 600;
}

.brand-logo {
  height: 50px;
}



.link-card {
  box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}




.links-badges {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.badge-link {
  display: inline-block;
  background: #0f766e;
  color: #e5e7eb;
  padding: 0.55rem 1rem;
  border-radius: 12px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: 0.2s ease;
}

.badge-link:hover {
  background: #14b8a6;
  color: #000;
}




