/* Dashboard */
.quick-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.recent-activity {
  margin-top: 24px;
}
.recent-activity h3 {
  margin-bottom: 12px;
}

/* Sites */
.site-domain {
  font-weight: 600;
  color: var(--text-primary);
}
.site-type {
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

/* Site Detail */
.site-detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.site-detail-header .back-link {
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition);
}
.site-detail-header .back-link:hover {
  color: var(--text-primary);
}

.dns-info {
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  overflow-x: auto;
}

.danger-zone {
  border: 1px solid var(--accent-danger);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 24px;
}
.danger-zone h3 {
  color: var(--accent-danger);
  margin-bottom: 8px;
}
.danger-zone p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 16px;
}

/* File Manager */
.file-manager {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 500px;
}

.file-tree-panel {
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  overflow-y: auto;
}
.file-tree-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.file-tree-header h3 {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.file-editor-panel {
  background: var(--bg-base);
  display: flex;
  flex-direction: column;
}
.file-editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}
.file-editor-path {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.file-editor-area {
  flex: 1;
  padding: 0;
}
.file-editor-area textarea {
  width: 100%;
  height: 100%;
  min-height: 400px;
  background: var(--bg-base);
  border: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
  padding: 16px;
  resize: none;
  outline: none;
  tab-size: 2;
}

/* File tree items */
.file-tree-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px calc(12px + var(--depth, 0) * 16px);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: all var(--transition);
}
.file-tree-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.file-tree-item.active {
  background: var(--accent-primary-bg);
  color: var(--accent-primary-hover);
}
.file-tree-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--border-default);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  color: var(--text-muted);
  transition: all var(--transition);
  cursor: pointer;
}
.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--accent-primary);
  background: var(--accent-primary-bg);
  color: var(--accent-primary);
}

/* Databases */
.db-password {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.db-password code {
  background: var(--bg-overlay);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
}
.db-password .toggle-pw {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
}

/* Monitoring */
.monitoring-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.chart-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.chart-card h3 {
  font-size: 0.95rem;
  margin-bottom: 16px;
}
.chart-card canvas {
  width: 100%;
  height: 200px;
}

.service-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Settings */
.settings-section {
  margin-bottom: 32px;
}
.settings-section h3 {
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

@media (max-width: 1024px) {
  .monitoring-grid {
    grid-template-columns: 1fr;
  }
  .file-manager {
    grid-template-columns: 1fr;
  }
  .file-tree-panel {
    max-height: 200px;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }
}

@media (max-width: 768px) {
  .file-manager {
    min-height: 300px;
  }
  .file-editor-area textarea {
    min-height: 200px;
    font-size: 0.8rem;
  }
  .quick-actions {
    flex-wrap: wrap;
  }
}
