/* ==========================================================================
   Telegram AI Summarizer — Admin design system
   Bang mau lay tu palette da validate (CVD-safe): series-1 blue, series-2 orange.
   ========================================================================== */

:root {
  /* Surfaces & ink */
  --surface: #fcfcfb;
  --plane: #f4f4f1;
  --sidebar: #17171a;
  --sidebar-ink: #d7d7d2;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --border: rgba(11, 11, 11, 0.1);

  /* Data series */
  --series-1: #2a78d6;
  --series-1-wash: #cde2fb;
  --series-2: #eb6834;
  --series-2-wash: #fadbcf;

  /* Status (khong bao gio dung lam mau series) */
  --good: #0ca30c;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;

  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-width: 244px;

  --bs-body-font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bs-body-bg: var(--plane);
  --bs-body-color: var(--ink);
  --bs-border-color: var(--border);
  --bs-primary: var(--series-1);
  --bs-link-color-rgb: 42, 120, 214;
}

body {
  background: var(--plane);
  color: var(--ink);
  font-family: var(--bs-body-font-family);
  -webkit-font-smoothing: antialiased;
}

/* ===================== Layout: sidebar + content ========================= */

.app-shell {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  width: var(--sidebar-width);
  flex: 0 0 var(--sidebar-width);
  background: var(--sidebar);
  color: var(--sidebar-ink);
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 0.875rem;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 0.5rem 1.25rem;
  color: #fff;
  text-decoration: none;
}

.app-brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--series-1);
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  flex: 0 0 34px;
}

.app-brand__name {
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.15;
}

.app-brand__sub {
  font-size: 0.7rem;
  color: #8b8b86;
}

.app-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.app-nav__label {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6e6e69;
  padding: 1rem 0.65rem 0.35rem;
}

.app-nav__link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-sm);
  color: var(--sidebar-ink);
  text-decoration: none;
  font-size: 0.875rem;
  transition: background 0.12s ease, color 0.12s ease;
}

.app-nav__link i {
  font-size: 1rem;
  opacity: 0.85;
}

.app-nav__link:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.app-nav__link.is-active {
  background: var(--series-1);
  color: #fff;
  font-weight: 500;
}

.app-nav__link.is-active i {
  opacity: 1;
}

.app-nav__badge {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 0.05rem 0.45rem;
}

.app-nav__link.is-active .app-nav__badge {
  background: rgba(0, 0, 0, 0.22);
}

.app-sidebar__footer {
  margin-top: auto;
  padding: 0.75rem 0.65rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  color: #6e6e69;
}

.app-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.app-topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 20;
}

.app-topbar__title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
}

.app-topbar__sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
}

.app-content {
  padding: 1.5rem;
  flex: 1 1 auto;
}

@media (max-width: 991.98px) {
  .app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1045;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.35);
  }
  .app-shell.nav-open .app-sidebar {
    transform: translateX(0);
  }
  .app-content {
    padding: 1rem;
  }
}

.app-scrim {
  display: none;
}

.app-shell.nav-open .app-scrim {
  display: block;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1040;
}

/* ============================== Cards =================================== */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: none;
}

