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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f0f2f5;
  color: #1a1a2e;
  padding: 20px;
}

.container { max-width: 1100px; margin: 0 auto; }

header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px;
}
header h1 { font-size: 24px; color: #2c3e50; }
header .meta { color: #7f8c8d; font-size: 13px; }

.actions { display: flex; gap: 10px; margin-bottom: 20px; }

.btn {
  padding: 10px 20px; border: none; border-radius: 6px;
  font-size: 14px; cursor: pointer; font-weight: 500;
  transition: opacity 0.2s;
}
.btn:hover { opacity: 0.85; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: #3498db; color: white; }
.btn-success { background: #27ae60; color: white; }
.btn-secondary { background: #95a5a6; color: white; }

.cards {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 12px; margin-bottom: 24px;
}

.card {
  background: white; border-radius: 10px; padding: 20px;
  text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.card .number { font-size: 32px; font-weight: 700; }
.card .label { font-size: 12px; color: #7f8c8d; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.card.green .number { color: #27ae60; }
.card.red .number { color: #e74c3c; }
.card.yellow .number { color: #f39c12; }
.card.grey .number { color: #95a5a6; }
.card.critical { background: #f5c6cb; }
.card.critical .number { color: #721c24; }

.tabs {
  display: flex; gap: 0; margin-bottom: 0;
  border-bottom: 2px solid #dee2e6;
}
.tab {
  padding: 10px 24px; cursor: pointer; font-size: 14px;
  border: none; background: none; color: #7f8c8d;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.tab.active { color: #3498db; border-bottom-color: #3498db; font-weight: 600; }

.panel { display: none; background: white; border-radius: 0 0 10px 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.panel.active { display: block; }

table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
th {
  background: #f8f9fa; padding: 10px 12px; text-align: left;
  font-weight: 600; color: #495057; border-bottom: 2px solid #dee2e6;
}
td {
  padding: 10px 12px; border-bottom: 1px solid #f0f0f0;
}
tr:hover { background: #f8f9fa; }

.flag-critical { color: #721c24; font-weight: 700; background: #f5c6cb; padding: 2px 8px; border-radius: 4px; }
.flag-late { color: #e74c3c; font-weight: 600; }
.flag-missing { color: #f39c12; font-weight: 600; }
.flag-ok { color: #27ae60; }
.flag-sla { color: #95a5a6; }

.history-row { cursor: pointer; }
.history-row:hover { background: #edf2f7; }

.settings-form {
  padding: 24px;
}
.settings-form label {
  display: block; margin-bottom: 4px; font-weight: 500; font-size: 13px; color: #495057;
}
.settings-form input {
  width: 100%; padding: 8px 12px; border: 1px solid #dee2e6; border-radius: 6px;
  font-size: 14px; margin-bottom: 16px;
}
.settings-form input:focus { outline: none; border-color: #3498db; }

.spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid #fff; border-top-color: transparent;
  border-radius: 50%; animation: spin 0.6s linear infinite;
  vertical-align: middle; margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty { padding: 40px; text-align: center; color: #95a5a6; }

.toast {
  position: fixed; bottom: 20px; right: 20px;
  background: #2c3e50; color: white; padding: 12px 20px;
  border-radius: 8px; font-size: 14px; display: none;
  z-index: 1000; box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.toast.show { display: block; }

.email-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: #e9ecef; padding: 6px 12px; border-radius: 20px;
  font-size: 13px; margin: 4px 4px 4px 0;
}
.email-chip .remove {
  cursor: pointer; color: #e74c3c; font-weight: bold;
  font-size: 16px; line-height: 1;
}
.email-chip .remove:hover { color: #c0392b; }
