:root {
  --bg: #eef4f7;
  --ink: #10202f;
  --muted: #637083;
  --line: rgba(16, 32, 47, 0.12);
  --panel: rgba(255, 255, 255, 0.78);
  --white: #ffffff;
  --teal: #0f766e;
  --blue: #2563eb;
  --lime: #d9f99d;
  --danger: #b42318;
  --shadow: 0 24px 70px rgba(23, 39, 58, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 8% 6%, rgba(15, 118, 110, 0.22), transparent 28rem),
    radial-gradient(circle at 86% 14%, rgba(37, 99, 235, 0.14), transparent 25rem),
    linear-gradient(135deg, #eef4f7 0%, #f8fbfc 48%, #e8f1f5 100%);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

.app {
  min-height: 100vh;
}

.is-hidden {
  display: none !important;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(100%, 440px);
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  animation: riseIn 520ms ease both;
}

.demo-badge,
.demo-label {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 20px;
  padding: 7px 10px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 999px;
  color: var(--teal);
  background: rgba(217, 249, 157, 0.34);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.logo-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.logo-lockup p {
  margin: 0;
  font-weight: 900;
}

.logo-lockup span {
  color: var(--muted);
  font-size: 0.88rem;
}

.logo {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  filter: drop-shadow(0 12px 20px rgba(37, 99, 235, 0.18));
}

.logo.small {
  width: 42px;
  height: 42px;
}

.compact {
  margin-bottom: 34px;
}

.login-card h1,
.topbar h1 {
  margin: 0;
  font-size: clamp(1.75rem, 3.5vw, 2.45rem);
  line-height: 1.05;
}

.intro {
  margin: 12px 0 24px;
  color: var(--muted);
  line-height: 1.6;
}

.login-form,
.mini-form {
  display: grid;
  gap: 10px;
}

label {
  font-size: 0.86rem;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus,
select:focus {
  border-color: rgba(37, 99, 235, 0.72);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.password-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.password-field button,
.panel-heading button,
.menu-button {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 13px;
  color: var(--ink);
  background: var(--white);
  font-weight: 800;
}

.hint {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.form-error {
  min-height: 20px;
  margin: 0;
  color: var(--danger);
  font-size: 0.9rem;
  font-weight: 800;
}

.primary-action,
.secondary-action {
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  padding: 0 18px;
  font-weight: 900;
}

.primary-action {
  color: var(--white);
  background: linear-gradient(135deg, var(--teal), var(--blue));
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.18);
}

.primary-action:hover {
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.24);
}

.secondary-action {
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--white);
}

.secondary-action:hover,
.password-field button:hover,
.panel-heading button:hover,
.menu-button:hover {
  border-color: rgba(37, 99, 235, 0.22);
  background: #f8fbfc;
}

.dashboard {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px;
  border-right: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.64);
  backdrop-filter: blur(18px);
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-list a {
  padding: 13px 14px;
  border-radius: 14px;
  color: var(--muted);
  font-weight: 850;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-list a:hover,
.nav-list a.active {
  color: var(--ink);
  background: rgba(37, 99, 235, 0.1);
  transform: translateX(2px);
}

.main-panel {
  min-width: 0;
  padding: clamp(18px, 3vw, 32px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.topbar .demo-label {
  margin: 0 0 8px;
}

.menu-button {
  display: none;
  min-height: 42px;
}

.balance-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
  padding: clamp(22px, 4vw, 40px);
  border-radius: 24px;
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.96), rgba(37, 99, 235, 0.95)),
    #123;
  box-shadow: var(--shadow);
  animation: riseIn 520ms ease both;
}

.balance-hero p,
.balance-hero h2 {
  margin: 0;
}

.balance-hero p {
  opacity: 0.8;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.balance-hero h2 {
  margin-top: 8px;
  font-size: clamp(1.6rem, 4vw, 3rem);
}

.balance-hero strong {
  font-size: clamp(2rem, 6vw, 4.5rem);
  line-height: 1;
  white-space: nowrap;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.summary-grid article,
.panel {
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 18px 45px rgba(23, 39, 58, 0.08);
  backdrop-filter: blur(16px);
}

.summary-grid article {
  display: grid;
  gap: 8px;
  padding: 20px;
  animation: riseIn 560ms ease both;
}

.summary-grid span,
.summary-grid small {
  color: var(--muted);
}

.summary-grid strong {
  font-size: 1.45rem;
}

.content-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 16px;
}

.panel {
  padding: 20px;
}

.transactions-panel {
  grid-row: span 2;
}

.panel h2 {
  margin: 0;
  font-size: 1.05rem;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.panel-heading button {
  min-height: 36px;
}

.transaction-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.transaction-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
}

.transaction-list span {
  display: block;
  font-weight: 850;
}

.transaction-list small {
  color: var(--muted);
}

.transaction-list strong.negative {
  color: #9f1239;
}

.transaction-list strong.positive {
  color: #047857;
}

.bank-card {
  display: grid;
  min-height: 205px;
  align-content: space-between;
  padding: 22px;
  border-radius: 20px;
  color: var(--white);
  background:
    radial-gradient(circle at 88% 16%, rgba(217, 249, 157, 0.42), transparent 12rem),
    linear-gradient(135deg, #172033, #0f766e 58%, #2563eb);
  box-shadow: 0 18px 42px rgba(15, 118, 110, 0.18);
}

.bank-card span,
.bank-card small {
  opacity: 0.82;
}

.bank-card strong {
  font-size: 1.2rem;
}

.bank-card p {
  margin: 0;
  font-size: 1.3rem;
}

.panel,
.summary-grid article,
.bank-card {
  overflow: hidden;
}

.mini-form {
  margin-top: 18px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  transform: translateY(24px);
  max-width: min(360px, calc(100vw - 40px));
  padding: 14px 16px;
  border-radius: 16px;
  color: var(--white);
  background: #10202f;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 920px) {
  .dashboard {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    z-index: 5;
    width: min(300px, 86vw);
    box-shadow: 20px 0 50px rgba(23, 39, 58, 0.18);
    transform: translateX(-105%);
    transition: transform 200ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .menu-button {
    display: inline-flex;
    align-items: center;
  }

  .summary-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .transactions-panel {
    grid-row: auto;
  }
}

@media (max-width: 640px) {
  .login-screen,
  .main-panel {
    padding: 14px;
  }

  .login-card {
    padding: 20px;
    border-radius: 20px;
  }

  .topbar,
  .balance-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .secondary-action {
    width: 100%;
  }

  .balance-hero strong {
    white-space: normal;
  }

  .password-field {
    grid-template-columns: 1fr;
  }

  .password-field button {
    min-height: 44px;
  }

  .transaction-list li {
    align-items: flex-start;
    flex-direction: column;
  }
}
