/* Dashboard panel */
.dashboard {
  position: fixed;
  top: 0;
  right: 0;
  width: 340px;
  height: 100%;
  height: 100dvh;
  background: var(--widget-bg);
  border-left: 1px solid var(--widget-border);
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.dashboard.hidden {
  transform: translateX(100%);
  pointer-events: none;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--widget-border);
  flex-shrink: 0;
}

.dashboard-title {
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.dashboard-close {
  color: var(--dim);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 2px 6px;
}

.dashboard-close:hover {
  color: var(--accent);
}

.dashboard-widgets {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  overflow-y: auto;
}

/* Widget base */
.widget {
  background: var(--bg);
  border: 1px solid var(--widget-border);
  border-radius: 4px;
  padding: 12px;
}

.widget-title {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--widget-border);
}

/* Status widget */
.status-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.available {
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.status-label {
  color: var(--accent);
  font-weight: 700;
}

.status-key {
  color: var(--dim);
  min-width: 70px;
}

.status-value {
  color: var(--text);
}

/* Uptime widget */
.uptime-counter {
  text-align: center;
  margin: 8px 0;
}

.uptime-big {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
}

.uptime-unit {
  font-size: 14px;
  color: var(--dim);
}

.uptime-small {
  font-size: 16px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.uptime-label {
  text-align: center;
  color: var(--dim);
  font-size: 11px;
  margin-bottom: 8px;
}

.uptime-bar {
  height: 4px;
  background: var(--widget-border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 4px;
}

.uptime-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 1s ease;
}

.uptime-sla {
  color: var(--dim);
  font-size: 10px;
  text-align: right;
}

/* Tech stack bar chart */
.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.bar-label {
  color: var(--text);
  min-width: 80px;
  flex-shrink: 0;
}

.bar-track {
  flex: 1;
  height: 6px;
  background: var(--widget-border);
  border-radius: 3px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--bar-fill);
  border-radius: 3px;
  transition: width 0.8s ease;
}

.bar-value {
  color: var(--dim);
  min-width: 30px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* GitHub widget */
.github-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}

.github-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.github-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}

.github-stat-label {
  font-size: 10px;
  color: var(--dim);
  text-transform: uppercase;
}

.github-events {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.github-event {
  font-size: 11px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.github-static {
  text-align: center;
  padding: 8px 0;
  font-size: 12px;
}

.github-loading {
  text-align: center;
  padding: 12px 0;
  font-size: 12px;
}

/* Dashboard toggle button */
.dashboard-toggle {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 99;
  background: var(--widget-bg);
  color: var(--accent);
  border: 1px solid var(--widget-border);
  border-radius: 4px;
  width: 32px;
  height: 32px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
}

.dashboard-toggle:hover {
  background: var(--accent);
  color: var(--bg);
}

/* Hide toggle when dashboard is open */
body:has(.dashboard:not(.hidden)) .dashboard-toggle {
  display: none;
}

/* Dashboard open: shrink terminal */
body:has(.dashboard:not(.hidden)) #terminal-output,
body:has(.dashboard:not(.hidden)) #input-line,
body:has(.dashboard:not(.hidden)) #quick-commands {
  margin-right: 340px;
}