.card-header {
  background: transparent;
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-header .bi {
  color: var(--muted);
}

.section-title {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin: 1.75rem 0 0.6rem;
}

.section-title:first-child {
  margin-top: 0;
}

/* ============================ Stat tiles ================================ */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.875rem;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.stat__label {
  font-size: 0.76rem;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.stat__label .bi {
  color: var(--muted);
}

.stat__value {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.stat__value small {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
}

.stat__foot {
  font-size: 0.74rem;
  color: var(--muted);
}

.stat__foot .up {
  color: var(--good);
  font-weight: 600;
}

/* ============================== Charts ================================== */

.chart {
  padding: 1rem;
}

.chart__plot {
  display: flex;
  align-items: flex-end;
  gap: 2px; /* khoang trong 2px giua cac cot ke nhau */
  height: 132px;
}

.chart__col {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
  position: relative;
  cursor: default;
}

.chart__bar {
  width: 100%;
  max-width: 24px; /* cot mong, khong lap day slot */
  border-radius: 4px 4px 0 0; /* bo tron dau du lieu, vuong o duong co so */
  background: var(--series-1);
  min-height: 2px;
  transition: filter 0.12s ease;
}

.chart--alt .chart__bar {
  background: var(--series-2);
}

.chart__col:hover .chart__bar {
  filter: brightness(0.88);
}

.chart__col--empty .chart__bar {
  background: var(--grid);
}

.chart__baseline {
  height: 1px;
  background: var(--axis);
  margin-top: 0;
}

.chart__axis {
  display: flex;
  gap: 2px;
  margin-top: 0.35rem;
}

.chart__tick {
  flex: 1 1 0;
  text-align: center;
  font-size: 0.65rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
}

.chart__cap {
  font-size: 0.68rem;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  margin-bottom: 2px;
  line-height: 1;
}

.chart__tip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  font-size: 0.72rem;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.1s ease;
  z-index: 5;
}

.chart__col:hover .chart__tip,
.chart__col:focus-visible .chart__tip {
  opacity: 1;
}

/* Bieu do cot ngang (xep hang nhom) */
.rank {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.rank__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.75rem;
  align-items: center;
}

.rank__name {
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank__value {
  font-size: 0.82rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.rank__track {
  grid-column: 1 / -1;
  height: 8px;
  background: var(--grid);
  border-radius: 4px;
  overflow: hidden;
}

.rank__fill {
  height: 100%;
  background: var(--series-1);
  border-radius: 0 4px 4px 0;
  min-width: 2px;
}

/* ============================== Tables ================================== */

.table {
  --bs-table-bg: transparent;
  margin-bottom: 0;
  font-size: 0.86rem;
}

.table > thead > tr > th {
  background: #f7f7f4;
  border-bottom: 1px solid var(--border);
  color: var(--ink-2);
  font-weight: 600;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.6rem 0.85rem;
  white-space: nowrap;
}

.table > tbody > tr > td {
  padding: 0.7rem 0.85rem;
  border-color: var(--border);
  vertical-align: middle;
}

.table > tbody > tr:last-child > td {
  border-bottom: 0;
}

.table-hover > tbody > tr:hover > * {
  --bs-table-accent-bg: #f7f7f4;
  background-color: #f7f7f4;
}

.num {
  font-variant-numeric: tabular-nums;
}

.cell-title {
  font-weight: 600;
  font-size: 0.88rem;
}

.cell-meta {
  font-size: 0.74rem;
  color: var(--muted);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f7f7f4;
  color: var(--ink-2);
  white-space: nowrap;
}

.chip--on {
  background: rgba(12, 163, 12, 0.1);
  border-color: rgba(12, 163, 12, 0.25);
  color: #0a7d0a;
}

.chip--off {
  background: #f1f1ee;
  color: var(--muted);
}

.chip--warn {
  background: rgba(250, 178, 25, 0.14);
  border-color: rgba(250, 178, 25, 0.35);
  color: #8a6000;
}

.chip--danger {
  background: rgba(208, 59, 59, 0.1);
  border-color: rgba(208, 59, 59, 0.28);
  color: #a52d2d;
}

.chip--target {
  background: rgba(235, 104, 52, 0.1);
  border-color: rgba(235, 104, 52, 0.28);
  color: #b84a1c;
}

.chip--source {
  background: rgba(42, 120, 214, 0.1);
  border-color: rgba(42, 120, 214, 0.26);
  color: #1f5ca8;
}

/* Thanh do tin nhan cho trong bang nhom */
.meter {
  height: 6px;
  width: 96px;
  background: var(--grid);
  border-radius: 3px;
  overflow: hidden;
}

.meter__fill {
  height: 100%;
  background: var(--series-1);
  border-radius: 0 3px 3px 0;
}

.meter__fill--warn {
  background: var(--warning);
}

/* ============================== Forms =================================== */

.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 0.3rem;
}

.form-control,
.form-select {
  border-color: var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--series-1);
  box-shadow: 0 0 0 3px rgba(42, 120, 214, 0.15);
}

.form-text {
  font-size: 0.74rem;
  color: var(--muted);
}

.input-group-text {
  background: #f7f7f4;
  border-color: var(--border);
}

.btn {
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 500;
}

.btn-primary {
  --bs-btn-bg: var(--series-1);
  --bs-btn-border-color: var(--series-1);
  --bs-btn-hover-bg: #256abf;
  --bs-btn-hover-border-color: #256abf;
  --bs-btn-active-bg: #1c5cab;
}

.btn-outline-primary {
  --bs-btn-color: var(--series-1);
  --bs-btn-border-color: var(--border);
  --bs-btn-hover-bg: var(--series-1);
  --bs-btn-hover-border-color: var(--series-1);
}

.btn-outline-secondary {
  --bs-btn-color: var(--ink-2);
  --bs-btn-border-color: var(--border);
  --bs-btn-hover-bg: #f1f1ee;
  --bs-btn-hover-color: var(--ink);
  --bs-btn-hover-border-color: var(--axis);
}

.btn-group > form {
  display: inline-flex;
}

.btn-group > form:not(:first-child) > .btn {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  margin-left: -1px;
}

.btn-group > form:not(:last-child) > .btn {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.form-switch .form-check-input {
  width: 2.1em;
  height: 1.15em;
  background-color: #d9d9d4;
  border-color: transparent;
}

.form-switch .form-check-input:checked {
  background-color: var(--good);
  border-color: var(--good);
}

.form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(42, 120, 214, 0.15);
}

/* =============================== Misc =================================== */

.alert {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 0.86rem;
}

/* ============================== Toast ================================== */

.toast-stack {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1090;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(420px, calc(100vw - 2rem));
  pointer-events: none;
}

.toast-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--muted);
  border-radius: var(--radius);
  padding: 0.7rem 0.8rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  font-size: 0.86rem;
  line-height: 1.4;
  pointer-events: auto;
  animation: toast-in 0.18s ease;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(14px);
  }
}

