/* ===== Design tokens ===== */
:root {
  --bg: #0A0E1A;
  --bg-glow: radial-gradient(circle at 20% -10%, rgba(79,127,255,0.16), transparent 45%);
  --surface: #131826;
  --surface-elevated: #1A2033;
  --surface-hover: #1F2740;
  --border: #232B42;
  --border-soft: rgba(255,255,255,0.06);

  --text: #EEF1F8;
  --text-muted: #8B93A7;
  --text-faint: #5C6478;

  --accent: #4F7FFF;
  --accent-hover: #3D69E8;
  --accent-soft: rgba(79,127,255,0.14);
  --accent-text: #A9C1FF;

  --success: #34D399;
  --success-soft: rgba(52,211,153,0.14);
  --danger: #F87171;
  --danger-hover: #E85D5D;
  --danger-soft: rgba(248,113,113,0.14);
  --warning: #FBBF24;
  --warning-soft: rgba(251,191,36,0.14);

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-card: 0 1px 2px rgba(0,0,0,0.3), 0 12px 32px -12px rgba(0,0,0,0.5);
  --shadow-button: 0 1px 2px rgba(0,0,0,0.2);
  --surface-translucent: rgba(19,24,38,0.85);
}

/* ===== Tema claro ===== */
[data-theme="light"] {
  --bg: #F4F6FA;
  --bg-glow: radial-gradient(circle at 20% -10%, rgba(79,127,255,0.08), transparent 45%);
  --surface: #FFFFFF;
  --surface-elevated: #F1F4F9;
  --surface-hover: #E7EBF3;
  --border: #E1E5EE;
  --border-soft: rgba(15,23,42,0.07);

  --text: #171B27;
  --text-muted: #5B6478;
  --text-faint: #8A93A7;

  --accent: #3D69E8;
  --accent-hover: #2F56C4;
  --accent-soft: rgba(61,105,232,0.10);
  --accent-text: #2F56C4;

  --success: #16A34A;
  --success-soft: rgba(22,163,74,0.10);
  --danger: #DC2626;
  --danger-hover: #B91C1C;
  --danger-soft: rgba(220,38,38,0.10);
  --warning: #B45309;
  --warning-soft: rgba(180,83,9,0.12);

  --shadow-card: 0 1px 2px rgba(15,23,42,0.04), 0 12px 28px -14px rgba(15,23,42,0.16);
  --shadow-button: 0 1px 2px rgba(15,23,42,0.08);
  --surface-translucent: rgba(255,255,255,0.85);
}

/* ===== Reset & base ===== */
* { box-sizing: border-box; }

html { -webkit-font-smoothing: antialiased; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    var(--bg-glow),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Inter', -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
}

h1, h2, h3, .brand {
  font-family: 'Manrope', 'Inter', sans-serif;
}

a { color: var(--accent-text); text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; }

code {
  font-family: "SF Mono", Consolas, monospace;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--accent-text);
}

/* ===== Menu no topo ===== */
.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface-translucent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

.topnav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 64px;
}

.topnav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 8px;
  flex-shrink: 0;
}
.topnav-brand .brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--accent), #7C5CFF);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px -4px rgba(79,127,255,0.6);
}
.topnav-brand .brand-icon svg { width: 17px; height: 17px; }
.topnav-brand-name {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 13.5px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.topnav-brand-org {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.topnav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 9px 14px;
  border-radius: 9px;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.nav-link:hover { background: var(--surface-elevated); color: var(--text); text-decoration: none; }
.nav-link.active { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.nav-link .chevron { width: 13px; height: 13px; margin-left: -2px; }

/* Dropdown (Aparelhos, Configurações, usuário) */
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 200px;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  box-shadow: var(--shadow-card);
  z-index: 50;
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--text);
  font-size: 13.5px;
  text-decoration: none;
}
.nav-dropdown-menu a:hover { background: var(--surface-hover); text-decoration: none; }
.nav-dropdown-menu a.active { color: var(--accent-text); font-weight: 600; }
.nav-dropdown-menu-right { left: auto; right: 0; }

/* Menu do usuário (avatar + nome + sair) */
.user-dropdown { flex-shrink: 0; }
.user-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--surface-elevated);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.user-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent), #7C5CFF);
  color: white;
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.user-dropdown-name {
  padding: 8px 12px 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 6px;
}
.user-dropdown-menu a:last-child { color: var(--text-faint); }
.user-dropdown-menu a:last-child:hover { color: var(--danger); background: var(--danger-soft); }

.mobile-menu-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  color: var(--text);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: auto;
}
.mobile-menu-toggle svg { width: 18px; height: 18px; }

