:root {
  --bg: #24313b;
  --bg-deep: #0b1016;
  --surface: #18232d;
  --surface-2: #111820;
  --border: #34424e;
  --gold: #ffc20f;
  --gold-hover: #e3a900;
  --red: #a61922;
  --text: #f7f1de;
  --muted: #b8c0c7;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
  --radius: 8px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 194, 15, 0.12), transparent 24rem),
    linear-gradient(180deg, #24313b 0%, #1a252e 48%, #0f151c 100%);
  color: var(--text);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

.navbar {
  background: rgba(11, 16, 22, 0.94);
  border-bottom: 1px solid rgba(255, 194, 15, 0.2);
  padding: 12px 40px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(14px);
}

.nav-container {
  width: 100%;
  max-width: 1200px;
  margin: auto;
  display: flex;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--gold);
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.logo:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.logo img {
  height: 64px;
  width: 64px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(255, 194, 15, 0.45);
  box-shadow: 0 0 0 5px rgba(255, 194, 15, 0.08);
}

main {
  max-width: 1220px;
  margin: 0 auto;
  padding: 44px 20px 0;
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 28px;
  align-items: stretch;
  min-height: 310px;
  animation: fadeUp 0.65s ease both;
}

.dashboard-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 22px 0;
}

.eyebrow,
.source-label,
.card-kicker,
.stat-label {
  color: var(--gold);
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
}

.dashboard h1 {
  max-width: 780px;
  margin-top: 10px;
  font-size: clamp(2.2rem, 6vw, 4.8rem);
  line-height: 1;
  color: var(--text);
}

.dashboard-subtitle {
  max-width: 650px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
}

.stats-grid {
  display: grid;
  gap: 14px;
  align-content: center;
}

.stat-card,
.source-panel,
.machine-card {
  background: linear-gradient(180deg, rgba(24, 35, 45, 0.98), rgba(17, 24, 32, 0.98));
  border: 1px solid rgba(255, 194, 15, 0.16);
  box-shadow: var(--shadow);
}

.stat-card {
  min-height: 96px;
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--gold);
}

.stat-card strong {
  margin-top: 6px;
  color: var(--text);
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.1;
}

.machines-section {
  margin-top: 46px;
}

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

.section-heading h2 {
  font-size: 1.6rem;
}

.section-heading p {
  color: var(--muted);
  font-size: 0.92rem;
}

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

.machine-card {
  appearance: none;
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  text-align: left;
  transform: translateY(14px);
  opacity: 0;
  animation: fadeUp 0.58s ease both;
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.machine-card:nth-child(1) { animation-delay: 0.08s; }
.machine-card:nth-child(2) { animation-delay: 0.16s; }
.machine-card:nth-child(3) { animation-delay: 0.24s; }
.machine-card:nth-child(4) { animation-delay: 0.32s; }

.machine-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 194, 15, 0.58);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 194, 15, 0.14);
}

.card-media {
  display: block;
  position: relative;
  aspect-ratio: 1 / 0.78;
  overflow: hidden;
  background: var(--bg-deep);
}

.card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(11, 16, 22, 0.78) 100%);
}

.machine-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.92) contrast(1.06);
  transition: transform 0.38s ease, filter 0.38s ease;
}

.machine-card:hover img {
  transform: scale(1.055);
  filter: saturate(1.08) contrast(1.08);
}

.card-content {
  display: grid;
  gap: 9px;
  padding: 18px;
}

.card-title {
  font-size: 1.24rem;
  font-weight: 800;
  line-height: 1.1;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.card-meta strong {
  color: var(--gold);
  font-size: 1.1rem;
}

.source-panel {
  margin: 44px 0 0;
  border-radius: var(--radius);
  padding: 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.source-panel p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.7;
}

.footer {
  text-align: center;
  padding: 24px 20px;
  margin-top: 48px;
  background: var(--bg-deep);
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid rgba(255, 194, 15, 0.22);
}

.footer a {
  color: var(--gold);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.notification-banner,
.notification-card {
  position: fixed;
  z-index: 9999;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid rgba(255, 194, 15, 0.32);
  box-shadow: var(--shadow);
}

.notification-banner {
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 13px 18px;
  text-align: center;
  font-size: 0.9rem;
}

.notification-card {
  right: 20px;
  bottom: 20px;
  width: min(360px, calc(100vw - 40px));
  border-radius: var(--radius);
  padding: 16px;
  animation: slideIn 0.35s ease both;
}

.notification-card p {
  display: grid;
  gap: 4px;
  color: var(--muted);
  line-height: 1.5;
}

.notification-card strong {
  color: var(--text);
}

.notification-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.notification-actions button {
  flex: 1;
  border: 0;
  border-radius: 6px;
  padding: 10px 12px;
  font-weight: 700;
  cursor: pointer;
  color: var(--bg-deep);
  background: var(--gold);
}

.notification-actions button:last-child {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.notification-actions button:hover {
  background: var(--gold-hover);
}

.notification-actions button:last-child:hover {
  background: rgba(255, 255, 255, 0.14);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1020px) {
  .dashboard,
  .source-panel {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  .navbar {
    padding: 10px 18px;
  }

  .logo {
    font-size: 20px;
    gap: 9px;
  }

  .logo img {
    width: 54px;
    height: 54px;
  }

  main {
    padding: 28px 15px 0;
  }

  .dashboard {
    min-height: auto;
    gap: 18px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .notification-card {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
  }
}

@media (max-width: 560px) {
  .machines-container {
    grid-template-columns: 1fr;
  }

  .card-media {
    aspect-ratio: 1 / 0.58;
  }

  .source-panel {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
