/* ═════════════════════════════════════════════════════════════════
   TMAILKU // TRACKMAIL — DARK NEO-BRUTALIST COMMAND DECK STYLESHEET
   Brand: Tmailku.com
   Version: 20261021_02
   ═════════════════════════════════════════════════════════════════ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0A0A0A;
  --surface: #121212;
  --surface-2: #181818;
  --surface-3: #222222;
  --border: #2E2E2E;
  --border-light: #444444;
  --red: #FF2D2D;
  --red-glow: rgba(255, 45, 45, 0.25);
  --red-hover: #E02020;
  --green: #00E676;
  --green-glow: rgba(0, 230, 118, 0.2);
  --yellow: #FFB300;
  --ink: #FFFFFF;
  --text: #D6D6D6;
  --text-muted: #8E8E8E;
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --shadow-hard: 4px 4px 0px #000000;
  --shadow-hard-sm: 2px 2px 0px #000000;
  --shadow-red: 4px 4px 0px var(--red);
  --radius: 4px;
  --transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Subtle Carbon Scanline Texture */
.scanlines {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
              linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
  background-size: 100% 3px, 3px 100%;
}

/* ═══ TOPBAR ═══ */
.topbar {
  background: var(--surface);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  height: 60px;
}

.topbar-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-group .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.logo-icon svg {
  width: 36px;
  height: 36px;
  display: block;
}

.logo-meta {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--ink);
  line-height: 1.1;
}

.logo-title .slash {
  color: var(--red);
}

.logo-title .sub-brand {
  color: var(--red);
  font-weight: 700;
}

.logo-subtitle {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(0, 230, 118, 0.08);
  border: 1px solid rgba(0, 230, 118, 0.3);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--green);
}

.status-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse-dot 1.8s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

.action-icon-btn {
  background: var(--surface-2);
  border: 2px solid var(--border);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-hard-sm);
  transition: var(--transition);
}

.action-icon-btn:hover {
  border-color: var(--red);
  color: var(--ink);
}

.action-icon-btn.active {
  border-color: var(--red);
  color: var(--red);
  background: rgba(255, 45, 45, 0.08);
}

.lang-pill {
  display: flex;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-hard-sm);
}

.lang-btn {
  background: var(--surface-2);
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 10px;
  cursor: pointer;
  transition: var(--transition);
}

.lang-btn.active {
  background: var(--red);
  color: #000000;
}

.nav-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-hard-sm);
  transition: var(--transition);
}

.nav-back-link:hover {
  border-color: var(--red);
  background: #1F1F1F;
}

/* ═══ COMMAND SEGMENTED NAVIGATION BAR ═══ */
.command-bar {
  background: #111111;
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 60px;
  z-index: 90;
}

.command-bar-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 6px 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.command-bar-inner::-webkit-scrollbar {
  display: none;
}

.nav-segment {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-hard-sm);
  transition: var(--transition);
}

.nav-segment .nav-svg {
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.nav-segment:hover {
  border-color: var(--border-light);
  color: var(--ink);
  background: #1A1A1A;
}

.nav-segment:hover .nav-svg {
  color: var(--red);
}

.nav-segment.active {
  background: var(--red);
  border-color: var(--red);
  color: #000000;
  box-shadow: var(--shadow-hard-sm);
}

.nav-segment.active .nav-svg {
  color: #000000;
}

.nav-badge {
  background: #000000;
  color: var(--red);
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 2px;
}

/* ═══ MAIN CONTAINER & SECTIONS ═══ */
.deck-container {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px 60px;
  flex: 1;
}

.deck-section {
  display: none;
}

.deck-section.active {
  display: block;
  animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-hero {
  margin-bottom: 20px;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.5px;
  border-left: 4px solid var(--red);
  padding-left: 10px;
  margin-bottom: 6px;
}

.section-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 820px;
}

/* ═══ DUAL PANE GRID (COMMAND DECK) ═══ */
.deck-grid {
  display: grid;
  grid-template-columns: 410px 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 980px) {
  .deck-grid {
    grid-template-columns: 1fr;
  }
}

.deck-pane {
  min-width: 0;
}

/* ═══ DECK CARDS ═══ */
.deck-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  overflow: hidden;
}

