:root {
  --bg: #f8fafc;
  --surface: rgba(255, 255, 255, 0.92);
  --accent: #0f766e;
  --accent-2: #14b8a6;
  --text: #0f172a;
  --muted: rgba(15, 23, 42, 0.68);
  --border: rgba(15, 23, 42, 0.10);
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(20, 184, 166, 0.22), transparent 28%),
    radial-gradient(circle at top right, rgba(244, 114, 182, 0.16), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.38)),
    var(--bg);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(15, 23, 42, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.42), transparent 80%);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

input,
select,
textarea,
button {
  font: inherit;
}

button {
  cursor: pointer;
}

.glass-card {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: 'Space Grotesk', 'Manrope', sans-serif;
  line-height: 1.06;
}

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 16px 30px rgba(15, 118, 110, 0.28);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.66);
  border-color: var(--border);
}

.btn-danger {
  color: #fff;
  background: linear-gradient(135deg, #dc2626, #fb7185);
}

.btn-small {
  padding: 0.72rem 1rem;
  font-size: 0.92rem;
}

.btn-block {
  width: 100%;
}

.alert {
  border-radius: 18px;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.alert-success {
  background: rgba(34, 197, 94, 0.14);
  color: #166534;
  border-color: rgba(34, 197, 94, 0.22);
}

.alert-error {
  background: rgba(239, 68, 68, 0.12);
  color: #991b1b;
  border-color: rgba(239, 68, 68, 0.2);
}

.landing-shell,
.auth-shell,
.dashboard-shell,
.public-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.hero-card,
.auth-card,
.sidebar,
.panel-card,
.public-card,
.feature-card,
.notice-box,
.empty-state {
  border-radius: 28px;
}

.hero-card {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  overflow: hidden;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hero-copy h1 {
  font-size: clamp(2.3rem, 5vw, 4.8rem);
  max-width: 10ch;
}

.hero-copy p {
  max-width: 62ch;
  font-size: 1.04rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: auto;
}

.hero-metrics div,
.feature-card,
.theme-chip,
.notice-box,
.link-row,
.empty-state {
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid var(--border);
}

.hero-metrics div {
  border-radius: 20px;
  padding: 1rem;
}

.hero-metrics strong,
.panel-header h2,
.feature-card h3,
.notice-box strong,
.empty-state h3,
.public-card h1,
.auth-brand h1,
.panel-card h2,
.link-row strong {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
}

.hero-metrics span {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  line-height: 1.5;
}

.hero-preview {
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-phone {
  width: min(100%, 320px);
  padding: 1rem;
  border-radius: 34px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.92));
  color: #f8fafc;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.3);
}

.preview-topbar {
  width: 34%;
  height: 6px;
  margin: 0 auto 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.preview-avatar,
.avatar-large,
.public-avatar {
  width: 92px;
  height: 92px;
  margin: 0 auto 1rem;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-phone h2 {
  text-align: center;
  margin-bottom: 0.25rem;
}

.preview-phone p {
  text-align: center;
  color: rgba(226, 232, 240, 0.72);
  margin-bottom: 1rem;
}

.preview-phone a {
  display: block;
  margin-top: 0.7rem;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  text-align: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-grid,
.dashboard-grid {
  display: grid;
  gap: 1rem;
}

.feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1rem;
}

.feature-card,
.empty-state {
  padding: 1.2rem;
}

.auth-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
}

.auth-shell-wide .auth-card {
  width: min(880px, 100%);
}

.auth-card {
  width: min(560px, 100%);
  padding: clamp(1.4rem, 4vw, 2.2rem);
}

.auth-brand {
  margin-bottom: 1.25rem;
}

.auth-brand h1 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  margin-top: 0.35rem;
}

.form-grid {
  display: grid;
  gap: 0.95rem;
}

.form-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid .full {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 0.45rem;
}

label span {
  font-size: 0.94rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.82);
  padding: 0.95rem 1rem;
  color: var(--text);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(15, 118, 110, 0.36);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.15);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.theme-preview-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.theme-chip {
  border-radius: 18px;
  padding: 0.95rem;
  display: grid;
  gap: 0.35rem;
}

.theme-chip.is-active {
  border-color: rgba(15, 118, 110, 0.38);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

.theme-chip span {
  color: var(--muted);
  line-height: 1.45;
}

.auth-switch {
  margin-top: 1rem;
  text-align: center;
}

.auth-switch a {
  color: var(--accent);
  font-weight: 800;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1rem;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 1rem;
  padding: 1.25rem;
}

.profile-card {
  display: grid;
  gap: 0.9rem;
  justify-items: center;
  text-align: center;
}

.avatar-large {
  margin-bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.06));
}

.sidebar-links {
  display: grid;
  gap: 0.65rem;
  margin: 1.25rem 0;
}

.sidebar-links a {
  padding: 0.95rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--border);
  font-weight: 700;
}

.notice-box {
  display: grid;
  gap: 0.35rem;
  padding: 1rem;
}

.notice-box span,
.link-row span,
.public-bio,
.public-empty p,
.empty-state p {
  color: var(--muted);
}

.dashboard-main {
  display: grid;
  gap: 1rem;
}

.dashboard-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel-card {
  padding: 1.25rem;
}

