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

:root {
  --bg-a: #eef5f8;
  --bg-b: #f8f3ec;
  --bg-c: #effaf4;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: #ffffff;
  --line: rgba(20, 56, 78, 0.14);
  --ink: #123047;
  --ink-soft: #537082;
  --brand-500: #0088b8;
  --brand-600: #036f97;
  --accent: #ff8d4d;
  --success-bg: #e5faee;
  --success-text: #0f7b4e;
  --danger-bg: #ffe9e6;
  --danger-text: #b1362b;
  --shadow-soft: 0 16px 34px rgba(10, 52, 79, 0.08);
  --shadow-card: 0 10px 24px rgba(21, 44, 68, 0.08);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 9px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Plus Jakarta Sans", "Avenir Next", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 92% -8%, rgba(255, 143, 77, 0.18), transparent 32%),
    radial-gradient(circle at -8% 20%, rgba(0, 136, 184, 0.2), transparent 38%),
    linear-gradient(160deg, var(--bg-a) 0%, var(--bg-b) 52%, var(--bg-c) 100%);
  line-height: 1.45;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(1px);
}

body::before {
  width: 360px;
  height: 360px;
  top: -140px;
  right: -100px;
  background: rgba(0, 136, 184, 0.11);
}

body::after {
  width: 460px;
  height: 460px;
  left: -170px;
  bottom: -210px;
  background: rgba(255, 141, 77, 0.09);
}

a {
  color: var(--brand-600);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h2,
h3 {
  margin-top: 0;
  color: var(--ink);
  font-family: "Outfit", "Trebuchet MS", sans-serif;
  letter-spacing: 0.02em;
}

h2 {
  margin-bottom: 0.4rem;
  font-size: clamp(1.45rem, 1.1rem + 1.1vw, 2rem);
}

h3 {
  margin-bottom: 0.7rem;
  font-size: 1.08rem;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 1.1rem 1rem 2rem;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  background: var(--surface);
}

.card--blur {
  backdrop-filter: blur(12px);
}

.card--content {
  background: var(--surface-strong);
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.2rem;
  padding: 1rem 1.2rem;
}

.topbar__title {
  margin: 0;
  font-family: "Outfit", "Trebuchet MS", sans-serif;
  font-size: clamp(1.2rem, 1rem + 0.65vw, 1.55rem);
  letter-spacing: 0.01em;
}

.topbar__right {
  display: grid;
  gap: 0.55rem;
  justify-items: end;
}

.topbar__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.topbar__nav a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.46rem 0.78rem;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
  transition: transform 150ms ease, border-color 150ms ease, background-color 150ms ease;
}

.topbar__nav a:hover {
  text-decoration: none;
  transform: translateY(-1px);
  border-color: rgba(0, 136, 184, 0.35);
  background: rgba(232, 250, 255, 0.9);
}

.inline-form {
  display: inline;
}

.eyebrow {
  margin: 0 0 0.2rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 0.72rem;
  font-weight: 700;
}

.lead {
  margin: 0;
  color: var(--ink-soft);
  max-width: 58ch;
}

.user-chip {
  margin: 0;
  padding: 0.38rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  color: var(--ink-soft);
  text-align: right;
}

.user-chip strong {
  display: block;
  color: var(--ink);
  font-size: 0.8rem;
}

.flash-stack {
  display: grid;
  gap: 0.55rem;
  margin: 0.9rem 0 0;
}

.flash {
  margin: 0;
  border-radius: var(--radius-md);
  padding: 0.76rem 0.95rem;
  border: 1px solid transparent;
  font-weight: 500;
}

.flash ul {
  margin: 0.35rem 0 0;
}

.flash--notice {
  background: var(--success-bg);
  color: var(--success-text);
  border-color: rgba(16, 140, 90, 0.2);
}

.flash--alert {
  background: var(--danger-bg);
  color: var(--danger-text);
  border-color: rgba(177, 54, 43, 0.22);
}

.content {
  margin-top: 0.95rem;
  padding: 1.2rem;
}

