/* Spotlight */
#spotlight-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 900;
  display: none;
  flex-direction: column;
  align-items: center;
  padding-top: 80px;
}

#spotlight-overlay.open { display: flex; }

#spotlight-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  width: 100%;
  max-width: 600px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

#spotlight-input {
  padding: 16px 20px;
  font-size: 16px;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}

#spotlight-results {
  max-height: 400px;
  overflow-y: auto;
  padding: 8px;
}

.spotlight-group-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 8px 12px 4px;
}

.spotlight-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
  color: var(--text);
}

.spotlight-item:hover, .spotlight-item.selected {
  background: var(--surface2);
}

.spotlight-icon { font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; }
.spotlight-main { flex: 1; min-width: 0; }
.spotlight-title { font-size: 13px; font-weight: 500; }
.spotlight-sub { font-size: 11px; color: var(--text-muted); }

#spotlight-empty {
  padding: 32px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* Keyboard help modal */
.kbd { display: inline-flex; align-items: center; justify-content: center; padding: 2px 6px; background: var(--surface2); border: 1px solid var(--border); border-radius: 4px; font-size: 11px; font-family: monospace; color: var(--text-muted); min-width: 28px; }

.shortcuts-table { width: 100%; }
.shortcuts-table tr td:first-child { width: 100px; }
.shortcuts-table td { padding: 8px 4px; font-size: 13px; border-bottom: 1px solid var(--border); }

/* Notes widget */
.note-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color var(--transition);
}
.note-card:hover { border-color: var(--accent); }
.note-card-title { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.note-card-preview { font-size: 12px; color: var(--text-muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* RSS widget */
.rss-item { padding: 8px 0; border-bottom: 1px solid var(--border); }
.rss-item:last-child { border-bottom: none; }
.rss-item a { font-size: 13px; color: var(--text); font-weight: 500; }
.rss-item a:hover { color: var(--accent); }
.rss-item-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* Docker widget */
.container-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.container-row:last-child { border-bottom: none; }
.container-state { padding: 1px 6px; border-radius: 3px; font-size: 10px; font-weight: 600; }
.container-state.running { background: #22c55e22; color: #22c55e; }
.container-state.exited { background: #ef444422; color: #ef4444; }
.container-state.paused { background: #f59e0b22; color: #f59e0b; }

/* Health widget */
.health-row { display: flex; align-items: center; justify-content: space-between; padding: 4px 0; font-size: 12px; }
.health-bar { height: 3px; background: var(--border); border-radius: 2px; flex: 1; margin: 0 8px; overflow: hidden; }
.health-bar-fill { height: 100%; border-radius: 2px; background: #22c55e; }
.health-bar-fill.warn { background: #f59e0b; }
.health-bar-fill.down { background: #ef4444; }

/* Clock widget */
.clock-time { font-size: 48px; font-weight: 700; letter-spacing: -2px; line-height: 1; }
.clock-date { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* Weather widget */
.weather-temp { font-size: 42px; font-weight: 700; }
.weather-desc { font-size: 13px; color: var(--text-muted); }
.weather-meta { display: flex; gap: 16px; margin-top: 8px; font-size: 12px; color: var(--text-muted); }

/* Admin panel */
.admin-nav {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.admin-nav-btn {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
}
.admin-nav-btn:hover { color: var(--text); }
.admin-nav-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

/* App card catalogue preview */
.catalogue-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
}

/* Switch toggle */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 11px;
  transition: background var(--transition);
  cursor: pointer;
}
.switch-slider::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  left: 3px; bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition);
}
input:checked + .switch-slider { background: var(--accent); }
input:checked + .switch-slider::before { transform: translateX(18px); }

/* Progress bar */
.progress { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.3s ease; }

/* Tooltip */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition);
  z-index: 1000;
}
[data-tooltip]:hover::after { opacity: 1; }

/* App filter bar */
.filter-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.filter-tag { padding: 4px 10px; border-radius: 20px; font-size: 12px; cursor: pointer; border: 1px solid var(--border); background: var(--surface2); color: var(--text-muted); transition: all var(--transition); }
.filter-tag:hover { border-color: var(--accent); color: var(--accent); }
.filter-tag.active { background: var(--accent); border-color: var(--accent); color: white; }

/* Section apps */
.apps-section-header { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 10px; margin-top: 20px; display: flex; align-items: center; gap: 8px; }
.apps-section-header::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* View tabs for calendar */
.view-toggle { display: flex; background: var(--surface2); border-radius: var(--radius); padding: 2px; gap: 2px; }
.view-toggle-btn { padding: 5px 12px; border-radius: 6px; font-size: 12px; font-weight: 500; cursor: pointer; color: var(--text-muted); transition: all var(--transition); background: none; border: none; }
.view-toggle-btn.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,0.2); }