.panel-card h2 {
  font-size: 1.55rem;
  margin-bottom: 1rem;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel-header span {
  color: var(--muted);
  font-weight: 700;
}

.link-list {
  display: grid;
  gap: 0.75rem;
}

.link-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border-radius: 20px;
}

.link-row.is-disabled {
  opacity: 0.62;
}

.link-row div {
  min-width: 0;
}

.link-row strong {
  margin-bottom: 0.25rem;
}

.link-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 52ch;
}

.link-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}

.link-actions form {
  margin: 0;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding-top: 0.45rem;
}

.checkbox-row input {
  width: auto;
  margin: 0;
  box-shadow: none;
}

.public-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
}

.public-card {
  width: min(560px, 100%);
  padding: clamp(1.4rem, 4vw, 2.2rem);
  text-align: center;
}

.public-card h1 {
  font-size: clamp(2rem, 4vw, 3.3rem);
  margin: 0.5rem 0 0.75rem;
}

.public-avatar {
  width: 110px;
  height: 110px;
}

.public-links {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.public-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--border);
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease;
}

.public-link:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.3);
}

.public-link span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 800;
  text-transform: uppercase;
}

.public-link strong {
  font-size: 1rem;
}

.public-empty {
  text-align: center;
}

.public-shell-error {
  min-height: 100vh;
}

.empty-state {
  text-align: center;
}

.empty-state h3 {
  margin-bottom: 0.4rem;
}

.site-footer {
  width: 100%;
  margin: 2rem 0 1.5rem;
  padding: 0 1rem;
  display: flex;
  justify-content: center;
}

.site-footer-inner {
  width: min(1180px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 1.15rem 1.25rem;
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.62)),
    var(--surface);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  text-align: center;
}

.site-footer-brand {
  display: grid;
  gap: 0.2rem;
  justify-items: center;
}

.site-footer-brand strong {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.08rem;
  letter-spacing: 0.03em;
}

.site-footer-brand span,
.site-footer-brand a,
.site-footer-meta a,
.site-footer-meta span {
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer-brand a,
.site-footer-meta a {
  text-decoration: none;
  transition: color 160ms ease, opacity 160ms ease;
}

.site-footer-brand a:hover,
.site-footer-meta a:hover {
  color: var(--accent);
}

.site-footer-brand strong,
.site-footer-brand a strong {
  font-weight: 800;
}

.site-footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.55rem 0.9rem;
  text-align: center;
}

.site-footer-meta a {
  font-weight: 700;
}

.site-footer-meta a:hover {
  color: var(--accent);
}

.site-footer-meta span + span::before,
.site-footer-meta a + span::before {
  content: '•';
  margin-right: 0.9rem;
  color: rgba(15, 23, 42, 0.3);
}

.admin-shell {
  width: min(1320px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
  display: grid;
  gap: 1rem;
}

.admin-hero,
.admin-panel,
.admin-tabs {
  border-radius: 28px;
}

.admin-hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1rem;
  padding: 1.25rem;
}

.admin-hero h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  margin: 0.4rem 0 0.6rem;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.admin-stats div {
  padding: 1rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.58);
}

.admin-stats strong {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.6rem;
}

.admin-stats span {
  color: var(--muted);
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.75rem;
}

.admin-tabs a {
  padding: 0.85rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.5);
  font-weight: 700;
}

.admin-tabs a.is-active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}

.admin-panel {
  padding: 1.25rem;
}

.admin-filters {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr 0.9fr auto;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.admin-filters-links {
  grid-template-columns: 1.5fr 0.9fr 0.7fr auto;
}

.admin-table {
  display: grid;
  gap: 0.8rem;
}

.admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.6);
}

.admin-row-main {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.admin-row-main span {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-row-actions {
  display: grid;
  gap: 0.6rem;
  justify-items: end;
}

.admin-row-actions form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  justify-content: flex-end;
  margin: 0;
}

.admin-row-actions select {
  min-width: 130px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  vertical-align: middle;
}

.badge-muted {
  color: var(--text);
  background: rgba(15, 23, 42, 0.12);
}

.admin-checkbox {
  min-width: 130px;
}

@media (max-width: 1024px) {
  .hero-card,
  .dashboard-shell,
  .admin-hero,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .admin-filters,
  .admin-filters-links {
    grid-template-columns: 1fr;
  }

  .admin-row {
    grid-template-columns: 1fr;
  }

  .admin-row-actions {
    justify-items: stretch;
  }

  .admin-row-actions form {
    justify-content: flex-start;
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 720px) {
  .landing-shell,
  .auth-shell,
  .dashboard-shell,
  .public-shell {
    width: min(100% - 1rem, 1180px);
    padding-top: 1rem;
  }

  .hero-metrics,
  .feature-grid,
  .form-grid-two {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    max-width: none;
  }

  .link-row,
  .panel-header,
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .link-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .site-footer-inner {
  padding: 1rem 1rem;
  }

  .site-footer-meta {
  justify-content: center;
  text-align: center;
  }

  .site-footer-meta span + span::before {
    content: none;
    margin-right: 0;
  }

  .site-footer-meta a + span::before {
    content: none;
    margin-right: 0;
  }

  .public-card,
  .auth-card,
  .panel-card,
  .sidebar,
  .hero-card,
  .admin-hero,
  .admin-panel,
  .admin-tabs {
    border-radius: 24px;
  }
}
