:root {
  --ink: #262624;
  --ink-soft: #3b3b36;
  --purple: #d18fed;
  --purple-dark: #b97ed8;
  --orange: #ff8031;
  --orange-dark: #e46f25;
  --cream: #fae5cc;
  --paper: #ffffff;
  --card: #ffffff;
  --muted: #5f5f56;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'poppins', 'Segoe UI', sans-serif;
  background-color: var(--paper);
  background-image: url('../img/07.png');
  background-repeat: repeat;
  background-position: top left;
  color: var(--ink);
}

a {
  color: var(--purple);
}

a:hover {
  color: var(--ink);
}

.top-bar,
.title-bar {
  background: var(--ink);
  color: #ffffff;
  border-bottom: 4px solid var(--orange);
}

.title-bar {
  position: sticky;
  top: 0;
  z-index: 1100;
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 1100;
}

.top-bar,
.top-bar .menu,
.top-bar ul,
.top-bar li {
  background: var(--ink);
}

.title-bar-title a,
.top-bar .menu a,
.top-bar .menu-text a {
  color: #ffffff;
}

.top-bar .menu a,
.top-bar .menu-text,
.top-bar .menu-text a {
  font-size: 0.9375rem;
}

.top-bar .menu a:hover {
  color: var(--purple);
}

.top-bar .menu a.is-active {
  background: #ffffff;
  color: var(--ink);
  border-radius: 999px;
}

.top-bar .menu a.is-active:hover {
  color: var(--ink);
}

.app-container {
  padding-top: 2rem;
  padding-bottom: 3rem;
  background-color: var(--card);
}

.login .app-container {
  padding-top: 0;
  padding-bottom: 0;
  margin-bottom: 0;
}

@media screen and (min-width: 1024px) {
  body {
    background: #f7f2e8;
  }

  .top-bar,
  .title-bar {
    width: min(1100px, 92vw);
    margin: 0 auto;
    border-radius: 14px;
  }

  .top-bar {
    border-radius: 0 0 14px 14px;
  }

  .title-bar {
    border-radius: 14px 14px 0 0;
  }

  .app-container {
    width: min(1100px, 92vw);
    margin: 0 auto 3rem;
    background-color: var(--card);
    border: 2px solid var(--cream);
    border-top: 0;
    border-radius: 0 0 18px 18px;
    padding: 2.5rem 3rem 3rem;
    box-shadow: 0 18px 40px rgba(38, 38, 36, 0.12);
  }

  .login .app-container {
    margin-top: 0;
    border-top: 2px solid var(--cream);
    border-radius: 0 0 18px 18px;
    padding-top: 0;
  }
}

h1,
h2,
h3,
.page-title {
  font-family: 'eight', 'poppins', sans-serif;
  font-weight: 400;
  color: var(--ink);
}

.page-title {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}

.login .page-title {
  font-size: 1.5rem;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.page-header .page-title {
  margin-bottom: 0;
}

.page-balance {
  font-size: 0.95rem;
  color: var(--muted);
}

.saldo-amount {
  font-weight: 600;
  color: var(--ink);
}

.saldo-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(46, 163, 93, 0.18);
  color: #1f6a3d;
  font-weight: 600;
}

.card-panel {
  background: var(--card);
  border-radius: 16px;
  border: 2px solid var(--cream);
  box-shadow: 0 12px 30px rgba(38, 38, 36, 0.08);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.panel-title {
  display: inline-block;
  padding: 0.35rem 1rem;
  background: var(--purple);
  color: #ffffff;
  border-radius: 12px 12px 6px 6px;
  margin: calc(-1.9rem - 2px) 0 0.8rem -0.6rem;
  box-shadow: 0 6px 14px rgba(209, 143, 237, 0.28);
}

.panel-title-orange {
  background: var(--orange);
  box-shadow: 0 6px 14px rgba(255, 128, 49, 0.28);
}

.card-panel.compact {
  padding: 1.25rem;
}

.stat-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 600;
}

.stat-bar {
  padding: 1.5rem 2rem;
  background: #fff3e2;
}

.stats-panel {
  background: rgba(209, 143, 237, 0.12);
  border-color: rgba(209, 143, 237, 0.35);
}

