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

:root {
  --ink: #101827;
  --ink-soft: #344054;
  --paper: #fbfcff;
  --text: #111827;
  --muted: #667085;
  --line: rgba(102, 112, 133, 0.16);
  --glass: rgba(255, 255, 255, 0.58);
  --glass-strong: rgba(255, 255, 255, 0.76);
  --cyan: #22d3ee;
  --green: #20d58a;
  --blue: #5975ff;
  --rose: #f26ab6;
  --amber: #f6b33f;
  --danger: #e5485d;
  --shadow: rgba(47, 65, 95, 0.16);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 20%, rgba(34, 211, 238, 0.28), transparent 29%),
    radial-gradient(circle at 82% 22%, rgba(242, 106, 182, 0.22), transparent 30%),
    radial-gradient(circle at 50% 88%, rgba(246, 179, 63, 0.2), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f4f8ff 48%, #f7f6ff 100%);
  color: var(--text);
  font-family: "Inter", Arial, sans-serif;
}

button,
a {
  font: inherit;
}

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

.page-shell {
  position: relative;
  min-height: 100vh;
  padding: 18px;
}

.page-shell::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(16, 24, 39, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 24, 39, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  content: "";
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.65), transparent);
}

.page-shell::after {
  position: fixed;
  left: 50%;
  bottom: 12%;
  z-index: -1;
  width: min(760px, 92vw);
  height: 112px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--rose), var(--amber));
  content: "";
  filter: blur(62px);
  opacity: 0.42;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 720px;
  margin: 0 auto;
}

.brand,
.status,
.action-pill,
.log-strip {
  border: 1px solid rgba(255, 255, 255, 0.76);
  background: var(--glass-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 20px 42px var(--shadow);
  backdrop-filter: blur(20px) saturate(170%);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 8px 16px 8px 10px;
  border-radius: 999px;
  color: var(--ink);
  gap: 10px;
}

.brand-mark,
.shape-icon,
.modal-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(32, 213, 138, 0.18));
  color: #0f9eb3;
}

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 124px;
  height: 48px;
  padding: 8px 15px;
  border-radius: 999px;
  color: var(--ink);
  gap: 9px;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.status::after,
.action-pill.primary::after,
.ownership-box::after {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: -2px;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--rose), var(--amber));
  content: "";
  filter: blur(0.6px);
  opacity: 0.9;
}

.status {
  position: relative;
}

.lottie-box {
  position: absolute;
  width: 30px;
  height: 30px;
  opacity: 0;
  pointer-events: none;
}

.status-icon {
  color: #0ea5c6;
  font-size: 15px;
}

.status-text {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.status[data-state="syncing"] .status-icon {
  animation: spin 1s linear infinite;
}

.status[data-state="saved"] .status-icon {
  color: var(--green);
}

.status[data-state="error"] .status-icon {
  color: var(--danger);
}

.container {
  display: grid;
  min-height: calc(100vh - 84px);
  place-items: center;
  padding: 36px 0 52px;
}

.identity-panel {
  position: relative;
  width: min(430px, 100%);
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.28) 42%, transparent),
    var(--glass);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 34px 70px rgba(65, 83, 120, 0.18),
    0 18px 56px rgba(89, 117, 255, 0.12);
  backdrop-filter: blur(24px) saturate(175%);
  -webkit-backdrop-filter: blur(24px) saturate(175%);
  opacity: 0;
  overflow: hidden;
  transform: translateY(38px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.identity-panel::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(120deg, rgba(34, 211, 238, 0.12), transparent 38%, rgba(242, 106, 182, 0.12)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.44), transparent 56%);
  content: "";
  pointer-events: none;
}

.identity-panel.show {
  opacity: 1;
  transform: translateY(0);
}

.profile-row,
.ownership-box,
.desc,
.actions,
.log-strip {
  position: relative;
  z-index: 1;
}

.profile-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
}