.deck-card-header {
  padding: 12px 16px;
  background: var(--surface-2);
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.title-svg {
  color: var(--red);
}

.card-title-text {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.3px;
}

.counter-badge {
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius);
}

.deck-card-body {
  padding: 16px;
}

/* ═══ FORM INPUTS & TEXTAREA ═══ */
.field-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.field-hint code {
  font-family: var(--font-mono);
  color: var(--red);
  background: rgba(255, 45, 45, 0.08);
  padding: 2px 5px;
  border-radius: 2px;
}

.textarea-dropzone {
  position: relative;
  margin-bottom: 14px;
}

.textarea-dropzone.dragover {
  outline: 2px dashed var(--red);
  outline-offset: -2px;
}

.dropzone-badge {
  position: absolute;
  bottom: 8px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  pointer-events: none;
  background: rgba(18, 18, 18, 0.85);
  padding: 2px 6px;
  border-radius: 2px;
  border: 1px solid var(--border);
}

.deck-textarea {
  width: 100%;
  background: #0B0B0B;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: #E0E0E0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 12px;
  line-height: 1.6;
  resize: vertical;
  transition: var(--transition);
}

.deck-textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 2px var(--red-glow);
}

.deck-textarea.text-green {
  color: var(--green);
}

.deck-input {
  width: 100%;
  background: #0B0B0B;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: #E0E0E0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 10px 12px;
  transition: var(--transition);
}

.deck-input:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 2px var(--red-glow);
}

.deck-select {
  background: #0B0B0B;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 8px 10px;
  cursor: pointer;
  width: 100%;
}

.deck-select:focus {
  outline: none;
  border-color: var(--red);
}

.control-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.control-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.deck-toggle-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 7px 10px;
  cursor: pointer;
  transition: var(--transition);
}

.deck-toggle-btn:hover {
  border-color: var(--border-light);
}

.deck-toggle-btn.active {
  border-color: var(--green);
  color: var(--green);
  background: rgba(0, 230, 118, 0.08);
}

.toggle-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-light);
  display: inline-block;
}

.deck-toggle-btn.active .toggle-dot {
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}

/* ═══ BUTTONS ═══ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--shadow-hard);
  transition: var(--transition);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px #000000;
}

.btn-primary {
  background: var(--red);
  border: 2px solid var(--red);
  color: #000000;
}

.btn-primary:hover {
  background: var(--red-hover);
  border-color: var(--red-hover);
}

.btn-secondary {
  background: var(--surface-2);
  border: 2px solid var(--border-light);
  color: var(--ink);
}

.btn-secondary:hover {
  border-color: var(--red);
  color: var(--red);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--border-light);
  color: var(--ink);
  background: var(--surface-2);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.75rem;
  box-shadow: var(--shadow-hard-sm);
}

.btn-xs {
  padding: 4px 8px;
  font-size: 0.7rem;
  box-shadow: none;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.action-btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

/* Public Share Box */
.public-share-box {
  background: var(--surface-2);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}

.share-box-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.share-box-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 10px;
}

/* ═══ FEED / STREAM PANE (RIGHT) ═══ */
.feed-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 220px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-box svg {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 9px 12px 9px 36px;
  box-shadow: var(--shadow-hard-sm);
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--red);
}

.filter-pills {
  display: flex;
  gap: 6px;
}

.filter-pill {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 12px;
  cursor: pointer;
  box-shadow: var(--shadow-hard-sm);
  transition: var(--transition);
}

.filter-pill.active {
  background: var(--red);
  border-color: var(--red);
  color: #000000;
}

.feed-stats-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 16px;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  box-shadow: var(--shadow-hard-sm);
  flex-wrap: wrap;
}

.stat-item .stat-lbl {
  color: var(--text-muted);
}

.stat-item strong {
  color: var(--ink);
}

.col-green { color: var(--green) !important; }
.col-red { color: var(--red) !important; }
.ml-auto { margin-left: auto; }

.feed-live-status {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--green);
  text-transform: uppercase;
}

/* Feed Container */
.feed-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 480px;
}

