@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

:root {
  --bg: #edf4f0;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --stroke: rgba(24, 49, 69, 0.1);
  --text: #173145;
  --muted: #607a8e;
  --navy: #14324b;
  --navy-2: #1d4b6c;
  --green: #1f8e65;
  --green-soft: #dff6ea;
  --red: #bf4d4d;
  --red-soft: #fde7e7;
  --blue: #2b6ee8;
  --blue-soft: #e5efff;
  --amber: #d98b16;
  --amber-soft: #fff0d8;
  --shadow: 0 22px 60px rgba(18, 48, 68, 0.14);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(43, 110, 232, 0.1), transparent 32%),
    radial-gradient(circle at bottom right, rgba(31, 142, 101, 0.12), transparent 28%),
    linear-gradient(180deg, #eef5f2 0%, #f8fbfa 100%);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
}

.hidden {
  display: none !important;
}

.aurora {
  position: fixed;
  border-radius: 999px;
  filter: blur(28px);
  opacity: 0.48;
  pointer-events: none;
  z-index: 0;
}

.aurora-one {
  inset: -120px auto auto -100px;
  width: 380px;
  height: 380px;
  background: rgba(44, 157, 110, 0.2);
}

.aurora-two {
  inset: auto -120px 20px auto;
  width: 420px;
  height: 420px;
  background: rgba(43, 110, 232, 0.18);
}

.login-shell,
.app-shell {
  position: relative;
  z-index: 1;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 460px);
  gap: 32px;
  padding: 34px;
}

.hero-panel,
.login-card,
.sidebar,
.content-shell,
.card,
.stat-card,
.status-banner {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.hero-panel {
  border-radius: 36px;
  padding: 44px;
  background: linear-gradient(140deg, rgba(20, 50, 75, 0.94), rgba(31, 142, 101, 0.85));
  box-shadow: var(--shadow);
  color: #f7fbff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: calc(100vh - 68px);
}

.hero-badge,
.soft-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-badge {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.hero-panel h1 {
  margin: 18px 0 14px;
  font-size: clamp(2.4rem, 3vw, 3.6rem);
  line-height: 1.05;
}

.hero-copy {
  max-width: 700px;
  margin: 0 0 30px;
  color: rgba(247, 251, 255, 0.82);
  font-size: 1.02rem;
  line-height: 1.75;
}

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

.hero-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.12);
}

.hero-card span,
.eyebrow {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-card span {
  color: rgba(247, 251, 255, 0.72);
}

.hero-card strong {
  display: block;
  margin-top: 14px;
  margin-bottom: 12px;
  font-size: 1.15rem;
}

.hero-card p {
  margin: 0;
  color: rgba(247, 251, 255, 0.8);
  line-height: 1.6;
}

.login-card {
  align-self: center;
  border-radius: 34px;
  padding: 34px;
  background: var(--surface-strong);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow);
}

.login-header h2 {
  margin: 12px 0 10px;
  font-size: 1.9rem;
}

.login-header p,
.login-footer p,
.connection-card p,
.summary-card p,
.inline-error,
.status-banner,
.summary-row span,
.chip-meta {
  line-height: 1.6;
}