.toast-item.is-leaving {
  opacity: 0;
  transform: translateX(14px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast-item__icon {
  font-size: 0.95rem;
  line-height: 1.35;
  flex: 0 0 auto;
}

.toast-item__body {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
}

.toast-item__close {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  font-size: 0.75rem;
  line-height: 1.4;
  cursor: pointer;
}

.toast-item__close:hover {
  color: var(--ink);
}

.toast-item--success { border-left-color: var(--good); }
.toast-item--success .toast-item__icon { color: var(--good); }
.toast-item--danger { border-left-color: var(--critical); }
.toast-item--danger .toast-item__icon { color: var(--critical); }
.toast-item--warning { border-left-color: var(--warning); }
.toast-item--warning .toast-item__icon { color: #8a6000; }
.toast-item--info { border-left-color: var(--series-1); }
.toast-item--info .toast-item__icon { color: var(--series-1); }

@media (max-width: 575.98px) {
  .toast-stack {
    top: auto;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    width: auto;
  }
}

.alert-success { background: rgba(12, 163, 12, 0.08); color: #0a6b0a; border-color: rgba(12, 163, 12, 0.2); }
.alert-danger  { background: rgba(208, 59, 59, 0.08); color: #992929; border-color: rgba(208, 59, 59, 0.2); }
.alert-warning { background: rgba(250, 178, 25, 0.12); color: #7a5500; border-color: rgba(250, 178, 25, 0.3); }
.alert-info    { background: rgba(42, 120, 214, 0.08); color: #1f5ca8; border-color: rgba(42, 120, 214, 0.2); }

code {
  font-size: 0.82em;
  color: var(--ink-2);
  background: #f1f1ee;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
}

/**
 * Noi dung tieng Viet (prompt, ban tom tat, tu khoa) KHONG dung font monospace:
 * Consolas/Courier tren Windows hien thi dau tieng Viet rat xau.
 * Monospace chi danh cho ma: API key, chat id, bieu thuc cron, ten model.
 */
pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--bs-body-font-family);
  margin: 0;
}

.prose-input {
  font-family: var(--bs-body-font-family);
  font-size: 0.86rem;
  line-height: 1.6;
}

/* Luoi checkbox gon - thay cho danh sach co vien chiem nhieu chieu cao */
.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.35rem 1rem;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.84rem;
  margin: 0;
  padding: 0.2rem 0;
  cursor: pointer;
}

.check-item input {
  margin: 0;
  flex: 0 0 auto;
}

.kv {
  display: grid;
  grid-template-columns: minmax(120px, auto) 1fr;
  gap: 0.45rem 1rem;
  font-size: 0.82rem;
}

.kv__k {
  color: var(--muted);
}

.kv__v {
  text-align: right;
  font-weight: 500;
  overflow-wrap: anywhere;
}

/* ===================== Danh sach nhom (trang Groups) ==================== */

.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 1.75rem 0 0.6rem;
}

.list-head:first-of-type {
  margin-top: 0;
}

.list-head__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.list-head__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 8px;
}

.list-head__dot--in {
  background: var(--series-1);
}

.list-head__dot--out {
  background: var(--series-2);
}

.list-head__count {
  background: #ececeA;
  color: var(--ink-2);
  border-radius: 999px;
  padding: 0.05rem 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0;
}

/* Mot dong nhom: avatar + ten + meta */
.g-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  min-width: 0;
}

.g-avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
  margin-top: 1px;
}

/* Mau theo VAI TRO cua nhom (vao / ra), khong phai trang tri ngau nhien */
.g-avatar--in {
  background: var(--series-1);
}