.theme-switch {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}
.theme-switch-track {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 58px;
  height: 30px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  padding: 0 7px;
  transition: background 0.15s ease;
}
.theme-switch:hover .theme-switch-track { background: var(--surface-hover); }
.theme-switch-track svg {
  width: 15px;
  height: 15px;
  color: var(--text-faint);
  position: relative;
  z-index: 1;
}
.theme-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent), #7C5CFF);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transform: translateX(26px); /* padrão (escuro) = em cima do ícone da lua */
  transition: transform 0.2s ease;
}
[data-theme="light"] .theme-switch-thumb {
  transform: translateX(0); /* claro = em cima do ícone do sol */
}

.theme-switch-floating {
  position: fixed;
  top: 20px;
  right: 20px;
}
.theme-switch-floating .theme-switch-track {
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

@media (max-width: 860px) {
  .topnav-brand-org { display: none; }
  .mobile-menu-toggle { display: flex; }
  .topnav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border-soft);
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    gap: 4px;
  }
  .topnav-links.open { display: flex; }
  .nav-link { width: 100%; }
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    background: none;
    padding-left: 14px;
    margin-top: 2px;
  }
  .nav-dropdown.open .nav-dropdown-menu { display: block; }
}

.main-content-top {
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
}
.main-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 24px 48px;
  width: 100%;
  flex: 1;
}

.app-footer {
  text-align: center;
  padding: 18px 24px;
  font-size: 12px;
  color: var(--text-faint);
  border-top: 1px solid var(--border-soft);
}

.app-footer-standalone {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  border-top: none;
  background: none;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  gap: 16px;
}
.page-header h1 {
  font-size: 22px;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.page-header p { color: var(--text-muted); font-size: 13.5px; margin: 0; }

/* ===== Stat strip ===== */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}
.stat-card .stat-value {
  font-family: 'Manrope', sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.stat-card .stat-label {
  color: var(--text-muted);
  font-size: 12.5px;
  margin-top: 4px;
}
.stat-card.accent .stat-value { color: var(--accent-text); }
.stat-card.warn .stat-value { color: var(--warning); }

/* ===== Cards ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}

.card h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin: 0 0 18px;
  font-weight: 700;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.card-header h2 { margin-bottom: 0; }

/* ===== Table ===== */
table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 13px 10px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13.5px;
}
th {
  color: var(--text-faint);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.12s ease; }
tbody tr:hover { background: var(--surface-elevated); }
td.name-cell { font-weight: 600; color: var(--text); }

/* ===== Login ===== */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-card);
  text-align: center;
}

.login-card.signup-card {
  max-width: 620px;
  text-align: center;
}
.signup-card form { text-align: left; }

.form-section {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--border-soft);
}
.form-section:first-of-type {
  margin-top: 22px;
  padding-top: 0;
  border-top: none;
}
.form-section h2 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  font-weight: 700;
  margin: 0 0 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}
.form-grid .span-2 { grid-column: span 2; }

@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
}

.field-error {
  color: var(--danger);
  font-size: 12px;
  margin-top: 6px;
}

.login-logo {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  margin: 0 auto 20px;
  background: linear-gradient(145deg, var(--accent), #7C5CFF);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px -8px rgba(79,127,255,0.6);
}
.login-logo svg { width: 26px; height: 26px; }

.login-card h1 {
  font-size: 19px;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.login-card p { color: var(--text-muted); font-size: 13.5px; margin: 0 0 26px; }
.login-card form { text-align: left; }

/* ===== Forms ===== */
label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 16px 0 7px;
}

input[type="text"], input[type="password"], input[type="email"], input[type="tel"] {
  width: 100%;
  background: var(--surface-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
input::placeholder { color: var(--text-faint); }

select {
  width: 100%;
  background: var(--surface-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  appearance: none;
  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='%238B93A7' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
select option {
  background: var(--surface-elevated);
  color: var(--text);
}

input[type="file"] {
  width: 100%;
  background: var(--surface-elevated);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  color: var(--text-muted);
  font-size: 13px;
  font-family: inherit;
}
input[type="file"]::file-selector-button {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  margin-right: 12px;
  cursor: pointer;
}

.wallpaper-preview {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  max-width: 220px;
}
.wallpaper-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 9/16;
  object-fit: cover;
}

.logo-preview {
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #1c2436;
  padding: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 260px;
}
.logo-preview img {
  max-width: 100%;
  max-height: 80px;
  object-fit: contain;
}

.token-display {
  font-family: "SF Mono", Consolas, monospace;
  font-size: 13.5px;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--accent-text);
  word-break: break-all;
  user-select: all;
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 560px) {
  .row-2 { grid-template-columns: 1fr; }
}

.qr-box {
  background: white;
  display: inline-block;
  padding: 18px;
  border-radius: var(--radius-md);
  margin: 10px 0;
}

.steps {
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.9;
  margin: 0;
  padding-left: 20px;
}

.error-text {
  color: var(--danger);
  font-size: 13px;
  margin-top: 10px;
}

.optional-label::after {
  content: ' (opcional)';
  color: var(--text-faint);
  font-weight: 400;
}

.app-catalog-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-elevated);
  margin-bottom: 8px;
}
.app-catalog-info { min-width: 0; }
.app-catalog-name {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 3px;
}
.app-catalog-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.app-catalog-actions button { padding: 8px 14px; font-size: 12.5px; }

/* ===== Grade de cards do catálogo de apps ===== */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.app-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.app-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 17px;
  color: white;
}

