:root {
  --color-bg: #f4f6f9;
  --color-bg-elevated: #ffffff;
  --color-accent: #1e88e5;
  --color-accent-soft: rgba(30, 136, 229, 0.06);
  --color-accent-secondary: #0d47a1;
  --color-text: #102a43;
  --color-text-muted: #62748a;
  --color-border-subtle: #d8e2ec;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --shadow-soft: 0 22px 60px rgba(15, 23, 42, 0.08);
  --shadow-subtle: 0 0 0 1px rgba(15, 23, 42, 0.02);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  display: block;
}

/* Brand text as image so crawlers don't index the name */
.brand-img {
  height: 1.2em;
  width: auto;
  display: inline-block;
  vertical-align: middle;
}
.top-bar .brand-img {
  filter: brightness(0) invert(1);
  opacity: 0.9;
}
.footer-bottom .brand-img {
  height: 1em;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.top-bar {
  background: #0d47a1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  color: #e3f2fd;
}

.top-bar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.5rem 1.5rem;
  text-align: center;
}

.top-bar-text {
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(224, 242, 254, 0.9);
}

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.logo {
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.logo span {
  color: var(--color-accent);
}

.logo-large {
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
}

.logo-img {
  height: 28px;
  display: block;
}

.logo-img-large {
  height: 60px;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.nav-links a {
  position: relative;
  padding: 0.2rem 0;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.3rem;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-secondary));
  transition: width 0.18s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.88rem;
}

.btn-primary,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-pill);
  font-weight: 550;
  letter-spacing: 0.03em;
  font-size: 0.86rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #1e88e5, #0d47a1);
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.25);
}

.btn-outline {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.7);
  color: var(--color-text);
}

.btn-outline:hover {
  background: #e5effa;
  border-color: rgba(148, 163, 184, 0.9);
}

.btn-outline.small {
  padding: 0.45rem 1.05rem;
  font-size: 0.8rem;
}

.link {
  font-size: 0.86rem;
  color: var(--color-text-muted);
  text-decoration: none;
  position: relative;
}

.link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.25rem;
  width: 0;
  height: 1px;
  background: rgba(148, 163, 184, 0.9);
  transition: width 0.16s ease;
}

.link:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.15rem;
}

.nav-toggle span {
  display: block;
  width: 19px;
  height: 2px;
  margin: 3px 0;
  background: rgba(71, 85, 105, 0.9);
  border-radius: 999px;
}

main {
  flex: 1;
}

.hero {
  max-width: 1120px;
  margin: 2.5rem auto 2.75rem;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.2fr);
  gap: 2.25rem;
  align-items: center;
}

.hero-login {
  grid-template-columns: minmax(0, 2.4fr) minmax(0, 2.1fr) minmax(0, 2.2fr);
  align-items: stretch;
}

.hero-content h1 {
  font-size: clamp(2.1rem, 2.8vw + 1.3rem, 2.8rem);
  margin: 0 0 0.9rem;
  letter-spacing: 0.01em;
}

.hero-content p {
  margin: 0 0 1.1rem;
  max-width: 30rem;
  color: var(--color-text-muted);
  font-size: 0.98rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}

.hero-subtext {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.hero-panel {
  background: radial-gradient(circle at top left, rgba(30, 136, 229, 0.08), transparent 60%),
    radial-gradient(circle at bottom right, rgba(13, 71, 161, 0.06), transparent 65%),
    var(--color-bg-elevated);
  border-radius: 20px;
  padding: 1.6rem 1.5rem 1.3rem;
  border: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-soft);
}

.hero-panel h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.login-form label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.login-form input {
  background: #f8fafc;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  padding: 0.6rem 0.85rem;
  color: var(--color-text);
  font-size: 0.9rem;
  outline: none;
}

.login-form input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px rgba(30, 136, 229, 0.45);
}

.full-width {
  width: 100%;
  margin-top: 0.35rem;
}

.login-links {
  margin-top: 0.55rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
}

.disclaimer-small {
  margin-top: 0.6rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.login-error {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #b91c1c;
}

.secure-login {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.2rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.hero-image {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--color-border-subtle);
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cards-grid {
  max-width: 1120px;
  margin: 0 1.5rem 2.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.4rem;
}

.card {
  background: var(--color-bg-elevated);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.3rem 1.35rem;
  border: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-subtle);
}

.card h2,
.card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.02rem;
}

.card p {
  margin: 0 0 0.7rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.card-list {
  font-size: 0.86rem;
  color: var(--color-text);
  margin-bottom: 0.8rem;
}

.card-list li {
  margin-bottom: 0.2rem;
  padding-left: 0.9rem;
  position: relative;
}

.card-list li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.55rem;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-secondary));
}

