/* ==========================================================================
   Cristo Tu Única Esperanza Lebu - Portal de Servidores & Chat Styles
   Theme: Sunset Orange & Amber Gold Harmony (Cálido, Premium y Moderno)
   ========================================================================== */

:root {
  --portal-bg-dark: #0e1118;
  --portal-bg-surface: #161b26;
  --portal-bg-card: #1f2636;
  --portal-bg-hover: #293245;
  --portal-border: rgba(249, 115, 22, 0.22);
  --portal-border-subtle: rgba(255, 255, 255, 0.08);
  
  --portal-orange: #f97316;
  --portal-orange-light: #fb923c;
  --portal-orange-soft: #ffedd5;
  --portal-orange-glow: rgba(249, 115, 22, 0.35);
  --portal-orange-gradient: linear-gradient(135deg, #ea580c 0%, #f97316 50%, #fb923c 100%);
  
  --portal-amber: #f59e0b;
  --portal-amber-light: #fbbf24;
  --portal-amber-soft: #fef3c7;
  --portal-amber-glow: rgba(245, 158, 11, 0.25);
  --portal-amber-gradient: linear-gradient(135deg, #d97706 0%, #f59e0b 50%, #fbbf24 100%);
  
  --portal-rose: #f43f5e;
  --portal-cyan: #38bdf8;
}

/* --------------------------------------------------
   1. Login Page Styles
   -------------------------------------------------- */
.portal-login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 80% 20%, rgba(249, 115, 22, 0.22) 0%, transparent 55%),
              radial-gradient(circle at 15% 85%, rgba(245, 158, 11, 0.16) 0%, transparent 55%),
              linear-gradient(145deg, #0e1118 0%, #171c28 50%, #0e1118 100%);
  color: #f8fafc;
  padding: 2rem 1.5rem;
  font-family: var(--font-body, 'DM Sans', sans-serif);
}

.login-card {
  width: 100%;
  max-width: 480px;
  background: rgba(22, 28, 40, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7),
              0 0 0 1px rgba(249, 115, 22, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.login-brand {
  margin-bottom: 2rem;
}

.login-brand img {
  height: 62px;
  margin: 0 auto 1.25rem auto;
  filter: drop-shadow(0 4px 14px rgba(249, 115, 22, 0.35));
}

.login-title {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 1.85rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.35rem;
}

.login-subtitle {
  color: #fed7aa;
  font-size: 0.95rem;
}

.login-form {
  text-align: left;
  margin-top: 2rem;
}

.portal-form-group {
  margin-bottom: 1.25rem;
}

.portal-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 0.5rem;
}

.portal-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.portal-input-wrap i {
  position: absolute;
  left: 1.1rem;
  color: #fb923c;
  font-size: 1rem;
}

.portal-input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.75rem;
  background: rgba(14, 17, 24, 0.85);
  border: 1.5px solid rgba(249, 115, 22, 0.22);
  border-radius: 12px;
  color: #ffffff;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  outline: none;
}

.portal-input:focus {
  border-color: #fb923c;
  background: rgba(14, 17, 24, 0.98);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.25);
}

.portal-btn {
  width: 100%;
  padding: 0.95rem 1.5rem;
  background: linear-gradient(135deg, #ea580c 0%, #f97316 50%, #fb923c 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 10px 25px -5px rgba(249, 115, 22, 0.45);
  transition: all 0.2s ease;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.portal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -5px rgba(249, 115, 22, 0.6);
  background: linear-gradient(135deg, #c2410c 0%, #ea580c 100%);
}

.login-demo-accounts {
  margin-top: 2.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
}

.demo-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fb923c;
  margin-bottom: 0.75rem;
  display: block;
}

.demo-account-chips {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.demo-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(249, 115, 22, 0.16);
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.demo-chip:hover {
  background: rgba(249, 115, 22, 0.14);
  border-color: rgba(249, 115, 22, 0.45);
  transform: translateX(4px);
}

.demo-chip-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #f8fafc;
}

.demo-chip-role {
  font-size: 0.75rem;
  color: #94a3b8;
}

/* --------------------------------------------------
   2. Sleek Left Navigation Sidebar (Barra Lateral Izquierda)
   -------------------------------------------------- */
.portal-app-layout {
  display: flex;
  height: 100vh;
  width: 100vw;
  background: var(--portal-bg-dark);
  color: #f8fafc;
  overflow: hidden;
  font-family: var(--font-body, 'DM Sans', sans-serif);
}

.portal-nav-sidebar {
  width: 240px;
  background: #121620;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.25rem 0.85rem;
  flex-shrink: 0;
  z-index: 150;
  transition: width 0.28s cubic-bezier(0.16, 1, 0.3, 1), padding 0.28s ease;
  position: relative;
}

.nav-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  margin-bottom: 1.15rem;
}

