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

:root {
  --admin-bg: #09090b;
  --admin-panel: #111214;
  --admin-panel-alt: rgba(19, 19, 23, 0.88);
  --admin-border: rgba(255, 255, 255, 0.08);
  --admin-text: #f5f7fb;
  --admin-muted: #a3a8b4;
  --admin-red: #ff3d3d;
  --admin-red-soft: rgba(255, 61, 61, 0.14);
  --admin-green: #62d2a2;
  --admin-amber: #f5bf57;
  --admin-radius: 28px;
  --admin-shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 61, 61, 0.12), transparent 20%),
    linear-gradient(180deg, #080809 0%, #09090b 100%);
  color: var(--admin-text);
}

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

button,
input,
textarea {
  font: inherit;
}

.admin-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.28;
  mask-image: radial-gradient(circle at center, black 55%, transparent 88%);
}

.admin-login-body {
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-shell,
.dashboard-shell {
  position: relative;
  z-index: 1;
}

.login-shell {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 28px;
  width: min(1180px, 100%);
}

.login-panel,
.auth-card,
.sidebar,
.panel-card,
.stat-card {
  border: 1px solid var(--admin-border);
  background: linear-gradient(180deg, rgba(18, 18, 21, 0.94), rgba(12, 12, 14, 0.96));
  box-shadow: var(--admin-shadow);
}

.login-panel,
.auth-card,
.sidebar,
.panel-card {
  border-radius: var(--admin-radius);
}

.login-panel,
.auth-card {
  padding: 34px;
}

.admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.admin-brand-logo {
  display: block;
  width: auto;
  height: 34px;
  max-width: min(100%, 190px);
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  flex: 0 0 auto;
}

.admin-brand strong,
.login-copy h1,
.auth-card h2,
.dashboard-header h1,
.panel-head h2,
.stat-card strong,
.sidebar-card strong {
  font-family: "Sora", sans-serif;
}

.admin-brand div {
  display: grid;
  gap: 2px;
}

.admin-brand strong {
  font-size: 0.9rem;
  line-height: 1.05;
}

.admin-brand small {
  font-size: 0.76rem;
  line-height: 1.2;
}

.admin-brand small,
.login-copy p,
.demo-card span,
.form-feedback,
.panel-card p,
.table-placeholder,
.sidebar-card p,
.stat-card small,
.panel-card label,
.sidebar-link {
  color: var(--admin-muted);
}

.eyebrow {
  margin: 0 0 14px;
  color: #ff8f8f;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.76rem;
  font-weight: 700;
}

.login-copy {
  margin: 72px 0 28px;
  max-width: 580px;
}

.login-copy h1,
.dashboard-header h1 {
  margin: 0;
  line-height: 1.05;
  font-size: clamp(2.5rem, 5vw, 4.8rem);
}

.login-copy p,
.auth-card p,
.panel-card p,
.sidebar-card p,
.stat-card small {
  line-height: 1.75;
}

.demo-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  max-width: 360px;
  padding: 20px 22px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.025);
}

.admin-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.admin-form label {
  display: grid;
  gap: 10px;
  font-size: 0.95rem;
}

.admin-form input,
.admin-form textarea {
  width: 100%;
  min-height: 58px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--admin-text);
}

.admin-form textarea {
  min-height: 132px;
  resize: vertical;
}

.admin-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff4b4b 0%, #d91e1e 100%);
  color: #fff;
  box-shadow: 0 16px 42px rgba(200, 29, 29, 0.34);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.admin-button.ghost {
  border-color: var(--admin-border);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: none;
}

.admin-button:hover,
.sidebar-link:hover,
.panel-card:hover,
.stat-card:hover {
  transform: translateY(-2px);
}

.dashboard-shell {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 22px;
  min-height: 100vh;
  padding: 20px;
}

.sidebar {
  display: grid;
  align-content: start;
  gap: 20px;
  padding: 24px;
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
}

.sidebar-nav {
  display: grid;
  gap: 10px;
}

.sidebar-link {
  min-height: 56px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.sidebar-link.active {
  color: var(--admin-text);
  border-color: rgba(255, 61, 61, 0.3);
  background: rgba(255, 61, 61, 0.1);
}

.sidebar-card,
.table-placeholder,
.placeholder-list {
  display: grid;
  gap: 14px;
}

.sidebar-card {
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.03);
}

.dashboard-main {
  display: grid;
  gap: 22px;
  align-content: start;
}

.dashboard-header,
.panel-head,
.header-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stat-card {
  padding: 22px;
  border-radius: 24px;
}

.stat-card span,
.status-tag {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--admin-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-card strong {
  display: block;
  margin: 16px 0 8px;
  font-size: 2rem;
}

.stat-card.highlight,
.status-tag.live {
  border-color: rgba(255, 61, 61, 0.26);
}

.status-tag.live,
.status-tag.warning {
  background: var(--admin-red-soft);
  color: #ff8f8f;
}

.status-tag.warning {
  color: var(--admin-amber);
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.panel-card {
  display: none;
  padding: 26px;
}

.panel-card.active {
  display: block;
}

.panel-head h2 {
  margin: 0;
  font-size: 1.55rem;
}

.placeholder-list > div,
.table-placeholder > div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.025);
}

.table-placeholder > div:first-child {
  grid-template-columns: repeat(3, 1fr);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--admin-muted);
}

.table-placeholder > div:not(:first-child) {
  grid-template-columns: repeat(3, 1fr);
  color: var(--admin-text);
}

.compact-form {
  margin-top: 18px;
}

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

  .panel-grid,
  .login-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .dashboard-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    max-height: none;
  }

  .dashboard-header,
  .header-actions,
  .panel-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .admin-login-body,
  .dashboard-shell {
    padding: 14px;
  }

  .login-panel,
  .auth-card,
  .sidebar,
  .panel-card,
  .stat-card {
    padding: 20px;
  }

  .stats-grid,
  .panel-grid {
    grid-template-columns: 1fr;
  }

  .table-placeholder > div,
  .table-placeholder > div:first-child,
  .table-placeholder > div:not(:first-child) {
    grid-template-columns: 1fr;
  }

  .admin-button {
    width: 100%;
  }

  .admin-brand-logo {
    height: 30px;
    max-width: 160px;
  }
}