:root {
  --primary: #6ec6ff;
  --primary-deep: #1d9bf0;
  --secondary: #ffc0cb;
  --bg: #f6fbff;
  --bg-soft: #eef8ff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --card: #ffffff;
  --danger: #dc2626;
  --success: #059669;
  --radius: 12px;
  --shadow: 0 16px 34px rgba(17, 24, 39, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
}

body {
  min-width: 1200px;
}

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

button,
input,
select {
  font: inherit;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
}

.container-wide {
  width: min(1280px, 94vw);
  margin: 0 auto;
}

.landing-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.nav-wrap {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-size: 20px;
  font-weight: 700;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
}

.top-nav a.active {
  color: var(--primary-deep);
  font-weight: 600;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 520px;
  gap: 24px;
  padding: 56px 0;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 13px;
  font-weight: 600;
}

.hero-left h1,
.auth-brand h2 {
  margin: 14px 0 12px;
  font-size: 44px;
  line-height: 1.18;
}

.hero-left p,
.auth-brand p,
.muted-line {
  color: var(--muted);
}

.hero-actions,
.tabs,
.inline-actions,
.role-pills,
.assist-line,
.preview-link-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-actions {
  margin-top: 28px;
}

.preview-box {
  min-height: 320px;
  border-radius: 20px;
  border: 1px dashed #bae6fd;
  background: linear-gradient(135deg, #eff8ff 0%, #ffffff 100%);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 28px;
  box-shadow: var(--shadow);
}

.preview-box strong {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
}

.value-cards,
.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.value-cards {
  padding: 20px 0 32px;
}

.metrics {
  padding: 8px 0 28px;
}

.card,
.metric,
.demo-panel,
.auth-card,
.panel,
.kpi,
.table,
.status-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.card,
.metric,
.panel,
.kpi,
.status-box {
  padding: 18px;
}

.card h3,
.metric strong,
.auth-card h3 {
  margin: 0 0 8px;
}

.metric strong {
  display: block;
  font-size: 30px;
}

.metric span,
.card p,
.status-text {
  color: var(--muted);
}

.demo {
  padding: 4px 0 24px;
}

.tab,
.chip {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  transition: 0.2s ease;
}

.tab.active,
.chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.demo-panel {
  min-height: 180px;
  padding: 22px;
}

.cta {
  padding: 12px 0 64px;
}

.cta h2,
.block-title {
  margin: 0 0 12px;
}

.btn-primary,
.btn-secondary,
.btn-text {
  border-radius: 12px;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn-primary,
.btn-secondary {
  height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-secondary {
  background: #fff;
  border-color: var(--line);
  color: var(--text);
}

.btn-text {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 0;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-text.linkish:hover,
.tab:hover,
.chip:hover {
  transform: translateY(-1px);
}

.btn-primary:hover,
.btn-secondary:hover {
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.1);
}

.small {
  height: 38px;
}

.full {
  width: 100%;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.linkish {
  color: var(--primary-deep);
}

.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: 32px;
  align-items: center;
  padding: 32px 0;
}

.auth-brand {
  padding: 24px 12px 24px 0;
}

.illustration {
  margin-top: 20px;
  font-size: 70px;
}

.auth-card {
  box-shadow: var(--shadow);
  padding: 28px;
}

.wide-card {
  width: min(640px, 92vw);
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.form-row label {
  font-size: 13px;
  color: var(--muted);
}

input,
select {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
}

input:focus,
select:focus {
  outline: 2px solid rgba(110, 198, 255, 0.22);
  border-color: var(--primary);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
}

.assist-line {
  justify-content: space-between;
  margin-top: 4px;
  font-size: 13px;
}

.success-msg,
.error-msg {
  min-height: 18px;
  margin: 8px 0 0;
  font-size: 13px;
}

.success-msg {
  color: var(--success);
}

.error-msg {
  color: var(--danger);
}

.status-box {
  margin-top: 18px;
}

.center-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.wrap {
  flex-wrap: wrap;
}

.preview-link-row {
  margin-top: 12px;
  justify-content: space-between;
}

.preview-link-row a {
  max-width: calc(100% - 110px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--primary-deep);
}

.hidden {
  display: none !important;
}

#admin-page {
  min-height: 100vh;
}

.admin-topbar {
  height: 64px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.search-box {
  width: 320px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: var(--muted);
}

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

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--secondary);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}

.admin-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 64px);
}

.sidebar {
  border-right: 1px solid var(--line);
  background: #fff;
  padding: 12px;
}

.menu-item {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  padding: 10px 12px;
  cursor: pointer;
  color: var(--muted);
}

.menu-item.active {
  background: #eff8ff;
  border-color: #dbeafe;
  color: #0369a1;
}

.content {
  padding: 16px;
}

.block-title {
  font-size: 24px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.kpi span {
  color: var(--muted);
  font-size: 13px;
}

.kpi strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 10px;
}

.placeholder-chart {
  min-height: 220px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
}

.table th,
.table td {
  font-size: 13px;
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid #f1f5f9;
}

.table th {
  background: #f8fafc;
  color: #475569;
}

.tag {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
}

.tag.warn {
  background: #fff7ed;
  color: #c2410c;
}
