/* ============================================================
   Remote Desktop Gateway Dashboard
   Design: Dark, dashboard-oriented, full-viewport
   ============================================================ */

/* TOTP field visibility (no inline styles needed) */
.totp-hidden { display: none; }
.totp-visible { display: block; }

:root {
  --bg-base: #0c0c0e;
  --bg-surface: #141416;
  --bg-elevated: #1c1c20;
  --bg-hover: #242428;
  --bg-active: #2c2c32;

  --border: #2a2a30;
  --border-subtle: #1e1e24;

  --text-primary: #ececf0;
  --text-secondary: #9898a4;
  --text-muted: #5c5c68;

  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-subtle: rgba(59, 130, 246, 0.12);

  --green: #22c55e;
  --green-subtle: rgba(34, 197, 94, 0.12);
  --orange: #f59e0b;
  --orange-subtle: rgba(245, 158, 11, 0.12);
  --red: #ef4444;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: 150ms ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums lining-nums;
}

/* ============================================================
   Screen management
   ============================================================ */
.screen { height: 100dvh; }
.screen[hidden] { display: none !important; }

/* ============================================================
   Login
   ============================================================ */
#login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-base);
}

.login-card {
  width: 100%;
  max-width: 380px;
  padding: 40px 32px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  text-align: center;
}

.login-logo {
  color: var(--accent);
  margin-bottom: 20px;
}

.login-card h1 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.login-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.field {
  text-align: left;
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition);
}

.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

#login-form button[type="submit"] {
  width: 100%;
  padding: 11px;
  margin-top: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}

#login-form button[type="submit"]:hover { background: var(--accent-hover); }
#login-form button[type="submit"]:disabled { opacity: 0.5; cursor: not-allowed; }

.error {
  color: var(--red);
  font-size: 13px;
  margin-top: 12px;
}

/* ============================================================
   Dashboard Layout
   ============================================================ */
#dashboard-screen {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
}

.topbar-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--green-subtle);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  color: var(--green);
}

.status-pill .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.user-display {
  font-size: 13px;
  color: var(--text-secondary);
}

.btn-ghost {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-family: var(--font);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--text-muted);
}

/* ============================================================
   Main Content Area
   ============================================================ */
.main-content {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.toolbar-left { flex: 1; max-width: 360px; }
.toolbar-right { display: flex; gap: 4px; align-items: center; }

.toolbar-sep {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 4px;
}

.search-input {
  width: 100%;
  padding: 9px 14px;
  padding-left: 38px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235c5c68' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px center;
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.view-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.view-btn:hover { color: var(--text-secondary); background: var(--bg-hover); }
.view-btn.active { color: var(--text-primary); border-color: var(--text-muted); }

/* ============================================================
   Connection Grid
   ============================================================ */
.connections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.connections-grid.list-view {
  grid-template-columns: 1fr;
  gap: 8px;
}

/* ============================================================
   Connection Card (Grid View)
   ============================================================ */
.connection-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
}

.connection-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 8px 32px rgba(0,0,0,0.3);
  transform: translateY(-2px);
}

.card-preview {
  aspect-ratio: 16 / 10;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.card-preview .os-icon {
  color: var(--text-muted);
  opacity: 0.5;
}

.card-preview .active-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  background: var(--green-subtle);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
}

.card-preview .active-badge .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
}

.card-body {
  padding: 14px 16px;
}

.card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.protocol-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.protocol-badge.rdp { background: var(--accent-subtle); color: var(--accent); }
.protocol-badge.vnc { background: rgba(168, 85, 247, 0.12); color: #a855f7; }
.protocol-badge.ssh { background: var(--green-subtle); color: var(--green); }
.protocol-badge.telnet { background: var(--orange-subtle); color: var(--orange); }
.protocol-badge.kubernetes { background: rgba(59, 130, 246, 0.12); color: #60a5fa; }

.card-host {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-open-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.connection-card:hover .card-open-hint { opacity: 1; }

.card-open-hint span {
  padding: 8px 20px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
}

/* ============================================================
   Machine Card (Grouped Actions)
   ============================================================ */
.machine-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
}

.machine-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 8px 32px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.machine-card-body {
  padding: 14px 16px 12px;
}

.machine-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 0 16px 16px;
}

.machine-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
}

