@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg-body: #F2F2F7;
  --bg-card: #FFFFFF;
  --bg-input: #EBEBF0;

  --text-primary: #0A0A0B;
  --text-secondary: #6B6B7B;
  --text-tertiary: #A0A0AD;
  --text-on-dark: #FFFFFF;

  --brand-teal: #5ddacc;
  --brand-dark: #003232;

  --accent: var(--brand-dark);
  --accent-highlight: #005050;
  --accent-soft: rgba(93, 218, 204, 0.15);

  --success: #16A34A;
  --success-soft: rgba(22, 163, 74, 0.12);
  --danger: #DC2626;
  --warning: #D97706;
  --warning-soft: rgba(217, 119, 6, 0.12);

  --separator: #D1D1D6;
  --separator-light: #EAEAEF;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.10), 0 4px 8px rgba(0, 0, 0, 0.06);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: var(--font-family);
  color: var(--text-primary);
  background: var(--bg-body);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-highlight);
}

/* ── Page Layout ──────────────────────────────────────── */
.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 16px 60px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.page--wide {
  max-width: 1120px;
}

@media (min-width: 640px) {
  .page {
    padding: 40px 24px 80px;
    gap: 32px;
  }
}

/* ── Typography ───────────────────────────────────────── */
h1 {
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.025em;
  margin: 16px 0 12px;
  color: var(--text-primary);
  line-height: 1.2;
}

@media (min-width: 640px) {
  h1 {
    font-size: 34px;
  }
}

h2 {
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.018em;
  margin: 0 0 8px;
  color: var(--text-primary);
}

@media (min-width: 640px) {
  h2 {
    font-size: 21px;
  }
}

p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 15px;
  font-weight: 400;
}

@media (min-width: 640px) {
  p {
    font-size: 16px;
  }
}

.muted {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* ── Badge ────────────────────────────────────────────── */
.hero__badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.step__title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}

/* ── Cards ────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--separator-light);
  position: relative;
  overflow: hidden;
}

@media (min-width: 640px) {
  .card {
    padding: 28px 32px;
  }
}

/* ── Hero Section (Landing) ───────────────────────────── */
.hero {
  text-align: center;
  padding: 40px 0 48px;
  max-width: 640px;
  margin: 0 auto;
}

.hero p {
  font-size: 18px;
  color: var(--text-secondary);
  margin-top: 12px;
}

/* ── Hero Card (Dashboard) ────────────────────────────── */
.hero-card {
  background: linear-gradient(135deg, var(--brand-dark) 0%, #005a5a 100%);
  border-radius: var(--radius-xl);
  padding: 40px;
  color: white;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 32px;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
  border: none;
}

.hero-card::before {
  content: "";
  position: absolute;
  top: -60%;
  right: -20%;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(93,218,204,0.18) 0%, transparent 65%);
  pointer-events: none;
}

@media (min-width: 768px) {
  .hero-card {
    flex-direction: row;
    align-items: center;
  }
}

.hero-card h1 {
  color: white;
  font-size: 28px;
  margin: 8px 0;
}

@media (min-width: 640px) {
  .hero-card h1 {
    font-size: 32px;
  }
}

.hero-card p {
  color: rgba(255, 255, 255, 0.80);
  font-size: 16px;
  max-width: 480px;
}

.hero-card .hero__badge {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  letter-spacing: 0.06em;
}

.hero__stat {
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 20px 28px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  min-width: 160px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.hero__label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 6px;
  font-weight: 600;
}

.hero__value {
  font-size: 40px;
  font-weight: 800;
  color: white;
  letter-spacing: -0.02em;
}

/* ── Forms & Inputs ───────────────────────────────────── */
.form {
  display: grid;
  gap: 20px;
  margin-top: 24px;
}

label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

input {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--separator);
  font-size: 15px;
  background: white;
  color: var(--text-primary);
  font-family: inherit;
  transition: all 0.15s ease;
  width: 100%;
}

input::placeholder {
  color: var(--text-tertiary);
}

input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

input[readonly] {
  color: var(--text-secondary);
  background: var(--bg-input);
  border-color: transparent;
  cursor: default;
}

