﻿@import url("https://fonts.googleapis.com/css2?family=Exo+2:wght@600;700;800&family=Nunito:wght@500;700;800&display=swap");

:root {
  --platinum: #e7ecef;
  --dusk-blue: #274c77;
  --steel-blue: #6096ba;
  --icy-blue: #a3cef1;
  --grey-olive: #8b8c89;
  --tile-blue: #6da0c7;
  --tile-blue-deep: #5b92ba;
  --tile-chip: #f5f9fd;
  --mint-chip: #a9e7d3;
  --rose-chip: #f0b4bf;
  --danger: #b42318;
  --ok: #12704a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Nunito", "Segoe UI", sans-serif;
  color: var(--dusk-blue);
  display: flex;
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(1200px 600px at 50% -15%, #c9e5fa 0%, rgba(201, 229, 250, 0) 65%),
    linear-gradient(180deg, #9fcaea 0%, #95c2e3 100%);
}

.container {
  width: min(420px, 100%);
  padding: 12px 10px 28px;
}

.hero {
  margin: 0 0 10px;
  transition: opacity 0.2s ease, max-height 0.2s ease, margin 0.2s ease;
  max-height: 120px;
}

.hero.dashboard-mode {
  opacity: 0;
  max-height: 0;
  margin: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero h1 {
  margin: 0;
  font-family: "Exo 2", "Nunito", sans-serif;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #f3f9ff;
  text-shadow: 0 3px 10px rgba(39, 76, 119, 0.25);
}

.hero p {
  margin: 2px 0 0;
  color: #e9f4ff;
  font-size: 13px;
  font-weight: 700;
}

.card {
  border-radius: 24px;
  padding: 12px;
  margin: 0 auto 12px;
}

#authCard {
  background: rgba(247, 252, 255, 0.95);
  border: 1px solid rgba(39, 76, 119, 0.16);
  box-shadow: 0 14px 28px rgba(39, 76, 119, 0.16);
}

#dashboardCard {
  position: relative;
  padding: 0;
  margin: 0;
}

.logout-floating {
  position: absolute;
  top: 4px;
  right: 8px;
  z-index: 4;
}

h2,
h3 {
  margin: 0 0 10px;
  color: var(--dusk-blue);
  font-family: "Exo 2", "Nunito", sans-serif;
}

h2 {
  font-size: 28px;
}

h3 {
  font-size: 21px;
}

.actions {
  margin-bottom: 10px;
}

.mobile-board {
  display: grid;
  gap: 12px;
}

.tile {
  position: relative;
  width: 100%;
  border: 0;
  border-radius: 24px;
  padding: 13px;
  background: linear-gradient(180deg, var(--tile-blue) 0%, var(--tile-blue-deep) 100%);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.wallet-tile {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.wallet-left,
.wallet-right {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 17px;
  padding: 10px;
}

.op-logo {
  font-size: 58px;
  font-family: "Exo 2", "Nunito", sans-serif;
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: 0.02em;
  color: #e7f4ff;
  margin: 0 0 8px;
}

.balance-value {
  margin: 10px 0 0;
  font-size: 40px;
  font-family: "Exo 2", "Nunito", sans-serif;
  font-weight: 800;
  line-height: 1;
  color: #fff;
}

.balance-value.negative {
  color: #ffd8de;
}

.balance-value.positive {
  color: #deffeb;
}

.wallet-title {
  margin: 0 0 6px;
  font-size: 34px;
  font-family: "Exo 2", "Nunito", sans-serif;
  font-weight: 800;
  color: #ecf7ff;
  line-height: 1;
}

.history-preview {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
}

.history-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-weight: 800;
  font-size: 20px;
  line-height: 1.05;
  color: #f4f9ff;
}

.history-row.neg {
  color: #ffd6db;
}

.history-row.pos {
  color: #d8ffe8;
}

.history-row.muted {
  opacity: 0.75;
}

.history-panel {
  grid-column: 1 / -1;
  margin-top: 2px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.14);
  padding: 8px;
}

.profile-tile {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  align-items: center;
}

.avatar-box {
  width: 110px;
  height: 140px;
  border-radius: 12px;
  overflow: hidden;
  background: #babdc3;
}

.avatar-placeholder {
  position: relative;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #c3c6cb 0%, #afb3ba 100%);
}

.avatar-placeholder::before {
  content: "";
  position: absolute;
  top: 28px;
  left: 50%;
  width: 46px;
  height: 46px;
  margin-left: -23px;
  border-radius: 50%;
  background: #e9ebef;
}

.avatar-placeholder::after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 50%;
  width: 92px;
  height: 72px;
  margin-left: -46px;
  border-radius: 50% 50% 0 0;
  background: #e9ebef;
}

.profile-meta {
  text-align: left;
  color: #f3f9ff;
  line-height: 1.18;
  font-weight: 700;
}