.machine-action:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.machine-actions .machine-action.is-primary {
  color: #fff;
  border-color: transparent;
}

.machine-actions .machine-action.is-primary.rdp {
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.12);
}

.machine-actions .machine-action.is-primary.rdp:hover {
  background: var(--accent-hover);
}

.machine-actions .machine-action.is-primary.vnc {
  background: #a855f7;
  box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.12);
}

.machine-actions .machine-action.is-primary.vnc:hover {
  background: #9333ea;
}

.machine-actions .machine-action.is-primary.ssh {
  background: var(--green);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.12);
}

.machine-actions .machine-action.is-primary.ssh:hover {
  background: #16a34a;
}

.machine-actions .machine-action.is-primary.telnet {
  background: var(--orange);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.12);
}

.machine-actions .machine-action.is-primary.telnet:hover {
  background: #d97706;
}

.machine-actions .machine-action.is-primary.kubernetes {
  background: #60a5fa;
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.12);
}

.machine-actions .machine-action.is-primary.kubernetes:hover {
  background: #3b82f6;
}

/* ============================================================
   Connection Card (List View)
   ============================================================ */
.connections-grid.list-view .connection-card {
  border-radius: var(--radius-md);
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
}

.connections-grid.list-view .card-preview {
  aspect-ratio: 1;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.connections-grid.list-view .card-preview .os-icon svg {
  width: 24px;
  height: 24px;
}

.connections-grid.list-view .card-body { padding: 0; }

.connections-grid.list-view .card-open-hint { display: none; }

.connections-grid.list-view .card-meta { margin-top: 4px; }

.connections-grid.list-view .machine-card {
  border-radius: var(--radius-md);
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
}

.connections-grid.list-view .machine-card-body {
  padding: 0;
}

.connections-grid.list-view .machine-actions {
  justify-content: flex-end;
  padding: 0;
}

.connections-grid.list-view .machine-action {
  padding: 5px 10px;
}

.list-action {
  color: var(--text-muted);
  font-size: 12px;
  display: none;
}
.connections-grid.list-view .list-action { display: block; }
.connections-grid.list-view .connection-card:hover .list-action { color: var(--accent); }

/* ============================================================
   Group Headers
   ============================================================ */
.group-header {
  grid-column: 1 / -1;
  padding: 8px 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border-subtle);
  margin-top: 8px;
}

.group-header:first-child { margin-top: 0; }

/* ============================================================
   States
   ============================================================ */
.empty-state:not([hidden]) {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 80px 20px;
  color: var(--text-muted);
  text-align: center;
}

.empty-state p { font-size: 14px; }
.empty-state .muted { font-size: 13px; }

.loading-state { padding: 0; }

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.skeleton-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  aspect-ratio: 16 / 12;
  animation: shimmer 1.5s ease-in-out infinite alternate;
}

@keyframes shimmer {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

/* ============================================================
   Quality Badges
   ============================================================ */
.quality-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.quality-badge.lossless {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green);
}

.quality-badge.hq {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent);
}

/* List view: reposition quality badges */
.connections-grid.list-view .quality-badge {
  position: static;
  margin-left: 6px;
}

/* ============================================================
   DPI Warning Banner
   ============================================================ */
.dpi-warning {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  margin-bottom: 16px;
  background: var(--orange-subtle);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--orange);
}

.dpi-warning svg {
  flex-shrink: 0;
}

/* ============================================================
   Resource Stats Bar
   ============================================================ */
.stats-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.stats-bar.stats-loading {
  justify-content: center;
}

.stats-placeholder {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.6;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 1;
  min-width: 0;
}

.stat-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  width: 28px;
}

.stat-gauge {
  flex: 1;
  height: 4px;
  background: var(--bg-base);
  border-radius: 2px;
  overflow: hidden;
  min-width: 24px;
}