.content > * {
  animation: rise-in 420ms ease both;
}

.content > *:nth-child(2) {
  animation-delay: 55ms;
}

.content > *:nth-child(3) {
  animation-delay: 100ms;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
  padding: 0.2rem 0 1rem;
  border-bottom: 1px solid var(--line);
}

.hero--compact {
  margin-bottom: 0.95rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 0.9rem;
}

.metric {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 136, 184, 0.2);
  background: linear-gradient(145deg, rgba(236, 250, 255, 0.95), rgba(255, 255, 255, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.metric__label {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.metric__value {
  margin: 0.25rem 0 0;
  color: var(--ink);
  font-family: "Outfit", "Trebuchet MS", sans-serif;
  font-size: 1.65rem;
}

.metric__value--small {
  font-size: 1.1rem;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.95rem;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0 0.95rem;
}

.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.58rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 700;
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}

.tab:hover {
  text-decoration: none;
  color: var(--ink);
  border-color: rgba(0, 136, 184, 0.3);
}

.tab--active {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(145deg, var(--brand-500), var(--brand-600));
  box-shadow: 0 8px 15px rgba(0, 116, 158, 0.24);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.panel-head h3 {
  margin: 0;
}

.tab-panel h3 {
  margin-top: 0;
}

.panel {
  margin: 0.95rem 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface-strong);
  box-shadow: var(--shadow-card);
  padding: 1rem;
}

.table-wrap {
  width: 100%;
  overflow: auto;
}

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

.data-table th,
.data-table td {
  text-align: left;
  border-bottom: 1px solid rgba(18, 48, 71, 0.1);
  padding: 0.6rem 0.45rem;
}

.data-table th {
  color: var(--ink-soft);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.data-table tbody tr {
  transition: background-color 140ms ease;
}

.data-table tbody tr:hover {
  background-color: rgba(236, 250, 255, 0.68);
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field label {
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 600;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.62rem 0.7rem;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(0, 136, 184, 0.45);
  box-shadow: 0 0 0 3px rgba(0, 136, 184, 0.15);
  outline: none;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.field--full {
  grid-column: 1 / -1;
}

.actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  padding: 0.58rem 0.95rem;
  font-size: 0.87rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

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

.button:disabled {
  cursor: not-allowed;
  opacity: 0.75;
  transform: none;
}

.button--primary {
  color: #ffffff;
  background: linear-gradient(145deg, var(--brand-500), var(--brand-600));
  box-shadow: 0 8px 15px rgba(0, 116, 158, 0.24);
}

.button--secondary {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.95);
}

.button--danger {
  color: #ffffff;
  background: linear-gradient(145deg, #e35f52, #bb3328);
  box-shadow: 0 8px 15px rgba(177, 54, 43, 0.22);
}

.button--ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
}

.button--small {
  padding: 0.4rem 0.72rem;
  font-size: 0.8rem;
}

.button--with-spinner {
  min-width: 180px;
}

.button__spinner {
  width: 0.9rem;
  height: 0.9rem;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 680ms linear infinite;
}

.form-status {
  margin: 0;
  min-height: 1.2rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.detail-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 0.95rem;
}

.detail-card p {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  margin: 0.35rem 0;
  color: var(--ink-soft);
}

.detail-card p strong {
  color: var(--ink);
}

.section-link {
  margin-top: 1rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.56rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-pill--submitted {
  background: rgba(255, 141, 77, 0.16);
  color: #b85d1f;
}

.status-pill--reviewed {
  background: rgba(10, 153, 99, 0.16);
  color: #0c7c51;
}

.muted {
  color: var(--ink-soft);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar__right,
  .topbar__nav {
    justify-items: start;
    justify-content: flex-start;
  }

  .user-chip {
    text-align: left;
    width: fit-content;
  }

  .form-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding: 0.8rem 0.72rem 1.5rem;
  }

  .content {
    padding: 0.95rem;
  }

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

  .topbar__nav a,
  .button {
    font-size: 0.82rem;
  }
}

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