:root {
  color-scheme: light;
  --bg: #ffffff;
  --app-bg: #f7f9f9;
  --surface: #ffffff;
  --surface-alt: #f7f9f9;
  --surface-hover: #eff3f4;
  --ink: #0f1419;
  --muted: #536471;
  --line: #eff3f4;
  --line-strong: #cfd9de;
  --blue: #1d9bf0;
  --blue-dark: #1a8cd8;
  --green: #00ba7c;
  --amber: #ffd400;
  --danger: #f4212e;
  --shadow: 0 16px 40px rgba(15, 20, 25, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

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

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  margin-top: 18px;
  max-width: 860px;
  font-size: 68px;
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  font-size: 36px;
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0;
}

.site {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(247, 249, 249, 0.86) 0, rgba(255, 255, 255, 0) 420px),
    var(--bg);
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 780;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 18px;
  font-weight: 850;
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link,
.app-nav-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 650;
  transition:
    background 0.16s ease,
    color 0.16s ease;
}

.nav-link {
  padding: 0 16px;
}

.nav-link:hover,
.app-nav-link:hover,
.nav-link.active,
.app-nav-link.active {
  background: var(--surface-hover);
  color: var(--ink);
}

.actions,
.header-actions,
.feed-row-actions,
.account-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.language-select,
.select,
.input {
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

.language-select {
  min-width: 116px;
  padding: 0 12px;
}

.input {
  width: 100%;
  padding: 0 16px;
}

.select {
  width: 100%;
  padding: 0 14px;
}

.input:hover,
.select:hover,
.language-select:hover {
  background: var(--surface-alt);
}

.input:focus,
.select:focus,
.language-select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(29, 155, 240, 0.18);
}

.btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 0 18px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 760;
  letter-spacing: 0;
  white-space: nowrap;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease;
}

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

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
}

.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 12px 26px rgba(15, 20, 25, 0.16);
}

.btn-primary:hover {
  background: #272c30;
}

.btn-secondary {
  border: 1px solid var(--line-strong);
  background: #fff;
}

.btn-secondary:hover {
  border-color: #aebbc2;
  background: var(--surface-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--surface-hover);
}

.btn-danger {
  border: 1px solid rgba(244, 33, 46, 0.24);
  background: rgba(244, 33, 46, 0.08);
  color: var(--danger);
}

.btn-danger:hover {
  background: rgba(244, 33, 46, 0.13);
}

.btn-small {
  min-height: 34px;
  padding: 0 13px;
  font-size: 13px;
}

.hero {
  padding: 72px 0 44px;
}

.hero .container {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: 44px;
  align-items: center;
}

.hero-copy {
  max-width: 620px;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  min-height: 32px;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0 13px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.lead {
  margin-top: 20px;
  max-width: 700px;
  color: var(--muted);
  font-size: 18px;
}

.page-hero-title {
  font-size: 58px;
}

.hero-form {
  display: grid;
  max-width: 600px;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 28px;
}

.hero-preview {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.preview-header,
.panel-header {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 0 18px;
}

.preview-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 390px;
}

.preview-side {
  border-right: 1px solid var(--line);
  background: var(--surface-alt);
  padding: 18px;
}

.preview-stream {
  padding: 0;
}

.section {
  padding: 56px 0;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.section-heading p {
  max-width: 520px;
  color: var(--muted);
}

.feature-grid,
.pricing-grid,
.faq-grid,
.metric-grid {
  display: grid;
  gap: 16px;
}

.feature-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pricing-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.faq-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card,
.tweet,
.account-row,
.feed-row,
.auth-card,
.panel,
.metric-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.card,
.metric-card {
  padding: 20px;
}

.card p,
.faq-item p,
.pricing-card p {
  margin-top: 8px;
  color: var(--muted);
}

.feature-kicker {
  margin-bottom: 14px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 850;
}

.pricing-card {
  padding: 22px;
}

.pricing-card:nth-child(2) {
  border-color: var(--ink);
  box-shadow: var(--shadow);
}

.price {
  margin-top: 16px;
  font-size: 34px;
  font-weight: 850;
  letter-spacing: 0;
}

.pricing-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 22px;
  padding: 0;
  color: var(--muted);
  list-style: none;
}

.pricing-list li::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--blue);
  vertical-align: middle;
}

.faq-item {
  padding: 18px;
}

.auth-wrap {
  display: grid;
  min-height: calc(100vh - 64px);
  place-items: center;
  padding: 42px 0;
  background:
    linear-gradient(180deg, rgba(247, 249, 249, 0.95), rgba(255, 255, 255, 0.85)),
    var(--bg);
}

.auth-card {
  width: min(440px, calc(100% - 40px));
  padding: 28px;
  box-shadow: var(--shadow);
}

.auth-card .lead {
  margin-top: 8px;
  font-size: 15px;
}

.form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.activation-form {
  grid-template-columns: minmax(180px, 260px) auto;
  align-items: end;
}

.form-error {
  margin-top: 16px;
  border: 1px solid rgba(244, 33, 46, 0.24);
  border-radius: var(--radius);
  background: rgba(244, 33, 46, 0.08);
  padding: 12px 14px;
  color: var(--danger);
  font-size: 14px;
  font-weight: 650;
}

