:root {
  --bg: #08121f;
  --panel: rgba(9, 18, 34, 0.84);
  --panel-border: rgba(123, 225, 255, 0.16);
  --text: #eef6ff;
  --muted: #8ea4c0;
  --accent: #7be1ff;
  --accent-strong: #00a9d6;
  --warm: #ffcb69;
  --success: #44d6a8;
  --danger: #ff6f7d;
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.32);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(0, 169, 214, 0.24), transparent 26%),
    radial-gradient(circle at top right, rgba(255, 203, 105, 0.12), transparent 20%),
    linear-gradient(135deg, #06101c 0%, #0b1630 50%, #07111c 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(123, 225, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(123, 225, 255, 0.05) 1px, transparent 1px);
  background-size: 30px 30px;
}

.auth-shell,
.app-shell {
  position: relative;
  z-index: 1;
  width: min(1560px, calc(100% - 24px));
  margin: 0 auto;
  padding: 16px 0 24px;
}

.manager-auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  align-items: stretch;
}

.manager-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-brand,
.auth-panel,
.panel,
.metric-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.auth-brand,
.auth-panel {
  padding: 32px;
}

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

.hero-panel {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 16px;
}

.hero-meta,
.cards-grid,
.dashboard-grid,
.pulse-grid {
  display: grid;
  gap: 16px;
}

.hero-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

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

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

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

.wide {
  grid-column: span 2;
}

.stack,
.auth-form,
.chart-list,
.timeline,
.recent-list,
.compact-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-size: 0.74rem;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.4rem, 4vw, 4.5rem);
  line-height: 0.95;
  margin-bottom: 18px;
}

h2 {
  margin-bottom: 8px;
  font-size: 1.35rem;
}

.lead,
.hint,
.metric-label,
.field span,
small {
  color: var(--muted);
}

.lead {
  max-width: 60ch;
  line-height: 1.6;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

input,
button {
  font: inherit;
}

input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(123, 225, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  outline: none;
}

button {
  border: none;
  cursor: pointer;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  border-radius: 16px;
  font-weight: 700;
}

.primary-button {
  color: #041019;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.ghost-button {
  color: var(--text);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.banner {
  padding: 12px 14px;
  border-radius: 16px;
}

.banner.error {
  background: rgba(255, 111, 125, 0.14);
  border: 1px solid rgba(255, 111, 125, 0.24);
}

.metric-card strong,
.chart-copy strong,
.recent-item strong,
.timeline-item strong {
  display: block;
}

.metric-card strong {
  font-size: 1.6rem;
}

.spotlight {
  background:
    linear-gradient(145deg, rgba(0, 169, 214, 0.2), rgba(255, 203, 105, 0.08)),
    var(--panel);
}

.pulse-card {
  position: relative;
  overflow: hidden;
}

.pulse-card::after {
  content: "";
  position: absolute;
  top: 16px;
  right: 16px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.pulse-card.online::after {
  background: var(--success);
  box-shadow: 0 0 0 8px rgba(68, 214, 168, 0.12);
}

.pulse-card.idle::after {
  background: var(--warm);
  box-shadow: 0 0 0 8px rgba(255, 203, 105, 0.1);
}

.panel-header,
.recent-item,
.timeline-item,
.chart-row {
  display: flex;
  gap: 14px;
}

.panel-header,
.recent-item,
.timeline-item {
  justify-content: space-between;
}

.timeline-copy {
  flex: 1;
}

.chart-row {
  align-items: center;
}

.chart-copy {
  min-width: 240px;
}

.chart-bar {
  flex: 1;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.chart-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.chart-bar.warm span {
  background: linear-gradient(135deg, var(--warm), #ff8f4d);
}

.chart-bar.success span {
  background: linear-gradient(135deg, var(--success), #179d78);
}

.chart-value {
  min-width: 110px;
  text-align: right;
  font-weight: 700;
}

.recent-item,
.timeline-item {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(123, 225, 255, 0.12);
}

.lot-item {
  align-items: flex-start;
}

.recent-meta {
  text-align: right;
}

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status.ok,
.status.info {
  background: rgba(68, 214, 168, 0.14);
  color: #8be7c5;
}

.status.warn {
  background: rgba(255, 203, 105, 0.14);
  color: #ffd888;
}

.empty-stage {
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed rgba(123, 225, 255, 0.24);
}

@media (max-width: 1280px) {
  .cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .manager-auth,
  .hero-panel,
  .dashboard-grid,
  .cards-grid,
  .hero-meta,
  .pulse-grid {
    grid-template-columns: 1fr;
  }

  .wide {
    grid-column: auto;
  }

  .chart-row {
    flex-direction: column;
    align-items: stretch;
  }

  .chart-copy,
  .chart-value {
    min-width: 0;
    text-align: left;
  }
}
