:root {
  --brand: #0f766e;
  --brand-dark: #134e4a;
  --accent: #f59e0b;
  --sidebar-w: 260px;
}

body { font-family: "Segoe UI", system-ui, -apple-system, sans-serif; color: #0f172a; }

.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: linear-gradient(180deg, var(--brand-dark) 0%, #0b3b38 100%);
  position: sticky;
  top: 0;
  flex-shrink: 0;
  overflow-y: auto;
}
.sidebar .nav-link {
  color: rgba(255,255,255,.82);
  border-radius: .6rem;
  margin: .15rem 0;
  padding: .55rem .8rem;
  display: flex;
  gap: .65rem;
  align-items: center;
  font-size: .92rem;
}
.sidebar .nav-link i { width: 1.2rem; }
.sidebar .nav-link:hover, .sidebar .nav-link.active {
  background: rgba(255,255,255,.12);
  color: #fff;
}
.sidebar .nav-link.active { box-shadow: inset 3px 0 0 var(--accent); }
.brand-icon {
  width: 40px; height: 40px; border-radius: 12px;
  background: rgba(255,255,255,.12);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.35rem; color: var(--accent);
}

#page-content { min-width: 0; min-height: 100vh; }
.topbar { z-index: 1020; }

.stat-card {
  border: 0;
  border-radius: 1rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
  overflow: hidden;
}
.stat-card .icon-wrap {
  width: 48px; height: 48px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}
.card-soft {
  border: 0;
  border-radius: 1rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
}
.table thead th {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #64748b;
  background: #f8fafc;
}
.badge-status {
  font-weight: 600;
  text-transform: capitalize;
}
.btn-brand {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn-brand:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }

.chat-panel {
  height: calc(100vh - 220px);
  min-height: 420px;
  display: flex;
  flex-direction: column;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  background: #f1f5f9;
  border-radius: .75rem;
  padding: 1rem;
}
.bubble {
  max-width: 75%;
  padding: .65rem .9rem;
  border-radius: 1rem;
  margin-bottom: .6rem;
  white-space: pre-wrap;
  word-break: break-word;
}
.bubble-in { background: #fff; border: 1px solid #e2e8f0; border-bottom-left-radius: .25rem; }
.bubble-out { background: #ccfbf1; margin-left: auto; border-bottom-right-radius: .25rem; }

.login-hero {
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 20%, rgba(15,118,110,.25), transparent 40%),
    radial-gradient(circle at 90% 10%, rgba(245,158,11,.2), transparent 35%),
    linear-gradient(135deg, #0f172a 0%, #134e4a 50%, #0f766e 100%);
}

@media (max-width: 991.98px) {
  .sidebar {
    position: fixed;
    z-index: 1040;
    transform: translateX(-100%);
    transition: transform .2s ease;
  }
  .sidebar.show { transform: translateX(0); }
}