.nav-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  min-width: 0;
  flex-grow: 1;
}

.nav-sidebar-brand img {
  height: 38px;
  width: auto;
  filter: brightness(1.1);
  transition: transform 0.25s ease, height 0.25s ease;
}

.nav-brand-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.nav-sidebar-brand-text {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-weight: 800;
  font-size: 1.05rem;
  color: #ffffff;
  line-height: 1.15;
}

.nav-sidebar-brand-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: #fb923c;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.btn-sidebar-collapse {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  font-size: 0.85rem;
}

.btn-sidebar-collapse:hover {
  background: rgba(249, 115, 22, 0.2);
  border-color: rgba(249, 115, 22, 0.45);
  color: #fb923c;
  transform: scale(1.05);
}

.btn-sidebar-collapse i {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex-grow: 1;
}

.nav-sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  width: 100%;
  text-align: left;
  white-space: nowrap;
  position: relative;
}

.nav-sidebar-item i {
  font-size: 1.05rem;
  color: #ffffff;
  width: 22px;
  text-align: center;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-sidebar-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.nav-sidebar-item:hover i {
  opacity: 1;
  transform: scale(1.1);
}

.nav-sidebar-item.active {
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.18) 0%, rgba(249, 115, 22, 0.28) 100%);
  color: #ffffff;
  border-color: rgba(249, 115, 22, 0.45);
  font-weight: 700;
}

.nav-sidebar-item.active i {
  color: #fb923c;
  opacity: 1;
}

.nav-sidebar-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 0.75rem 0.5rem;
}

.nav-sidebar-footer {
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nav-user-pill {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  position: relative;
}

.nav-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #fb923c;
  flex-shrink: 0;
}

.nav-user-name {
  font-size: 0.825rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.nav-user-role {
  font-size: 0.7rem;
  color: #fb923c;
}

.nav-btn-logout {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  white-space: nowrap;
}

.nav-btn-logout:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ffffff;
  border-color: rgba(239, 68, 68, 0.5);
}

.nav-btn-logout i {
  color: #ffffff;
}

/* ==================================================
   ESTADO COLAPSADO DE BARRA LATERAL (Mini Sidebar: Solo Logos e Íconos)
   ================================================== */
.portal-nav-sidebar.collapsed {
  width: 76px;
  padding: 1.25rem 0.55rem;
}

.portal-nav-sidebar.collapsed .nav-sidebar-header {
  flex-direction: column;
  gap: 0.65rem;
  padding-bottom: 0.9rem;
  justify-content: center;
  align-items: center;
}

.portal-nav-sidebar.collapsed .nav-sidebar-brand {
  justify-content: center;
  padding: 0;
  margin: 0;
  flex-grow: 0;
}

.portal-nav-sidebar.collapsed .nav-sidebar-brand img {
  height: 32px;
}

.portal-nav-sidebar.collapsed .nav-brand-info {
  display: none !important;
}

.portal-nav-sidebar.collapsed .btn-sidebar-collapse {
  width: 28px;
  height: 28px;
  font-size: 0.8rem;
}

.portal-nav-sidebar.collapsed .btn-sidebar-collapse i {
  transform: rotate(180deg);
}

.portal-nav-sidebar.collapsed .nav-sidebar-item {
  justify-content: center;
  padding: 0.75rem 0;
  gap: 0;
}

