/* ── Cards ───────────────────────────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.card-clickable { cursor: pointer; }
.card-clickable:hover { border-color: var(--accent); box-shadow: var(--shadow); }

.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.card-title  { font-size: 14px; font-weight: 700; }
.card-meta   { color: var(--text-muted); font-size: 12px; }

/* ── Auth ────────────────────────────────────────────────────────────────── */
.auth-container {
  display: flex; align-items: center; justify-content: center;
  min-height: calc(100vh - var(--nav-h)); padding: 40px 16px;
}

.auth-card {
  width: 100%; max-width: 380px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px;
}

.auth-logo     { text-align: center; font-size: 22px; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.auth-subtitle { text-align: center; color: var(--text-muted); margin-bottom: 22px; font-size: 12px; }
.auth-footer   { text-align: center; margin-top: 16px; font-size: 12px; color: var(--text-muted); }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}

.modal-overlay.hidden { display: none; }

.modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
  width: 100%; max-width: 440px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.modal-title    { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.modal-subtitle { color: var(--text-muted); font-size: 12px; margin-bottom: 20px; line-height: 1.5; }
.modal-actions  { display: flex; gap: 8px; margin-top: 20px; justify-content: flex-end; }

.otp-input {
  width: 100%; text-align: center; font-size: 26px; letter-spacing: 12px;
  padding: 12px; background: var(--bg); border: 2px solid var(--border);
  border-radius: var(--radius); color: var(--text); font-family: var(--font);
  transition: border-color var(--transition);
}

.otp-input:focus { outline: none; border-color: var(--accent); }
.otp-timer          { text-align: center; color: var(--text-muted); font-size: 12px; margin-top: 6px; }
.otp-timer.expiring { color: var(--red); }

/* ── Log Viewer ──────────────────────────────────────────────────────────── */
.log-viewer {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  font-size: 12px; line-height: 1.7;
  min-height: 320px; max-height: 620px;
  overflow-y: auto; white-space: pre-wrap; word-break: break-all;
  color: var(--text);
}

.log-live-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 8px; background: var(--green-sub); color: var(--green);
  border-radius: 10px; font-size: 11px;
}

.log-live-dot {
  width: 6px; height: 6px; background: var(--green); border-radius: 50%;
  animation: pulse 1.5s ease infinite;
}

@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.3; } }

/* ── Spinner / Empty / Loading ───────────────────────────────────────────── */
.spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-state {
  display: flex; align-items: center; gap: 10px;
  color: var(--text-muted); padding: 60px 0; justify-content: center;
}

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }

.empty-state-icon  { font-size: 32px; margin-bottom: 12px; }
.empty-state-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.empty-state-text  { font-size: 12px; }