.stat-gauge-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s ease, background 0.3s ease;
}

.stat-gauge-fill.stat-ok     { background: var(--green); }
.stat-gauge-fill.stat-warning { background: var(--orange); }
.stat-gauge-fill.stat-critical { background: var(--red); }

.stat-value {
  font-size: 11px;
  font-weight: 600;
  min-width: 28px;
  text-align: right;
  flex-shrink: 0;
}

.stat-value.stat-ok      { color: var(--green); }
.stat-value.stat-warning  { color: var(--orange); }
.stat-value.stat-critical { color: var(--red); }

.stat-uptime {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
  padding-left: 6px;
  border-left: 1px solid var(--border-subtle);
}

/* List view: compress stats */
.connections-grid.list-view .stats-bar {
  margin-top: 6px;
  padding-top: 6px;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 640px) {
  .main-content { padding: 16px; }
  .connections-grid { grid-template-columns: 1fr; }
  .connections-grid.list-view .machine-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .connections-grid.list-view .machine-actions {
    justify-content: flex-start;
    padding: 0 16px 16px;
  }
  .topbar { padding: 0 16px; }
  .topbar-title { display: none; }
  .user-display { display: none; }
  .stat-label { display: none; }
  .stat-uptime { display: none; }
}

/* ============================================================
   Modal Overlay
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
}

.modal-overlay[hidden] { display: none !important; }

.modal-card {
  width: 100%;
  max-width: 420px;
  padding: 32px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  text-align: center;
}

.modal-card.modal-wide {
  max-width: 600px;
  text-align: left;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.modal-close:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.modal-icon {
  margin-bottom: 16px;
}

.modal-icon.warning {
  color: var(--orange);
}

.modal-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.5;
}

.modal-card form button[type="submit"],
.btn-primary {
  padding: 10px 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}

.modal-card form button[type="submit"]:hover,
.btn-primary:hover {
  background: var(--accent-hover);
}

.modal-card form button[type="submit"]:disabled,
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================================
   Password Strength Indicator
   ============================================================ */
.password-strength {
  margin: 12px 0;
  text-align: left;
}

.strength-bar {
  height: 4px;
  background: var(--bg-base);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 6px;
}

.strength-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease, background 0.3s ease;
}

.strength-label {
  font-size: 11px;
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
}

.strength-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.strength-checks span {
  font-size: 11px;
  color: var(--text-muted);
}

.check-ok { color: var(--green) !important; }
.check-fail { color: var(--text-muted) !important; }

/* ============================================================
   Connection Health Badges
   ============================================================ */
.health-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
}

.health-badge.health-online {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green);
}

.health-badge.health-offline {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
}

.health-badge.health-unknown {
  background: rgba(92, 92, 104, 0.15);
  color: var(--text-muted);
}

.health-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.health-dot.online { background: var(--green); }
.health-dot.offline { background: var(--red); }
.health-dot.unknown { background: var(--text-muted); animation: pulse 1.5s ease-in-out infinite; }

/* List view: reposition health badges */
.connections-grid.list-view .health-badge {
  position: static;
  margin-left: 6px;
}

/* ============================================================
   User Management Table
   ============================================================ */
.user-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.user-table th {
  text-align: left;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
}

.user-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.user-table tr:last-child td {
  border-bottom: none;
}

.badge-you {
  font-size: 10px;
  color: var(--accent);
  font-weight: 500;
}

.btn-small {
  padding: 4px 10px;
  font-size: 11px;
  font-family: var(--font);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-small:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-danger {
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--red);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--red);
}

/* ============================================================
   Admin Icon Button
   ============================================================ */
.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: var(--radius-sm);
}

.btn-icon svg {
  flex-shrink: 0;
}

.loading-text {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.error-text {
  padding: 20px;
  text-align: center;
  color: var(--red);
  font-size: 13px;
}

/* Checkbox styling in modals */
.field input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
  accent-color: var(--accent);
}

.field label:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  text-transform: none;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}
