* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

body {
  background: #f3f4f6;
  color: #1f2937;
}

.screen {
  min-height: 100vh;
}

/* ── Login ──────────────────────────────────────────────────────────── */

#login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e3a5f, #2d5a87, #4a90b8, #6b7b8d);
  padding: 24px;
}

.login-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 24px;
  padding: 40px 32px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.login-icon {
  font-size: 48px;
  margin-bottom: 8px;
}

.login-card h1 {
  font-size: 26px;
  color: #1f2937;
}

.subtitle {
  color: #6b7280;
  font-size: 13px;
  margin-bottom: 28px;
}

#license-input {
  width: 100%;
  padding: 14px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 16px;
  text-align: center;
  letter-spacing: 2px;
  font-weight: 600;
  margin-bottom: 16px;
}

.error-box {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 16px;
  text-align: left;
}

#login-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #1565c0, #42a5f5);
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

#login-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

/* ── Dashboard ──────────────────────────────────────────────────────── */

.top-bar {
  background: linear-gradient(135deg, #0d47a1, #1565c0, #607d8b);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
}

.brand-icon {
  font-size: 28px;
}

.brand-title {
  font-size: 18px;
  font-weight: 700;
}

.brand-subtitle {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: #bfdbfe;
}

.logout-btn {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
}

.content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.tab {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 12px 12px 0 0;
  background: #e5e7eb;
  color: #6b7280;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
}

.tab.active {
  background: white;
  color: #1f2937;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
}

.toolbar {
  background: white;
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.status-line {
  font-size: 13px;
  color: #6b7280;
}

.export-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

#date-select {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
}

.export-controls button {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: #2e7d32;
  color: white;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.card {
  background: white;
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
  border: 2px solid #e5e7eb;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.card .num {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 6px;
}

.card .icon {
  font-size: 18px;
  margin-bottom: 4px;
}

.card .label {
  font-size: 9px;
  color: #6b7280;
  line-height: 1.3;
}

.card.ok { border-color: #2e7d32; }
.card.warning { border-color: #f59e0b; }
.card.late { border-color: #dc2626; background: rgba(220,38,38,0.05); }
.card.maintenance { border-color: #9333ea; background: rgba(147,51,234,0.05); }
.card.transfer { border-color: #f59e0b; background: rgba(245,158,11,0.05); }
.card.pending { border-color: #d1d5db; }

.legend {
  background: white;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 11px;
  color: #6b7280;
}

.legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot.ok { background: #2e7d32; }
.dot.warning { background: #f59e0b; }
.dot.late { background: #dc2626; }
.dot.maintenance { background: #9333ea; }
.dot.transfer { background: #f59e0b; }