.g-avatar--out {
  background: var(--series-2);
}

.g-row__body {
  min-width: 0;
}

.g-row__name {
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
}

.g-row__meta {
  font-size: 0.74rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 1px;
}

/* Cum so lieu nho trong bang */
.minis {
  display: flex;
  gap: 1.1rem;
}

.mini {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.mini__v {
  font-weight: 600;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.mini__k {
  font-size: 0.66rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pending {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
}

.pending__value {
  font-size: 1.15rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.pending__value.is-waiting {
  color: var(--ink);
}

.pending__unit {
  font-size: 0.72rem;
  color: var(--muted);
}

/* Cum nut hanh dong - deu nhau, khong vien chen nhau nhu btn-group */
/* Thanh trang thai bot o dau trang Nhom Telegram */
.bot-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 0.9rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.bot-bar__icon {
  font-size: 1.1rem;
  color: var(--muted);
}

.bot-bar__body {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex: 1 1 auto;
  min-width: 0;
}

.bot-bar__name {
  font-weight: 600;
  font-size: 0.88rem;
}

.bot-bar__error {
  font-size: 0.76rem;
  color: var(--critical);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Tab trong trang Cau hinh - moi luc chi hien mot phan, khong phai cuon dai */
.settings-tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0.45rem 0.5rem;
  flex-wrap: wrap;
}

.settings-tabs .nav-link {
  border: 0;
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.75rem;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 0.15rem;
  transition: background 0.12s ease, color 0.12s ease;
}

.settings-tabs .nav-link:hover {
  background: #f1f1ee;
  color: var(--ink);
}

.settings-tabs .nav-link.active {
  background: var(--series-1);
  color: #fff;
}

/* Cham bao tab dang co cau hinh */
.tab-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--series-2);
  margin-left: 0.3rem;
}

.settings-tabs .nav-link.active .tab-dot {
  background: rgba(255, 255, 255, 0.85);
}

/* Danh sach chon nhieu (thay cho <select multiple> cua trinh duyet) */
.picker {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  max-height: 220px;
  overflow-y: auto;
  background: var(--surface);
}

.picker__item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  margin: 0;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s ease;
}

.picker__item:last-child {
  border-bottom: 0;
}

.picker__item:hover {
  background: #f7f7f4;
}

.picker__item.is-checked {
  background: rgba(42, 120, 214, 0.06);
}

.picker__item .form-check-input {
  margin-top: 0.15rem;
  flex: 0 0 auto;
}

.picker__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.picker__name {
  font-size: 0.86rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.picker__meta {
  font-size: 0.74rem;
  color: var(--muted);
}

/* Danh sach nhom nguon gui bao cao ve mot nhom dich */
.senders {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.actions form {
  display: inline-flex;
  margin: 0;
}

.actions .btn-sm {
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.icon-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.icon-btn:hover {
  background: #f1f1ee;
  color: var(--ink);
  border-color: var(--axis);
}

/* Nut bat lai thu thap - nhan manh bang mau trang thai "tot" */
.icon-btn--on {
  color: #0a7d0a;
  border-color: rgba(12, 163, 12, 0.35);
}

.icon-btn--on:hover {
  background: rgba(12, 163, 12, 0.1);
  color: #0a7d0a;
  border-color: rgba(12, 163, 12, 0.5);
}

.icon-btn--danger:hover {
  background: rgba(208, 59, 59, 0.1);
  color: var(--critical);
  border-color: rgba(208, 59, 59, 0.28);
}

.empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--muted);
}

.empty__icon {
  font-size: 1.75rem;
  opacity: 0.45;
}

.feed {
  display: flex;
  flex-direction: column;
}

.feed__item {
  display: flex;
  gap: 0.7rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
}

.feed__item:last-child {
  border-bottom: 0;
}

.feed__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--series-1);
  margin-top: 0.4rem;
  flex: 0 0 8px;
}

.feed__body {
  min-width: 0;
  flex: 1 1 auto;
}

.feed__time {
  color: var(--muted);
  font-size: 0.74rem;
  white-space: nowrap;
}

details.table-view > summary {
  cursor: pointer;
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 0.6rem;
  list-style: none;
}

details.table-view > summary::-webkit-details-marker {
  display: none;
}

details.table-view > summary::before {
  content: '▸ ';
}

details.table-view[open] > summary::before {
  content: '▾ ';
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: var(--plane);
}

.login-card {
  width: 100%;
  max-width: 400px;
}

.btn[disabled] {
  cursor: not-allowed;
}