.profile-meta b {
  display: block;
  margin-bottom: 6px;
  font-size: 34px;
  font-family: "Exo 2", "Nunito", sans-serif;
  letter-spacing: 0.02em;
}

.profile-meta div {
  font-size: 20px;
  margin-bottom: 3px;
}

.profile-tile .hint {
  grid-column: 1 / -1;
  margin: 3px 0 0;
  color: #deefff;
  font-size: 16px;
  font-weight: 700;
}

.loan-tile {
  display: grid;
  gap: 10px;
}

.term-switch,
.amount-switch {
  display: grid;
  gap: 8px;
}

.term-switch {
  grid-template-columns: repeat(3, 1fr);
}

.amount-switch {
  grid-template-columns: repeat(2, 1fr);
}

.history-shortcut {
  display: grid;
  place-items: center;
  min-height: 72px;
  color: #eaf6ff;
  font-family: "Exo 2", "Nunito", sans-serif;
  font-size: 50px;
  font-weight: 800;
  letter-spacing: 0.01em;
  background: linear-gradient(180deg, var(--tile-blue) 0%, var(--tile-blue-deep) 100%);
}

.pill-button,
.term-btn,
.amount-btn {
  border: 0;
  border-radius: 999px;
  padding: 11px 12px;
  font-size: 19px;
  font-family: "Exo 2", "Nunito", sans-serif;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.16s ease, opacity 0.16s ease;
}

.pill-button:hover,
.term-btn:hover,
.amount-btn:hover,
button:hover {
  transform: translateY(-1px);
}

.pill-button,
.term-btn,
.amount-btn {
  width: 100%;
  background: var(--tile-chip);
  color: var(--dusk-blue);
}

.ghost-lite {
  background: rgba(255, 255, 255, 0.84);
}

.action-pill {
  grid-column: 1 / -1;
  width: 100%;
}

.term-btn.active {
  background: #cadcf1;
  color: #203857;
}

.amount-btn {
  background: rgba(255, 255, 255, 0.35);
  color: #d9ebfb;
}

.amount-btn.active:first-child {
  background: var(--mint-chip);
  color: #1f644b;
}

.amount-btn.active:last-child {
  background: var(--rose-chip);
  color: #8a3846;
}

.term-btn:disabled,
.amount-btn:disabled,
.pill-button:disabled,
.history-shortcut:disabled,
button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

button {
  border: 0;
  border-radius: 12px;
  background: var(--dusk-blue);
  color: #fff;
  padding: 10px 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.16s ease, opacity 0.16s ease;
}

button.ghost {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.22);
  color: #eef7ff;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
}

.lock-overlay {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  display: grid;
  place-items: center;
  background: rgba(91, 137, 171, 0.68);
  color: #fff;
  text-shadow: 0 2px 6px rgba(12, 34, 57, 0.4);
  backdrop-filter: blur(1.5px);
}

.lock-icon {
  width: 92px;
  height: 92px;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.details-section {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.subcard {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(248, 252, 255, 0.92);
  color: var(--dusk-blue);
  padding: 12px;
}

.row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

label {
  font-size: 14px;
  font-weight: 700;
}

input,
textarea,
select {
  width: min(100%, 320px);
  border-radius: 10px;
  border: 1px solid rgba(39, 76, 119, 0.28);
  padding: 10px 12px;
  font-size: 15px;
  color: var(--dusk-blue);
  background: #fff;
}

textarea {
  min-height: 78px;
  resize: vertical;
}

form button,
.actions button {
  width: min(100%, 320px);
}

.hint {
  margin: 0;
  color: var(--grey-olive);
}

.msg {
  min-height: 20px;
  margin: 6px 0 0;
}

.msg.error {
  color: var(--danger);
}

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

.item {
  border-radius: 12px;
  border: 1px solid rgba(39, 76, 119, 0.2);
  background: #fff;
  padding: 9px 10px;
  text-align: left;
}

.item b {
  display: block;
  margin-bottom: 6px;
}

.item small {
  color: var(--grey-olive);
}

.inline-form {
  margin-top: 8px;
  display: grid;
  gap: 7px;
  justify-items: center;
}

.hidden {
  display: none !important;
}

@media (max-width: 390px) {
  .container {
    padding: 10px 7px 22px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .wallet-title {
    font-size: 28px;
  }

  .history-row {
    font-size: 17px;
  }

  .balance-value {
    font-size: 32px;
  }

  .profile-tile {
    grid-template-columns: 92px 1fr;
  }

  .avatar-box {
    width: 92px;
    height: 124px;
  }

  .profile-meta b {
    font-size: 26px;
  }

  .profile-meta div {
    font-size: 17px;
  }

  .history-shortcut {
    font-size: 40px;
  }

  .pill-button,
  .term-btn,
  .amount-btn {
    font-size: 17px;
  }
}
