/* Patch Accounts — Mono-first, thin borders
   JetBrains Mono. Consistent with inbox/landing design.
*/

body.accounts-body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'JetBrains Mono', 'IBM Plex Mono', monospace;
  font-size: 12px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Header */
.accounts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 52px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.accounts-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--fg);
  font-size: 12px;
  font-weight: 700;
}

.logo-mark {
  width: 24px; height: 24px;
  background: var(--fg);
  color: var(--bg);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.logo-name { letter-spacing: -0.02em; }

.accounts-nav { display: flex; gap: 4px; }
.nav-link {
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 11px;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--fg); background: var(--hover-row); }
.nav-link--active { color: var(--fg); background: var(--active-row); }

/* Main */
.accounts-main { padding: 40px 24px 80px; }
.accounts-container { max-width: 680px; margin: 0 auto; }

.page-title { margin-bottom: 28px; }
.page-title h1 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--fg);
  margin-bottom: 4px;
}
.page-subtitle { font-size: 11px; color: var(--fg-muted); }

/* Flash */
.flash {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 5px;
  font-size: 11px;
  border: 1px solid;
  margin-bottom: 20px;
}
.flash--success { background: var(--accent-dim); border-color: var(--accent); color: var(--fg-muted); }
.flash--error   { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.3); color: #ef4444; }
.flash--info    { background: rgba(74,158,255,0.08); border-color: rgba(74,158,255,0.3); color: var(--signal); }
.flash-icon { font-size: 10px; opacity: 0.7; }

/* Platform grid */
.platforms-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
@media (max-width: 560px) { .platforms-grid { grid-template-columns: 1fr; } }

/* Platform card */
.platform-card {
  padding: 16px 18px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}
.platform-card:hover { background: var(--hover-row); }
.platform-card:nth-child(2n) { border-right: none; }

.platform-card--connected { /* no special style — borders are the card */ }
.platform-card--soon { opacity: 0.5; pointer-events: none; }

/* Platform header */
.platform-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.platform-icon {
  width: 30px; height: 30px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.platform-icon--gmail    { background: rgba(244,180,0,0.10); color: var(--gmail); }
.platform-icon--sms      { background: rgba(76,175,80,0.10);  color: var(--sms); }
.platform-icon--signal   { background: rgba(74,158,255,0.10); color: var(--signal); }
.platform-icon--microsoft{ background: rgba(100,100,100,0.10); color: var(--fg-muted); }
.platform-icon--slack    { background: rgba(224,30,90,0.10);  color: #E01E5A; }
.platform-icon--discord  { background: rgba(88,101,242,0.10);  color: #5865F2; }
.platform-icon--telegram { background: rgba(41,182,246,0.10);  color: var(--telegram); }

.platform-info { flex: 1; min-width: 0; }
.platform-name {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--fg);
}
.platform-identifier {
  display: block;
  font-size: 10px;
  color: var(--fg-muted);
  margin-top: 2px;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.platform-desc {
  display: block;
  font-size: 10px;
  color: var(--fg-faint);
  margin-top: 1px;
}

.platform-status { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot--green  { background: var(--fg-muted); }
.status-dot--yellow { background: var(--gmail); }
.status-dot--red    { background: #ef4444; }
.status-dot--gray   { background: var(--border); }

.status-label { font-size: 10px; color: var(--fg-faint); white-space: nowrap; }

.coming-soon-badge {
  font-size: 9px;
  background: var(--border);
  color: var(--fg-faint);
  padding: 2px 5px;
  border-radius: 3px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Platform actions */
.platform-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.inline-form { display: inline; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  font-size: 11px;
  font-family: inherit;
  font-weight: 600;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn--primary {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}
.btn--primary:hover { opacity: 0.8; }

.btn--ghost {
  background: transparent;
  color: var(--fg-muted);
  border-color: var(--border);
}
.btn--ghost:hover { color: var(--fg); border-color: var(--fg-faint); }

.btn--warning {
  background: rgba(244,180,0,0.10);
  color: var(--gmail);
  border-color: rgba(244,180,0,0.3);
}
.btn--warning:hover { background: rgba(244,180,0,0.15); }

.btn--danger-ghost {
  background: transparent;
  color: var(--fg-faint);
  border-color: transparent;
  padding: 6px 8px;
  font-size: 10px;
}
.btn--danger-ghost:hover {
  color: #ef4444;
  background: rgba(239,68,68,0.08);
  border-color: rgba(239,68,68,0.2);
}

.btn--disabled { pointer-events: none; opacity: 0.4; }

/* Guided form (details/summary) */
.guided-form { margin-top: 0; }
.guided-form > summary {
  list-style: none;
  cursor: pointer;
  width: 100%;
}
.guided-form > summary::-webkit-details-marker { display: none; }

.guided-fields {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field-group { display: flex; flex-direction: column; gap: 3px; }
.field-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.field-input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--fg);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: 7px 10px;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
  box-sizing: border-box;
}
.field-input:focus { border-color: var(--fg-faint); }
.field-input::placeholder { color: var(--fg-faint); }

.field-hint {
  font-size: 10px;
  color: var(--fg-faint);
  line-height: 1.5;
}
.field-hint a { color: var(--fg-muted); text-decoration: none; }
.field-hint a:hover { text-decoration: underline; }

code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  background: var(--bg-subtle);
  padding: 1px 4px;
  border-radius: 3px;
  color: var(--fg-muted);
}

/* Setup steps */
.setup-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.setup-step {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11px;
  color: var(--fg-muted);
  line-height: 1.5;
}
.step-num {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--fg-faint);
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Footer */
.accounts-footer {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* Test toast */
.test-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 9px 14px;
  border-radius: 4px;
  font-size: 11px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  z-index: 100;
}
.test-toast--show { opacity: 1; transform: translateY(0); }
.test-toast--success {
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  color: var(--fg-muted);
}
.test-toast--error {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.3);
  color: #ef4444;
}