*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0f1117;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.card {
  background: #1a1d27;
  border: 1px solid #2d3148;
  border-radius: 16px;
  padding: 40px 48px;
  width: 460px;
  box-shadow: 0 24px 48px rgba(0,0,0,.4);
}

h1 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

/* ── Login screen ── */
#login-screen p {
  color: #64748b;
  font-size: .9rem;
  margin-bottom: 24px;
  line-height: 1.6;
}

.google-btn {
  width: 100%;
  padding: 13px;
  background: #4285f4;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: .03em;
  transition: opacity .15s;
}
.google-btn:hover { opacity: .88; }

/* ── Status ── */
.status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background .4s;
}
.dot.RUNNING    { background: #22c55e; box-shadow: 0 0 8px #22c55e88; }
.dot.TERMINATED { background: #ef4444; }
.dot.STAGING    { background: #f59e0b; animation: pulse 1s infinite; }
.dot.STOPPING   { background: #f59e0b; animation: pulse 1s infinite; }
.dot.UNKNOWN    { background: #64748b; }

@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

#status-text {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.badge {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 2px 8px;
  border-radius: 99px;
  text-transform: uppercase;
}
.badge.spot     { background: #7c3aed22; color: #a78bfa; border: 1px solid #7c3aed55; }
.badge.standard { background: #0ea5e922; color: #7dd3fc; border: 1px solid #0ea5e955; }

/* ── Meta table ── */
.meta-table {
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .88rem;
}
.meta-row .label { color: #64748b; }
.meta-row .value { font-family: monospace; color: #7dd3fc; }
.meta-row .value.uptime { color: #a78bfa; }
.meta-row .value.cost   { color: #34d399; }
.meta-row .value.na     { color: #475569; }

.copy-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  color: #64748b;
  border-radius: 4px;
  font-size: .85rem;
  line-height: 1;
  transition: color .2s;
}

.divider {
  border: none;
  border-top: 1px solid #2d3148;
  margin: 20px 0;
}

/* ── Buttons ── */
.buttons {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

button {
  padding: 12px 0;
  border: none;
  border-radius: 10px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  letter-spacing: .03em;
}
button:active  { transform: scale(.97); }
button:disabled { opacity: .35; cursor: not-allowed; }

#btn-start  { background: #22c55e; color: #052e16; }
#btn-stop   { background: #ef4444; color: #fff; }
#btn-reboot { background: #f59e0b; color: #1c0a00; }

/* ── Footer ── */
.refresh-row {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .75rem;
  color: #475569;
}
#last-updated { font-family: monospace; }

.logout-link {
  background: none;
  border: none;
  color: #475569;
  font-size: .75rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}
.logout-link:hover { color: #94a3b8; }

/* ── Spinner ── */
.spinner {
  display: inline-block;
  width: 10px; height: 10px;
  border: 2px solid #475569;
  border-top-color: #94a3b8;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  vertical-align: middle;
  visibility: hidden;
}
.spinner.active { visibility: visible; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #334155;
  color: #e2e8f0;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: .85rem;
  opacity: 0;
  transition: opacity .3s, transform .3s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