.field,
.compact-field {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.field span,
.compact-field span {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
}

.field-hint {
  color: var(--muted);
  font-size: 0.82rem;
}

.field input,
.field select,
.compact-field select,
.inline-form input {
  width: 100%;
  border: 1px solid rgba(23, 49, 69, 0.12);
  border-radius: 16px;
  background: rgba(244, 249, 247, 0.94);
  padding: 14px 16px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.field input:focus,
.field select:focus,
.compact-field select:focus,
.inline-form input:focus {
  border-color: rgba(43, 110, 232, 0.38);
  box-shadow: 0 0 0 4px rgba(43, 110, 232, 0.12);
}

.field input:disabled,
.field select:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.login-card .field + .field {
  margin-top: 16px;
}

.primary-button,
.ghost-button,
.nav-button {
  border-radius: 16px;
  padding: 14px 18px;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.primary-button:hover,
.ghost-button:hover,
.nav-button:hover {
  transform: translateY(-1px);
}

.primary-button {
  width: 100%;
  margin-top: 22px;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  color: #ffffff;
  box-shadow: 0 18px 28px rgba(43, 110, 232, 0.22);
}

.ghost-button {
  background: rgba(20, 50, 75, 0.06);
  color: var(--navy);
}

.full-width {
  width: 100%;
}

.inline-error {
  margin: 14px 0 0;
  color: #a42d40;
}

.login-footer {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(23, 49, 69, 0.08);
}

.footer-key {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy);
}

.login-footer p {
  margin: 10px 0 0;
  color: var(--muted);
}

.login-footer code {
  background: rgba(20, 50, 75, 0.08);
  padding: 4px 8px;
  border-radius: 8px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  padding: 24px;
}

.sidebar {
  background: linear-gradient(180deg, rgba(20, 50, 75, 0.96), rgba(28, 76, 109, 0.92));
  border-radius: 32px;
  padding: 24px;
  color: #f6fbff;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.05));
  color: #ffffff;
}

.brand-block h2,
.card-head h3 {
  margin: 6px 0 0;
}

.brand-block .eyebrow,
.connection-card .soft-pill {
  color: rgba(247, 251, 255, 0.66);
}

.connection-card {
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.connection-card strong {
  display: block;
  margin-top: 12px;
  margin-bottom: 10px;
}

.connection-card p {
  margin: 0;
  color: rgba(247, 251, 255, 0.74);
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-button {
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav-button.active {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(43, 110, 232, 0.45));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.content-shell {
  border-radius: 32px;
  padding: 26px;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow);
}

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

.topbar h1 {
  margin: 6px 0 0;
  font-size: clamp(1.6rem, 2vw, 2.2rem);
}

.topbar-actions {
  display: flex;
  align-items: end;
  gap: 12px;
}

.compact-field {
  min-width: 210px;
}

.status-banner {
  margin-bottom: 20px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(23, 49, 69, 0.08);
  color: var(--muted);
}

.stats-grid,
.card-grid,
.form-grid {
  display: grid;
  gap: 18px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.stat-card {
  border-radius: 24px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.stat-card strong {
  display: block;
  margin-top: 14px;
  font-size: 1.65rem;
}

.accent-green {
  background: linear-gradient(180deg, rgba(223, 246, 234, 0.92), rgba(255, 255, 255, 0.82));
}

.accent-red {
  background: linear-gradient(180deg, rgba(253, 231, 231, 0.92), rgba(255, 255, 255, 0.82));
}

.accent-blue {
  background: linear-gradient(180deg, rgba(229, 239, 255, 0.92), rgba(255, 255, 255, 0.82));
}

.card-grid {
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.9fr);
}

.reports-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card {
  border-radius: 28px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.56);
  box-shadow: 0 18px 40px rgba(18, 48, 68, 0.08);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.card-head .eyebrow {
  margin: 0;
}

.soft-pill {
  background: rgba(43, 110, 232, 0.12);
  color: var(--blue);
}

.summary-rail {
  display: grid;
  gap: 14px;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 18px;
  padding: 16px;
  background: rgba(20, 50, 75, 0.05);
}

.summary-row strong {
  white-space: nowrap;
}

.summary-row.highlight {
  background: linear-gradient(135deg, rgba(223, 246, 234, 0.9), rgba(229, 239, 255, 0.9));
}

.table-wrapper {
  overflow: auto;
  max-height: 650px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.data-table th,
.data-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(23, 49, 69, 0.08);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  position: sticky;
  top: 0;
  background: rgba(248, 251, 250, 0.98);
  color: var(--navy);
}

.table-muted {
  color: var(--muted);
}

.type-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.type-income {
  background: var(--green-soft);
  color: var(--green);
}

.type-expense {
  background: var(--red-soft);
  color: var(--red);
}

.amount-income {
  color: var(--green);
  font-weight: 800;
}

.amount-expense {
  color: var(--red);
  font-weight: 800;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-button {
  border-radius: 12px;
  padding: 8px 12px;
  background: rgba(20, 50, 75, 0.08);
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 700;
}

.mini-button.danger {
  background: rgba(191, 77, 77, 0.12);
  color: var(--red);
}

.proof-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(217, 139, 22, 0.12);
  color: #9a620c;
  font-size: 0.78rem;
  font-weight: 700;
}

.form-card {
  max-width: 980px;
}

.form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-wide {
  grid-column: span 3;
}

.action-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

.action-row .primary-button {
  width: auto;
  min-width: 220px;
  margin-top: 0;
}

.report-actions,
.inline-form {
  display: flex;
  gap: 12px;
}

.report-actions {
  flex-wrap: wrap;
}

.report-actions .primary-button,
.report-actions .ghost-button,
.inline-form .primary-button {
  width: auto;
  margin-top: 0;
}

.inline-form input {
  flex: 1;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 12;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(14, 31, 43, 0.45);
  backdrop-filter: blur(10px);
}

.modal-card {
  width: min(920px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-radius: 28px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 60px rgba(18, 48, 68, 0.2);
}

.modal-card-small {
  width: min(520px, 100%);
}

.modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.confirm-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.proof-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(20, 50, 75, 0.05);
}

.proof-summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.proof-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
}

.modal-actions.compact {
  margin-top: 0;
}

.modal-actions .primary-button,
.modal-actions .ghost-button {
  width: auto;
  margin-top: 0;
}

.check-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.check-row input {
  width: 18px;
  height: 18px;
}

.icon-button {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(20, 50, 75, 0.08);
  color: var(--navy);
  font-weight: 800;
}

.report-preview-card {
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.preview-empty {
  color: var(--muted);
  text-align: center;
  padding: 20px;
}

.report-preview {
  width: 100%;
  height: auto;
  max-height: 920px;
  object-fit: contain;
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(18, 48, 68, 0.14);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(20, 50, 75, 0.06);
  color: var(--navy);
}

.chip button {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(191, 77, 77, 0.12);
  color: var(--red);
  font-weight: 800;
}

@media (max-width: 1280px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    min-height: auto;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    padding: 18px;
  }

  .nav-list {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .nav-button {
    width: auto;
  }

  .stats-grid,
  .reports-grid,
  .settings-grid,
  .card-grid,
  .form-grid,
  .modal-grid {
    grid-template-columns: 1fr;
  }

  .field-wide {
    grid-column: span 1;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 760px) {
  .login-shell,
  .app-shell,
  .content-shell {
    padding: 16px;
  }

  .hero-panel,
  .login-card,
  .sidebar,
  .content-shell,
  .card {
    border-radius: 24px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .report-actions,
  .inline-form,
  .action-row,
  .modal-actions,
  .proof-panel {
    flex-direction: column;
  }

  .action-row .primary-button,
  .report-actions .primary-button,
  .report-actions .ghost-button,
  .inline-form .primary-button,
  .modal-actions .primary-button,
  .modal-actions .ghost-button {
    width: 100%;
  }
}