.rate-tag {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin: 0 0 0.7rem;
}

.rate-tag .muted {
  opacity: 0.7;
}

.highlight {
  margin: 0 0 2.75rem;
}

.highlight-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.6rem 1.5rem 1.8rem;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at top left, rgba(30, 136, 229, 0.06), transparent 60%),
    radial-gradient(circle at bottom right, rgba(13, 71, 161, 0.06), transparent 60%),
    #ffffff;
  border: 1px solid var(--color-border-subtle);
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.5fr);
  gap: 1.8rem;
  box-shadow: var(--shadow-soft);
}

.highlight-inner h2 {
  margin: 0 0 0.6rem;
}

.highlight-inner p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--color-text-muted);
}

.highlight-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  font-size: 0.8rem;
}

.highlight-stats > div {
  padding: 0.7rem 0.8rem;
  border-radius: var(--radius-md);
  background: #f8fafc;
  border: 1px solid var(--color-border-subtle);
}

.stat-label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.68rem;
  color: var(--color-text-muted);
  margin-bottom: 0.15rem;
}

.stat-value {
  font-size: 0.9rem;
  font-weight: 550;
}

.highlight-list {
  display: grid;
  gap: 0.8rem;
}

.highlight-list h3 {
  margin: 0 0 0.15rem;
  font-size: 0.9rem;
}

.highlight-list p {
  font-size: 0.86rem;
  color: var(--color-text-muted);
}

.page-main {
  max-width: 1120px;
  margin: 2rem auto 2.5rem;
  padding: 0 1.5rem;
}

.page-header h1 {
  margin: 0 0 0.4rem;
  font-size: 1.8rem;
}

.page-header p {
  margin: 0 0 1.5rem;
  max-width: 34rem;
  color: var(--color-text-muted);
  font-size: 0.98rem;
}

.footer {
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  background: #ffffff;
  padding-top: 1.5rem;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem 1.1rem;
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-inner h4 {
  margin: 0 0 0.4rem;
}

.footer-inner p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.footer-columns {
  display: flex;
  gap: 2.4rem;
  font-size: 0.82rem;
}

.footer-columns h5 {
  margin: 0 0 0.3rem;
  font-size: 0.82rem;
}

.footer-columns li {
  margin-bottom: 0.2rem;
  color: var(--color-text-muted);
}

.footer-columns a {
  color: var(--color-text-muted);
}

.footer-bottom {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem 1.4rem;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  font-size: 0.76rem;
  color: var(--color-text-muted);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.dashboard-summary h2 {
  margin-bottom: 0.4rem;
}

.dashboard-balance {
  margin: 0 0 0.5rem;
  font-size: 2rem;
  font-weight: 700;
  color: #0f172a;
}

.dashboard-change {
  margin: 0 0 0.5rem;
  font-weight: 500;
}

.dashboard-change.positive {
  color: #15803d;
}

.dashboard-change.negative {
  color: #b91c1c;
}

.dashboard-main {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.4fr);
  gap: 1.5rem;
}

.chart-card h2 {
  margin-bottom: 0.2rem;
}

.chart-subtitle {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.chart-bars {
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  background: #f8fafc;
  border: 1px solid var(--color-border-subtle);
}

.line-chart {
  width: 100%;
  height: 160px;
}

.line-chart-area {
  fill: url(#lineAreaGradient);
}

.line-chart-path {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 1.8;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.chart-line-legend {
  margin-top: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8rem;
}

.chart-legend-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.chart-legend-label {
  color: var(--color-text-muted);
}

.chart-legend-value {
  font-weight: 600;
}

.chart-legend-axis {
  display: flex;
  justify-content: space-between;
  color: var(--color-text-muted);
  font-size: 0.75rem;
}

.customer-card h2 {
  margin-bottom: 0.85rem;
  font-size: 1.2rem;
}

.customer-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.9rem;
}

.customer-photo {
  width: 60px;
  height: 60px;
  border-radius: 999px;
  object-fit: cover;
}

.customer-name {
  margin: 0;
  font-weight: 700;
  font-size: 1.05rem;
}

.customer-id {
  margin: 0.1rem 0 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.customer-details {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem 1.2rem;
  font-size: 0.95rem;
}

.customer-details div {
  display: flex;
  flex-direction: column;
}

.customer-details dt {
  font-weight: 700;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

.customer-details dd {
  margin: 0;
  font-weight: 700;
  color: #111827;
}

.customer-card {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at top left, rgba(30, 136, 229, 0.12), transparent 55%),
    radial-gradient(circle at bottom right, rgba(13, 71, 161, 0.16), transparent 55%),
    #ffffff;
  border: 1px solid rgba(30, 64, 175, 0.18);
  box-shadow: 0 22px 45px rgba(15, 23, 42, 0.12);
  transform-origin: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.customer-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 0 0, rgba(59, 130, 246, 0.25), transparent 55%);
  opacity: 0;
  transform: translate3d(-20px, -20px, 0);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

.customer-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.18);
  border-color: rgba(30, 64, 175, 0.4);
}

.customer-card:hover::before {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.customer-card-title {
  color: inherit;
  text-decoration: none;
  position: relative;
  padding-bottom: 0.1rem;
}

.customer-card-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-secondary));
  transition: width 0.2s ease;
}

