:root {
  --rn-primary-50: #eff6ff;
  --rn-primary-100: #dbeafe;
  --rn-primary-200: #bfdbfe;
  --rn-primary-300: #93c5fd;
  --rn-primary-500: #3b82f6;
  --rn-primary-600: #2563eb;
  --rn-primary-700: #1d4ed8;
  --rn-primary-800: #1e3a8a;
  --rn-shell-shadow: 0 28px 70px rgba(15, 23, 42, 0.18);
}

.rn-body {
  background:
    radial-gradient(circle at top, rgba(96, 165, 250, 0.24) 0%, rgba(191, 219, 254, 0) 38%),
    linear-gradient(180deg, #0f172a 0%, #172554 18%, #dbeafe 100%);
}

.rn-shell {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid rgba(191, 219, 254, 0.65);
  box-shadow: var(--rn-shell-shadow);
}

.rn-footer {
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.7) 0%, rgba(255, 255, 255, 0.96) 100%);
}

.rn-page {
  padding: 1rem;
}

@media (min-width: 768px) {
  .rn-page {
    padding: 1.25rem;
  }
}

@media (min-width: 1024px) {
  .rn-page {
    padding: 1.5rem;
  }
}

.rn-app-header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 4.25rem;
  padding: 0.9rem 1.15rem;
  color: #fff;
  background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 52%, #38bdf8 100%);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.18);
}

.rn-app-header::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.08), rgba(255,255,255,0.34), rgba(255,255,255,0.08));
}

.rn-app-header__body {
  flex: 1 1 auto;
  min-width: 0;
}

.rn-app-header__body--center {
  text-align: center;
}

.rn-app-header__eyebrow {
  font-size: 0.68rem;
  line-height: 1.1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.74;
}

.rn-app-header__title {
  margin-top: 0.15rem;
  font-size: 1.05rem;
  line-height: 1.2;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rn-app-header__subtitle {
  margin-top: 0.12rem;
  font-size: 0.72rem;
  line-height: 1.2;
  opacity: 0.84;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rn-app-header__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 0.95rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.rn-app-header__icon:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.rn-app-header__actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.rn-page-note {
  font-size: 0.75rem;
  line-height: 1.55;
  color: #64748b;
}

.rn-panel {
  border: 1px solid rgba(191, 219, 254, 0.88);
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,251,255,0.98) 100%);
  border-radius: 1.65rem;
  padding: 1rem;
  box-shadow: 0 16px 42px rgba(148, 163, 184, 0.12);
}

.rn-panel--soft {
  background: linear-gradient(180deg, rgba(239,246,255,0.92) 0%, rgba(255,255,255,0.98) 100%);
}

.rn-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.rn-section-subtitle {
  margin-top: 0.22rem;
  font-size: 0.76rem;
  line-height: 1.45;
  color: #64748b;
}

.rn-btn-primary,
.rn-btn-secondary,
.rn-btn-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.2;
  transition: all 0.18s ease;
}

.rn-btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 14px 24px rgba(37, 99, 235, 0.2);
}

.rn-btn-primary:hover {
  filter: brightness(0.98);
  transform: translateY(-1px);
}

.rn-btn-secondary {
  color: #0f172a;
  background: #fff;
  border: 1px solid rgba(191, 219, 254, 0.88);
}

.rn-btn-secondary:hover,
.rn-btn-soft:hover {
  background: #f8fbff;
}

.rn-btn-soft {
  color: #1d4ed8;
  background: rgba(239, 246, 255, 0.92);
  border: 1px solid rgba(191, 219, 254, 0.88);
}

.rn-metric-card {
  border: 1px solid rgba(191, 219, 254, 0.88);
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,251,255,0.98) 100%);
  border-radius: 1.5rem;
  padding: 1rem;
  box-shadow: 0 12px 28px rgba(148, 163, 184, 0.12);
}

.rn-metric-card--tint {
  background: linear-gradient(135deg, rgba(239,246,255,0.95) 0%, rgba(219,234,254,0.92) 100%);
}

.rn-input,
.rn-select,
.rn-textarea {
  width: 100%;
  border: 1px solid rgba(191, 219, 254, 0.98);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55);
}

