:root {
  --bs-body-bg: #0f1115;
  --bs-body-color: #e6e8ee;
}
body { background: var(--bs-body-bg); color: var(--bs-body-color); }

.login-body {
  min-height: 100vh;
  background: radial-gradient(circle at top, #1a1f2e 0%, #0a0d14 70%);
}
.login-logo {
  width: 64px; height: 64px;
  margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #4f6cf7, #8b5cf6);
  border-radius: 16px;
  font-size: 28px; color: #fff;
  box-shadow: 0 8px 32px rgba(79, 108, 247, .35);
}

.card {
  background: #161a23;
  border: 1px solid #232838;
  border-radius: 12px;
}
.card-header {
  background: #1a1f2b;
  border-bottom: 1px solid #232838;
  font-weight: 500;
  font-size: 0.92rem;
}
.status-card .h5 { font-weight: 600; }

.activity-table th {
  background: #1a1f2b;
  font-weight: 500;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #8a92a6;
  border-bottom-color: #232838;
}
.activity-table td { vertical-align: middle; border-color: #1f2330; }
.activity-table a { color: #7d9bff; }

.log-pane {
  background: #0a0d14;
  color: #b8c0d2;
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  font-size: 0.78rem;
  padding: 12px 14px;
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}

.btn-warning {
  --bs-btn-color: #1a1f2b;
}
code {
  color: #e0a87b;
  background: rgba(255,255,255,.04);
  padding: 1px 5px;
  border-radius: 3px;
}
.navbar-dark {
  background: #0a0d14 !important;
  border-color: #232838 !important;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  margin-right: 4px;
  color: #8a92a6 !important;
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.92rem;
  transition: all 0.15s;
}
.nav-pill:hover, .nav-pill:focus {
  background: #1a1f2b;
  color: #e6e8ee !important;
}
.nav-pill.active {
  background: linear-gradient(135deg, #4f6cf7, #6a4ce0);
  color: #fff !important;
  font-weight: 500;
}
@media (max-width: 991px) {
  .nav-pill {
    margin: 2px 0;
    padding: 10px 14px;
    border-radius: 6px;
  }
}
.navbar-toggler {
  border-color: rgba(255,255,255,.2);
}
.navbar-toggler:focus { box-shadow: none; }

.list-group-item {
  background: transparent;
  border-color: #232838;
  color: #e6e8ee;
}

.font-monospace {
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace !important;
}

.alert {
  border: none;
}
.alert-success { background: rgba(40,167,69,.15); color: #6dd58c; }
.alert-danger  { background: rgba(220,53,69,.15); color: #ff8a95; }
.alert-warning { background: rgba(255,193,7,.12); color: #ffd866; }
.alert-info    { background: rgba(13,202,240,.12); color: #8de2ff; }

.form-control, .form-select {
  background: #0d1018;
  border-color: #232838;
  color: #e6e8ee;
}
.form-control:focus, .form-select:focus {
  background: #0d1018;
  color: #e6e8ee;
  border-color: #4f6cf7;
  box-shadow: 0 0 0 0.2rem rgba(79,108,247,.25);
}
.form-text { color: #8a92a6; }

.pending-card {
  border-left: 3px solid #ffd866;
}
.pending-card .card-header {
  background: rgba(255, 216, 102, 0.06);
}
.post-quote {
  border-left: 2px solid #2a2f3d;
  padding: 6px 12px;
  color: #b8c0d2;
  background: rgba(255,255,255,.02);
  border-radius: 4px;
  white-space: pre-wrap;
}

/* Toggle buttons (radio btn-check) — make selected state visible in dark theme */
.btn-check:checked + .btn-outline-primary,
.btn-check:checked + .btn-outline-success,
.btn-check:checked + .btn-outline-warning,
.btn-check:checked + .btn-outline-info {
  color: #fff;
}

/* ---------- Mobile responsiveness ---------- */
@media (max-width: 767px) {
  body { font-size: 0.92rem; }
  h1.h4 { font-size: 1.1rem; }

  /* Tighter container padding on mobile */
  .container-fluid { padding-left: 12px; padding-right: 12px; }

  /* Status cards: smaller padding + condensed text */
  .status-card .card-body { padding: 12px 14px; }
  .status-card .h5 { font-size: 1rem; margin-bottom: 4px !important; }

  /* Generic tables: smaller font + cells */
  .table { font-size: 0.82rem; }
  .table-sm td, .table-sm th { padding: 6px 8px; }

  /* Stack action button groups in tables */
  td .btn { padding: 4px 8px; font-size: 0.78rem; }
  td .btn + .btn { margin-top: 4px; }

  /* Forms: a bit more breathing room */
  .card-body { padding: 1rem; }
  .form-label.small { font-size: 0.82rem; }

  /* Pending cards: full width */
  .pending-card .card-body { padding: 1rem; }

  /* Toggle btn-group: stack vertically on tiny screens */
  .btn-group.w-100 { flex-direction: column; }
  .btn-group.w-100 > .btn { border-radius: 6px !important; margin-bottom: 4px; }

  /* ---- Activity table: render as stacked cards on mobile ---- */
  .activity-table thead { display: none; }
  .activity-table, .activity-table tbody, .activity-table tr, .activity-table td {
    display: block;
    width: 100%;
  }
  .activity-table tr {
    border: 1px solid #232838;
    border-radius: 8px;
    padding: 10px 12px;
    margin: 8px 12px;
    background: #131720;
  }
  .activity-table tr + tr { margin-top: 8px; }
  .activity-table td {
    border: none !important;
    padding: 3px 0 !important;
    white-space: normal !important;
    text-align: left !important;
  }
  /* First cell: timestamp — small, muted, top of card */
  .activity-table td:nth-child(1) {
    color: #8a92a6;
    font-size: 0.75rem;
    margin-bottom: 4px;
  }
  /* Second cell: account → page — emphasized header */
  .activity-table td:nth-child(2) {
    font-weight: 500;
    font-size: 0.86rem;
    margin-bottom: 6px;
  }
  /* Third cell: post + comment */
  .activity-table td:nth-child(3) {
    margin-bottom: 6px;
  }
  /* Like + Status: inline at the bottom of card */
  .activity-table td:nth-child(4),
  .activity-table td:nth-child(5) {
    display: inline-block !important;
    width: auto !important;
    margin-right: 10px;
  }
  /* Empty-state row keeps its own layout */
  .activity-table tr.empty-row td { text-align: center !important; }
}

/* Make horizontally-scrollable tables more obvious on touch */
.table-responsive {
  -webkit-overflow-scrolling: touch;
}