.form-success {
  margin-top: 16px;
  border: 1px solid rgba(0, 186, 124, 0.24);
  border-radius: var(--radius);
  background: rgba(0, 186, 124, 0.08);
  padding: 12px 14px;
  color: #007a52;
  font-size: 14px;
  font-weight: 650;
}

.form-info {
  margin-top: 16px;
  border: 1px solid rgba(29, 155, 240, 0.24);
  border-radius: var(--radius);
  background: rgba(29, 155, 240, 0.08);
  padding: 12px 14px;
  color: #0f5f99;
  font-size: 14px;
  font-weight: 650;
}

.form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 270px minmax(0, 1fr);
  background: var(--bg);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: #fff;
  padding: 18px;
}

.app-nav {
  display: grid;
  gap: 6px;
  margin-top: 28px;
}

.app-nav-link {
  justify-content: flex-start;
  padding: 0 14px;
  font-size: 18px;
}

.sidebar-footer {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.app-main {
  min-width: 0;
  background: #fff;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  padding: 0 28px;
  backdrop-filter: blur(16px);
}

.app-content {
  max-width: 1120px;
  padding: 28px;
}

.page-title {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.page-title p {
  color: var(--muted);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0;
}

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(180px, 220px);
  gap: 10px;
  width: min(620px, 100%);
}

.select-filter,
.date-filter {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.panel {
  overflow: hidden;
}

.panel-body {
  padding: 18px;
}

.metric-card {
  background: var(--surface-alt);
}

.metric-value {
  margin-top: 8px;
  font-size: 30px;
  font-weight: 850;
}

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

.status {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(0, 186, 124, 0.1);
  color: #007a53;
  font-size: 12px;
  font-weight: 850;
}

.status.failed {
  background: rgba(244, 33, 46, 0.09);
  color: var(--danger);
}

.status.syncing {
  background: rgba(255, 212, 0, 0.18);
  color: #7a6500;
}

.feed-list,
.account-list {
  display: grid;
  gap: 12px;
}

.tweet-list {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.feed-row,
.account-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  transition:
    background 0.16s ease,
    border-color 0.16s ease;
}

.feed-row:hover,
.account-row:hover {
  border-color: var(--line-strong);
  background: var(--surface-alt);
}

.feed-row-main,
.account-main,
.tweet-author,
.target {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-alt);
  object-fit: cover;
}

.avatar-lg {
  width: 56px;
  height: 56px;
}

.truncate {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.feed-layout {
  display: grid;
  grid-template-columns: minmax(0, 680px) minmax(280px, 320px);
  gap: 18px;
  align-items: start;
}

.feed-stream {
  max-width: 920px;
}

.tweet {
  padding: 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.tweet:last-child {
  border-bottom: 0;
}

.tweet:hover {
  background: rgba(247, 249, 249, 0.82);
}

.tweet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.tweet-body {
  margin-top: 12px;
  color: var(--ink);
  white-space: pre-wrap;
}

.tweet-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.account-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  padding: 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 740;
}

.empty {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 30px;
  background: var(--surface-alt);
  text-align: center;
}

.empty p {
  margin-top: 8px;
  color: var(--muted);
}

.table-like {
  display: grid;
  gap: 10px;
}

.setting-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}

.setting-line:last-child {
  border-bottom: 0;
}

.admin-table {
  display: grid;
}

.admin-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.7fr) minmax(86px, 0.7fr) minmax(80px, 0.6fr) minmax(90px, 0.7fr) minmax(130px, 1fr);
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
}

.admin-row:last-child {
  border-bottom: 0;
}

.admin-row-head {
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.mobile-menu {
  display: none;
}

@media (max-width: 980px) {
  h1 {
    font-size: 52px;
  }

  .page-hero-title {
    font-size: 44px;
  }

  .hero .container,
  .feature-grid,
  .pricing-grid,
  .faq-grid,
  .metric-grid,
  .preview-grid,
  .feed-layout {
    grid-template-columns: 1fr;
  }

  .preview-side {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .app-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .app-nav-link {
    justify-content: center;
    font-size: 15px;
  }

  .sidebar-footer {
    grid-template-columns: 1fr auto;
    margin-top: 18px;
  }

  .app-header {
    position: static;
  }
}

@media (max-width: 720px) {
  h1 {
    font-size: 42px;
  }

  .page-hero-title {
    font-size: 36px;
  }

  h2 {
    font-size: 30px;
  }

  .container {
    width: min(100% - 28px, 1180px);
  }

  .topbar-inner {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .brand span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }

  .actions {
    flex: 1 1 auto;
    justify-content: flex-end;
  }

  .hero {
    padding-top: 42px;
  }

  .hero-form,
  .filters,
  .activation-form,
  .setting-line {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .toolbar,
  .app-header {
    align-items: stretch;
    flex-direction: column;
  }

  .feed-row,
  .account-row {
    grid-template-columns: 1fr;
  }

  .tweet-head {
    align-items: stretch;
    flex-direction: column;
  }

  .app-header,
  .app-content {
    padding-right: 16px;
    padding-left: 16px;
  }

  .app-nav {
    grid-template-columns: 1fr 1fr;
  }

  .sidebar-footer {
    grid-template-columns: 1fr;
  }

  .admin-row {
    grid-template-columns: 1fr;
  }

  .btn,
  .input,
  .select,
  .language-select {
    min-height: 42px;
  }
}
