:root {
  --accent: #e11d48;
  --accent-soft: #fff1f3;
  --sidebar: #111827;
  --sidebar-text: #cbd5e1;
  --bg: #f4f5f7;
}

body { background: var(--bg); font-size: .95rem; }

.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 230px; flex-shrink: 0; background: var(--sidebar); color: var(--sidebar-text);
  display: flex; flex-direction: column; padding: 1.25rem .75rem; position: sticky; top: 0; height: 100vh;
}
.sidebar .brand { color: #fff; font-weight: 700; font-size: 1.2rem; text-decoration: none; padding: 0 .75rem 1.25rem; }
.sidebar .brand i { color: var(--accent); }
.nav-item {
  display: block; color: var(--sidebar-text); text-decoration: none; padding: .55rem .75rem;
  border-radius: .5rem; margin-bottom: .15rem;
}
.nav-item i { width: 1.4rem; display: inline-block; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: var(--accent); color: #fff; }
.btn-reset { background: none; border: 0; }
.content { flex: 1; padding: 2rem; min-width: 0; }

.page-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.page-head h1 { font-size: 1.5rem; font-weight: 700; margin: 0; }

.card { border: 0; border-radius: .9rem; box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 2px 8px rgba(0,0,0,.03); }
.card-header { background: transparent; font-weight: 600; border-bottom: 1px solid #eef0f3; }
.stat .value { font-size: 1.8rem; font-weight: 700; line-height: 1; }
.stat .label { color: #6b7280; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }

.live-card { background: linear-gradient(135deg, #e11d48, #9f1239); color: #fff; }
.live-card .thumb { width: 220px; border-radius: .6rem; }
.live-dot { width: .7rem; height: .7rem; background: #fff; border-radius: 50%; display: inline-block; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .25 } }

.thumb-sm { width: 120px; aspect-ratio: 16/9; object-fit: cover; border-radius: .4rem; background: #e5e7eb; }
.btn-accent { background: var(--accent); color: #fff; border: 0; }
.btn-accent:hover { background: #be123c; color: #fff; }
.table > :not(caption) > * > * { padding: .65rem .75rem; vertical-align: middle; }
.msg-preview { white-space: pre-wrap; background: #e7ffdb; border-radius: .6rem; padding: .9rem 1rem; font-family: inherit; font-size: .9rem; }
.text-truncate-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
code.k { background: #f1f5f9; padding: .1rem .35rem; border-radius: .25rem; color: #be123c; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--sidebar); }
.login-wrap .card { width: 100%; max-width: 380px; }

@media (max-width: 860px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; gap: .25rem; }
  .sidebar .brand { width: 100%; padding-bottom: .5rem; }
  .sidebar form { margin-top: 0 !important; }
  .content { padding: 1rem; }
  .live-card .thumb { width: 100%; }
}