.customer-card:hover .customer-card-title::after {
  width: 60%;
}

.line-chart-path {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 1.8;
  stroke-linejoin: round;
  stroke-linecap: round;
  stroke-dasharray: 260;
  stroke-dashoffset: 260;
  animation: drawLine 1.8s ease-out forwards;
}

@keyframes drawLine {
  to {
    stroke-dashoffset: 0;
  }
}

.customer-page-body {
  background: radial-gradient(circle at top, #e0f2fe 0, #f4f6f9 35%, #e2e8f0 100%);
}

.customer-page {
  animation: fadeInCustomer 0.6s ease-out forwards;
}

.customer-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding: 1.4rem 1.3rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #1e88e5, #0d47a1);
  color: #f9fafb;
  box-shadow: 0 22px 45px rgba(15, 23, 42, 0.3);
  position: relative;
  overflow: hidden;
}

.customer-hero::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 0 0, rgba(191, 219, 254, 0.4), transparent 55%);
  opacity: 0.5;
  pointer-events: none;
}

.customer-hero-main {
  position: relative;
  z-index: 1;
}

.customer-hero-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  opacity: 0.8;
  margin: 0 0 0.25rem;
}

.customer-hero-name {
  margin: 0 0 0.25rem;
  font-size: 1.6rem;
  letter-spacing: 0.08em;
}

.customer-hero-id {
  margin: 0;
  font-size: 0.86rem;
  opacity: 0.9;
}

.customer-hero-balance {
  position: relative;
  z-index: 1;
  text-align: right;
}

.customer-hero-balance-label {
  margin: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.85;
}

.customer-hero-balance-amount {
  margin: 0.15rem 0 0;
  font-size: 1.7rem;
  font-weight: 700;
}

.customer-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.4rem;
}

.customer-detail-card {
  position: relative;
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.3rem 1.3rem;
  border: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-subtle);
  overflow: hidden;
}

.customer-detail-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(30, 136, 229, 0.3), transparent 55%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.customer-detail-card:hover::before {
  opacity: 0.35;
}

.customer-detail-card h2 {
  margin: 0 0 0.7rem;
  font-size: 1.02rem;
}

.customer-detail-rows {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.6rem;
  font-size: 0.9rem;
}

.detail-row {
  display: flex;
  flex-direction: column;
}

.detail-label {
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

.detail-value {
  font-weight: 600;
  color: #111827;
}

.slide-in-up {
  opacity: 0;
  transform: translateY(14px);
  animation: slideInUp 0.6s ease-out forwards;
}

.slide-in-up.delay-1 {
  animation-delay: 0.1s;
}

@keyframes slideInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInCustomer {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-user {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

@media (max-width: 768px) {
  .nav-inner {
    padding-inline: 1.25rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links,
  .nav-actions {
    display: none;
  }

  .nav-links.open,
  .nav-actions.open {
    display: flex;
  }

  .nav-links {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    padding: 0.7rem 1.5rem 0.1rem;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  }

  .nav-actions {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 2.7rem);
    padding: 0.4rem 1.5rem 0.7rem;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  }

  .hero,
  .hero-login {
    grid-template-columns: 1fr;
    margin-top: 2rem;
  }

  .hero-panel {
    order: 0;
  }

  .hero-image {
    order: -1;
    height: 180px;
  }

  .cards-grid {
    margin-inline: 1.25rem;
  }

  .highlight-inner {
    grid-template-columns: 1fr;
  }

  .highlight-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-main {
    margin-top: 1.6rem;
  }

  .footer-inner {
    flex-direction: column;
  }

  .footer-columns {
    gap: 1.5rem;
  }

  .dashboard-main {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero,
  .hero-login {
    margin-top: 1.6rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .highlight-stats {
    grid-template-columns: 1fr;
  }

  .footer-columns {
    flex-direction: column;
  }
}

