/* ═══════════════════════════════════════════════════════════════════════════
   SERVER MANAGER — ESTILIZAÇÃO MODERNA NOC (ATIVA ISP MANAGER)
   ═══════════════════════════════════════════════════════════════════════════ */

.sm-container {
  padding: 24px;
  max-width: 1600px;
  margin: 0 auto;
  color: #f1f5f9;
  font-family: inherit;
}

/* Header & Barra Superior */
.sm-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #1e293b;
}

.sm-title-group h1 {
  font-size: 24px;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sm-title-group p {
  margin: 4px 0 0 0;
  font-size: 13px;
  color: #94a3b8;
}

.sm-quick-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.sm-stat-pill {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
}

.sm-stat-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* Abas de Navegação */
.sm-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid #1e293b;
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.sm-tab-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  border-bottom: 2px solid transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.sm-tab-btn:hover {
  color: #f1f5f9;
  background: rgba(30, 41, 59, 0.5);
}

.sm-tab-btn.active {
  color: #38bdf8;
  border-bottom-color: #38bdf8;
  background: rgba(15, 23, 42, 0.8);
}

/* Cards & Grid */
.sm-grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.sm-card {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s, border-color 0.2s;
}

.sm-card:hover {
  border-color: #334155;
}

.sm-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.sm-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sm-card-val {
  font-size: 28px;
  font-weight: 700;
  color: #f8fafc;
  font-family: monospace;
}

.sm-card-sub {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
}

/* Barras de Progresso */
.sm-prog-wrap {
  background: #1e293b;
  border-radius: 6px;
  height: 8px;
  width: 100%;
  overflow: hidden;
  margin-top: 12px;
}

.sm-prog-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.4s ease;
}

.sm-prog-fill.green { background: #10b981; }
.sm-prog-fill.yellow { background: #f59e0b; }
.sm-prog-fill.red { background: #ef4444; }
.sm-prog-fill.blue { background: #0284c7; }

/* Tabelas NOC */
.sm-table-box {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
}

.sm-table-box-header {
  padding: 16px 20px;
  border-bottom: 1px solid #1e293b;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.sm-table-box-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #f1f5f9;
}

.sm-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.sm-table th {
  background: #1e293b;
  color: #94a3b8;
  font-weight: 600;
  padding: 12px 16px;
  border-bottom: 1px solid #334155;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
}

.sm-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #1e293b;
  color: #cbd5e1;
}

.sm-table tr:hover td {
  background: rgba(30, 41, 59, 0.4);
}

/* Badges */
.sm-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.sm-badge-active { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); }
.sm-badge-inactive { background: rgba(148, 163, 184, 0.15); color: #94a3b8; border: 1px solid rgba(148, 163, 184, 0.3); }
.sm-badge-failed { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }
.sm-badge-warning { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.3); }
.sm-badge-blue { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); }

/* Botões */
.sm-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.sm-btn-primary { background: #0284c7; color: #fff; }
.sm-btn-primary:hover { background: #0369a1; }
.sm-btn-success { background: #059669; color: #fff; }
.sm-btn-success:hover { background: #047857; }
.sm-btn-danger { background: #dc2626; color: #fff; }
.sm-btn-danger:hover { background: #b91c1c; }
.sm-btn-warning { background: #d97706; color: #fff; }
.sm-btn-warning:hover { background: #b45309; }
.sm-btn-secondary { background: #1e293b; color: #cbd5e1; border-color: #334155; }
.sm-btn-secondary:hover { background: #334155; color: #fff; }

.sm-btn-sm {
  padding: 4px 8px;
  font-size: 11px;
}

/* Editor de Código & Console */
.sm-code-editor {
  width: 100%;
  height: 480px;
  background: #020617;
  color: #38bdf8;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 13px;
  padding: 16px;
  border: 1px solid #1e293b;
  border-radius: 8px;
  box-sizing: border-box;
  resize: vertical;
  line-height: 1.6;
}

.sm-code-editor:focus {
  outline: none;
  border-color: #0284c7;
}

/* Modais */
.sm-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

.sm-modal-card {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.sm-modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid #1e293b;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sm-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.sm-modal-footer {
  padding: 16px 20px;
  border-top: 1px solid #1e293b;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Form Controls */
.sm-form-group {
  margin-bottom: 16px;
}

.sm-form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 6px;
}

.sm-input {
  width: 100%;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 9px 12px;
  color: #f8fafc;
  font-size: 13px;
  box-sizing: border-box;
}

.sm-input:focus {
  outline: none;
  border-color: #38bdf8;
}