.field-row {
  display: block;
}

.row-input {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.row-input input {
  flex: 1;
}

/* ── Buttons ──────────────────────────────────────────── */
.button {
  border: none;
  border-radius: var(--radius-md);
  padding: 13px 22px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  letter-spacing: 0.01em;
  font-family: inherit;
}

.button:active {
  transform: scale(0.97);
}

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

.button--dark {
  background: var(--accent);
  color: white;
}

.button--dark:hover:not(:disabled) {
  background: var(--accent-highlight);
}

.button--ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--separator);
}

.button--ghost:hover:not(:disabled) {
  background: var(--bg-input);
  border-color: var(--separator);
}

.button--success {
  background: var(--success);
  color: white;
}

/* ── Topbar ───────────────────────────────────────────── */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--separator-light);
  margin-bottom: 4px;
}

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

.brand__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--brand-dark);
  border-radius: 10px;
}

.brand__logo {
  height: 22px;
  width: auto;
  filter: brightness(0) invert(1);
}

.brand__title {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.brand__subtitle {
  display: none;
}

@media (min-width: 640px) {
  .brand__subtitle {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 1px;
    font-weight: 500;
  }
}

.topbar__actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ── Navigation ───────────────────────────────────────── */
.dash-nav {
  background: var(--bg-input);
  padding: 3px;
  border-radius: var(--radius-md);
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex-shrink: 0;
  gap: 2px;
}

.dash-nav::-webkit-scrollbar {
  display: none;
}

.dash-nav__item {
  flex: 0 0 auto;
  background: transparent;
  color: var(--text-secondary);
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  transition: all 0.15s ease;
  text-align: center;
  font-family: inherit;
}

.dash-nav__item:hover:not(.is-active) {
  color: var(--text-primary);
}

.dash-nav__item.is-active {
  background: white;
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* ── Copy Cards ───────────────────────────────────────── */
.copy-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

.copy-card {
  background: var(--bg-body);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  border: 1px solid var(--separator-light);
}

.copy-card .muted {
  width: 100%;
  margin-bottom: 2px;
}

.copy-card__value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  color: var(--text-primary);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.copy-card .button {
  flex-shrink: 0;
  padding: 7px 14px;
  font-size: 13px;
}

/* ── Grids ────────────────────────────────────────────── */
.grid {
  display: grid;
  gap: 20px;
}

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

@media (min-width: 768px) {
  .grid--2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── Status Messages ──────────────────────────────────── */
.status {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 500;
  min-height: 20px;
  text-align: center;
  line-height: 1.5;
}

/* ── Tables ───────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  margin: 0 -20px;
  padding: 0 20px;
}

@media (min-width: 640px) {
  .table-wrap {
    margin: 0 -32px;
    padding: 0 32px;
  }
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

.data-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  font-weight: 600;
  border-bottom: 1px solid var(--separator-light);
  white-space: nowrap;
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--separator-light);
  color: var(--text-primary);
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover td {
  background: #FAFAFA;
}

.table-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ── Progress Bar ─────────────────────────────────────── */
.progress {
  height: 6px;
  background: var(--bg-input);
  border-radius: 999px;
  overflow: hidden;
  margin: 20px 0 10px;
}

.progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-dark), var(--brand-teal));
  border-radius: inherit;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Pills ────────────────────────────────────────────── */
.pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-input);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  letter-spacing: 0.02em;
}

.pill--accent {
  background: var(--accent-soft);
  color: var(--accent);
}

.pill--success {
  background: var(--success-soft);
  color: var(--success);
}

.pill--pending {
  background: var(--warning-soft);
  color: var(--warning);
}

/* ── Stat Grid ────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 16px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--separator-light);
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 4px;
  letter-spacing: -0.02em;
}

/* ── Auth Card ────────────────────────────────────────── */
.auth-card {
  max-width: 400px;
  margin: 20px auto;
  text-align: center;
}

@media (min-width: 640px) {
  .auth-card {
    margin: 40px auto;
  }
}

.auth-card__content {
  margin-bottom: 28px;
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 28px 0 0;
}