.portal-nav-sidebar.collapsed .nav-sidebar-item span {
  display: none !important;
}

.portal-nav-sidebar.collapsed .nav-sidebar-item i {
  margin: 0 auto;
  font-size: 1.2rem;
  width: auto;
}

.portal-nav-sidebar.collapsed .nav-sidebar-footer {
  padding-top: 0.75rem;
  gap: 0.5rem;
}

.portal-nav-sidebar.collapsed .nav-user-pill {
  justify-content: center;
  padding: 0.35rem 0;
  background: transparent;
}

.portal-nav-sidebar.collapsed .nav-user-pill div {
  display: none !important;
}

.portal-nav-sidebar.collapsed .nav-btn-logout {
  justify-content: center;
  padding: 0.65rem 0;
  gap: 0;
}

.portal-nav-sidebar.collapsed .nav-btn-logout span {
  display: none !important;
}

.portal-nav-sidebar.collapsed .nav-btn-logout i {
  margin: 0;
  font-size: 1.15rem;
}

/* Tooltip flotante Dark Glass con acento Sunset en estado colapsado */
.portal-nav-sidebar.collapsed .nav-sidebar-item[data-tooltip]::after,
.portal-nav-sidebar.collapsed .nav-user-pill[data-tooltip]::after,
.portal-nav-sidebar.collapsed .nav-btn-logout[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%);
  background: #191f2c;
  color: #ffffff;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(249, 115, 22, 0.45);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 99999;
}

.portal-nav-sidebar.collapsed .nav-sidebar-item[data-tooltip]:hover::after,
.portal-nav-sidebar.collapsed .nav-user-pill[data-tooltip]:hover::after,
.portal-nav-sidebar.collapsed .nav-btn-logout[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(2px);
}

.portal-content-viewport {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* Backward compatibility for topbar */
.portal-app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: #0e1118;
  color: #f8fafc;
  overflow: hidden;
  font-family: var(--font-body, 'DM Sans', sans-serif);
}

/* Dashboard Topbar */
.portal-topbar {
  height: 70px;
  background: #151922;
  border-bottom: 1px solid rgba(249, 115, 22, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  z-index: 100;
  flex-shrink: 0;
}

.portal-nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #cbd5e1;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.portal-nav-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.portal-nav-tab.active {
  background: rgba(249, 115, 22, 0.16);
  color: #fb923c;
  border-color: rgba(249, 115, 22, 0.4);
}

.portal-topbar-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.portal-topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.portal-topbar-brand img {
  height: 42px;
}

.portal-badge {
  background: rgba(245, 49, 61, 0.15);
  color: #f5313d;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(245, 49, 61, 0.3);
}

.portal-topbar-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.servant-profile-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.servant-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #f5313d;
}

.servant-meta {
  display: flex;
  flex-direction: column;
}

.servant-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.servant-role {
  font-size: 0.725rem;
  color: #94a3b8;
}