.feed-empty-state {
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 60px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: auto 0;
}

.empty-icon-box {
  margin-bottom: 16px;
  background: rgba(255, 45, 45, 0.08);
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 45, 45, 0.3);
}

.feed-empty-state h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.feed-empty-state p {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.6;
}

/* Account Feed Card */
.account-feed-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  overflow: hidden;
  transition: var(--transition);
}

.account-feed-card:hover {
  border-color: var(--border-light);
}

.account-card-header {
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.acc-email-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.acc-email-text {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
}

.acc-status-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 2px;
  border: 1px solid;
}

.acc-status-tag.live {
  background: rgba(0, 230, 118, 0.12);
  border-color: var(--green);
  color: var(--green);
}

.acc-status-tag.error {
  background: rgba(255, 45, 45, 0.12);
  border-color: var(--red);
  color: var(--red);
}

.email-items-list {
  display: flex;
  flex-direction: column;
}

.email-item-row {
  padding: 12px 14px;
  border-bottom: 1px solid var(--surface-3);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background 0.1s ease;
}

.email-item-row:last-child {
  border-bottom: none;
}

.email-item-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.email-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.email-sender-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--red);
  background: rgba(255, 45, 45, 0.08);
  padding: 2px 6px;
  border-radius: 2px;
}

.email-time-lbl {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.email-subject-line {
  font-weight: 600;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.4;
}

.email-preview-snip {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Highlighted OTP and Link Actions */
.email-action-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.otp-pill-box {
  display: inline-flex;
  align-items: center;
  background: #000000;
  border: 2px solid var(--red);
  border-radius: var(--radius);
  overflow: hidden;
}

.otp-pill-code {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--red);
  padding: 4px 10px;
}

.otp-pill-btn {
  background: var(--red);
  border: none;
  color: #000000;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 6px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: opacity 0.15s ease;
}

.otp-pill-btn:hover {
  opacity: 0.9;
}

.magic-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 230, 118, 0.1);
  border: 1px solid var(--green);
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius);
  text-decoration: none;
}

.magic-link-btn:hover {
  background: var(--green);
  color: #000000;
}

.btn-view-mail {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  padding: 4px 8px;
  border-radius: var(--radius);
  cursor: pointer;
}

.btn-view-mail:hover {
  border-color: var(--border-light);
  color: var(--ink);
}

/* ═══ CHECKER 3-BOX RESULTS ═══ */
.result-tri-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .result-tri-grid {
    grid-template-columns: 1fr;
  }
}

.tri-box {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.tri-box.tri-live { border-top: 4px solid var(--green); }
.tri-box.tri-die { border-top: 4px solid var(--red); }
.tri-box.tri-unknown { border-top: 4px solid var(--yellow); }

.tri-header {
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tri-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--ink);
}

.tri-live .tri-title svg { color: var(--green); }
.tri-die .tri-title svg { color: var(--red); }
.tri-unknown .tri-title svg { color: var(--yellow); }

.tri-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 2px;
}

.tri-live .tri-badge { background: rgba(0, 230, 118, 0.15); color: var(--green); }
.tri-die .tri-badge { background: rgba(255, 45, 45, 0.15); color: var(--red); }
.tri-unknown .tri-badge { background: rgba(255, 179, 0, 0.15); color: var(--yellow); }

.tri-textarea {
  width: 100%;
  height: 260px;
  background: #080808;
  border: none;
  color: #CCCCCC;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  padding: 10px 12px;
  line-height: 1.5;
  resize: vertical;
}

.tri-live .tri-textarea { color: #88F0B0; }
.tri-die .tri-textarea { color: #FFA0A0; }
.tri-unknown .tri-textarea { color: #FFE080; }

.tri-footer {
  padding: 10px 12px;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
}

.progress-wrap {
  margin-top: 16px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.progress-track {
  width: 100%;
  height: 8px;
  background: #000000;
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--red);
  transition: width 0.2s ease;
}

/* ═══ AUTO FORMATTER PANE ═══ */
.formatter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 900px) {
  .formatter-grid {
    grid-template-columns: 1fr;
  }
}

.formatter-controls {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: var(--radius);
}

.fmt-option-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.fmt-opt-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}

.seg-radio-group {
  display: flex;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.seg-radio {
  display: flex;
  align-items: center;
  cursor: pointer;
  background: var(--surface);
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: var(--transition);
}

.seg-radio input {
  display: none;
}

.seg-radio:has(input:checked) {
  background: var(--red);
  color: #000000;
}

.fmt-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 4px;
  border-top: 1px solid var(--surface-3);
}

.fmt-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text);
  cursor: pointer;
}

