:root {
  --navy: #14233c;
  --navy-light: #243d62;
  --ink: #1a2a43;
  --muted: #758095;
  --cream: #f4f1eb;
  --paper: #fffdfa;
  --line: #e4e1da;
  --amber: #e4a33d;
  --amber-soft: #f5e6c8;
  --green: #337052;
  --green-soft: #e2eee6;
  --shadow: 0 24px 70px rgba(20, 35, 60, 0.1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  background: var(--cream);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(228, 163, 61, 0.55);
  outline-offset: 3px;
}

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

.login-view {
  position: relative;
  display: grid;
  min-height: 100vh;
  overflow: hidden;
  place-items: center;
  padding: 24px;
  background: var(--navy);
}

.login-view::before {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  content: "";
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 80%);
}

.login-shape {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.login-shape-one {
  top: -220px;
  right: 8%;
  width: 470px;
  height: 470px;
  background: rgba(71, 120, 157, 0.25);
}

.login-shape-two {
  bottom: -320px;
  left: -120px;
  width: 560px;
  height: 560px;
  background: rgba(228, 163, 61, 0.1);
}

.login-card {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  padding: 40px;
  border-radius: 22px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.lock-mark {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 28px;
  place-items: center;
  border-radius: 13px;
  background: var(--amber-soft);
  color: #ae6e17;
}

.lock-mark svg {
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.eyebrow {
  margin: 0 0 10px;
  color: #aa6b18;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow-light {
  color: #c98b31;
}

.login-card h1,
.record-heading h1 {
  margin: 0;
  letter-spacing: -0.065em;
}

.login-card h1 {
  color: var(--ink);
  font-size: clamp(2.25rem, 7vw, 3.6rem);
  line-height: 0.98;
}

.login-copy,
.record-subtitle {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

#login-form {
  margin-top: 30px;
}

#login-form label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 750;
}

.password-field {
  position: relative;
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #d1cec6;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
}

input::placeholder {
  color: #a7adb8;
}

input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(228, 163, 61, 0.14);
  outline: none;
}

.password-field input {
  padding-right: 64px;
}

.password-field button {
  position: absolute;
  top: 50%;
  right: 12px;
  border: 0;
  background: transparent;
  color: #a66a1b;
  font-size: 0.72rem;
  font-weight: 800;
  transform: translateY(-50%);
}

.form-error {
  min-height: 18px;
  margin: 7px 0 0;
  color: #ad4437;
  font-size: 0.75rem;
}

.button {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  border: 0;
  border-radius: 9px;
  font-size: 0.8rem;
  font-weight: 800;
  transition: background 160ms ease, transform 160ms ease;
}

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

.button-primary {
  background: var(--navy);
  color: #fff;
}

.button-primary:hover {
  background: var(--navy-light);
}

.button span {
  color: var(--amber);
  font-size: 1rem;
}

.record-view {
  min-height: 100vh;
  background: var(--cream);
}

.topbar {
  border-bottom: 1px solid rgba(228, 225, 218, 0.9);
  background: rgba(244, 241, 235, 0.84);
}

.topbar-inner,
.record-container {
  width: min(100% - 48px, 980px);
  margin: 0 auto;
}

.topbar-inner {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.topbar-name {
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.topbar-name span {
  margin: 0 4px;
  color: var(--amber);
}

.lock-button {
  padding: 7px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 700;
}

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

.record-container {
  padding: 72px 0 36px;
}

.record-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.record-heading h1 {
  color: var(--ink);
  font-size: clamp(2.3rem, 6vw, 4.2rem);
  line-height: 0.98;
}

.status {
  flex-shrink: 0;
  padding: 8px 11px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 0.7rem;
  font-weight: 800;
}

.record-card {
  margin-top: 42px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 16px 45px rgba(20, 35, 60, 0.05);
}

.summary-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  padding: 28px 30px;
}

.summary-row > div {
  padding: 0 24px;
  border-left: 1px solid var(--line);
}

.summary-row > div:first-child {
  padding-left: 0;
  border-left: 0;
}

.summary-row > div:last-child {
  padding-right: 0;
}

dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

dd {
  margin: 12px 0 0;
  color: var(--ink);
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.07em;
}

.summary-row > div:nth-child(2) dd {
  color: var(--green);
}

.summary-row > div:nth-child(3) dd {
  color: #ad6c18;
}

.progress-section,
.history-section {
  border-top: 1px solid var(--line);
  padding: 27px 30px;
}

.progress-labels,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.progress-labels {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.progress-labels strong {
  color: #ad6c18;
  font-size: 1.2rem;
  letter-spacing: -0.05em;
}

.progress-track {
  height: 11px;
  margin-top: 15px;
  overflow: hidden;
  border-radius: 999px;
  background: #ebe8e1;
}

.progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--amber);
  transition: width 400ms ease;
}

.section-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.2rem;
  letter-spacing: -0.04em;
}

.section-heading span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.table-wrap {
  margin-top: 20px;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 430px;
  border-collapse: collapse;
  text-align: left;
}

th {
  padding: 0 12px 11px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

td {
  padding: 17px 12px;
  border-bottom: 1px solid #efede8;
  color: var(--muted);
  font-size: 0.8rem;
}

th:first-child,
td:first-child {
  padding-left: 0;
}

th:last-child,
td:last-child {
  padding-right: 0;
}

td:first-child {
  color: var(--ink);
  font-weight: 750;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.amount {
  color: var(--ink);
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.record-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
  text-align: right;
}

@media (max-width: 600px) {
  .login-card {
    padding: 30px 24px;
  }

  .topbar-inner,
  .record-container {
    width: min(100% - 32px, 980px);
  }

  .record-container {
    padding-top: 46px;
  }

  .record-heading {
    display: block;
  }

  .status {
    display: inline-block;
    margin-top: 18px;
  }

  .record-card {
    margin-top: 30px;
  }

  .summary-row {
    grid-template-columns: 1fr;
    gap: 21px;
    padding: 24px 20px;
  }

  .summary-row > div,
  .summary-row > div:first-child,
  .summary-row > div:last-child {
    padding: 0;
    border: 0;
  }

  .summary-row > div:not(:first-child) {
    padding-top: 21px;
    border-top: 1px solid var(--line);
  }

  .progress-section,
  .history-section {
    padding: 24px 20px;
  }

  .record-note {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
