/* ============================================================
   Zalo Bot Admin Dashboard — LHU Brand Identity
   Primary: #274f9d (navy)  Accent: #e5b947 (gold)  Alert: #911e43 (burgundy)
   Mode: Operate / Dark — professional admin tool
   ============================================================ */

:root {
  /* LHU Brand Palette */
  --lhu-navy:       #274f9d;
  --lhu-navy-light: #3563c4;
  --lhu-navy-dim:   #1b3870;
  --lhu-gold:       #e5b947;
  --lhu-gold-dim:   #c9a030;
  --lhu-burgundy:   #911e43;
  --lhu-burgundy-light: #b52555;

  /* Surface system — navy-tinted dark, not generic slate */
  --bg-base:        #090f1e;
  --bg-main:        #0d1628;
  --bg-card:        #111e35;
  --bg-card-hover:  #162540;
  --bg-sidebar:     #080e1c;
  --bg-input:       #0a1322;

  /* Borders */
  --border:         rgba(39, 79, 157, 0.25);
  --border-hover:   rgba(39, 79, 157, 0.5);
  --border-gold:    rgba(229, 185, 71, 0.35);

  /* Text */
  --text-main:      #eef2fb;
  --text-sub:       #8fa3cc;
  --text-muted:     #5a739e;
  --text-xs:        0.75rem;
  --text-sm:        0.875rem;

  /* Semantic colors — LHU-tinted */
  --primary:        var(--lhu-navy);
  --primary-hover:  var(--lhu-navy-light);
  --accent:         var(--lhu-gold);
  --success:        #1dbf7b;
  --warning:        var(--lhu-gold);
  --danger:         var(--lhu-burgundy);
  --danger-light:   var(--lhu-burgundy-light);
  --info:           #3b9ede;

  /* Elevation */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.25);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.35), 0 1px 4px rgba(0,0,0,0.2);
  --shadow-lg: 0 16px 40px rgba(0,0,0,0.5), 0 4px 12px rgba(0,0,0,0.25);
  --shadow-gold: 0 4px 16px rgba(229,185,71,0.2);
  --shadow-navy: 0 4px 16px rgba(39,79,157,0.3);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Scrollbar ─────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--lhu-navy); }

/* ── Selection ─────────────────────────────────── */
::selection { background: rgba(229,185,71,0.25); color: var(--text-main); }

body {
  font-family: 'Sora', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ════════════════════════════════════════════════
   LAYOUT
════════════════════════════════════════════════ */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ════════════════════════════════════════════════
   SIDEBAR
════════════════════════════════════════════════ */
.sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  padding: 20px 14px;
  position: relative;
}



.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}

.bot-avatar-badge {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(39,79,157,0.2);
  border: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--lhu-gold);
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar-title h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.bot-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--success);
  margin-top: 2px;
}

.bot-status-pill .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background-color: var(--success);
  box-shadow: 0 0 6px var(--success);
}

/* ── Nav ───────────────────────────────────────── */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-sub);
  background: transparent;
  border: none;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  width: 100%;
  text-align: left;
  position: relative;
}