.fmt-checkbox input {
  accent-color: var(--red);
}

.fmt-summary-banner {
  background: rgba(0, 230, 118, 0.08);
  border: 1px solid rgba(0, 230, 118, 0.3);
  padding: 8px 12px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--green);
  margin-bottom: 12px;
}

.fmt-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

/* ═══ REST API SECTION ═══ */
.api-diff-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .api-diff-banner {
    grid-template-columns: 1fr;
  }
}

.diff-col {
  background: var(--surface);
  border: 2px solid var(--border);
  padding: 14px 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard-sm);
}

.diff-col.active-trk {
  border-color: var(--green);
  background: rgba(0, 230, 118, 0.03);
}

.diff-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 6px;
}

.diff-p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.gen-input-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.generated-key-box {
  margin-top: 16px;
  background: #080808;
  border: 2px solid var(--green);
  border-radius: var(--radius);
  padding: 14px;
}

.key-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.key-box-title {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--green);
}

.key-display-text {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: #FFFFFF;
  background: #111111;
  padding: 8px 12px;
  border-radius: var(--radius);
  margin-bottom: 10px;
  word-break: break-all;
}

.key-meta-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.meta-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.meta-pill strong {
  color: var(--ink);
}

.code-tab-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.code-tab-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius);
  cursor: pointer;
}

.code-tab-btn.active {
  background: var(--red);
  border-color: var(--red);
  color: #000000;
}

.code-block {
  background: #080808;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.6;
  color: #D6D6D6;
  overflow-x: auto;
}

.usage-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 14px;
}

@media (max-width: 600px) {
  .usage-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.usage-item {
  background: #0B0B0B;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  display: flex;
  flex-direction: column;
}

.usage-lbl {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.usage-val {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--green);
}

/* ═══ EMAIL MODAL (SLIDE-OVER / POPUP) ═══ */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
  animation: fadeIn 0.15s ease;
}

.modal-box {
  background: var(--surface);
  border: 2px solid var(--border-light);
  border-radius: var(--radius);
  max-width: 760px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9), var(--shadow-hard);
}

.modal-header {
  padding: 14px 18px;
  background: var(--surface-2);
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--ink);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: var(--red);
}

.modal-meta {
  padding: 10px 18px;
  background: #111111;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.modal-otp-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.modal-otp-code {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--red);
  background: #000;
  padding: 2px 6px;
  border-radius: 2px;
  border: 1px solid var(--red);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  font-size: 0.88rem;
  line-height: 1.7;
  color: #E0E0E0;
}

/* ═══ TOAST NOTIFICATIONS ═══ */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 300;
  pointer-events: none;
}

.toast {
  background: var(--surface-2);
  border: 2px solid var(--border-light);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 10px 16px;
  box-shadow: var(--shadow-hard);
  pointer-events: auto;
  animation: slideToast 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast.toast-success { border-color: var(--green); color: var(--green); }
.toast.toast-error { border-color: var(--red); color: var(--red); }

@keyframes slideToast {
  from { transform: translateX(50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ═══ SITE FOOTER ═══ */
.site-footer {
  background: #0C0C0C;
  border-top: 2px solid var(--border);
  padding: 24px 20px;
  text-align: center;
  margin-top: auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 700;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--red);
}

.footer-links .dot {
  color: var(--red);
  font-size: 0.6rem;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #666666;
}

/* Helper Utilities */
.mb-6 { margin-bottom: 6px; }
.mb-14 { margin-bottom: 14px; }
.mb-20 { margin-bottom: 20px; }
.mt-8 { margin-top: 8px; }
.mt-14 { margin-top: 14px; }