.app-card-title { min-width: 0; }
.app-card-name {
  font-weight: 600;
  font-size: 14.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-card-package {
  font-size: 11.5px;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.app-card-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.app-card-meta .badge { font-size: 10.5px; padding: 3px 9px; }

.app-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}
.app-card-actions form { flex: 1; }
.app-card-actions button {
  width: 100%;
  padding: 9px;
  font-size: 12.5px;
}

/* ===== Switch (checkbox estilo interruptor) usado em Sistema ===== */
.switch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
}
.switch-row input[type="checkbox"] {
  width: 42px;
  height: 24px;
  appearance: none;
  background: var(--border);
  border-radius: 20px;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease;
}
.switch-row input[type="checkbox"]::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  top: 3px;
  left: 3px;
  transition: transform 0.15s ease;
}
.switch-row input[type="checkbox"]:checked {
  background: var(--accent);
}
.switch-row input[type="checkbox"]:checked::before {
  transform: translateX(18px);
}

.install-queue-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
}
.install-queue-row:last-child { border-bottom: none; }

.filter-bar {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-soft);
}
.filter-bar > div { min-width: 160px; }
.filter-bar label { margin-top: 0; }
.filter-bar button { flex-shrink: 0; }

/* ===== Mapa (Leaflet) ===== */
.map-marker-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid white;
  box-shadow: 0 0 0 2px var(--accent), 0 2px 6px rgba(0,0,0,0.4);
}
.leaflet-popup-content-wrapper {
  background: var(--surface-elevated);
  color: var(--text);
  border-radius: 10px;
}
.leaflet-popup-content { font-size: 13px; line-height: 1.6; }
.leaflet-popup-content a { color: var(--accent-text); }
.leaflet-popup-tip { background: var(--surface-elevated); }

/* ===== Buttons ===== */
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 20px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  box-shadow: var(--shadow-button);
  transition: background 0.15s ease, transform 0.1s ease;
}
button:hover, .btn:hover { background: var(--accent-hover); text-decoration: none; }
button:active, .btn:active { transform: translateY(1px); }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
  box-shadow: none;
}
.btn-outline:hover { background: var(--surface-elevated); border-color: var(--text-faint); }

.btn-danger { background: var(--danger); }
.btn-danger:hover { background: var(--danger-hover); }

.btn-block { width: 100%; }

/* ===== Flash messages ===== */
.flash {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 18px;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 8px;
}
.flash-success { background: var(--success-soft); color: var(--success); border-color: rgba(52,211,153,0.25); }
.flash-error { background: var(--danger-soft); color: var(--danger); border-color: rgba(248,113,113,0.25); }

/* ===== Badges ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 20px;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-faint);
}
.badge-online { color: var(--success); border-color: rgba(52,211,153,0.3); background: var(--success-soft); }
.badge-online::before { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }

/* ===== App checklist rows ===== */
.app-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  background: var(--surface-elevated);
  transition: border-color 0.12s ease;
}
.app-row:has(input:checked) { border-color: rgba(79,127,255,0.4); background: var(--accent-soft); }
.app-row label { margin: 0; flex: 1; font-size: 13.5px; font-weight: 500; color: var(--text); }
.app-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }

/* ===== PIN reveal ===== */
.pin-reveal {
  font-family: "SF Mono", Consolas, monospace;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 8px;
  background: var(--accent-soft);
  border: 1px solid rgba(79,127,255,0.35);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
  margin: 14px 0;
  color: var(--accent-text);
}

/* ===== Misc ===== */
.muted { color: var(--text-muted); font-size: 13px; }
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty-state svg { opacity: 0.4; margin-bottom: 12px; }

::selection { background: var(--accent-soft); color: var(--text); }
