:root {
  --blue-900: #143984;
  --blue-700: #1e68d3;
  --blue-500: #6fb5f5;
  --ink-900: #18335f;
  --ink-700: #37527e;
  --card: #ffffff;
  --line: #d6dfef;
  --bg-top: #f7f9ff;
  --bg-mid: #edf3fc;
  --bg-bottom: #e7eef9;
  --bg-glow-left: rgba(112, 154, 227, 0.34);
  --bg-glow-right: rgba(86, 147, 230, 0.28);
  --bg-glow-bottom: rgba(162, 192, 237, 0.3);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: "Nunito Sans", "Segoe UI", Arial, sans-serif;
  color: var(--ink-900);
  background-color: var(--bg-mid);
  background-image:
    radial-gradient(980px 520px at -12% -16%, var(--bg-glow-left), transparent 62%),
    radial-gradient(940px 500px at 112% -8%, var(--bg-glow-right), transparent 58%),
    radial-gradient(960px 420px at 50% 116%, var(--bg-glow-bottom), transparent 64%),
    repeating-linear-gradient(-35deg, rgba(255, 255, 255, 0.34) 0 1px, transparent 1px 22px),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 48%, var(--bg-bottom) 100%);
  background-attachment: fixed;
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: -18vh -18vw auto auto;
  width: min(54vw, 780px);
  height: min(54vw, 780px);
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}

body::before {
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0) 58%),
    radial-gradient(circle at 70% 65%, rgba(95, 154, 235, 0.28), rgba(95, 154, 235, 0) 64%);
  filter: blur(8px);
  animation: ambientFloat 18s ease-in-out infinite alternate;
}

body::after {
  inset: auto auto -20vh -16vw;
  width: min(48vw, 700px);
  height: min(48vw, 700px);
  background:
    radial-gradient(circle at 42% 38%, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 58%),
    radial-gradient(circle at 58% 62%, rgba(110, 167, 242, 0.24), rgba(110, 167, 242, 0) 66%);
  filter: blur(10px);
  animation: ambientFloatAlt 22s ease-in-out infinite alternate;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background:
    radial-gradient(560px 220px at 86% -48%, rgba(185, 219, 255, 0.36), transparent 72%),
    linear-gradient(118deg, #123274 0%, #1f58b2 53%, #4d93ea 100%);
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 30px rgba(13, 39, 90, 0.24);
}

.app-topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  font-family: "Montserrat", "Nunito Sans", Arial, sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: 0.1px;
}

.brand-mark {
  font-style: italic;
}

.app-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  font-weight: 700;
}

.app-nav a,
.app-nav button {
  border: 0;
  background: transparent;
  color: #e6f0ff;
  font: inherit;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
}

.app-nav a.is-active {
  background: rgba(255, 255, 255, 0.17);
  color: #ffffff;
}

.app-nav .nav-pill {
  background: rgba(255, 255, 255, 0.95);
  color: #2f4f89;
  padding: 8px 12px;
  box-shadow: 0 6px 14px rgba(8, 27, 65, 0.16);
}

.app-main {
  position: relative;
  padding: 48px 0;
}

.app-main::before {
  content: "";
  position: absolute;
  inset: 18px 0;
  background:
    radial-gradient(920px 260px at 8% 0%, rgba(255, 255, 255, 0.54), transparent 68%),
    radial-gradient(920px 240px at 92% 100%, rgba(222, 234, 251, 0.42), transparent 66%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(233, 242, 252, 0.2));
  border-top: 1px solid rgba(255, 255, 255, 0.52);
  border-bottom: 1px solid rgba(206, 220, 240, 0.42);
  pointer-events: none;
}

.app-main > .container {
  position: relative;
  z-index: 1;
}

.card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(214, 225, 242, 0.9);
  border-radius: 14px;
  box-shadow:
    0 18px 38px rgba(21, 47, 99, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  padding: 28px;
}

.card h1 {
  margin: 0 0 10px;
  font-family: "Montserrat", "Nunito Sans", Arial, sans-serif;
  font-size: 2rem;
}

.card p {
  margin: 0;
  color: var(--ink-700);
  font-size: 1.05rem;
  line-height: 1.5;
}

.row {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 8px;
  border: 0;
  cursor: pointer;
  font-weight: 700;
}

.btn-primary {
  background: linear-gradient(180deg, #3f8be8, #1f68c8);
  color: #ffffff;
}

.btn-secondary {
  background: #eef3fb;
  color: #2f4f89;
  border: 1px solid var(--line);
}

.notice {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  display: none;
}

.notice.is-visible {
  display: block;
}

.notice-warning {
  background: #fff3df;
  border: 1px solid #ffd59d;
  color: #8f5b15;
}

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

.shell-table {
  width: 100%;
  border-collapse: collapse;
}

.shell-table th,
.shell-table td {
  border-top: 1px solid #e1e9f6;
  padding: 10px 8px;
  font-size: 0.95rem;
  color: #345282;
  text-align: left;
}

.shell-table thead th {
  border-top: 0;
  background: rgba(240, 245, 253, 0.88);
  color: #5f78a1;
}

.shell-table tbody tr:hover {
  background: #f8fbff;
}

.shell-row-selected {
  background: #ecf3ff;
}

.shell-link {
  color: #1f4f9c;
  font-weight: 700;
}

.shell-link:hover {
  text-decoration: underline;
}

.shell-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.82rem;
  font-weight: 700;
}

.shell-pill.paid {
  color: #ffffff;
  background: #3fb67c;
}

.shell-pill.pending {
  color: #7e6927;
  background: #efe6c6;
}

.shell-pill.overdue {
  color: #ffffff;
  background: #d64b5c;
}

.shell-empty {
  text-align: center;
  color: #6a83aa;
}

@keyframes ambientFloat {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(-28px, 20px, 0) scale(1.06);
  }
}

@keyframes ambientFloatAlt {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(26px, -18px, 0) scale(1.04);
  }
}

@media (max-width: 840px) {
  .app-topbar {
    min-height: 64px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 10px 0;
  }

  .app-nav {
    width: 100%;
    flex-wrap: wrap;
  }
}