.profile-row img {
  width: 68px;
  height: 68px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  box-shadow:
    0 0 0 6px rgba(255, 255, 255, 0.52),
    0 18px 30px rgba(65, 83, 120, 0.16);
  object-fit: cover;
}

.eyebrow,
.label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.profile-row h1 {
  color: var(--ink);
  font-size: 23px;
  line-height: 1.16;
}

.profile-row h1 + .eyebrow {
  margin-top: 5px;
  color: #475467;
}

.ownership-box {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 104px;
  margin: 12px 0 0;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.48)),
    rgba(255, 255, 255, 0.54);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 18px 36px rgba(65, 83, 120, 0.13);
  overflow: hidden;
}

.shape-icon {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  color: #06242b;
  font-size: 22px;
  box-shadow: 0 12px 34px rgba(34, 211, 238, 0.24);
}

.ownership-box h2 {
  color: var(--ink);
  font-size: 33px;
  line-height: 1;
}

.desc {
  margin: 18px 8px 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.65;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 0.82fr;
  gap: 12px;
  margin-top: 22px;
}

.action-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  min-height: 58px;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  gap: 10px;
  overflow: hidden;
}

.action-pill span {
  min-width: 0;
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-pill i:first-child {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: #0ea5c6;
}

.action-pill i:last-child {
  flex: 0 0 auto;
  color: rgba(16, 24, 39, 0.54);
}

.action-pill.primary {
  border-color: rgba(34, 211, 238, 0.48);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.56)),
    rgba(255, 255, 255, 0.72);
}

.action-pill.primary i:first-child {
  background: linear-gradient(135deg, var(--green), var(--cyan));
  color: #06242b;
}

.action-pill.secondary {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.45)),
    rgba(255, 255, 255, 0.62);
  color: var(--ink);
}

.action-pill:hover {
  transform: translateY(-1px);
}

.action-pill:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.log-strip {
  display: flex;
  align-items: center;
  min-height: 48px;
  margin-top: 12px;
  padding: 12px 15px;
  border-radius: 999px;
  color: var(--ink-soft);
  gap: 10px;
}

.log-strip i {
  color: var(--green);
}

.log-strip span {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.animate {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.animate.show {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 0.12s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.28s; }
.delay-4 { transition-delay: 0.36s; }

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  padding: 20px;
  place-items: center;
  background: rgba(245, 248, 252, 0.56);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  width: min(390px, 100%);
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.52)),
    rgba(255, 255, 255, 0.74);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 30px 80px rgba(65, 83, 120, 0.24);
  color: var(--ink);
  transform: translateY(18px) scale(0.96);
  transition: transform 0.25s ease;
}

.modal-overlay.show .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(30, 41, 59, 0.12);
}

.modal-icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--rose));
  color: #fff;
}

.modal-header .eyebrow {
  color: #657083;
}

.modal-header h3 {
  margin-top: 2px;
  font-size: 20px;
}

.modal-body {
  display: grid;
  gap: 10px;
  padding: 16px 0;
  color: #3d4858;
  font-size: 14px;
  line-height: 1.65;
}

.modal-actions {
  display: grid;
  gap: 10px;
}

.modal .action-pill {
  justify-content: center;
  min-height: 54px;
}

.modal .action-pill span {
  flex: 0 1 auto;
}

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

@media (max-width: 430px) {
  .page-shell {
    padding: 14px;
  }

  .topbar {
    align-items: stretch;
  }

  .brand,
  .status {
    min-height: 44px;
  }

  .brand {
    max-width: 48%;
  }

  .status {
    min-width: 112px;
  }

  .container {
    min-height: calc(100vh - 72px);
    padding: 24px 0 36px;
  }

  .profile-row h1 {
    font-size: 20px;
  }

  .ownership-box h2 {
    font-size: 29px;
  }

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

  .log-strip span {
    white-space: normal;
  }
}