.auth-form {
  text-align: left;
  border-top: 1px solid var(--separator-light);
  padding-top: 28px;
}

/* ── Utilities ────────────────────────────────────────── */
.hidden { display: none !important; }
[x-cloak] { display: none !important; }

.dashboard-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 12px;
}

/* ── Claim Form ───────────────────────────────────────── */
.form--inline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.form--inline label {
  width: 100%;
}

.form--inline .button {
  width: 100%;
}

@media (min-width: 640px) {
  .form--inline {
    flex-direction: row;
    gap: 10px;
    align-items: flex-end;
  }

  .form--inline label {
    flex: 1;
  }

  .form--inline .button {
    width: auto;
    flex-shrink: 0;
  }
}

.claim-amount {
  display: flex;
  gap: 32px;
  margin: 20px 0;
}

/* ── Success Modal ────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
  animation: fadeIn 0.2s ease forwards;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 40px 32px 36px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal__icon {
  width: 60px;
  height: 60px;
  background: var(--success-soft);
  color: var(--success);
  border-radius: 50%;
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 6px;
}

.modal__title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.modal__body {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
}

.modal__countdown {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-tertiary);
  margin: 0;
}

.modal .button {
  margin-top: 8px;
  width: 100%;
}

/* ── Split Layout (Bind page) ─────────────────────────── */
.split-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

@media (min-width: 768px) {
  .split-layout {
    flex-direction: row;
  }
}

.brand-panel {
  background: var(--brand-dark);
  color: white;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .brand-panel {
    width: 420px;
    min-height: 100vh;
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 52px 48px;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    overflow: hidden;
  }

  .brand-panel::after {
    content: "";
    position: absolute;
    bottom: -80px;
    right: -80px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(93,218,204,0.15) 0%, transparent 70%);
    pointer-events: none;
  }
}

.brand-panel__logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.brand-panel__logo {
  height: 28px;
  width: auto;
  filter: brightness(0) invert(1);
}

.brand-panel__name {
  font-size: 18px;
  font-weight: 700;
  color: white;
  letter-spacing: -0.01em;
}

.brand-panel__content {
  display: none;
  position: relative;
  z-index: 1;
}

@media (min-width: 768px) {
  .brand-panel__content {
    display: flex;
    flex-direction: column;
    flex: 1;
    margin-top: 64px;
  }
}

.brand-panel__headline {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: white;
  margin: 0 0 16px;
}

.brand-panel__sub {
  font-size: 15px;
  color: rgba(255,255,255,0.65);
  line-height: 1.65;
  margin: 0;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 36px 0 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255,255,255,0.72);
}

.feature-icon {
  width: 22px;
  height: 22px;
  background: rgba(93, 218, 204, 0.18);
  border: 1px solid rgba(93, 218, 204, 0.25);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--brand-teal);
  margin-top: 1px;
  font-style: normal;
}

.feature-item strong {
  color: white;
  font-weight: 600;
}

.brand-panel__footer {
  display: none;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: auto;
  position: relative;
  z-index: 1;
}

@media (min-width: 768px) {
  .brand-panel__footer {
    display: block;
  }
}

.brand-panel__link {
  color: var(--brand-teal);
  font-weight: 500;
  transition: color 0.2s;
}

.brand-panel__link:hover {
  color: white;
}

/* Form Panel */
.form-panel {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 36px 20px 60px;
  background: #F5F5F7;
}

@media (min-width: 768px) {
  .form-panel {
    align-items: center;
    min-height: 100vh;
    padding: 60px 48px;
  }
}

.form-panel__inner {
  width: 100%;
  max-width: 420px;
}

.form-header {
  margin-bottom: 28px;
}

.form-headline {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.022em;
  margin: 8px 0 10px;
  color: var(--text-primary);
}

.form-sub {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.form-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--text-tertiary);
}

.form-footer a {
  color: var(--text-secondary);
  font-weight: 500;
}

.form-footer a:hover {
  color: var(--text-primary);
}

/* ── Animations ───────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.94) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.reveal {
  animation: slideUpFade 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}

@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
