body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
.badge-status { font-size: .85rem; }
.progress { height: 1.4rem; }
.disclaimer-banner {
  background: #e9ecef;
  border-bottom: 1px solid #ced4da;
  text-align: center;
  padding: .4rem;
  font-size: .8rem;
  color: #495057;
}
.verified-badge {
  display: inline-block;
  background: #198754;
  color: #fff;
  font-size: .7rem;
  padding: .15em .5em;
  border-radius: .25rem;
  vertical-align: middle;
  font-weight: 600;
}
.star { color: #ffc107; }
.star-empty { color: #dee2e6; }
.msg-bubble {
  border-radius: .75rem;
  padding: .75rem 1rem;
  margin-bottom: .5rem;
  max-width: 85%;
}
.msg-mine { background: #d1ecf1; margin-left: auto; }
.msg-other { background: #f8f9fa; }
.milestone-bar { border-left: 3px solid #0d6efd; padding-left: .75rem; margin-bottom: .5rem; }
.milestone-bar.done { border-left-color: #198754; }
.milestone-bar.overdue { border-left-color: #dc3545; }
.milestone-bar.due-soon { border-left-color: #ffc107; }

/* ===== Dark-mode overrides ===== */
[data-bs-theme="dark"] .disclaimer-banner {
  background: #1a1d20;
  border-bottom-color: #495057;
  color: #adb5bd;
}
[data-bs-theme="dark"] .navbar[style*="background-color:#2c3e50"] {
  background-color: #1a1d20 !important;
}
[data-bs-theme="dark"] .card[style*="linear-gradient(135deg,#2c3e50,#34495e)"] {
  background: linear-gradient(135deg,#1a1d20,#2b3035) !important;
}
[data-bs-theme="dark"] .verified-badge {
  background: #157347;
}
[data-bs-theme="dark"] .msg-mine {
  background: #1a3a4a;
  color: #e9ecef;
}
[data-bs-theme="dark"] .msg-other {
  background: #2b3035;
  color: #e9ecef;
}
[data-bs-theme="dark"] .star-empty {
  color: #495057;
}
[data-bs-theme="dark"] #changelogModal > div {
  background: #212529;
  color: #dee2e6;
}
[data-bs-theme="dark"] #changelogModal ul {
  color: #adb5bd;
}
[data-bs-theme="dark"] #changelogModal div[style*="border-bottom"] {
  border-bottom-color: #495057 !important;
}
.dark-toggle {
  background: none;
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  border-radius: .375rem;
  padding: .25rem .5rem;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}
.dark-toggle:hover {
  border-color: rgba(255,255,255,.5);
}

/* ===== Search hint ===== */
.search-hint {
  font-size: .7rem;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: .25rem;
  padding: .05rem .4rem;
  color: rgba(255,255,255,.6);
  margin-left: .25rem;
  vertical-align: middle;
}

/* ===== Mobile responsiveness ===== */
@media (max-width: 991.98px) {
  .navbar-nav .nav-link { padding: .35rem .5rem; font-size: .9rem; }
  .dark-toggle { font-size: .9rem; padding: .2rem .4rem; }
}
@media (max-width: 575.98px) {
  .disclaimer-banner { font-size: .7rem; padding: .25rem; }
  /* Stats widget mobile fix */
  .card.text-center .card-body h3 { font-size: 1.2rem; }
  .card.text-center .card-body h5 { font-size: .8rem; }
  .card.text-center .card-body { padding: .5rem; }
}
@media (max-width: 430px) {
  .card.text-center .card-body h3 { font-size: 1rem; }
  .card.text-center .card-body h5 { font-size: .7rem; }
  .card.text-center .card-body small { font-size: .7rem; }
  .card.text-center .card-body { padding: .4rem .25rem; }
  .col-6 .card.text-center { min-width: 0; }
}

/* ===== Wizard nav-pills ===== */
.wizard-nav .nav-link {
  border-radius: 50rem;
  padding: .4rem 1.2rem;
  font-weight: 600;
  color: #6c757d;
  background: #e9ecef;
  cursor: default;
}
.wizard-nav .nav-link.active {
  background: #0d6efd;
  color: #fff;
}
.wizard-nav .nav-link.done {
  background: #198754;
  color: #fff;
}
.wizard-step { display: none !important; }
.wizard-step.active { display: block !important; }

/* ===== Dark-mode additions ===== */
[data-bs-theme="dark"] .search-hint {
  border-color: rgba(255,255,255,.2);
  color: rgba(255,255,255,.4);
}
[data-bs-theme="dark"] .wizard-nav .nav-link {
  background: #343a40;
  color: #adb5bd;
}
[data-bs-theme="dark"] .wizard-nav .nav-link.active {
  background: #0d6efd;
  color: #fff;
}
[data-bs-theme="dark"] .wizard-nav .nav-link.done {
  background: #157347;
  color: #fff;
}
[data-bs-theme="dark"] .card.bg-light {
  background-color: #2b3035 !important;
  color: #dee2e6;
}
[data-bs-theme="dark"] .comparison-card {
  border-color: #495057;
}
[data-bs-theme="dark"] .comparison-card .card-header {
  background: #343a40;
}

/* ===== Line-clamp utility ===== */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== Skip to content (a11y) ===== */
.skip-to-content {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10000;
  background: #0d6efd;
  color: #fff;
  padding: .5rem 1rem;
  font-size: .9rem;
  text-decoration: none;
  border-radius: 0 0 .375rem .375rem;
}
.skip-to-content:focus {
  left: 50%;
  transform: translateX(-50%);
}

/* ===== Focus-visible outlines (a11y) ===== */
:focus-visible {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}
