html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

/* Global theme: black-dominant with white text */
html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background-color: #ffffff; /* black background as dominant color */
  color: #000000; /* primary text color: white */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Focus outlines tuned for dark backgrounds */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  outline: none;
  box-shadow: 0 0 0 0.1rem rgba(255,255,255,0.15), 0 0 0 0.25rem rgba(255,255,255,0.04);
}

/* Links */
a {
  color: #000000; /* light gray/near-white for links */
}

a:hover, a:focus {
  color: #000000;
  text-decoration: underline;
}

/* Buttons */
.btn-primary {
  color: #000000;
  background-color: #ffffff;
  border-color: #2a2a2a;
}

.btn-primary:hover, .btn-primary:focus {
  background-color: #e6e6e6;
  border-color: #cccccc;
}

/* Nav pills / active items */
.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
  color: #000000;
  background-color: #ffffff;
  border-color: #cccccc;
}

/* Borders adapted for dark background */
.border-top {
  border-top: 1px solid rgba(0,0,0,0.06);
}
.border-bottom {
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.box-shadow {
  box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .02);
}

button.accept-policy {
  font-size: 1rem;
  line-height: inherit;
}

.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  white-space: nowrap;
  line-height: 60px;
  color: #e6e6e6;
}

/* Utility: muted text on dark */
.text-muted {
  color: rgba(0,0,0,0.6) !important;
}

/* Utility: pure black background helper used for header */
.bg-black {
  background-color: #ffffff !important;
}

/* Ensure form controls are legible on dark backgrounds */
.form-control {
  background-color: #ffffff;
  color: #000000;
  border: 1px solid rgba(0,0,0,0.06);
}

.form-control::placeholder {
  color: rgba(0,0,0,0.5);
}

/* Tables: ensure high contrast on dark background */
.table, .table td, .table th {
  color: #000000; /* table text should be black */
  border-color: rgba(255,255,255,0.08);
}

.table thead th {
  background-color: #ffffff;
  color: #000000;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.table-striped > tbody > tr:nth-of-type(odd) {
  background-color: rgba(0,0,0,0.02);
}

.table-hover > tbody > tr:hover {
  background-color: rgba(0,0,0,0.04);
}

.table a {
  color: #000000;
}

/* Override muted/secondary text inside tables to be more legible */
.table .text-muted, .table .text-secondary {
  color: rgba(0,0,0,0.75) !important;
}

/* Chat styles */
.chat-container {
  max-height: 60vh;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.message {
  display: flex;
  flex-direction: column;
}
.message .meta {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 0.25rem;
}
.msg-status { margin-left: 0.5rem; }
.msg-status .status { font-size: 0.9rem; color: rgba(255,255,255,0.6); margin-left:0.25rem; }
.msg-status .status.read { color: #2ea9f5; /* blue for read */ }
.message .meta.me {
  text-align: right;
}
.bubble {
  display: inline-block;
  background: rgba(255,255,255,0.06);
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  max-width: 80%;
  word-break: break-word;
  align-self: flex-start; /* default: align left */
}
.bubble.me {
  background: rgba(255,255,255,0.12);
  align-self: flex-end; /* align bubble to right */
  margin-left: auto; /* ensure bubble sticks to right */
  text-align: right; /* right-align text inside bubble */
}

ul li a {
  color: #000000;
}

.nav-link {
  color: #000000 !important;
}

/* Logout button styled as nav link */
.navbar-nav form.d-inline button.nav-link {
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  cursor: pointer;
}

.navbar-nav form.d-inline button.nav-link:hover {
  opacity: 0.8;
}

/* Dashboard Cards */
.card {
  border-radius: 0.5rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
  border-radius: 0.5rem 0.5rem 0 0 !important;
}

/* Dashboard Stats Cards */
.card.bg-primary .card-footer,
.card.bg-success .card-footer,
.card.bg-info .card-footer,
.card.bg-warning .card-footer {
  background-color: rgba(0, 0, 0, 0.1) !important;
  padding: 0.5rem 1rem;
}

.card.bg-primary .card-footer a,
.card.bg-success .card-footer a,
.card.bg-info .card-footer a,
.card.bg-warning .card-footer a {
  font-size: 0.875rem;
  font-weight: 500;
}

/* Dashboard Icon Background */
.card-body i {
  transition: opacity 0.3s;
}

.card:hover .card-body i {
  opacity: 0.7 !important;
}

/* Table improvements */
.table-hover tbody tr {
  transition: background-color 0.2s;
}

/* Badge improvements */
.badge {
  font-weight: 500;
  padding: 0.35em 0.65em;
}

/* Quick access buttons */
.btn-outline-primary:hover,
.btn-outline-info:hover,
.btn-outline-success:hover,
.btn-outline-secondary:hover {
  transform: scale(1.05);
  transition: transform 0.2s;
}