.stat-bar .cell + .cell {
  border-left: 2px solid var(--cream);
  padding-left: 2rem;
}

.chart-card {
  margin-top: 1.5rem;
}

.chart-svg {
  width: 100%;
  height: auto;
  display: block;
  margin-top: 0.75rem;
}

.chart-grid line {
  stroke: #f1dbc3;
  stroke-width: 1;
}

.chart-axis-label {
  fill: var(--muted);
  font-size: 11px;
}

.chart-tick-label {
  fill: var(--muted);
  font-size: 10px;
}

.chart-bar {
  fill: rgba(255, 128, 49, 0.35);
}

.chart-line {
  stroke: var(--purple);
  stroke-width: 2.5;
}

.chart-dot {
  fill: var(--purple);
}

.button {
  background: var(--orange);
  color: #ffffff;
}

.button:hover {
  background: var(--orange-dark);
  color: #ffffff;
}

.button.primary {
  background: var(--orange);
  color: #ffffff;
}

.button.primary:hover {
  background: var(--orange-dark);
}

.button.sun {
  background: var(--purple);
  color: #ffffff;
}

.button.sun:hover {
  background: var(--purple-dark);
  color: #ffffff;
}

.button.outline {
  background: transparent;
  border: 1px solid var(--purple);
  color: var(--purple);
}

.button.outline:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge.active {
  background: rgba(46, 163, 93, 0.2);
  color: #1f6a3d;
}

.badge.inactive {
  background: rgba(223, 75, 75, 0.2);
  color: #9f2b2b;
}

.badge-success {
  background: rgba(46, 163, 93, 0.2);
  color: #1f6a3d;
}

.duit-icon {
  height: 18px;
  width: auto;
  vertical-align: text-top;
}

.duit-icon-lg {
  height: 40px;
  vertical-align: middle;
  margin-right: 0.35rem;
}

.tx-datetime {
  font-size: 0.8rem;
  color: var(--muted);
}

.tx-amount-positive {
  font-weight: 700;
}

.transactions-panel {
  display: flex;
  flex-direction: column;
  max-height: 65vh;
  overflow: hidden;
}

.transactions-scroll {
  overflow-y: auto;
  margin-top: 0.5rem;
}

.transactions-scroll .table {
  margin-bottom: 0;
}

.student-card {
  background: #fff7ec;
  border-color: #f6d9b6;
}

.table thead {
  background: var(--cream);
}

.table tbody tr:nth-child(even) {
  background: #fff8ef;
}

.callout {
  background-color: #ffffff;
  background-image: url('../img/titelbalk2025.png');
  background-repeat: repeat;
  border-color: var(--cream);
}

.callout.success {
  border-left: 6px solid var(--orange);
}

.callout.warning {
  border-left: 6px solid var(--purple);
}

.callout.alert {
  border-left: 6px solid #df4b4b;
}

.reveal {
  border-radius: 18px;
}

.form-hint {
  color: var(--muted);
  font-size: 0.85rem;
}

.login-wrapper {
  min-height: calc(100vh - 1.5rem);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 3rem 1.5rem 1rem;
}

.login-brand {
  text-align: center;
  margin-bottom: 1rem;
}

.login-brand img {
  height: 96px;
  width: auto;
}

.login-card {
  max-width: 420px;
  width: 100%;
}

.brand-link {
  display: inline-flex !important;
  flex-direction: row;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.6rem;
  color: #ffffff;
  white-space: nowrap;
}

.brand-link:hover {
  color: #ffffff;
}

.brand-logo {
  height: 48px;
  width: auto;
}

.title-bar .brand-logo {
  height: 34px;
}

.brand-name {
  font-family: 'eight', 'poppins', sans-serif;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.top-bar .brand-link,
.title-bar .brand-link {
  display: inline-flex !important;
}

.top-bar .brand-text,
.title-bar .brand-text {
  display: flex;
}

.brand-location {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  position: relative;
  top: 4px;
}

.brand-name,
.brand-location {
  display: inline-block;
}

@media screen and (max-width: 640px) {
  .page-title {
    font-size: 1.5rem;
  }

  .stat-value {
    font-size: 1.6rem;
  }

  .stats-mobile-hide {
    display: none;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