.rn-input:focus,
.rn-select:focus,
.rn-textarea:focus {
  outline: none;
  border-color: rgba(96, 165, 250, 0.98);
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.14);
}

.rn-shell .rounded-2xl.border,
.rn-shell .rounded-3xl.border {
  border-color: rgba(191, 219, 254, 0.75) !important;
}

.bg-emerald-50 { background-color: var(--rn-primary-50) !important; }
.bg-emerald-100 { background-color: var(--rn-primary-100) !important; }
.bg-emerald-500 { background-color: var(--rn-primary-600) !important; }
.bg-emerald-600 { background-color: var(--rn-primary-700) !important; }

.border-emerald-200 { border-color: var(--rn-primary-200) !important; }

.text-emerald-500 { color: var(--rn-primary-500) !important; }
.text-emerald-600 { color: var(--rn-primary-600) !important; }
.text-emerald-700 { color: var(--rn-primary-700) !important; }
.text-emerald-800 { color: var(--rn-primary-800) !important; }

.from-emerald-500 {
  --tw-gradient-from: var(--rn-primary-600) var(--tw-gradient-from-position) !important;
  --tw-gradient-to: rgb(37 99 235 / 0) var(--tw-gradient-to-position) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}

.from-emerald-600 {
  --tw-gradient-from: var(--rn-primary-700) var(--tw-gradient-from-position) !important;
  --tw-gradient-to: rgb(29 78 216 / 0) var(--tw-gradient-to-position) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}

.to-emerald-400 {
  --tw-gradient-to: var(--rn-primary-500) var(--tw-gradient-to-position) !important;
}

.to-emerald-500 {
  --tw-gradient-to: var(--rn-primary-600) var(--tw-gradient-to-position) !important;
}

.hover\:bg-emerald-500:hover { background-color: var(--rn-primary-600) !important; }
.hover\:bg-emerald-600:hover { background-color: var(--rn-primary-700) !important; }
.hover\:bg-emerald-700:hover { background-color: var(--rn-primary-800) !important; }

.focus\:ring-emerald-300:focus {
  --tw-ring-color: rgba(96, 165, 250, 0.38) !important;
}

.accent-emerald-500 {
  accent-color: var(--rn-primary-600) !important;
}

/* Make printing cleaner for Tailwind UI */
@media print {
  body { background: #fff !important; }
  .shadow, .shadow-sm, .shadow-md, .shadow-lg, .shadow-xl, .shadow-2xl { box-shadow: none !important; }
}

.rn-fit {
  display: block;
  max-width: 100%;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.rn-statement-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.rn-statement-label {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.35;
  word-break: break-word;
}

.rn-statement-amount {
  flex: 0 0 auto;
  min-width: 82px;
  max-width: 46%;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.rn-table-compact {
  width: 100%;
  table-layout: fixed;
}

.rn-table-compact td:first-child {
  width: 68%;
  padding-right: 10px;
  word-break: break-word;
}

.rn-table-compact td:last-child {
  width: 32%;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
  .rn-page {
    padding: 0.9rem;
  }

  .rn-app-header {
    min-height: 4rem;
    padding: 0.8rem 0.95rem;
    gap: 0.7rem;
  }

  .rn-app-header__title {
    font-size: 0.98rem;
  }

  .rn-app-header__subtitle {
    font-size: 0.68rem;
  }

  .rn-app-header__icon {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.85rem;
  }

  .rn-panel,
  .rn-metric-card {
    padding: 0.95rem;
    border-radius: 1.45rem;
  }

  .rn-btn-primary,
  .rn-btn-secondary,
  .rn-btn-soft {
    min-height: 2.85rem;
    padding: 0.78rem 0.92rem;
    font-size: 0.9rem;
  }

  .rn-table-compact {
    font-size: 13px;
  }

  .rn-table-compact td {
    padding-top: 3px;
    padding-bottom: 3px;
  }
}

@media (max-width: 420px) {
  .rn-statement-row {
    gap: 8px;
  }

  .rn-statement-amount {
    min-width: 72px;
    max-width: 44%;
    font-size: 0.92rem;
  }
}
