/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  color: #1e293b;
  line-height: 1.6;
  min-height: 100vh;
}

/* Dashboard Container */
.dashboard-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.dashboard-header {
  background: linear-gradient(135deg, #164e63 0%, #0891b2 100%);
  color: white;
  padding: 1.5rem 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

.logo-section .logo {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.logo-section .subtitle {
  font-size: 0.875rem;
  opacity: 0.9;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.refresh-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.auto-refresh-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
}

.auto-refresh-toggle input {
  width: 16px;
  height: 16px;
}

.refresh-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.refresh-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.last-update {
  font-size: 0.875rem;
  opacity: 0.9;
}

/* Main Content */
.dashboard-main {
  flex: 1;
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* Summary Section */
.summary-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.summary-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  transition: all 0.2s;
}

.summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.summary-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.summary-icon.total {
  background: linear-gradient(135deg, #164e63, #0891b2);
}
.summary-icon.online {
  background: linear-gradient(135deg, #15803d, #84cc16);
}
.summary-icon.alerts {
  background: linear-gradient(135deg, #ea580c, #f59e0b);
}
.summary-icon.critical {
  background: linear-gradient(135deg, #dc2626, #ef4444);
}

.summary-content h3 {
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.summary-value {
  font-family: "Space Grotesk", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
}

/* Computers Section */
.section-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 1.5rem;
}

.computers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 1.5rem;
}

/* Computer Card */
.computer-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  transition: all 0.2s;
}

.computer-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.computer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.computer-info h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.25rem;
}

.computer-info .client-name {
  font-size: 0.875rem;
  color: #64748b;
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.online {
  background: #dcfce7;
  color: #15803d;
}

.status-badge.critical {
  background: #fef2f2;
  color: #dc2626;
}

.status-badge.warning {
  background: #fef3c7;
  color: #d97706;
}

.status-badge.offline {
  background: #f1f5f9;
  color: #64748b;
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.metric-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.metric-label {
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
}

.metric-value {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  color: #1e293b;
}

.metric-value.good {
  color: #15803d;
}
.metric-value.warning {
  color: #d97706;
}
.metric-value.critical {
  color: #dc2626;
}

/* Last Seen */
.last-seen {
  font-size: 0.75rem;
  color: #64748b;
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.card.stale {
  background: #f5f7fa;
  border-color: #e5e7eb;
  filter: grayscale(100%);
  opacity: .85;
}
.badge-stale {
  background: #e5e7eb;
  color: #6b7280;
}

.account-section { margin-top: 18px; }
.account-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); gap: 16px; }
.account-card { background:#fff; border:1px solid #eaeaea; border-radius:12px; padding:16px; }
.account-title { font-weight:600; margin-bottom:10px; }
.kv { display:flex; justify-content:space-between; padding:6px 0; border-bottom:1px dashed #f0f0f0; }
.kv span { color:#666; }
.kv strong { font-weight:600; }
.credit-box label { display:block; font-size:14px; margin:8px 0 6px; color:#444; }
.credit-box input { width:120px; padding:6px 8px; border:1px solid #ddd; border-radius:8px; }
.muted { color:#6b7280; font-size:13px; }
.btn { display:inline-block; padding:8px 14px; border-radius:8px; background:#1f7aed; color:#fff; text-decoration:none; }
.btn:hover { filter: brightness(0.95); }

.blocked-section { margin-top: 18px; }
.blocked-header  { font-weight: 600; color:#475467; margin: 6px 0 10px; }
.blocked-list    { list-style: none; margin: 0; padding: 0; }
.blocked-item    {
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 12px; margin-bottom:8px; border:1px dashed #e5e7eb;
  background:#fafafa; border-radius:10px;
}
.blocked-item .b-main   { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.blocked-item .b-name   { font-weight:600; }
.blocked-item .b-meta   { color:#6b7280; font-size:12px; }
.blocked-item .b-actions .mini-btn { margin-left:10px; }


/* Loading and Error States */
.loading-state,
.error-state {
  text-align: center;
  padding: 3rem;
  color: #64748b;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e2e8f0;
  border-top: 3px solid #0891b2;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.error-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.retry-btn {
  background: #0891b2;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  margin-top: 1rem;
  transition: all 0.2s;
}

.retry-btn:hover {
  background: #164e63;
}

/* Responsive Design */
@media (max-width: 768px) {
  .dashboard-header {
    padding: 1rem;
  }

  .header-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .dashboard-main {
    padding: 1rem;
  }

  .computers-grid {
    grid-template-columns: 1fr;
  }

  .summary-section {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .summary-section {
    grid-template-columns: 1fr;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

/* Botões modernos (bloquear/desbloquear) */
.mini-btn{
  appearance:none;
  background:#2563eb;
  color:#fff;
  border:0;
  padding:10px 18px;
  font-size:14px;
  font-weight:700;
  line-height:1;
  border-radius:9999px;           /* pill */
  cursor:pointer;
  box-shadow:0 6px 18px rgba(37,99,235,.25);
  transition:background-color .2s, box-shadow .2s, transform .06s;
}
.mini-btn:hover{
  background:#1d4ed8;
  box-shadow:0 8px 22px rgba(29,78,216,.28);
}
.mini-btn:active{
  transform:translateY(1px);
  box-shadow:0 4px 12px rgba(29,78,216,.35);
}
.mini-btn:focus{
  outline:none;
  box-shadow:0 0 0 3px rgba(37,99,235,.25), 0 6px 18px rgba(37,99,235,.25);
}
.mini-btn:disabled{
  opacity:.6; cursor:not-allowed; box-shadow:none;
}

/* (Opcional) se quiser cor diferente p/ "Bloquear":
.mini-btn.block-btn{ background:#ef4444; }
.mini-btn.block-btn:hover{ background:#dc2626; box-shadow:0 8px 22px rgba(239,68,68,.28); }
*/



}
