/**
 * Circloud GUI - Dark Theme
 * Main CSS file that imports modular components
 */

/* Modular CSS imports are linked in HTML with cache-busting query params. */

/* ============================================
   CLOUDUSER GUI SPECIFIC OVERRIDES
   ============================================ */

/* Main content area */
.main-content {
  padding: 8px 12px;
}

/* Content wrapper */
.content {
  padding: 8px 12px;
}

/* Select dropdowns */
.form-group select {
  width: 100%;
  padding: 6px 8px;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 4px;
  color: #e6edf3;
  font-size: 11px;
  font-family: inherit;
  transition: border-color 0.15s ease;
  cursor: pointer;
}

.form-group select:focus {
  outline: none;
  border-color: #8b5cf6;
  background: #161b22;
}

/* Number inputs */
.form-group input[type="number"] {
  width: 100%;
  padding: 6px 8px;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 4px;
  color: #e6edf3;
  font-size: 11px;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.form-group input[type="number"]:focus {
  outline: none;
  border-color: #8b5cf6;
  background: #161b22;
}

/* Pod port group visibility toggle */
.pod-port-group {
  transition: all 0.2s ease;
}

/* Pod image code styling */
.pod-image {
  font-size: 11px;
  word-break: break-all;
}

/* Pod IP styling */
.pod-ip code {
  font-size: 11px;
}

.pod-cpu,
.pod-memory,
.pod-network,
.pod-gpu {
  white-space: nowrap;
}

.pod-cpu code,
.pod-memory code,
.pod-network code,
.pod-gpu code {
  font-size: 11px;
}

/* Monitoring board */
.monitoring-board {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.monitoring-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.monitoring-title {
  font-size: 16px;
  font-weight: 600;
  color: #e2e8f0;
}

.monitoring-subtitle {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
}

.monitoring-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #94a3b8;
}

.monitoring-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.6);
}

.monitoring-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.metric-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(30, 41, 59, 0.85));
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.metric-card.metric-card-count .metric-bar {
  display: none;
}

.metric-card.metric-ok {
  border-color: rgba(34, 197, 94, 0.35);
}

.metric-card.metric-warn {
  border-color: rgba(245, 158, 11, 0.4);
}

.metric-card.metric-hot {
  border-color: rgba(239, 68, 68, 0.4);
}

.metric-card.metric-pulse {
  animation: metricPulse 0.6s ease;
}

@keyframes metricPulse {
  0% {
    box-shadow: 0 0 0 rgba(56, 189, 248, 0.6);
  }
  100% {
    box-shadow: 0 0 0 rgba(56, 189, 248, 0);
  }
}

.metric-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #94a3b8;
}

.metric-value {
  font-size: 18px;
  font-weight: 600;
  color: #f8fafc;
}

.metric-sub {
  font-size: 11px;
  color: #94a3b8;
}

.metric-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  overflow: hidden;
}

.metric-bar-fill {
  height: 100%;
  width: 0;
  transition: width 0.4s ease;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.9), rgba(129, 140, 248, 0.9));
}

.metric-bar-fill.metric-ok {
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.9), rgba(16, 185, 129, 0.9));
}

.metric-bar-fill.metric-warn {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.9), rgba(251, 146, 60, 0.9));
}

.metric-bar-fill.metric-hot {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.9), rgba(244, 114, 182, 0.9));
}

.metric-bar-fill.metric-na {
  background: rgba(148, 163, 184, 0.35);
}

.monitoring-legend {
  display: flex;
  gap: 16px;
  font-size: 11px;
  color: #94a3b8;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #64748b;
}

.legend-dot.metric-ok {
  background: #22c55e;
}

.legend-dot.metric-warn {
  background: #f59e0b;
}

.legend-dot.metric-hot {
  background: #ef4444;
}

.monitoring-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 16px;
}

.monitoring-panel {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 12px;
}

.monitoring-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.monitoring-panel-header h4 {
  font-size: 13px;
  color: #e2e8f0;
}

.monitoring-panel-sub {
  font-size: 10px;
  color: #94a3b8;
}

.monitoring-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.monitoring-table th {
  text-align: left;
  padding: 6px 4px;
  color: #94a3b8;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.monitoring-table td {
  padding: 6px 4px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  vertical-align: top;
  color: #e2e8f0;
}

.metric-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-cell.metric-na .metric-value {
  color: #64748b;
}

.net-metrics {
  display: inline-flex;
  gap: 10px;
  align-items: baseline;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.net-metric {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.net-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.net-value {
  min-width: 70px;
  text-align: right;
  font-size: 11px;
  color: #e2e8f0;
}

.metric-cell.metric-ok .metric-value code {
  color: #22c55e;
}

.metric-cell.metric-warn .metric-value code {
  color: #f59e0b;
}

.metric-cell.metric-hot .metric-value code {
  color: #ef4444;
}

.metric-subtle {
  font-size: 10px;
  color: #94a3b8;
}

/* Registry server/username code styling */
.registry-server,
.registry-username {
  font-size: 11px;
}

/* Status indicator in pods table */
.status-indicator {
  cursor: default;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Console button enhancements */
.console-btn svg,
.console-btn-disabled svg {
  display: block;
}

/* Header nav link - no underline */
.header-nav .nav-link {
  text-decoration: none !important;
}

.header-nav .nav-link:hover {
  text-decoration: none !important;
}
