:root {
  --bg: #0b1220;
  --panel: #121a2b;
  --panel-2: #16213a;
  --border: #26324d;
  --text: #f3f7ff;
  --muted: #9eb0d1;
  --primary: #144bb8;
  --primary-2: #3a7bff;
  --primary-soft: rgba(20, 75, 184, 0.08);
  --danger: #ff6b6b;
  --success: #1bb668;
  --warn: #ffb84d;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: linear-gradient(180deg, #09101d, #0d1526 35%, #0b1220);
  color: var(--text);
}
a { color: var(--primary-2); text-decoration: none; }
img { max-width: 100%; display: block; }

.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0 48px; }
.shell.narrow { width: min(520px, calc(100% - 32px)); }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 24px; }
.eyebrow { color: var(--primary-2); text-transform: uppercase; letter-spacing: .08em; font-size: 12px; margin-bottom: 8px; }
h1, h2 { margin: 0 0 10px; }
h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1.08; }
h2 { font-size: 22px; }
.lead, .small-muted { color: var(--muted); }
.card { background: rgba(18, 26, 43, .94); border: 1px solid var(--border); border-radius: 20px; padding: 22px; box-shadow: var(--shadow); margin-bottom: 18px; }
.hero-grid, .grid-2 { display: grid; grid-template-columns: 1.25fr .9fr; gap: 18px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.metric-card, .mini-stat { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--border); border-radius: 16px; padding: 16px; }
.metric-card span, .mini-stat span { color: var(--muted); display: block; font-size: 13px; }
.metric-card strong { font-size: 32px; margin-top: 8px; display: block; }
.stats-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-content: start; }
label span { display: block; margin-bottom: 8px; color: var(--muted); }
input, select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0f1729;
  color: var(--text);
}
button, .ghost-btn, .primary-btn, .danger-btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.primary-btn { background: linear-gradient(180deg, #8cc2ff, var(--primary-2)); color: #06111f; font-weight: 700; }
.ghost-btn { background: linear-gradient(180deg, #8cc2ff, var(--primary-2)); color: var(--text); border: 1px solid var(--border); }
.danger-btn { background: rgba(255,107,107,.12); color: #ffd3d3; border: 1px solid rgba(255,107,107,.3); }
.action-row { display: flex; gap: 10px; flex-wrap: wrap; }
.action-row select {
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f8fafc;
  color: #475569;
  font-family: inherit;
}
.action-row.compact {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}
.action-row.compact select {
  min-width: 220px;
  height: 40px;
}
.stack-md > * + * { margin-top: 14px; }
.alert, .inline-alert { margin-top: 14px; padding: 12px 14px; border-radius: 12px; font-size: 14px; }
.alert.error, .inline-alert.error { background: rgba(255,107,107,.12); border: 1px solid rgba(255,107,107,.25); color: #0b1220; }
.alert.success { background: rgba(48,196,141,.12); border: 1px solid rgba(48,196,141,.25); color: #cbffe9; }
.alert.warn, .inline-alert.warn { background: rgba(255,184,77,.12); border: 1px solid rgba(255,184,77,.25); color: #ffe2b1; }
.result-card { display: grid; grid-template-columns: 1.3fr .7fr; gap: 18px; align-items: center; }
.result-url { font-size: 24px; word-break: break-all; margin: 12px 0 16px; }
.qr-panel, .qr-side { display: flex; align-items: center; justify-content: center; flex-direction: column; }
.qr-image { background: #fff; padding: 12px; border-radius: 18px; width: 220px; min-height: 220px; object-fit: contain; }
.qr-image.large { width: 260px; min-height: 260px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 10px; border-bottom: 1px solid rgba(255,255,255,.08); text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.truncate { max-width: 360px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { display: inline-flex; padding: 6px 10px; border-radius: 999px; font-size: 12px; border: 1px solid var(--border); }
.pill.ok { background: rgba(48,196,141,.12); color: #cffff0; }
.pill.off { background: rgba(255,107,107,.12); color: #ffd2d2; }
.chart-svg { width: 100%; height: 220px; }
.chart-svg text { fill: var(--muted); font-size: 10px; }
.chart-svg .axis { stroke: rgba(255,255,255,.12); stroke-width: 1; }
.chart-svg .trend { stroke: var(--primary-2); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.bars { display: grid; gap: 12px; }
.bar-row { display: grid; gap: 8px; }
.bar-head { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }
.bar-track { background: #0f1729; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; height: 12px; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-2)); border-radius: 999px; }
.empty-state { color: var(--muted); padding: 18px 0; }

.landing-body {
  background: #ffffff;
  color: #475569;
}
.landing-body .site-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
.landing-header {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #0f172a;
  font-weight: 800;
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.brand-text { font-size: 18px; letter-spacing: -0.02em; }
.landing-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.landing-nav a {
  color: #475569;
  font-size: 14px;
  font-weight: 600;
}
.landing-nav .nav-btn {
  padding: 10px 16px;
  border: 1px solid rgba(20, 75, 184, 0.18);
  border-radius: 12px;
  color: var(--primary);
  background: rgba(20, 75, 184, 0.03);
}
.landing-main {
  flex: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 0 72px;
}
.hero-block {
  width: 100%;
  max-width: 860px;
  text-align: center;
  margin: 36px auto 40px;
}
.hero-copy h1 {
  color: #0f172a;
  font-size: clamp(38px, 6vw, 72px);
  font-weight: 900;
  line-height: 1.03;
  letter-spacing: -0.04em;
  margin-bottom: 18px;
}
.hero-lead {
  width: min(100%, 720px);
  margin: 0 auto 28px;
  font-size: 18px;
  line-height: 1.6;
  color: #64748b;
}
.shortener-panel {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 10px;
  box-shadow: 0 16px 50px rgba(15, 23, 42, 0.06);
}
.shortener-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}
.input-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 1px;
  border-radius: 16px;
  overflow: hidden;
  background: #e2e8f0;
}
.url-input-wrap,
.alias-wrap {
  background: #ffffff;
  min-height: 64px;
  display: flex;
  align-items: center;
}
.url-input-wrap { padding: 0 16px; gap: 12px; }
.alias-wrap { padding: 0 16px; }
.field-icon {
  color: #94a3b8;
  flex: 0 0 auto;
}
.url-input-wrap input,
.alias-wrap input {
  border: 0;
  background: transparent;
  color: #0f172a;
  padding: 20px 12px;
  min-width: 0;
}
.url-input-wrap input::placeholder,
.alias-wrap input::placeholder { color: #94a3b8; }
.alias-prefix {
  color: #94a3b8;
  font-size: 14px;
  font-weight: 600;
  margin-right: 4px;
  white-space: nowrap;
}
.primary-cta {
  min-width: 160px;
  min-height: 64px;
  padding: 0 26px;
  border: 0;
  border-radius: 16px;
  background: var(--primary);
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 14px 24px rgba(20, 75, 184, 0.22);
}
.trust-row {
  margin-top: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.ok-icon { color: var(--success); font-size: 18px; }
.result-shell {
  width: 100%;
  max-width: 980px;
  margin: 0 auto 28px;
}
.result-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  box-shadow: 0 16px 50px rgba(15, 23, 42, 0.08);
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 280px;
  gap: 24px;
  align-items: center;
  padding: 28px;
}
.mini-label {
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}
.landing-body .result-url {
  color: #0f172a;
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 18px;
}
.landing-actions .ghost-btn {
  color: #0f172a;
  border-color: #dbe2ea;
  background: #fff;
}
.landing-actions .primary-btn {
  color: #ffffff;
  background: var(--primary);
}
.result-qr {
  display: flex;
  align-items: center;
  justify-content: center;
}
.landing-qr {
  width: 220px;
  min-height: 220px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}
.preview-grid {
  width: 100%;
  max-width: 1100px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 10px;
}
.preview-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
}
.preview-card strong {
  display: block;
  color: #0f172a;
  font-size: 17px;
  margin-bottom: 8px;
}
.preview-card p {
  margin: 0;
  color: #64748b;
  line-height: 1.6;
  font-size: 14px;
}
.preview-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(20, 75, 184, 0.08);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.landing-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-top: 1px solid #e2e8f0;
  color: #94a3b8;
  font-size: 13px;
}
.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.footer-links a { color: #64748b; }

@media (max-width: 1100px) {
  .preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .hero-grid, .grid-2, .result-card, .stats-grid { grid-template-columns: 1fr; }
  .topbar, .section-head { flex-direction: column; align-items: stretch; }
  .truncate { max-width: 180px; }

  .landing-header,
  .landing-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .landing-nav {
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
  }
  .hero-block { margin-top: 18px; }
  .shortener-form,
  .result-panel {
    grid-template-columns: 1fr;
  }
  .input-stack {
    grid-template-columns: 1fr;
  }
  .alias-wrap {
    border-top: 1px solid #e2e8f0;
  }
  .primary-cta {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .landing-header,
  .landing-main,
  .landing-footer {
    width: min(100% - 24px, 1180px);
  }
  .hero-copy h1 { font-size: 42px; }
  .hero-lead { font-size: 16px; }
  .preview-grid { grid-template-columns: 1fr; }
  .result-panel,
  .preview-card,
  .shortener-panel {
    border-radius: 18px;
  }
  .landing-qr {
    width: min(220px, 100%);
    min-height: auto;
  }
  .trust-row {
    gap: 14px 18px;
  }
}

.app-body {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: #475569;
}
.app-wrap {
  background:
    radial-gradient(circle at top right, rgba(20, 75, 184, 0.06), transparent 26%),
    radial-gradient(circle at top left, rgba(20, 75, 184, 0.04), transparent 22%);
}
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  
}
.app-main {
  align-items: stretch;
  justify-content: flex-start;
  gap: 18px;
  padding-top: 12px;
}
.app-hero {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1px solid #e2e8f0;
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.06);
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}
.app-hero-copy h1 {
  margin-bottom: 12px;
  font-size: clamp(30px, 4.6vw, 54px);
}
.truncate-full {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.hero-quick-actions,
.dashboard-search {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.dashboard-search input {
  min-width: 280px;
  background: #fff;
  border: 1px solid #dbe2ea;
  color: #0f172a;
}
.stats-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.app-metric-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
  display: flex;
  align-items: center;
  gap: 14px;
}
.app-metric-card.highlight {
  background: linear-gradient(180deg, rgba(20, 75, 184, 0.06), #ffffff);
}
.app-metric-card .material-symbols-outlined {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(20, 75, 184, 0.08);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.app-metric-card small {
  display: block;
  color: #64748b;
  font-size: 13px;
  margin-bottom: 6px;
}
.app-metric-card strong {
  color: #0f172a;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1;
}
.app-grid {
  display: grid;
  gap: 18px;
}
.app-grid-main {
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, .8fr);
}
.app-grid-tiles {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.app-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.05);
}
.app-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.app-card-head h2 {
  color: #0f172a;
  margin: 0;
  font-size: 22px;
}
.app-card-head-stack {
  align-items: start;
}
.card-kicker {
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}
.modern-chart {
  min-height: 260px;
}
.modern-chart .chart-svg {
  height: 260px;
}
.modern-chart .axis {
  stroke: #dbe2ea;
}
.modern-chart .trend {
  stroke: var(--primary);
}
.modern-chart text {
  fill: #94a3b8;
}
.modern-qr-side {
  gap: 18px;
}
.modern-qr {
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}
.meta-list {
  width: 100%;
  display: grid;
  gap: 12px;
}
.meta-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #eef2f7;
  padding-top: 12px;
}
.meta-list span {
  color: #64748b;
  font-size: 13px;
}
.meta-list strong {
  color: #0f172a;
  font-size: 14px;
  text-align: right;
}
.modern-bars .bar-head {
  color: #334155;
}
.modern-bars .bar-track {
  background: #f8fafc;
  border-color: #e2e8f0;
  height: 10px;
}
.modern-bars .bar-fill {
  background: linear-gradient(90deg, #144bb8, #6ea8ff);
}
.app-table-card {
  overflow: hidden;
}
.modern-table-wrap {
  margin: 0 -24px -24px;
}
.modern-table {
  width: 100%;
  min-width: 920px;
}
.modern-table thead {
  background: #f8fafc;
}
.modern-table th,
.modern-table td {
  border-bottom: 1px solid #eef2f7;
  padding: 14px 24px;
  color: #334155;
}
.modern-table th {
  color: #64748b;
  font-size: 13px;
}
.modern-table td {
  font-size: 14px;
}
.truncate-cell {
  max-width: 360px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.alias-link {
  color: var(--primary);
  font-weight: 700;
}
.admin-actions form {
  display: inline-flex;
}
.top-links-list {
  display: grid;
  gap: 10px;
}
.top-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #f8fafc;
}
.top-link-item strong,
.top-link-item b {
  color: #0f172a;
}
.top-link-item span {
  display: block;
  max-width: 240px;
  color: #64748b;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.auth-main {
  justify-content: center;
}
.auth-shell {
  width: 100%;
  max-width: 1040px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, .75fr);
  gap: 18px;
  align-items: stretch;
}
.auth-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.06);
}
.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}
.auth-form label span {
  color: #64748b;
}
.auth-form input {
  background: #ffffff;
  border: 1px solid #dbe2ea;
  color: #0f172a;
}
.auth-lead {
  margin: 0;
  width: min(100%, 580px);
}
.auth-side {
  display: grid;
  gap: 18px;
}
.app-alert {
  margin-top: 0;
}
.pill {
  border-color: #dbe2ea;
}
.pill.ok {
  background: rgba(27, 182, 104, 0.12);
  color: #0f7a43;
}
.pill.off {
  background: rgba(255, 107, 107, 0.12);
  color: #b42318;
}

@media (max-width: 1100px) {
  .stats-kpis,
  .app-grid-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .app-grid-main,
  .auth-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .app-hero,
  .app-card-head {
    flex-direction: column;
    align-items: stretch;
  }
  .dashboard-search input {
    min-width: 0;
    width: 100%;
  }
  .hero-quick-actions,
  .dashboard-search {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .stats-kpis,
  .app-grid-tiles {
    grid-template-columns: 1fr;
  }
  .app-main {
    gap: 14px;
  }
  .app-hero,
  .app-card,
  .auth-card {
    border-radius: 20px;
    padding: 20px;
  }
  .modern-table-wrap {
    margin-left: -20px;
    margin-right: -20px;
    margin-bottom: -20px;
  }
  .auth-shell {
    gap: 14px;
  }
}

.auth-tabs {
  display: inline-flex;
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px;
  background: #eef2ff;
  border-radius: 999px;
}
.auth-tabs a {
  color: #4b5563;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
}
.auth-tabs a.active {
  background: #111827;
  color: #fff;
}
.auth-shell-wide {
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
}
.inline-form {
  margin-top: 14px;
}
.compact-form label span {
  margin-bottom: 6px;
}
.empty-cell {
  text-align: center;
  color: #6b7280;
  padding: 18px;
}

.auth-helper{margin-top:14px;text-align:center;font-size:.95rem}
.auth-helper a{color:inherit;text-decoration:none;font-weight:600}
.auth-helper a:hover{text-decoration:underline}

.admin-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.admin-actions {
  justify-content: flex-start;
}

.icon-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 12px;
  min-width: 42px;
}

.icon-btn .material-symbols-outlined {
  font-size: 20px;
  line-height: 1;
}

.no-wrap {
  flex-wrap: nowrap;
  align-items: center;
}

.no-wrap select {
  min-width: 220px;
  height: 42px;
}




