:root {
  color-scheme: light dark;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.5;
  font-size: 16px;
  background: #050913;
  color: #e8ecff;
}

body {
  margin: 0;
  min-height: 100vh;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  padding: 32px 24px;
  background: linear-gradient(160deg, #0d47a1, #1976d2);
  color: #fff;
  display: flex;
  flex-direction: column;
}

.sidebar__title {
  font-size: 1.5rem;
  margin: 0 0 24px;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nav-link {
  padding: 12px 16px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(4px);
}

.nav-link.active {
  background: #fff;
  color: #0d47a1;
  font-weight: 600;
}

.content {
  flex: 1;
  padding: 48px;
  background: #050913;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.content__section {
  display: none;
  max-width: 720px;
}

.content__section.active {
  display: block;
}

.content__section h2 {
  margin-top: 0;
}

#bank.content__section {
  max-width: 100%;
}

#bank {
  background: linear-gradient(160deg, rgba(18, 25, 56, 0.94), #070c1f);
  border-radius: 32px;
  padding: 40px;
  box-shadow: 0 24px 48px rgba(5, 9, 19, 0.65);
  width: 100%;
}

#bank h2 {
  color: #f5f7ff;
  font-size: 1.8rem;
}

#bank p {
  margin-bottom: 0;
  color: #b7c4ff;
}

.country-dashboard {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.country-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
}

.stat-card {
  background: rgba(19, 28, 68, 0.85);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #e4e9ff;
}

.stat-card--accent {
  background: linear-gradient(160deg, #4a55ff, #7a3cf6);
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.stat-card__label {
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0.85;
}

.stat-card__value {
  font-size: 2rem;
  font-weight: 600;
  margin: 4px 0;
}

.stat-card__hint {
  font-size: 0.85rem;
  opacity: 0.7;
}

.stat-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.6px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
}

.stat-card__icon::before {
  content: 'i';
}

.stat-card__icon--globe::before {
  content: 'G';
}

.stat-card__icon--building::before {
  content: 'B';
}

.stat-card__icon--person::before {
  content: 'P';
}

.country-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.country-detail-card {
  background: rgba(17, 24, 55, 0.88);
  border-radius: 24px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 36px rgba(6, 10, 25, 0.45);
}

.country-detail-card__header {
  display: flex;
  align-items: center;
  gap: 18px;
}

.country-detail-card__avatar {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 1px;
  color: #121638;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.country-detail-card__avatar--gb {
  background: linear-gradient(135deg, #f8f8f8, #ffffff);
}

.country-detail-card__avatar--ie {
  background: linear-gradient(135deg, #f3f8ff, #d5f5ff);
}

.country-detail-card__avatar--de {
  background: linear-gradient(135deg, #fff5f5, #ffe1e1);
}

.country-detail-card__meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.country-detail-card__name {
  font-size: 1.15rem;
  font-weight: 600;
  color: #ffffff;
}

.country-detail-card__registry {
  font-size: 0.9rem;
  color: #b5c4ff;
  display: flex;
  gap: 8px;
  align-items: center;
}

.country-detail-card__tag {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.country-detail-card__action {
  font-size: 1.5rem;
  color: #707dff;
}

.country-detail-card__status {
  align-self: flex-start;
  background: rgba(66, 214, 151, 0.16);
  color: #5ae0a1;
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.country-detail-card__status--pending {
  background: rgba(227, 161, 67, 0.22);
  color: #f5bf68;
}

.country-detail-card__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.country-detail-card__metrics div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metric__value {
  font-size: 1.35rem;
  font-weight: 600;
  color: #ffffff;
}

.metric__label {
  font-size: 0.8rem;
  color: #8f9bd7;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.error-banner {
  padding: 18px;
  border-radius: 16px;
  background: rgba(255, 90, 95, 0.14);
  color: #ff9b9e;
  border: 1px solid rgba(255, 90, 95, 0.3);
  font-weight: 600;
}

@media (max-width: 768px) {
  .app-shell {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    flex-direction: row;
    gap: 12px;
    align-items: center;
  }

  .sidebar__nav {
    flex-direction: row;
    gap: 12px;
  }

  .content {
    padding: 24px;
  }

  #bank {
    padding: 28px;
  }

  .country-detail-card__metrics {
    grid-template-columns: repeat(3, minmax(72px, 1fr));
  }
}
