:root{
  --bg: #f7f7fb;
  --text: #212529;
  --card-bg: #ffffff;
  --border: rgba(0,0,0,.1);
  --muted: #6c757d;
  --primary: #0d6efd;
}
.theme-dark{
  --bg: #121212;
  --text: #e9ecef;
  --card-bg: #1e1f24;
  --border: rgba(255,255,255,.08);
  --muted: #adb5bd;
}

body { background: var(--bg); color: var(--text); }
.table td, .table th { vertical-align: middle; }
.btn-play { min-width: 110px; }
.stat-card { border-left: 4px solid #0d6efd; }
.admin-sidebar .list-group-item { border: 0; padding: .75rem 1rem; display: flex; align-items: center; background: transparent; color: var(--text); }
.admin-sidebar .list-group-item:hover { background: rgba(13,110,253,.08); }
.admin-sidebar .list-group-item i { color: #0d6efd; }

.card { background: var(--card-bg); border-color: var(--border); }
.card.shadow-sm { transition: transform .08s ease, box-shadow .2s ease; border-radius: 14px; }
.card.shadow-sm:hover { transform: translateY(-2px); box-shadow: 0 .5rem 1.25rem rgba(0,0,0,.18) !important; }

.card-header { border-bottom-color: var(--border); }
.list-group-item { color: var(--text); }
.form-control, .form-select { background-color: var(--card-bg); color: var(--text); border-color: var(--border); }
.form-control:focus, .form-select:focus { box-shadow: 0 0 0 .2rem rgba(13,110,253,.25); }
.form-label { color: var(--muted); }
.form-control::placeholder { color: #9aa3ad; opacity: 1; }

.table { color: var(--text); }
.table-striped>tbody>tr:nth-of-type(odd)>* { color: var(--text); }
.table-modern tbody tr:hover { background-color: rgba(13,110,253,.08); }

.theme-dark .navbar { background-color: #0b5ed7 !important; }
.theme-dark .bg-light { background-color: #15171c !important; }
.theme-dark .border-end { border-color: var(--border) !important; }
.theme-dark .list-group-item:hover { background: rgba(13,110,253,.15) !important; }

/* Dark theme readability tweaks */
.theme-dark .card, .theme-dark .modal-content { background: #1e1f24; }
.theme-dark .card-header { background: #1f2230; color: #e9ecef; }
.theme-dark .table thead th { background: #1f2230; color: #ced4da; }
.theme-dark .table-striped>tbody>tr:nth-of-type(odd)>* { background-color: #191c24; }
.theme-dark .table-striped>tbody>tr:nth-of-type(even)>* { background-color: #1f2230; }
.theme-dark .form-control, .theme-dark .form-select { background-color: #24262d; color: #e9ecef; border-color: #343a40; }
.theme-dark .form-control:focus, .theme-dark .form-select:focus { border-color: #3b82f6; }
.theme-dark .form-control::placeholder { color: #8b93a1; }
.theme-dark .input-group-text { background-color: #24262d; color: #e9ecef; border-color: #343a40; }
.theme-dark .dropdown-menu { background: #1e1f24; color: #e9ecef; border-color: var(--border); }
.theme-dark .dropdown-item { color: #e9ecef; }
.theme-dark .dropdown-item:hover { background: rgba(13,110,253,.25); }

/* Additional contrast fixes */
.theme-dark a { color: #7db7ff; }
.theme-dark a:hover { color: #a9ccff; }
.theme-dark .text-muted { color: #b7bcc5 !important; }
.theme-dark .table { border-color: #2a2f3a; }
.theme-dark .table td, .theme-dark .table th { border-color: #2a2f3a; }
.theme-dark .card { border-color: #2a2f3a; }
.theme-dark .list-group-item { background: transparent; border-color: #2a2f3a; }
.theme-dark .badge.bg-secondary { background-color: #495057 !important; color: #e9ecef; }
.theme-dark .badge.bg-info { color: #052c65; }
.theme-dark .badge.bg-warning { color: #463c00; }
.theme-dark .badge.bg-success { color: #0a2e12; }
.theme-dark .alert { background-color: #1f2230; color: #e9ecef; border-color: #2a2f3a; }

/* Digital clock font (place fonts/digital-7.ttf in assets/fonts/) */
@font-face {
  font-family: 'Digital-7';
  src: url('fonts/digital-7.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Layout container to keep date and time side-by-side */
#clock-container {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

/* Larger, more legible badges */
#live-date, #live-time {
  font-size: clamp(1.1rem, 2.2vw, 1.8rem);
  line-height: 1.1;
  padding: 0.45rem 0.75rem;
  border-radius: 0.4rem;
}

/* Only the time uses the Digital-7 look */
#live-time {
  font-family: 'Digital-7', 'Share Tech Mono', 'Orbitron', monospace;
  letter-spacing: 1px;
}

/* Date keeps the normal UI font */
#live-date { font-family: inherit; }

/* =========== Presenter Dashboard modern look =========== */
.show-card .card { border: none; border-radius: 14px; overflow: hidden; background: #fff; }
.show-card .card-header {
  background: linear-gradient(90deg, #0d6efd 0%, #6610f2 100%);
  color: #fff;
}
.table-modern tbody tr:hover { background-color: rgba(13,110,253,.05); }
.table-modern thead th { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }

.btn-play {
  border-radius: 999px;
  padding: .35rem .9rem;
  box-shadow: 0 6px 14px rgba(13,110,253,.25);
  transition: transform .08s ease;
}
.btn-play:active { transform: translateY(1px); }

.chip { display: inline-block; padding: .2rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.chip-commercial { background: rgba(13,110,253,.12); color: #0d6efd; }
.chip-promo { background: rgba(25,135,84,.12); color: #198754; }
.chip-funeral { background: rgba(220,53,69,.12); color: #dc3545; }

.sidebar-sticky { position: sticky; top: 1rem; max-height: calc(100vh - 6rem); overflow: auto; border-radius: 12px; }
.list-group-flush .list-group-item { transition: background-color .15s ease; }
.list-group-flush .list-group-item:hover { background: rgba(13,110,253,.06); }

.progress.thin { height: 8px; }

/* ===== Advert Cards Grid for Presenter ===== */
.ad-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.ad-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 8px 20px rgba(13,110,253,.08);
  transition: transform .1s ease, box-shadow .25s ease, border-color .25s ease;
}
.ad-card:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(13,110,253,.15); border-color: rgba(13,110,253,.35); }
.ad-card .ad-title { font-weight: 600; }
.ad-card .ad-subtle { color: var(--muted); }
.ad-card .ad-audio { width: 100%; margin-top: .25rem; }
.ad-card .chip { margin-left: .4rem; }
.ad-card.disabled { opacity: .6; filter: grayscale(.2); }
.ad-card .ad-footer { display:flex; align-items:center; justify-content:space-between; margin-top: .5rem; }

/* Recommendation highlight */
.ad-card.recommended { border-color: #f1c40f; box-shadow: 0 10px 26px rgba(241,196,15,.35); position: relative; }
.ad-card.recommended:before {
  content: 'Recommended';
  position: absolute; top: -10px; right: 12px;
  background: #f1c40f; color: #000; font-weight: 700; font-size: .65rem;
  padding: .15rem .45rem; border-radius: 999px; box-shadow: 0 4px 10px rgba(241,196,15,.35);
}



