:root {
  --azul-escuro: #1a428a;
  --azul-claro: #87a9e2;
  --amarelo: #f3bd48;
  --cinza: #e5e1e6;
  --verde: #3cb371;
  --vermelho: #d9534f;
}

* {
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  margin: 0;
  background: var(--cinza);
  color: var(--azul-escuro);
}

/* ===== HEADER ===== */
header {
  background: white;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  height: 42px;
}

.btn-refresh {
  background: var(--amarelo);
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: bold;
  cursor: pointer;
}

/* ===== CONTEÚDO ===== */
main {
  padding: 12px;
}

h2 {
  margin: 16px 0 8px;
}

/* ===== GRID ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* ===== CARD ===== */
.card {
  background: white;
  border-radius: 16px;
  padding: 10px;
  text-align: center;
}

.machine-name {
  font-weight: bold;
  margin-bottom: 6px;
  font-size: 14px;
}

/* ===== MÁQUINA ===== */
.machine {
  width: 100%;
  height: 130px;
  border-radius: 14px;
  background: linear-gradient(#f7f7f7, #ddd);
  border: 3px solid var(--azul-escuro);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

/* Porta */
.door {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid #333;
  position: relative;
  overflow: hidden;
}

/* ===== LAVADORA ===== */
.lavadora .door {
  background: #e0f0ff;
}

.water {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 45%;
  background: linear-gradient(#4da3ff, #1a428a);
  border-radius: 0 0 50% 50%;
}

/* ===== SECADORA ===== */
.secadora .door {
  background: #eee;
}

.drum-lines {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 2px dashed #999;
}

/* ===== ANIMAÇÕES ===== */
.spin {
  animation: spin 2s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ===== STATUS ===== */
.status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: bold;
  margin-top: 4px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.livre .dot {
  background: var(--verde);
}

.ocupada .dot {
  background: var(--vermelho);
}

/* ===== PROGRESSO ===== */
.progress {
  background: var(--cinza);
  border-radius: 10px;
  height: 8px;
  overflow: hidden;
  margin-top: 6px;
}

.progress-bar {
  height: 100%;
  background: var(--azul-escuro);
  width: 0%;
  transition: width 0.5s;
}

.time {
  font-size: 12px;
  margin-top: 4px;
}