:root {
  --brand-deep: #5d4a00;
  --brand-teal: #6d5b00;
  --brand-amber: #fdcf00;
  --brand-ink: #1d1e26;
  --brand-surface: #fff8d9;
  --brand-soft: #fff3bd;
  --md-sys-color-primary: var(--brand-amber);
  --md-sys-color-secondary: #b18d00;
  --md-sys-color-tertiary: #ffe482;
  --md-sys-color-surface: #ffffff;
  --md-sys-color-surface-container: #ffffff;
  --md-sys-color-on-surface: var(--brand-ink);
  --md-sys-color-outline: rgba(29, 30, 38, 0.15);
  --md-sys-color-background: #f7f9fb;
  --md-sys-typescale-body-large-font-family: "Plus Jakarta Sans", system-ui;
  --md-sys-typescale-title-large-font-family: "Plus Jakarta Sans", system-ui;
  --md-sys-typescale-headline-medium-font-family: "Plus Jakarta Sans", system-ui;
  --md-sys-typescale-label-large-font-family: "Poppins", system-ui;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  color: var(--brand-ink);
  background: radial-gradient(1200px 600px at 10% -10%, rgba(253, 207, 0, 0.26), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, rgba(255, 236, 150, 0.4), transparent 60%),
    linear-gradient(180deg, #fffdf2 0%, #fff8dc 100%);
  min-height: 100vh;
}

.bg-glow {
  position: fixed;
  inset: 0;
  background: radial-gradient(500px 300px at 60% 80%, rgba(253, 207, 0, 0.2), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

.login-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(460px, 100%);
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid rgba(171, 133, 0, 0.2);
  box-shadow: 0 16px 36px rgba(144, 110, 0, 0.15);
  padding: 28px;
}

.login-card h1 {
  margin: 14px 0 8px;
  font-size: 36px;
}

.login-card p {
  margin: 0 0 20px;
  color: rgba(29, 30, 38, 0.7);
}

.login-btn {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #1f8f57, #15784a);
  color: #ffffff;
  font-family: "Poppins", system-ui;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(21, 120, 74, 0.28);
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.login-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 12px 20px rgba(21, 120, 74, 0.32);
}

.login-btn:active {
  transform: translateY(0);
}

.hero {
  margin-bottom: 32px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(253, 207, 0, 0.34);
  color: var(--brand-deep);
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  font-size: 12px;
}

.hero h1 {
  font-size: clamp(28px, 4vw, 44px);
  margin: 16px 0 8px;
}

.hero p {
  margin: 0;
  color: rgba(29, 30, 38, 0.7);
  max-width: 720px;
  font-size: 16px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.card {
  background: #ffffff;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 12px 30px rgba(144, 110, 0, 0.1);
  border: 1px solid rgba(171, 133, 0, 0.12);
}

.card.wide {
  width: 100%;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.card h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.muted {
  color: rgba(29, 30, 38, 0.6);
  margin: 0 0 12px;
}

.status {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 16px 0 20px;
}

.status-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #cbd5e1;
  box-shadow: 0 0 0 6px rgba(203, 213, 225, 0.35);
  transition: 0.3s ease;
}

.status-dot.on {
  background: #138a52;
  box-shadow: 0 0 0 6px rgba(19, 138, 82, 0.22);
}

.status-dot.off {
  background: #d62c1a;
  box-shadow: 0 0 0 6px rgba(214, 44, 26, 0.25);
}

.status-title {
  font-weight: 700;
}

.status-sub {
  font-size: 13px;
  color: rgba(29, 30, 38, 0.6);
}

.auth {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 16px;
}

.auth-state {
  font-size: 13px;
  color: rgba(29, 30, 38, 0.72);
  font-weight: 600;
}

.auth-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-logout {
  --md-outlined-button-outline-color: rgba(171, 133, 0, 0.6);
  --md-outlined-button-label-text-color: #5d4a00;
  --md-outlined-button-container-shape: 12px;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.action-btn {
  appearance: none;
  border: none;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 156px;
  height: 48px;
  padding: 0 20px;
  font-family: "Poppins", system-ui;
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease, opacity 0.12s ease;
}

.action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.24);
  filter: brightness(1.03);
}

.action-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.action-btn:disabled {
  opacity: 0.72;
  cursor: not-allowed;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14);
  transform: none;
  filter: none;
}

.action-btn-on {
  background: linear-gradient(135deg, #1f8f57, #15784a) !important;
  color: #ffffff !important;
}

.action-btn-off {
  background: linear-gradient(135deg, #d84f43, #b1382d) !important;
  color: #ffffff !important;
}

.divider {
  height: 1px;
  background: rgba(171, 133, 0, 0.16);
  margin: 20px 0;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.label {
  font-size: 12px;
  color: rgba(29, 30, 38, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.mono {
  font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  color: rgba(29, 30, 38, 0.8);
  word-break: break-all;
}

.source-note {
  margin-top: 8px;
  font-size: 11px;
  color: rgba(29, 30, 38, 0.55);
}

.list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: grid;
  gap: 10px;
}

.list li {
  background: var(--brand-soft);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 600;
  color: var(--brand-deep);
  display: grid;
  gap: 6px;
}

.list .ng-meta {
  font-weight: 500;
  font-size: 12px;
  color: rgba(29, 30, 38, 0.6);
}

.list .ng-name {
  font-size: 18px;
  font-weight: 700;
}

.list .asg-lines {
  display: grid;
  gap: 4px;
}

.list .asg-line {
  font-size: 12px;
  color: rgba(29, 30, 38, 0.72);
  font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.tips {
  display: grid;
  gap: 12px;
}

.tip {
  background: rgba(253, 207, 0, 0.22);
  border-radius: 12px;
  padding: 12px;
}

.tip-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.tip-body {
  color: rgba(29, 30, 38, 0.65);
  font-size: 14px;
}

.log {
  background: #0e1a1f;
  color: #e6f0f2;
  border-radius: 14px;
  padding: 16px;
  font-size: 12px;
  overflow: auto;
  min-height: 140px;
}

@media (max-width: 640px) {
  .page {
    padding: 32px 16px 64px;
  }

  .card-head {
    flex-direction: column;
    align-items: flex-start;
  }
}