.nav-item i {
  font-size: 1rem;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.nav-item:hover {
  background: rgba(39,79,157,0.12);
  color: var(--text-main);
}

.nav-item.active {
  background: var(--lhu-gold);
  color: #0d1628;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(229,185,71,0.3);
}

.nav-item.active i { color: #0d1628; }

.nav-item .badge {
  margin-left: auto;
  background: rgba(255,255,255,0.12);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 22px;
  text-align: center;
}

.nav-item.active .badge {
  background: rgba(0,0,0,0.18);
  color: #0d1628;
}

/* ── Sidebar Footer ────────────────────────────── */
.sidebar-footer {
  padding-top: 14px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.footer-info {
  background: rgba(39,79,157,0.1);
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  font-size: 0.78rem;
}

.bot-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.bot-info-row:last-child { margin-bottom: 0; }

.bot-info-row .label { color: var(--text-muted); }

.bot-info-row .val {
  color: var(--text-sub);
  font-weight: 600;
}

.bot-info-row .val.green { color: var(--success); }

.footer-actions { display: flex; flex-direction: column; gap: 8px; }

.btn-refresh {
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-sub);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
}

.btn-refresh:hover {
  background: rgba(39,79,157,0.15);
  border-color: var(--border-hover);
  color: var(--text-main);
}

/* ════════════════════════════════════════════════
   MAIN CONTENT
════════════════════════════════════════════════ */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background-color: var(--bg-main);
  min-width: 0;
}

/* ── Topbar ────────────────────────────────────── */
.topbar {
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: rgba(13,22,40,0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-left h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.topbar-left p {
  margin-top: 2px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.server-status-card {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
}

.server-status-card i {
  color: var(--lhu-gold);
}

/* ── Content Body ──────────────────────────────── */
.content-body { padding: 28px; }

.tab-pane { display: none; }

.tab-pane.active {
  display: block;
  animation: tabIn 0.22s ease;
}

@keyframes tabIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ════════════════════════════════════════════════
   METRIC CARDS
════════════════════════════════════════════════ */
.grid-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}

.metric-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

/* Accent strip — left border replaced with top strip */
.metric-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.metric-blue::before   { background: var(--lhu-navy); }
.metric-purple::before { background: var(--lhu-gold); }
.metric-orange::before { background: var(--lhu-burgundy); }
.metric-green::before  { background: var(--success); }

.metric-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.metric-blue   .metric-icon { background: rgba(39,79,157,0.18);  color: #6b9dff; }
.metric-purple .metric-icon { background: rgba(229,185,71,0.15); color: var(--lhu-gold); }
.metric-orange .metric-icon { background: rgba(145,30,67,0.18);  color: #e06090; }
.metric-green  .metric-icon { background: rgba(29,191,123,0.15); color: var(--success); }

.metric-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.metric-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.metric-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ════════════════════════════════════════════════
   CARDS
════════════════════════════════════════════════ */
.grid-2-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 1100px) {
  .grid-2-col { grid-template-columns: 1fr; }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  letter-spacing: -0.01em;
}

.card-header h3 i {
  color: var(--lhu-gold);
}

.card-header p {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-top: 3px;
}

.card-body { padding: 22px; }

/* Spacing utilities */
.p-0 { padding: 0 !important; }
.mt-4 { margin-top: 16px !important; }
.mt-6 { margin-top: 24px !important; }
.mb-2 { margin-bottom: 8px !important; }
.mb-4 { margin-bottom: 16px !important; }
.mb-6 { margin-bottom: 24px !important; }
.mr-2 { margin-right: 8px !important; }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-700 { max-width: 700px; }
.w-full { width: 100%; }

.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-gap { display: flex; gap: 10px; align-items: center; }
.flex-end { display: flex; justify-content: flex-end; align-items: center; }
.flex-1 { flex: 1; }
.flex-column { display: flex; flex-direction: column; }
.gap-2 { gap: 8px; }
.align-center { align-items: center; }

/* ════════════════════════════════════════════════
   TABLES
════════════════════════════════════════════════ */
.table-responsive { width: 100%; overflow-x: auto; }

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.855rem;
}

.table th {
  background: rgba(39,79,157,0.12);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 11px 18px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table td {
  padding: 13px 18px;
  border-bottom: 1px solid rgba(39,79,157,0.1);
  vertical-align: middle;
  color: var(--text-main);
}

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

.table tbody tr:hover { background: rgba(39,79,157,0.07); }

.user-cell { display: flex; align-items: center; gap: 11px; }

.avatar-circle {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--lhu-navy), var(--lhu-navy-light));
  border: 1px solid var(--border-gold);
  color: var(--lhu-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  overflow: hidden;
}

.avatar-circle img { width: 100%; height: 100%; object-fit: cover; }

/* ════════════════════════════════════════════════
   BADGES & TAGS
════════════════════════════════════════════════ */
.badge-tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-tag-blue   { background: rgba(39,79,157,0.2);  color: #7baeff; border: 1px solid rgba(39,79,157,0.35); }
.badge-tag-green  { background: rgba(29,191,123,0.15); color: #3de09a; border: 1px solid rgba(29,191,123,0.3); }
.badge-tag-orange { background: rgba(229,185,71,0.15); color: var(--lhu-gold); border: 1px solid rgba(229,185,71,0.3); }
.badge-tag-gray   { background: rgba(90,115,158,0.15); color: var(--text-sub); border: 1px solid rgba(90,115,158,0.2); }

/* ════════════════════════════════════════════════
   BUTTONS
════════════════════════════════════════════════ */
button {
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: none;
  letter-spacing: -0.01em;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Primary — LHU Navy */
.btn-primary {
  background: var(--lhu-navy);
  color: #fff;
  box-shadow: 0 2px 8px rgba(39,79,157,0.35);
}

.btn-primary:hover {
  background: var(--lhu-navy-light);
  box-shadow: 0 4px 14px rgba(39,79,157,0.45);
  transform: translateY(-1px);
}

/* Secondary */
.btn-secondary {
  background: var(--bg-card-hover);
  color: var(--text-sub);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: rgba(39,79,157,0.15);
  border-color: var(--border-hover);
  color: var(--text-main);
}

/* Danger — LHU Burgundy */
.btn-danger {
  background: rgba(145,30,67,0.15);
  color: #e06080;
  border: 1px solid rgba(145,30,67,0.3);
}

.btn-danger:hover {
  background: var(--lhu-burgundy);
  color: #fff;
  border-color: var(--lhu-burgundy);
  box-shadow: 0 3px 10px rgba(145,30,67,0.4);
}

/* Icon buttons */
.btn-icon-sm {
  width: 32px; height: 32px;
  padding: 0;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-icon-sm:hover {
  background: var(--lhu-navy);
  color: #fff;
  border-color: var(--lhu-navy);
  transform: translateY(-1px);
}

.btn-icon-sm.danger:hover {
  background: var(--lhu-burgundy);
  color: #fff;
  border-color: var(--lhu-burgundy);
}

/* Link */
.btn-link {
  background: transparent;
  color: var(--lhu-gold);
  padding: 0;
  font-size: 0.85rem;
  font-weight: 600;
}

.btn-link:hover {
  color: var(--lhu-gold-dim);
  text-decoration: underline;
}

.btn-sm { padding: 5px 10px; font-size: 0.8rem; }

/* ════════════════════════════════════════════════
   FORMS
════════════════════════════════════════════════ */
.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-control {
  width: 100%;
  padding: 10px 13px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.875rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control::placeholder { color: var(--text-muted); }

.form-control:focus {
  outline: none;
  border-color: var(--lhu-navy);
  box-shadow: 0 0 0 3px rgba(39,79,157,0.2);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a739e' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.search-box {
  position: relative;
  width: 300px;
}

.search-box i {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.82rem;
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.855rem;
  transition: border-color 0.15s;
}

.search-box input::placeholder { color: var(--text-muted); }

.search-box input:focus {
  outline: none;
  border-color: var(--lhu-navy);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-sub);
}

.checkbox-label input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: var(--lhu-navy);
}

/* Password input */
.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrap .input-icon {
  position: absolute;
  left: 13px;
  color: var(--text-muted);
  font-size: 0.875rem;
  pointer-events: none;
}

.password-input-wrap .form-control.with-icon {
  padding-left: 40px;
  padding-right: 42px;
}

.btn-toggle-eye {
  position: absolute;
  right: 6px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 10px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  transition: color 0.15s;
}

.btn-toggle-eye:hover { color: var(--text-main); }

/* ════════════════════════════════════════════════
   SYSTEM INFO LIST
════════════════════════════════════════════════ */
.system-info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.system-info-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid rgba(39,79,157,0.1);
}

.system-info-list li:last-child { border-bottom: none; }

.info-key {
  color: var(--text-muted);
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 7px;
}

.info-key i { color: var(--lhu-gold); width: 14px; }

.info-val { font-size: 0.85rem; color: var(--text-sub); font-weight: 600; }

/* ════════════════════════════════════════════════
   TOGGLE SWITCH
════════════════════════════════════════════════ */
.switch {
  position: relative;
  display: inline-block;
  width: 40px; height: 22px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(90,115,158,0.3);
  transition: .25s;
  border-radius: 22px;
  border: 1px solid var(--border);
}

.slider::before {
  position: absolute;
  content: "";
  height: 16px; width: 16px;
  left: 2px; bottom: 2px;
  background: var(--text-muted);
  transition: .25s;
  border-radius: 50%;
}

input:checked + .slider { background: var(--lhu-navy); border-color: var(--lhu-navy); }
input:checked + .slider::before { transform: translateX(18px); background: #fff; }

/* ════════════════════════════════════════════════
   MODALS
════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(5, 10, 22, 0.75);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.97) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.modal-card.modal-lg { max-width: 800px; }

.modal-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}



.modal-header h3 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.modal-header h3 i { color: var(--lhu-gold); }

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.15s;
}

.modal-close:hover { color: var(--text-main); }

.modal-body { padding: 22px; overflow-y: auto; }

.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
}

.modal-user-info { display: flex; align-items: center; gap: 12px; }

/* ════════════════════════════════════════════════
   CHAT HISTORY
════════════════════════════════════════════════ */
.chat-history-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 460px;
  background: var(--bg-base);
  padding: 18px;
}

.chat-bubble {
  max-width: 76%;
  padding: 11px 15px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
}

.chat-bubble.user {
  align-self: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-main);
  border-bottom-left-radius: 3px;
}

.chat-bubble.assistant {
  align-self: flex-end;
  background: var(--lhu-navy);
  color: #fff;
  border-bottom-right-radius: 3px;
  box-shadow: 0 3px 10px rgba(39,79,157,0.3);
}

.chat-bubble-time {
  font-size: 0.68rem;
  opacity: 0.6;
  margin-top: 4px;
  text-align: right;
}

.chat-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 0;
}

.code-preview {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  white-space: pre-wrap;
  max-height: 240px;
  overflow-y: auto;
  color: var(--lhu-gold);
}

/* ════════════════════════════════════════════════
   ALERTS
════════════════════════════════════════════════ */
.alert {
  padding: 11px 15px;
  border-radius: var(--radius-sm);
  font-size: 0.855rem;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  line-height: 1.5;
}

.alert i { flex-shrink: 0; margin-top: 1px; }

.alert-info {
  background: rgba(39,79,157,0.12);
  border: 1px solid rgba(39,79,157,0.3);
  color: #7baeff;
}

.alert-danger {
  background: rgba(145,30,67,0.12);
  border: 1px solid rgba(145,30,67,0.3);
  color: #e06080;
}

/* ════════════════════════════════════════════════
   AUTH SCREEN (LOGIN)
════════════════════════════════════════════════ */
.auth-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 50% 40%, #0d1a35 0%, #060c18 100%);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 20px;
}



.auth-overlay.active {
  display: flex;
  animation: authIn 0.3s ease;
}

@keyframes authIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 400px;
  padding: 36px 32px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  position: relative;
  z-index: 1;
}



.auth-header { margin-bottom: 28px; }

.auth-header h2 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.bot-avatar-badge.large {
  width: 68px; height: 68px;
  font-size: 26px;
  margin: 0 auto 18px;
  border-radius: 18px;
  background: rgba(39,79,157,0.15);
  border: 2px solid var(--border-gold);
  box-shadow: 0 8px 24px rgba(39,79,157,0.2);
}

/* ════════════════════════════════════════════════
   TOAST NOTIFICATIONS
════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
}

.toast {
  padding: 12px 18px;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.28s ease;
  max-width: 320px;
}

@keyframes toastIn {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

.toast-success { background: #138a56; }
.toast-error   { background: var(--lhu-burgundy); }
.toast-info    { background: var(--lhu-navy); }

/* ════════════════════════════════════════════════
   TYPOGRAPHY UTILITIES
════════════════════════════════════════════════ */
.text-muted  { color: var(--text-muted) !important; }
.text-xs     { font-size: 0.75rem; }
.text-sm     { font-size: 0.875rem; }
.text-center { text-align: center; }
.font-semibold { font-weight: 600; }
.font-bold   { font-weight: 700; }
.font-mono   { font-family: 'Courier New', monospace; }
.green       { color: var(--success); }
.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 240px;
}

/* ════════════════════════════════════════════════
   SCHEDULE PAGE — TIME DISPLAY
════════════════════════════════════════════════ */
#current-notify-time-display {
  color: var(--lhu-gold) !important;
}

/* ════════════════════════════════════════════════
   FORM ACTIONS
════════════════════════════════════════════════ */
.form-actions { margin-top: 4px; }