.btn-portal-logout {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f87171;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.btn-portal-logout:hover {
  background: rgba(245, 49, 61, 0.2);
  border-color: #f5313d;
  color: #ffffff;
}

/* Dashboard Body (Sidebar + Chat Viewport) */
.portal-main {
  display: flex;
  flex-grow: 1;
  height: calc(100vh - 70px);
  overflow: hidden;
}

/* Left Sidebar (Conversations List) */
.portal-sidebar {
  width: 380px;
  background: #0f172a;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-header {
  padding: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-search-box {
  position: relative;
  margin-bottom: 1rem;
}

.sidebar-search-box i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 0.9rem;
}

.sidebar-search-input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  background: rgba(11, 15, 25, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #ffffff;
  font-size: 0.875rem;
  outline: none;
}

.sidebar-search-input:focus {
  border-color: #f5313d;
}

.conversations-list {
  flex-grow: 1;
  overflow-y: auto;
}

.conversation-item {
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  display: flex;
  gap: 0.85rem;
  transition: all 0.2s ease;
  position: relative;
}

.conversation-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.conversation-item.active {
  background: rgba(245, 49, 61, 0.1);
  border-left: 4px solid #f5313d;
}

.conv-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.conv-body {
  flex-grow: 1;
  min-width: 0;
}

.conv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.conv-name {
  font-weight: 700;
  font-size: 0.925rem;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conv-time {
  font-size: 0.725rem;
  color: #64748b;
}

.conv-snippet {
  font-size: 0.825rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.4rem;
}

.conv-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.badge-category {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

.badge-status {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  text-transform: capitalize;
}

.status-pendiente {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.status-en_oracion {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.status-respondido {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

/* Chat Main Viewport */
.portal-chat-viewport {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  background: #0b0f19;
  position: relative;
}

.chat-empty-state {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #64748b;
  text-align: center;
  padding: 2rem;
}

.chat-empty-icon {
  font-size: 3.5rem;
  color: rgba(255, 255, 255, 0.1);
  margin-bottom: 1rem;
}

/* Chat Header */
.chat-header {
  padding: 1rem 1.75rem;
  background: #0f172a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.chat-visitor-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
}

.chat-visitor-phone {
  font-size: 0.825rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.status-select {
  background: var(--portal-bg-card);
  color: #f8fafc;
  border: 1px solid var(--portal-border);
  padding: 0.45rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.status-select:focus {
  border-color: var(--portal-orange);
}

/* Messages Stream */
.chat-messages-stream {
  flex-grow: 1;
  padding: 1.75rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: var(--portal-bg-dark);
}

.message-bubble-wrap {
  display: flex;
  flex-direction: column;
  max-width: 75%;
}

.message-bubble-wrap.visitor {
  align-self: flex-start;
}

.message-bubble-wrap.servant {
  align-self: flex-end;
}

.msg-sender-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 0.25rem;
}

.message-bubble-wrap.servant .msg-sender-name {
  text-align: right;
  color: var(--portal-orange-light);
}

.msg-bubble {
  padding: 1rem 1.25rem;
  border-radius: 16px;
  font-size: 0.95rem;
  line-height: 1.55;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.message-bubble-wrap.visitor .msg-bubble {
  background: var(--portal-bg-card);
  color: #f8fafc;
  border-bottom-left-radius: 4px;
  border: 1px solid var(--portal-border);
}

.message-bubble-wrap.servant .msg-bubble {
  background: var(--portal-orange-gradient);
  color: #ffffff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 6px 20px var(--portal-orange-glow);
}

.msg-time {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: 0.35rem;
}

.message-bubble-wrap.servant .msg-time {
  text-align: right;
  color: #fed7aa;
}

/* Chat Input Bar */
.chat-input-bar {
  padding: 1.25rem 1.75rem;
  background: var(--portal-bg-surface);
  border-top: 1px solid var(--portal-border);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.chat-input {
  flex-grow: 1;
  padding: 0.85rem 1.25rem;
  background: var(--portal-bg-dark);
  border: 1.5px solid var(--portal-border);
  border-radius: 12px;
  color: #ffffff;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s ease;
}

.chat-input:focus {
  border-color: var(--portal-orange-light);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.25);
}

.btn-chat-send {
  padding: 0.85rem 1.5rem;
  background: var(--portal-orange-gradient);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 6px 20px var(--portal-orange-glow);
  transition: all 0.2s ease;
}

.btn-chat-send:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(249, 115, 22, 0.5);
}

/* --------------------------------------------------
   3. Visitor Interactive Live Chat Widget (Public)
   -------------------------------------------------- */
.visitor-chat-container {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.visitor-chat-header {
  background: #0f172a;
  color: #ffffff;
  padding: 1.15rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.visitor-chat-title {
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.visitor-chat-online {
  font-size: 0.8rem;
  font-weight: 600;
  color: #4ade80;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(34, 197, 94, 0.15);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.visitor-chat-online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse-live 1.5s infinite;
}

.visitor-chat-stream {
  flex-grow: 1;
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  background: #f8fafc;
  height: 480px;
}

.visitor-chat-input-bar {
  padding: 1.25rem;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 0.85rem;
}

.visitor-chat-input {
  flex-grow: 1;
  padding: 0.85rem 1.15rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  font-size: 0.95rem;
  outline: none;
  background: #f8fafc;
  color: #0f172a;
}

.visitor-chat-input:focus {
  border-color: #f5313d;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(245, 49, 61, 0.15);
}

/* --------------------------------------------------
   4. Music Ministry & Setlists Module
   -------------------------------------------------- */
.portal-nav-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 1.5rem;
}

.portal-nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.1rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: none;
  transition: all 0.2s ease;
}

.portal-nav-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.portal-nav-tab.active {
  background: var(--primary-gradient, linear-gradient(135deg, #f5313d 0%, #d91c28 100%));
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(245, 49, 61, 0.35);
}

/* Music Layout */
.music-dashboard {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: #0b132b;
  padding: 1.75rem 2.25rem;
}

.music-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.music-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.music-subtabs {
  display: flex;
  gap: 0.5rem;
  background: #1e293b;
  padding: 0.35rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.music-subtab {
  padding: 0.55rem 1.25rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 700;
  color: #94a3b8;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.music-subtab.active {
  background: #334155;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.music-subtab:hover:not(.active) {
  color: #e2e8f0;
}

/* Setlists Grid */
.setlists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.5rem;
}

.setlist-card {
  background: #1e293b;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.5rem;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.setlist-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.setlist-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.setlist-date-badge {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  padding: 0.35rem 0.85rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.setlist-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.35rem;
}

.setlist-leader {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 1.25rem;
}

.setlist-songs-preview {
  background: rgba(11, 19, 43, 0.6);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.setlist-song-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  color: #e2e8f0;
  padding: 0.35rem 0;
  transition: all 0.15s ease;
}

.setlist-song-item:hover {
  color: #38bdf8;
}

.setlist-song-item:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.setlist-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Songs Library Grid */
.songs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.song-card {
  background: #1e293b;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.5rem;
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.song-card:hover {
  transform: translateY(-3px);
  border-color: #38bdf8;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.song-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.35rem;
}

.song-card-artist {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 1rem;
}

.song-meta-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.song-tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
}

.song-tag.key {
  background: rgba(56, 189, 248, 0.18);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

/* Chord Chart Viewer */
.chord-viewer-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #0b132b;
  backdrop-filter: blur(16px);
  z-index: 2000;
  display: none;
  flex-direction: column;
}

.chord-viewer-header {
  padding: 1rem 2rem;
  background: #1e293b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.transposer-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.4rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-transpose {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #334155;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-transpose:hover {
  background: #38bdf8;
  color: #0f172a;
  border-color: #38bdf8;
}

.chord-sheet-content {
  flex-grow: 1;
  padding: 2.5rem 3.5rem 6rem 3.5rem;
  overflow-y: auto;
  font-family: 'DM Mono', monospace, 'Courier New', Courier;
  font-size: 1.15rem;
  color: #f8fafc;
  max-width: 980px;
  margin: 0 auto;
  width: 100%;
}

.chord-section-header {
  display: inline-flex;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  margin: 1.5rem 0 1rem 0;
}

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

.chord-line {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

.chord-line-break {
  height: 1.35rem;
}

.chord-unit {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  margin-right: 0.2rem;
}

.chord-note {
  font-family: 'DM Mono', monospace;
  font-size: 0.95rem;
  font-weight: 800;
  color: #38bdf8;
  line-height: 1.2;
  letter-spacing: 0.03em;
  min-height: 1.3rem;
  white-space: pre;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.chord-lyric {
  font-family: 'DM Mono', monospace;
  font-size: 1.1rem;
  color: #f8fafc;
  line-height: 1.35;
  white-space: pre;
}

/* Rehearsal Live Navigation Bar */
.practice-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  background: rgba(15, 23, 42, 0.96);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(12px);
  z-index: 2050;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-nav-song {
  padding: 0.6rem 1.25rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #1e293b;
  color: #ffffff;
}

.btn-nav-song:hover:not(:disabled) {
  background: #38bdf8;
  color: #0f172a;
  border-color: #38bdf8;
  transform: translateY(-2px);
}

.btn-nav-song:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Personal Musician Attendance Box */
.my-attendance-card {
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.12) 0%, rgba(30, 41, 59, 0.9) 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.my-attendance-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.my-attendance-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #0284c7;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
}

.my-attendance-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* Song Order Selector in Setlist Creator */
.setlist-builder-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .setlist-builder-grid {
    grid-template-columns: 1fr;
  }
}

.song-picker-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.85rem;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  transition: all 0.15s ease;
}

.song-picker-card:hover {
  background: rgba(30, 41, 59, 1);
  border-color: rgba(56, 189, 248, 0.3);
}

.btn-add-song-chip {
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

.btn-add-song-chip.selected {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.4);
}

.ordered-song-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.85rem;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.btn-order-arrow {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  background: #334155;
  color: #cbd5e1;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: all 0.15s ease;
}

.btn-order-arrow:hover:not(:disabled) {
  background: #38bdf8;
  color: #0f172a;
}

.btn-order-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.btn-confirm-yes {
  background: #22c55e;
  color: #ffffff;
  border: none;
  padding: 0.5rem 1.1rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
  transition: all 0.15s ease;
}

.btn-confirm-yes:hover {
  background: #16a34a;
  transform: translateY(-2px);
}

.btn-confirm-no {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 0.5rem 1.1rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
}

.btn-confirm-no:hover {
  background: rgba(239, 68, 68, 0.35);
  color: #ffffff;
  transform: translateY(-2px);
}

/* Attendance Table */
.attendance-card {
  background: #0f172a;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.75rem;
  margin-top: 1.5rem;
}

.attendance-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.attendance-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.attendance-table td {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.95rem;
}

.status-toggle-btn {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}

.status-toggle-btn.confirmado {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.status-toggle-btn.pendiente {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.status-toggle-btn.no_asiste {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

/* Generic Modal */
.portal-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(7, 10, 18, 0.85);
  backdrop-filter: blur(10px);
  z-index: 1500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.portal-modal-content {
  background: #0f172a;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  width: 100%;
  max-width: 780px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.25rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
}

/* RBAC Role Badges */
.role-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.role-badge.admin {
  background: rgba(234, 179, 8, 0.2);
  color: #fde047;
  border: 1px solid rgba(234, 179, 8, 0.4);
}

.role-badge.director_alabanza {
  background: rgba(245, 49, 61, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(245, 49, 61, 0.4);
}

.role-badge.musico {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.role-badge.intercesion {
  background: rgba(168, 85, 247, 0.2);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

/* Permissions Matrix Table */
.portal-modal-content.wide {
  max-width: 1040px;
}

.rbac-table-wrap {
  overflow-x: auto;
  margin-top: 1.25rem;
  background: rgba(11, 15, 25, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

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

.rbac-table th {
  padding: 0.85rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.rbac-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
  color: #e2e8f0;
}

.rbac-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.perm-checkbox-cell {
  text-align: center;
}

.perm-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #0284c7;
  cursor: pointer;
  vertical-align: middle;
}

.rbac-role-select {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  outline: none;
}

.rbac-role-select:focus {
  border-color: #38bdf8;
}

.rbac-subform-box {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  display: none;
}

/* PWA Smart Install Banner */
.pwa-install-banner {
  background: linear-gradient(90deg, #1e293b 0%, #0f172a 100%);
  border-bottom: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 100;
}

/* Offline Status Toast */
.offline-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1e293b;
  color: #ffffff;
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 3000;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.offline-toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.offline-toast.offline-mode {
  background: #0f172a;
  border-color: #fbbf24;
  color: #fde047;
}

.offline-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #4ade80;
  background: rgba(34, 197, 94, 0.12);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .portal-main {
    flex-direction: column;
  }

  .portal-sidebar {
    width: 100%;
    height: 45vh;
  }

  .portal-chat-viewport {
    height: 55vh;
  }

  .music-dashboard {
    padding: 1.25rem;
  }

  .pwa-install-banner {
    padding: 0.65rem 1rem;
  }
}
