/* ==========================================================================
   CAMPUS NOTIFY - OFFICIAL CAMPUS NOTIFICATION MANAGEMENT SYSTEM (CNMS)
   Institutional Academic & Administrative Circular Dispatch Portal
   ========================================================================== */

:root {
  /* CampusNotify - Professional Academic Blue, Crisp White & Solid Black Palette */
  --bg-page: #f8fafc;
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-input: #ffffff;
  
  --border-color: #e2e8f0;
  --border-light: #cbd5e1;
  
  --text-main: #0f172a;
  --text-muted: #334155;
  --text-dim: #64748b;
  
  --brand-primary: #1d4ed8;
  --brand-primary-hover: #1e40af;
  --brand-secondary: #2563eb;
  --brand-accent: #3b82f6;
  --brand-gradient: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #3b82f6 100%);
  
  /* Department Palette (Academic high-contrast tokens) */
  --dept-exam: #dc2626;
  --dept-exam-bg: #fee2e2;
  --dept-acad: #1d4ed8;
  --dept-acad-bg: #dbeafe;
  --dept-place: #059669;
  --dept-place-bg: #d1fae5;
  --dept-admin: #7c3aed;
  --dept-admin-bg: #ede9fe;
  --dept-event: #db2777;
  --dept-event-bg: #fce7f3;
  --dept-sports: #d97706;
  --dept-sports-bg: #fef3c7;

  /* Priority Tokens */
  --priority-urgent: #dc2626;
  --priority-urgent-bg: #fee2e2;
  --priority-high: #d97706;
  --priority-high-bg: #fef3c7;
  --priority-routine: #2563eb;
  --priority-routine-bg: #eff6ff;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 14px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 30px rgba(15, 23, 42, 0.12), 0 4px 10px rgba(15, 23, 42, 0.06);

  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);

  /* Fluid Responsive Typography Scale Tokens (auto-fitting across all screen widths) */
  --font-2xs: clamp(0.6rem, 1.4vw, 0.68rem);
  --font-xs: clamp(0.68rem, 1.7vw, 0.75rem);
  --font-sm: clamp(0.76rem, 1.9vw, 0.84rem);
  --font-base: clamp(0.85rem, 2.1vw, 0.94rem);
  --font-md: clamp(0.95rem, 2.4vw, 1.05rem);
  --font-lg: clamp(1.05rem, 2.8vw, 1.25rem);
  --font-xl: clamp(1.2rem, 3.4vw, 1.45rem);
  --font-2xl: clamp(1.35rem, 4vw, 1.75rem);
}

[data-theme="light"] {
  --bg-page: #f8fafc;
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-input: #ffffff;

  --border-color: #e2e8f0;
  --border-light: #cbd5e1;

  --text-main: #0f172a;
  --text-muted: #334155;
  --text-dim: #64748b;

  --brand-primary: #1d4ed8;
  --brand-primary-hover: #1e40af;
  --brand-secondary: #2563eb;
  --brand-accent: #3b82f6;
  --brand-gradient: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #3b82f6 100%);

  --dept-exam: #dc2626;
  --dept-exam-bg: #fee2e2;
  --dept-acad: #1d4ed8;
  --dept-acad-bg: #dbeafe;
  --dept-place: #059669;
  --dept-place-bg: #d1fae5;
  --dept-admin: #7c3aed;
  --dept-admin-bg: #ede9fe;
  --dept-event: #db2777;
  --dept-event-bg: #fce7f3;
  --dept-sports: #d97706;
  --dept-sports-bg: #fef3c7;

  --priority-urgent: #dc2626;
  --priority-urgent-bg: #fee2e2;
  --priority-high: #d97706;
  --priority-high-bg: #fef3c7;
  --priority-routine: #2563eb;
  --priority-routine-bg: #eff6ff;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 14px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 30px rgba(15, 23, 42, 0.12), 0 4px 10px rgba(15, 23, 42, 0.06);
}

[data-theme="dark"] {
  --bg-page: #0b1120;
  --bg-body: #0b1120;
  --bg-card: #151e32;
  --bg-card-hover: #1c2742;
  --bg-subtle: #0f172a;
  --bg-input: #080d1a;

  --border-color: #24324f;
  --border-light: #374768;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --brand-primary: #3b82f6;
  --brand-primary-hover: #2563eb;
  --brand-secondary: #60a5fa;
  --brand-accent: #93c5fd;
  --brand-gradient: linear-gradient(135deg, #1d4ed8 0%, #2563eb 50%, #3b82f6 100%);

  --dept-exam: #f43f5e;
  --dept-exam-bg: rgba(244, 63, 94, 0.15);
  --dept-acad: #3b82f6;
  --dept-acad-bg: rgba(59, 130, 246, 0.15);
  --dept-place: #10b981;
  --dept-place-bg: rgba(16, 185, 129, 0.15);
  --dept-admin: #8b5cf6;
  --dept-admin-bg: rgba(139, 92, 246, 0.15);
  --dept-event: #ec4899;
  --dept-event-bg: rgba(236, 72, 153, 0.15);
  --dept-sports: #f59e0b;
  --dept-sports-bg: rgba(245, 158, 11, 0.15);

  --priority-urgent: #ef4444;
  --priority-urgent-bg: rgba(239, 68, 68, 0.15);
  --priority-high: #f59e0b;
  --priority-high-bg: rgba(245, 158, 11, 0.15);
  --priority-routine: #3b82f6;
  --priority-routine-bg: rgba(59, 130, 246, 0.15);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.45);
}

/* ==========================================================================
   BASE & RESET - UNIVERSAL RESPONSIVE FIT
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  background-image: 
    radial-gradient(at 0% 0%, rgba(29, 78, 216, 0.03) 0px, transparent 55%),
    radial-gradient(at 100% 0%, rgba(15, 23, 42, 0.02) 0px, transparent 55%),
    radial-gradient(at 100% 100%, rgba(37, 99, 235, 0.02) 0px, transparent 50%),
    radial-gradient(at 0% 100%, rgba(15, 23, 42, 0.02) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.55;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
  transition: background-color 0.25s ease, color 0.25s ease;
}

[data-theme="dark"] body {
  background-image: 
    radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.08) 0px, transparent 55%),
    radial-gradient(at 100% 0%, rgba(59, 130, 246, 0.08) 0px, transparent 55%),
    radial-gradient(at 100% 100%, rgba(37, 99, 235, 0.05) 0px, transparent 50%),
    radial-gradient(at 0% 100%, rgba(59, 130, 246, 0.05) 0px, transparent 50%);
}

/* Universal text-wrap and word-break protection for all screens */
p, span, h1, h2, h3, h4, h5, h6, label, a, button, select, input, textarea, article, aside, main, header, footer, div {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Balanced headline wrapping prevents awkward single-word lines */
h1, h2, h3, h4, h5, h6, .brand-title, .modal-title, .empty-title, .lh-subject-title {
  text-wrap: balance;
}

/* Pretty paragraph wrapping for natural readability */
p, .card-circular-body, .lh-body-text, .empty-text, .sidebar-info-text {
  text-wrap: pretty;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* ==========================================================================
   TOP INSTITUTIONAL NAVBAR
   ========================================================================== */
.navbar {
  background-color: rgba(255, 255, 255, 0.94);
  border-bottom: 1.5px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
}

.navbar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #1d4ed8 0%, #2563eb 50%, #38bdf8 100%);
  opacity: 0.85;
}

[data-theme="light"] .navbar {
  background-color: rgba(255, 255, 255, 0.94);
}

[data-theme="dark"] .navbar {
  background-color: rgba(21, 30, 50, 0.95);
  border-bottom: 1.5px solid rgba(59, 130, 246, 0.28);
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px clamp(12px, 3vw, 20px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 14px);
  flex-shrink: 0;
  min-width: 0;
}

.brand-crest {
  font-size: clamp(1.3rem, 3.5vw, 1.6rem);
  width: clamp(38px, 6vw, 44px);
  height: clamp(38px, 6vw, 44px);
  background-color: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.brand-title {
  font-size: clamp(1.05rem, 2.8vw, 1.25rem);
  font-weight: 800;
  letter-spacing: -0.4px;
  color: #000000;
  white-space: nowrap;
}

.brand-accent {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--brand-accent);
}

.brand-tag {
  font-size: clamp(0.58rem, 1.5vw, 0.65rem);
  font-weight: 700;
  text-transform: uppercase;
  background: var(--brand-gradient);
  color: #ffffff;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.tag-short {
  display: none;
}

.brand-tagline {
  font-size: clamp(0.64rem, 1.8vw, 0.72rem);
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 290px;
}

/* Nav Search */
.nav-search-wrap {
  position: relative;
  flex: 1;
  max-width: 420px;
  min-width: 180px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
  flex-shrink: 0;
}

.nav-search-wrap input {
  width: 100%;
  padding: 8px 16px 8px 40px;
  background-color: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-full);
  color: #000000;
  font-size: clamp(0.8rem, 2vw, 0.88rem);
  outline: none;
  transition: var(--transition);
}

.nav-search-wrap input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.8vw, 12px);
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px clamp(12px, 2vw, 18px);
  font-size: clamp(0.78rem, 2vw, 0.86rem);
  font-weight: 700;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-text-short {
  display: none;
}

.btn-primary {
  background: var(--brand-gradient);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}

.btn-secondary {
  background-color: #ffffff;
  border: 1.5px solid var(--border-color);
  color: #000000;
}

.btn-secondary:hover {
  background-color: var(--bg-subtle);
  border-color: var(--border-light);
  color: #000000;
}

.btn-sm {
  padding: 6px 12px;
  font-size: clamp(0.72rem, 1.8vw, 0.8rem);
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 12px 24px;
  font-size: clamp(0.88rem, 2.2vw, 0.95rem);
  border-radius: var(--radius-lg);
}

.icon-btn {
  width: clamp(36px, 5.5vw, 40px);
  height: clamp(36px, 5.5vw, 40px);
  border-radius: var(--radius-full);
  background-color: #ffffff;
  border: 1.5px solid var(--border-color);
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  transition: var(--transition);
  flex-shrink: 0;
}

.icon-btn:hover {
  background-color: var(--bg-subtle);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

/* Officer Profile Button in Navbar */
.officer-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #ffffff;
  border: 1.5px solid var(--border-color);
  padding: 4px clamp(8px, 1.5vw, 14px) 4px 5px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  flex-shrink: 0;
}

.officer-card:hover {
  background-color: var(--bg-subtle);
  border-color: var(--brand-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.officer-avatar {
  width: clamp(28px, 4.5vw, 32px);
  height: clamp(28px, 4.5vw, 32px);
  min-width: 28px;
  min-height: 28px;
  max-width: 32px;
  max-height: 32px;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #ffffff;
  font-size: clamp(0.72rem, 1.8vw, 0.78rem);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.officer-info {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.officer-name {
  font-size: clamp(0.75rem, 1.8vw, 0.82rem);
  font-weight: 700;
  white-space: nowrap;
}

.officer-role {
  font-size: clamp(0.62rem, 1.5vw, 0.68rem);
  color: var(--text-muted);
  white-space: nowrap;
}

.profile-gear-icon {
  font-size: 0.72rem;
  opacity: 0.8;
  margin-left: 2px;
}

/* ==========================================================================
   MAIN SYSTEM LAYOUT
   ========================================================================== */
.system-layout {
  max-width: 1040px;
  margin: 20px auto;
  padding: 0 clamp(12px, 3vw, 20px);
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 3vw, 22px);
  width: 100%;
}

/* ==========================================================================
   METRICS GRID (Executive KPI Cards)
   ========================================================================== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(10px, 2vw, 16px);
  width: 100%;
}

.metric-card {
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: clamp(12px, 2.2vw, 16px) clamp(12px, 2.5vw, 20px);
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 16px);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  min-width: 0;
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-md);
}

.metric-icon {
  width: clamp(38px, 6vw, 48px);
  height: clamp(38px, 6vw, 48px);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  flex-shrink: 0;
}

.blue-icon   { background-color: rgba(29, 78, 216, 0.12); border: 1.5px solid rgba(29, 78, 216, 0.28); color: #1d4ed8; }
.red-icon    { background-color: rgba(220, 38, 38, 0.12); border: 1.5px solid rgba(220, 38, 38, 0.28); color: #dc2626; }
.purple-icon { background-color: rgba(124, 58, 237, 0.12); border: 1.5px solid rgba(124, 58, 237, 0.28); color: #7c3aed; }
.green-icon  { background-color: rgba(5, 150, 105, 0.12); border: 1.5px solid rgba(5, 150, 105, 0.28); color: #059669; }

.metric-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.metric-value {
  font-size: clamp(1.25rem, 3.8vw, 1.65rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-main);
  font-family: var(--font-mono);
  overflow-wrap: anywhere;
}

.metric-label {
  font-size: clamp(0.62rem, 1.8vw, 0.74rem);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 3px;
  line-height: 1.25;
}

/* ==========================================================================
   PORTAL BODY GRID (Centered Clean Main Desk)
   ========================================================================== */
.portal-body-grid {
  display: block;
  width: 100%;
}

.portal-main-desk {
  width: 100%;
}

/* ==========================================================================
   CONTROL PANEL CARD (Filters & Toolbar)
   ========================================================================== */
.control-panel-card {
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: clamp(14px, 3vw, 20px);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2.5vw, 16px);
  width: 100%;
}

.panel-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: clamp(0.72rem, 2vw, 0.8rem);
  font-weight: 800;
  color: #1e293b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-wrap: wrap;
  gap: 8px;
}

.notices-count-badge {
  font-family: var(--font-mono);
  font-size: clamp(0.7rem, 1.8vw, 0.76rem);
  color: var(--brand-accent);
  background-color: var(--bg-subtle);
  border: 1.5px solid var(--border-color);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  font-weight: 700;
}

.dept-pills-row {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
  scrollbar-width: thin;
  width: 100%;
}

.dept-pill-btn {
  background-color: #ffffff;
  border: 1.5px solid var(--border-color);
  color: #1e293b;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  font-size: clamp(0.74rem, 2vw, 0.82rem);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: var(--transition);
}

.dept-pill-btn:hover {
  color: #000000;
  border-color: var(--brand-primary);
  background-color: var(--bg-subtle);
}

.dept-pill-btn.active {
  background: var(--brand-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.sub-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}

.sub-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.control-label {
  font-size: clamp(0.72rem, 1.8vw, 0.78rem);
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
}

.control-select {
  background-color: #ffffff;
  border: 1.5px solid var(--border-color);
  color: #000000;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: clamp(0.76rem, 2vw, 0.82rem);
  font-weight: 600;
  outline: none;
  cursor: pointer;
  max-width: 100%;
}

.control-select:focus {
  border-color: var(--brand-primary);
}

.filter-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Active Filter Alert Banner */
.active-filter-alert {
  background-color: var(--bg-subtle);
  border: 1.5px solid var(--brand-primary);
  color: var(--brand-accent);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: clamp(0.78rem, 2vw, 0.86rem);
  font-weight: 700;
  gap: 10px;
  flex-wrap: wrap;
}

.clear-filter-btn {
  background: transparent;
  border: none;
  color: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  white-space: nowrap;
}

/* ==========================================================================
   OFFICIAL CIRCULAR NOTICES CONTAINER & CARDS
   ========================================================================== */
.notices-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.notice-item-card {
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: clamp(14px, 3.2vw, 24px);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  width: 100%;
}

.notice-item-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-primary);
}

/* Priority Left Accent Borders */
.notice-item-card.is-urgent {
  border-left: 5px solid var(--priority-urgent);
}

.notice-item-card.is-high {
  border-left: 5px solid var(--priority-high);
}

/* Card Top Metadata Header */
.card-header-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.card-badges-cluster {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.ref-no-badge {
  font-family: var(--font-mono);
  font-size: clamp(0.66rem, 1.8vw, 0.72rem);
  font-weight: 700;
  color: #000000;
  background-color: var(--bg-subtle);
  border: 1.5px solid var(--border-color);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.dept-badge {
  font-size: clamp(0.66rem, 1.8vw, 0.72rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.dept-examination-cell { background-color: var(--dept-exam-bg); color: var(--dept-exam); border: 1px solid rgba(190, 18, 60, 0.2); }
.dept-academic-affairs  { background-color: var(--dept-acad-bg); color: var(--dept-acad); border: 1px solid rgba(194, 65, 12, 0.2); }
.dept-training--placement { background-color: var(--dept-place-bg); color: var(--dept-place); border: 1px solid rgba(4, 120, 87, 0.2); }
.dept-deans-office     { background-color: var(--dept-admin-bg); color: var(--dept-admin); border: 1px solid rgba(109, 40, 217, 0.2); }
.dept-student-welfare  { background-color: var(--dept-event-bg); color: var(--dept-event); border: 1px solid rgba(190, 24, 93, 0.2); }
.dept-sports-directorate { background-color: var(--dept-sports-bg); color: var(--dept-sports); border: 1px solid rgba(180, 83, 9, 0.2); }

.priority-tag {
  font-size: clamp(0.64rem, 1.7vw, 0.7rem);
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  white-space: nowrap;
}

.priority-urgent {
  background-color: var(--priority-urgent-bg);
  color: var(--priority-urgent);
  border: 1px solid rgba(190, 18, 60, 0.3);
  animation: pulseUrgent 2s infinite;
}

.priority-high {
  background-color: var(--priority-high-bg);
  color: var(--priority-high);
  border: 1px solid rgba(194, 65, 12, 0.3);
}

.priority-routine {
  background-color: var(--priority-routine-bg);
  color: var(--priority-routine);
  border: 1px solid rgba(190, 24, 93, 0.3);
}

@keyframes pulseUrgent {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

.card-meta-date {
  font-size: clamp(0.68rem, 1.8vw, 0.76rem);
  color: #334155;
  font-weight: 600;
  font-family: var(--font-mono);
  white-space: nowrap;
}

/* Card Body Content */
.card-subject-title {
  font-size: clamp(1.05rem, 3.2vw, 1.25rem);
  font-weight: 800;
  color: #000000;
  line-height: 1.35;
  margin-bottom: 10px;
  text-wrap: balance;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.card-circular-body {
  font-size: clamp(0.85rem, 2.2vw, 0.94rem);
  color: #111827;
  font-weight: 450;
  line-height: 1.65;
  margin-bottom: 16px;
  white-space: pre-line;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-wrap: pretty;
}

/* Audience Pill & Document Attachment */
.card-secondary-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  min-width: 0;
}

.audience-pill {
  font-size: clamp(0.68rem, 1.8vw, 0.74rem);
  color: #334155;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.attachment-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--bg-subtle);
  border: 1.5px dashed var(--brand-accent);
  border-radius: var(--radius-sm);
  padding: 3px 10px;
  font-size: clamp(0.7rem, 1.9vw, 0.76rem);
  color: var(--brand-accent);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-pill-btn:hover {
  background-color: #ffe4e6;
  border-color: var(--brand-primary);
}

/* Signatory Line */
.card-signatory-line {
  font-size: clamp(0.72rem, 1.9vw, 0.76rem);
  color: #1e293b;
  font-weight: 600;
  border-top: 1px dashed var(--border-color);
  padding-top: 10px;
  margin-bottom: 12px;
  line-height: 1.4;
}

/* Card Official Management Action Bar */
.card-management-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.toolbar-left-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.action-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background-color: #ffffff;
  border: 1.5px solid var(--border-color);
  color: #1e293b;
  padding: 5px 12px;
  border-radius: var(--radius-md);
  font-size: clamp(0.74rem, 2vw, 0.82rem);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.action-tool-btn:hover {
  background-color: var(--bg-subtle);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.action-tool-btn.active-ack {
  background-color: rgba(16, 185, 129, 0.15);
  border-color: var(--dept-place);
  color: var(--dept-place);
}

.action-tool-btn.active-bookmark {
  background-color: rgba(245, 158, 11, 0.15);
  border-color: var(--dept-sports);
  color: var(--dept-sports);
}

.toolbar-right-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-action-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: var(--transition);
}

.icon-action-btn:hover {
  color: var(--text-main);
}

.icon-action-btn.delete-icon:hover {
  color: var(--priority-urgent);
}

/* Empty State Card */
.empty-state-card {
  background-color: var(--bg-card);
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-lg);
  padding: clamp(36px, 8vw, 64px) clamp(16px, 4vw, 24px);
  text-align: center;
  box-shadow: var(--shadow-sm);
  width: 100%;
}

.empty-crest {
  font-size: clamp(2.2rem, 6vw, 3rem);
  margin-bottom: 14px;
}

.empty-title {
  font-size: clamp(1.15rem, 3.5vw, 1.35rem);
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
  text-wrap: balance;
}

.empty-text {
  font-size: clamp(0.84rem, 2.2vw, 0.92rem);
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 24px auto;
  line-height: 1.6;
  text-wrap: pretty;
}

/* ==========================================================================
   OFFICER PROFILE MODAL & SYSTEM GOVERNANCE PANELS
   ========================================================================== */
.modal-dialog.modal-profile {
  max-width: min(100%, 620px);
}

.profile-modal-body {
  padding: clamp(14px, 3.5vw, 24px);
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2.5vw, 18px);
}

.profile-hero-card {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 18px);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: clamp(12px, 3vw, 18px) clamp(14px, 3vw, 20px);
  box-shadow: var(--shadow-sm);
}

.profile-large-avatar {
  width: clamp(48px, 10vw, 64px);
  height: clamp(48px, 10vw, 64px);
  min-width: 48px;
  min-height: 48px;
  max-width: 64px;
  max-height: 64px;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #ffffff;
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  flex-shrink: 0;
  overflow: hidden;
}

.profile-hero-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.profile-hero-name {
  font-size: clamp(1.08rem, 3.6vw, 1.25rem);
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.profile-hero-role {
  font-size: clamp(0.74rem, 2.2vw, 0.82rem);
  color: var(--text-muted);
}

.profile-badge-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.sidebar-panel {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: clamp(12px, 3vw, 18px) clamp(14px, 3vw, 20px);
  box-shadow: var(--shadow-sm);
}

.sidebar-panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.panel-icon {
  font-size: 1.15rem;
}

.sidebar-panel-title {
  font-size: clamp(0.78rem, 2vw, 0.88rem);
  font-weight: 800;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.system-meta-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: clamp(0.75rem, 2vw, 0.82rem);
}

.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.meta-name {
  color: var(--text-muted);
  font-weight: 500;
}

.meta-value {
  font-weight: 700;
  color: var(--text-main);
}

.meta-badge {
  font-size: clamp(0.66rem, 1.8vw, 0.72rem);
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
}

.green-badge { background-color: rgba(16, 185, 129, 0.15); color: #10b981; }
.blue-badge  { background-color: rgba(59, 130, 246, 0.15); color: #3b82f6; }

.protocol-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: clamp(0.75rem, 2vw, 0.82rem);
  color: var(--text-muted);
  line-height: 1.45;
}

.protocol-checklist li {
  display: flex;
  gap: 10px;
}

.chk-icon {
  font-size: 0.95rem;
  flex-shrink: 0;
}

.sidebar-info-text {
  font-size: clamp(0.75rem, 2vw, 0.82rem);
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.mono-code {
  font-family: var(--font-mono);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: clamp(0.72rem, 1.8vw, 0.78rem);
  color: var(--brand-accent);
}

.code-badge-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.code-tag {
  font-size: clamp(0.64rem, 1.6vw, 0.7rem);
  font-weight: 700;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-dim);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
}

.profile-modal-footer-credits {
  font-size: clamp(0.72rem, 1.8vw, 0.78rem);
  color: var(--text-dim);
  text-align: center;
  line-height: 1.5;
  padding: 10px 0 2px 0;
  border-top: 1px dashed var(--border-color);
}

.system-page-footer {
  text-align: center;
  font-size: clamp(0.72rem, 1.8vw, 0.78rem);
  color: var(--text-dim);
  padding: 24px 0 16px 0;
  line-height: 1.6;
}

/* ==========================================================================
   MODALS (Issue Circular, Letterhead Print, Query Desk)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(8px, 2vw, 20px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background-color: var(--bg-card);
  color: var(--text-main);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: min(100%, 650px);
  max-height: min(92vh, calc(100dvh - 24px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin: auto;
  position: relative;
}

.modal-dialog.modal-md {
  max-width: min(100%, 540px);
}

.modal-dialog.modal-letterhead {
  max-width: min(100%, 780px);
}

.modal-header {
  padding: clamp(12px, 2.5vw, 18px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
  background-color: var(--bg-card);
  z-index: 10;
}

.modal-dept-badge {
  display: inline-block;
  font-size: clamp(0.64rem, 1.6vw, 0.68rem);
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--brand-accent);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
}

.modal-title {
  font-size: clamp(1.08rem, 3.5vw, 1.28rem);
  font-weight: 800;
  color: #000000;
  text-wrap: balance;
}

.modal-subtitle {
  font-size: clamp(0.74rem, 2vw, 0.8rem);
  color: var(--text-muted);
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.6rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
}

.modal-close-btn:hover {
  color: #000000;
}

.modal-form, .modal-body {
  padding: clamp(14px, 3.5vw, 22px);
}

.form-group {
  margin-bottom: 14px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group label {
  display: block;
  font-size: clamp(0.76rem, 2vw, 0.82rem);
  font-weight: 800;
  color: #000000;
  margin-bottom: 5px;
}

.form-group label .req {
  color: var(--priority-urgent);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 9px 12px;
  background-color: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  color: #000000;
  outline: none;
  font-size: max(16px, 0.88rem);
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.modal-footer {
  padding: clamp(12px, 2.5vw, 16px);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background-color: var(--bg-card);
  flex-shrink: 0;
  z-index: 10;
}

/* ==========================================================================
   OFFICIAL LETTERHEAD DOCUMENT VIEW (Printable Circular Format)
   ========================================================================== */
.letterhead-document {
  padding: clamp(16px, 4vw, 36px);
  background-color: #ffffff;
  color: #0f172a;
  border-bottom: 1px solid #e2e8f0;
  font-family: 'Plus Jakarta Sans', serif;
  width: 100%;
  box-sizing: border-box;
}

.lh-college-banner {
  text-align: center;
  border-bottom: 2px solid #0f172a;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.lh-crest {
  font-size: clamp(1.8rem, 5vw, 2.2rem);
  margin-bottom: 4px;
}

.lh-college-name {
  font-size: clamp(0.95rem, 3.4vw, 1.35rem);
  font-weight: 800;
  letter-spacing: -0.3px;
  text-transform: uppercase;
  color: #0f172a;
  line-height: 1.3;
  text-wrap: balance;
}

.lh-college-subhead {
  font-size: clamp(0.66rem, 2vw, 0.78rem);
  color: #475569;
  font-weight: 600;
  line-height: 1.4;
}

.lh-ref-date-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: clamp(0.72rem, 2vw, 0.82rem);
  color: #334155;
  margin-bottom: 16px;
  border-bottom: 1px dashed #cbd5e1;
  padding-bottom: 8px;
  flex-wrap: wrap;
  gap: 6px;
}

.lh-circular-heading {
  text-align: center;
  margin-bottom: 14px;
}

.lh-doc-badge {
  display: inline-block;
  background-color: #0f172a;
  color: #ffffff;
  font-size: clamp(0.68rem, 2vw, 0.82rem);
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 3px 12px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.lh-subject-title {
  font-size: clamp(0.95rem, 3vw, 1.15rem);
  font-weight: 800;
  margin: 10px 0 14px 0;
  text-decoration: underline;
  text-underline-offset: 4px;
  line-height: 1.35;
  color: #0f172a;
  text-wrap: balance;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.lh-body-text {
  font-size: clamp(0.85rem, 2.2vw, 0.94rem);
  line-height: 1.65;
  color: #1e293b;
  margin-bottom: 20px;
  white-space: pre-line;
  word-break: break-word;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.lh-document-attachment {
  background-color: var(--bg-subtle);
  border-left: 4px solid var(--brand-primary);
  padding: 8px 12px;
  font-size: clamp(0.74rem, 2vw, 0.82rem);
  color: #1e293b;
  margin-bottom: 20px;
  word-break: break-word;
}

.lh-signatory-block {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 28px;
  padding-top: 14px;
  gap: 16px;
}

.lh-seal-box {
  width: clamp(75px, 18vw, 95px);
  height: clamp(75px, 18vw, 95px);
  border: 2px dashed #94a3b8;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.55rem, 1.6vw, 0.65rem);
  color: #64748b;
  text-align: center;
  font-weight: 700;
  transform: rotate(-10deg);
  flex-shrink: 0;
}

.lh-signature-details {
  text-align: right;
  min-width: 0;
}

.lh-sig-line {
  width: min(180px, 100%);
  border-bottom: 1px solid #0f172a;
  margin-bottom: 6px;
  margin-left: auto;
}

.lh-sig-name {
  font-size: clamp(0.82rem, 2.2vw, 0.92rem);
  font-weight: 800;
  color: #0f172a;
}

.lh-sig-role {
  font-size: clamp(0.7rem, 1.8vw, 0.78rem);
  color: #475569;
}

/* Print Styling */
@media print {
  body * {
    visibility: hidden;
  }
  #officialLetterheadModalBackdrop, 
  #officialLetterheadModalBackdrop * {
    visibility: visible;
  }
  #officialLetterheadModalBackdrop {
    position: absolute;
    left: 0;
    top: 0;
    background: transparent;
    padding: 0;
  }
  .modal-dialog.modal-letterhead {
    max-width: 100%;
    box-shadow: none;
    border: none;
  }
  .modal-header, .modal-footer {
    display: none !important;
  }
}

/* ==========================================================================
   QUERY & CLARIFICATIONS DESK
   ========================================================================== */
.composer-label {
  display: block;
  font-size: var(--font-xs);
  font-weight: 800;
  color: #000000;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.comment-composer textarea {
  width: 100%;
  background-color: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  outline: none;
  resize: vertical;
  min-height: 72px;
  font-family: inherit;
  font-size: var(--font-sm);
  color: #000000;
  line-height: 1.5;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.comment-composer textarea:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.comment-composer-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
  margin-top: 14px;
  padding-right: 4px;
}

.comment-item {
  background-color: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  word-break: break-word;
  overflow-wrap: break-word;
}

.comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.comment-author {
  font-size: var(--font-xs);
  font-weight: 800;
  color: #000000;
}

.comment-time {
  font-size: var(--font-2xs);
  color: #334155;
  font-family: var(--font-mono);
  font-weight: 600;
}

.comment-text {
  font-size: var(--font-xs);
  color: #111827;
  font-weight: 500;
  line-height: 1.45;
  margin: 0;
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: calc(100vw - 32px);
}

.toast {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: var(--font-sm);
  font-weight: 600;
  animation: slideToast 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  word-break: break-word;
  overflow-wrap: break-word;
}

.toast-success { border-left: 4px solid var(--dept-place); }
.toast-info    { border-left: 4px solid var(--brand-primary); }
.toast-error   { border-left: 4px solid var(--priority-urgent); }

@keyframes slideToast {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   MULTI-DEVICE RESPONSIVE BREAKPOINTS (Fluid Multi-Screen Optimization)
   ========================================================================== */

/* ==========================================================================
   MULTI-DEVICE RESPONSIVE BREAKPOINTS (Universal Cross-Device Optimization)
   Supports: 320px Fold/SE, 360px-430px Smartphones, 768px-834px Tablets,
   1024px-1366px Laptops, 1440px+ Desktops, and Mobile Landscape Mode
   ========================================================================== */

/* 1. Large Tablets & Small Laptops (<= 1024px) */
@media (max-width: 1024px) {
  .feed-container {
    padding: 0 16px 40px;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .nav-search-wrap {
    flex: 1 1 220px;
    max-width: 300px;
  }
}

/* 2. Tablets, iPads & Phablets (<= 820px) */
@media (max-width: 820px) {
  .nav-container {
    flex-wrap: wrap;
    padding: 10px 14px;
    gap: 10px;
  }

  .nav-brand {
    order: 1;
  }

  .nav-actions {
    order: 2;
    margin-left: auto;
  }

  /* Dedicated full-width row for Search bar on tablets and mobile */
  .nav-search-wrap {
    order: 3;
    flex: 1 1 100%;
    max-width: 100%;
    margin: 4px 0 0;
  }

  .sub-controls-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: stretch;
  }

  .sub-filter-group {
    width: 100%;
  }

  .control-select {
    width: 100%;
  }

  .filter-actions-group {
    grid-column: 1 / -1;
    width: 100%;
  }

  .filter-actions-group .btn {
    width: 100%;
    justify-content: center;
  }

  /* Notice Card Management Toolbar on Tablets */
  .card-management-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .toolbar-left-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
    gap: 6px;
    width: 100%;
  }

  .toolbar-left-actions .action-tool-btn {
    width: 100%;
    justify-content: center;
    padding: 8px 10px;
    font-size: var(--font-xs);
  }

  .toolbar-right-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    width: 100%;
    padding-top: 6px;
    border-top: 1px dashed var(--border-color);
  }

  .modal-dialog {
    width: min(96vw, 600px);
    margin: 12px auto;
  }

  .modal-dialog.modal-letterhead {
    width: min(96vw, 720px);
  }
}

/* 3. Standard Smartphones (<= 680px) */
@media (max-width: 680px) {
  /* Hide the text in officer card to preserve space for buttons */
  .officer-card .officer-info {
    display: none !important;
  }

  .officer-card {
    padding: 3px !important;
    border-radius: 50% !important;
  }

  .officer-avatar {
    width: 32px;
    height: 32px;
    font-size: 0.74rem;
  }

  .brand-tagline {
    display: none; /* Hide institutional tagline on phones to preserve clean bar */
  }

  .brand-title {
    font-size: 1.15rem;
  }

  .brand-crest {
    width: 34px;
    height: 34px;
    font-size: 17px;
  }

  .nav-actions {
    gap: 6px;
  }

  .nav-actions .btn {
    padding: 6px 10px;
    font-size: var(--font-xs);
  }

  .btn-text-full {
    display: none;
  }

  .btn-text-short {
    display: inline;
  }

  .tag-full {
    display: none;
  }

  .tag-short {
    display: inline-block;
  }

  /* Prevent iOS Safari 16px auto-zoom */
  input[type="text"],
  input[type="search"],
  input[type="date"],
  input[type="email"],
  input[type="password"],
  input[type="url"],
  select,
  textarea {
    font-size: 16px !important;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 16px;
  }

  .metric-card {
    padding: 10px 12px;
    gap: 10px;
  }

  .metric-icon {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .metric-value {
    font-size: 1.35rem;
  }

  .metric-label {
    font-size: 0.68rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Workspace switcher on phones */
  .view-mode-buttons-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .view-mode-tab {
    padding: 10px 14px;
  }

  /* Notice items */
  .notice-item-card {
    padding: 14px 12px;
  }

  .card-header-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .card-badges-cluster {
    width: 100%;
    gap: 4px;
  }

  .card-meta-date {
    font-size: 0.72rem;
  }

  .card-subject-title {
    font-size: 1.05rem;
  }

  .card-secondary-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .attachment-pill-btn {
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Action buttons on phones: 2-column touch grid */
  .toolbar-left-actions {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .toolbar-left-actions .action-tool-btn {
    padding: 8px 6px;
    font-size: 0.74rem;
    min-height: 40px;
  }

  .toolbar-right-actions {
    display: flex;
    justify-content: space-between;
    width: 100%;
  }

  .toolbar-right-actions .icon-action-btn {
    padding: 8px 12px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: var(--radius-sm);
    background-color: var(--bg-subtle);
  }

  /* Modal responsiveness on phones */
  .modal-dialog {
    width: 96vw;
    margin: 8px auto;
    border-radius: var(--radius-md);
    max-height: calc(100dvh - 16px);
  }

  .modal-header {
    padding: 12px 14px;
  }

  .modal-title {
    font-size: 1.05rem;
  }

  .modal-body, .modal-form {
    padding: 14px 12px;
  }

  .modal-footer {
    flex-direction: column-reverse;
    gap: 8px;
    padding: 12px 14px;
  }

  .modal-footer .btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }

  /* Letterhead sheet on mobile */
  .letterhead-document {
    padding: 16px 12px;
  }

  .lh-college-name {
    font-size: 1rem;
  }

  .lh-signatory-block {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 16px;
  }

  .lh-signature-details {
    text-align: left;
    width: 100%;
  }

  .lh-sig-line {
    margin-left: 0;
  }

  /* Community Lounge on Mobile */
  .lounge-composer-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .emoji-shortcuts-bar {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .quick-reactions-strip {
    display: flex;
    flex-shrink: 0;
    gap: 4px;
  }

  .lounge-action-buttons {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 8px;
    width: 100%;
  }

  .lounge-action-buttons .btn {
    width: 100%;
    justify-content: center;
    min-height: 42px;
  }

  /* Theme Studio on Mobile */
  .preset-palettes-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
  }

  .color-controls-grid {
    grid-template-columns: 1fr !important;
    gap: 8px;
  }

  .theme-studio-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .footer-left-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    width: 100%;
  }

  .footer-left-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 8px 4px;
    font-size: 0.72rem;
  }

  .footer-right-actions {
    width: 100%;
  }

  #saveThemePaletteBtn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }

  /* Admin User Card on Mobile */
  .admin-user-card {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .admin-user-details {
    min-width: 0;
    width: 100%;
  }

  .admin-user-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    width: 100%;
  }

  .admin-user-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 38px;
  }

  .toast-container {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }

  .toast {
    width: 100%;
    font-size: 0.82rem;
    padding: 10px 14px;
  }
}

/* 4. Small / Compact Phones (<= 420px, e.g. iPhone SE, Fold external screens) */
@media (max-width: 420px) {
  html {
    font-size: 14.5px;
  }

  .nav-container {
    padding: 8px 10px;
  }

  /* On ultra-narrow screens, turn Theme Studio into an icon-only button so it never crowds */
  #openThemeStudioBtn .btn-text-short {
    display: none !important;
  }

  #openThemeStudioBtn {
    padding: 6px 8px !important;
  }

  #navSignOutBtn .btn-text-short {
    font-size: 0.7rem;
  }

  .metrics-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .metric-card {
    padding: 8px 8px;
    gap: 6px;
  }

  .metric-icon {
    display: none; /* Hide icon on extra-small screens so numbers have maximum space */
  }

  .metric-value {
    font-size: 1.2rem;
  }

  .metric-label {
    font-size: 0.65rem;
    line-height: 1.25;
  }

  .dept-pills-row {
    gap: 6px;
  }

  .dept-pill-btn {
    padding: 6px 10px;
    font-size: 0.72rem;
  }

  .toolbar-left-actions {
    grid-template-columns: 1fr 1fr;
  }

  .footer-left-actions {
    grid-template-columns: 1fr 1fr;
  }

  .footer-left-actions .btn:last-child {
    grid-column: 1 / -1;
  }
}

/* 5. Mobile Landscape Mode (height <= 520px and landscape orientation) */
@media (max-height: 520px) and (orientation: landscape) {
  .modal-dialog {
    max-height: calc(100dvh - 12px);
    margin: 6px auto;
  }

  .modal-header {
    padding: 8px 14px;
  }

  .modal-title {
    font-size: 0.95rem;
  }

  .modal-subtitle {
    display: none; /* Hide subtitle in landscape to give body maximum room */
  }

  .modal-body, .modal-form {
    padding: 10px 14px;
  }

  .modal-footer {
    padding: 8px 14px;
    flex-direction: row !important;
  }

  .modal-footer .btn {
    width: auto !important;
    min-height: 36px !important;
  }

  .navbar {
    padding: 4px 0;
  }
}

/* ==========================================================================
   VIEW MODE WORKSPACE SWITCHER (Official Circulars vs Campus Community Lounge)
   Elevated Control Deck with Live Radar Beacons & Segmented Cards
   ========================================================================== */
.view-mode-tabs-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  background: var(--bg-card);
  padding: 14px 18px;
  border-radius: 20px;
  border: 1.5px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.view-mode-tabs-wrap::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #1d4ed8 0%, #2563eb 50%, #38bdf8 100%);
}

.view-mode-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.view-mode-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-primary); background: var(--bg-subtle); padding: 5px 12px; border-radius: 9999px; border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.pulse-beacon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--brand-primary); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
  animation: beaconPulse 2s infinite ease-in-out;
}

@keyframes beaconPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(37, 99, 235, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

.view-mode-quick-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #4b5563;
  font-weight: 600;
}

.view-mode-quick-hint svg {
  color: var(--brand-primary);
  flex-shrink: 0;
}

.view-mode-buttons-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (max-width: 860px) {
  .view-mode-buttons-row {
    grid-template-columns: 1fr;
  }
}

.view-mode-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  cursor: pointer;
  position: relative;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
  width: 100%;
  overflow: hidden;
}

.tab-left-group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.tab-text-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

/* Inactive Tab: Crisp white elevated card with peach border */
.view-mode-tab:not(.active) {
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.view-mode-tab:not(.active):hover {
  background: var(--bg-subtle); border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.view-mode-tab:not(.active) .tab-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--bg-subtle); color: var(--brand-primary); border: 1.5px solid var(--border-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.08);
  transition: transform 0.2s ease;
}

.view-mode-tab:not(.active):hover .tab-icon {
  transform: scale(1.08);
}

.view-mode-tab:not(.active) .tab-title {
  color: #000000;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.view-mode-tab:not(.active) .tab-subtext {
  color: #4b5563;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.view-mode-tab:not(.active) .tab-badge {
  background: #fff7ed;
  color: #c2410c;
  border: 1.5px solid var(--border-color);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 9999px;
  margin-left: auto;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.view-mode-tab:not(.active) .tab-badge.green-badge {
  background: #ecfdf5;
  color: #047857;
  border: 1.5px solid #a7f3d0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.1);
}

/* Green Live Radar Dot on Lounge Badge */
.view-mode-tab .tab-badge.green-badge::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: radarGreenPulse 1.8s infinite;
  flex-shrink: 0;
}

@keyframes radarGreenPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Active Tab: Vibrant Sunset Pink-Orange Gradient 3D Card */
.view-mode-tab.active {
  background: var(--brand-gradient);
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 10px 24px -4px rgba(37, 99, 235, 0.38), 0 4px 10px -2px rgba(30, 64, 175, 0.25);
  transform: translateY(-2px);
}

.view-mode-tab.active .tab-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.view-mode-tab.active .tab-title {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.view-mode-tab.active .tab-subtext {
  color: rgba(255, 255, 255, 0.96);
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.view-mode-tab.active .tab-badge {
  background: #ffffff;
  color: #c2410c;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 9999px;
  margin-left: auto;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.16);
  flex-shrink: 0;
}

.view-mode-tab.active .tab-badge.green-badge {
  background: #ffffff;
  color: #047857;
  border-color: #ffffff;
}

/* ==========================================================================
   CIRCULAR CARD INTERACTIONS: LIKES & EMOJI REACTIONS
   ========================================================================== */
.card-reactions-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  background-color: var(--bg-subtle);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-top: 12px;
}

.reaction-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background-color: #ffffff;
  border: 1.5px solid var(--border-color);
  color: #1e293b;
  font-size: var(--font-xs);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.reaction-chip:hover {
  border-color: var(--brand-primary);
  transform: translateY(-1px);
  color: #000000;
  background-color: var(--bg-subtle);
}

.reaction-chip.active-reaction {
  background: var(--brand-gradient);
  border-color: transparent;
  color: #ffffff;
}

.reaction-chip .emoji-icon {
  font-size: 1rem;
}

.reaction-chip .reaction-count {
  font-family: var(--font-mono);
  font-weight: 800;
}

/* Like button active */
.action-tool-btn.active-like {
  color: #ffffff;
  border-color: transparent;
  background: var(--brand-gradient);
}

/* Delete comment button (Admin super authority) */
.comment-item {
  position: relative;
}

.comment-delete-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.82rem;
  transition: color var(--transition-fast);
}

.comment-delete-btn:hover { color: #dc2626; background-color: rgba(220, 38, 38, 0.12); }

.comment-author-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.comment-role-tag {
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 800;
}

.comment-role-admin { background-color: rgba(29, 78, 216, 0.12); color: #1d4ed8; border: 1px solid rgba(29, 78, 216, 0.28); }

.comment-role-publisher { background-color: rgba(5, 150, 105, 0.12); color: #059669; border: 1px solid rgba(5, 150, 105, 0.28); }

.comment-role-viewer { background-color: var(--bg-subtle); color: var(--text-muted); border: 1px solid var(--border-color); }

/* ==========================================================================
   CAMPUS COMMUNITY LOUNGE (GROUP CHAT & FILE SHARING)
   ========================================================================== */
.community-lounge-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lounge-header-card {
  background-color: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}

.lounge-channel-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-2xs);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #047857;
  background-color: #d1fae5;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
}

.pulse-indicator {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70%  { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.lounge-title {
  font-size: var(--font-lg);
  font-weight: 800;
  color: #000000;
  margin-bottom: 4px;
}

.lounge-subtitle {
  font-size: var(--font-xs);
  color: #1e293b;
  max-width: 680px;
  line-height: 1.45;
  margin: 0;
  font-weight: 500;
}

.lounge-stats-cluster {
  display: flex;
  gap: 12px;
}

.lounge-stat-pill {
  background-color: var(--bg-subtle);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  text-align: center;
}

.lounge-stat-pill .stat-number {
  display: block;
  font-size: var(--font-base);
  font-weight: 800;
  color: #000000;
  font-family: var(--font-mono);
}

.lounge-stat-pill .stat-lbl {
  font-size: 0.65rem;
  color: #334155;
  text-transform: uppercase;
  font-weight: 700;
}

/* Messages Stream */
.lounge-messages-feed {
  background-color: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  min-height: 380px;
  max-height: 540px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.lounge-msg-item {
  display: flex !important;
  gap: 14px !important;
  align-items: flex-start !important;
  animation: fadeIn 0.2s ease;
  min-width: 0 !important;
  width: 100% !important;
}

.lounge-msg-avatar {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
  border-radius: var(--radius-full) !important;
  background: var(--brand-gradient);
  color: #ffffff;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0 !important;
  overflow: hidden !important;
  box-shadow: var(--shadow-sm);
}

.lounge-msg-avatar img,
.avatar-msg-img {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  display: block !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
}

.lounge-msg-content {
  flex: 1 1 0% !important;
  min-width: 0 !important;
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  word-break: break-word;
  overflow-wrap: break-word;
  box-sizing: border-box !important;
}

.lounge-msg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.lounge-author-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.lounge-msg-author {
  font-size: var(--font-sm);
  font-weight: 800;
  color: var(--text-main);
}

.lounge-msg-username {
  font-size: var(--font-2xs);
  color: var(--text-dim);
  font-weight: 600;
}

.lounge-msg-time {
  font-size: var(--font-2xs);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-weight: 600;
}

.lounge-msg-body {
  font-size: var(--font-sm);
  color: var(--text-main);
  font-weight: 500;
  line-height: 1.55;
  margin-bottom: 6px;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* File Attachment Card in Message */
.lounge-file-attachment {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background-color: var(--bg-subtle);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-top: 8px;
  max-width: 480px;
}

.file-meta-box {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.file-type-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.file-name-size {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.file-download-name {
  font-size: var(--font-xs);
  font-weight: 700;
  color: #000000;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.file-download-size {
  font-size: 0.7rem;
  color: #334155;
  font-family: var(--font-mono);
  font-weight: 600;
}

.file-download-btn {
  background: var(--brand-gradient);
  color: #ffffff;
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: var(--font-xs);
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.file-download-btn:hover {
  opacity: 0.9;
}

/* Lounge Composer */
.lounge-composer-card {
  background-color: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
}

.file-attachment-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-subtle);
  border: 1.5px dashed var(--brand-primary);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  margin-bottom: 10px;
}

.file-preview-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.file-preview-icon {
  font-size: 1.3rem;
}

.file-preview-meta {
  display: flex;
  flex-direction: column;
}

.file-preview-name {
  font-size: var(--font-xs);
  font-weight: 700;
  color: #000000;
}

.file-preview-size {
  font-size: 0.7rem;
  color: #334155;
}

.file-remove-btn {
  background: transparent;
  border: none;
  color: #be123c;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 4px;
}

.lounge-textarea {
  width: 100%;
  background-color: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: #000000;
  font-family: inherit;
  font-size: var(--font-sm);
  resize: vertical;
  min-height: 56px;
  outline: none;
  transition: border-color var(--transition-fast);
}

.lounge-textarea:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.lounge-composer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.emoji-shortcuts-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.emoji-bar-label {
  font-size: var(--font-2xs);
  color: #334155;
  font-weight: 800;
  text-transform: uppercase;
}

.quick-emoji-btn {
  background-color: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 4px 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.quick-emoji-btn:hover {
  transform: scale(1.18);
  background-color: var(--bg-subtle);
  border-color: var(--brand-primary);
}

.lounge-action-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   PROFILE BIO & ADMIN PERMISSIONS DESK
   ========================================================================== */
.profile-bio-box {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-top: 12px;
}

.bio-header-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.bio-label {
  font-size: var(--font-2xs);
  font-weight: 800;
  color: var(--text-dim);
  text-transform: uppercase;
}

.btn-text-action {
  background: transparent;
  border: none;
  color: var(--brand-accent);
  font-size: var(--font-2xs);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}

.bio-text {
  font-size: var(--font-xs);
  color: var(--text-main);
  line-height: 1.45;
  margin: 0;
  font-style: italic;
}

.bio-edit-form {
  margin-top: 8px;
}

.bio-edit-form textarea {
  width: 100%;
  background-color: var(--bg-card);
  border: 1px solid var(--brand-primary);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  color: var(--text-main);
  font-family: inherit;
  font-size: var(--font-xs);
  outline: none;
  resize: none;
}

.bio-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 6px;
}

/* Admin User Accounts List */
.admin-users-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
  max-height: 280px;
  overflow-y: auto;
}

.admin-user-card {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-user-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-user-avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  max-width: 36px;
  max-height: 36px;
  border-radius: var(--radius-full);
  background: var(--brand-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8rem;
  overflow: hidden;
  flex-shrink: 0;
}

.admin-user-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.admin-user-details {
  display: flex;
  flex-direction: column;
}

.admin-user-name {
  font-size: var(--font-xs);
  font-weight: 700;
  color: var(--text-main);
}

.admin-user-meta {
  font-size: var(--font-2xs);
  color: var(--text-dim);
}

.admin-user-bio {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-style: italic;
  max-width: 320px;
}

.admin-user-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Firebase Config Card */
.firebase-config-card {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-top: 10px;
}

.firebase-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-xs);
  color: var(--text-main);
  margin-bottom: 8px;
}

.firebase-summary-btn {
  font-size: var(--font-xs);
  font-weight: 700;
  color: var(--brand-accent);
  cursor: pointer;
  padding: 4px 0;
}

.firebase-form-body {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.firebase-form-body .form-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.firebase-form-body .form-group input {
  padding: 6px 10px;
  font-size: var(--font-xs);
}

.firebase-btn-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

/* ==========================================================================
   AUTH MODAL & MULTI-ACCOUNT SWITCHER
   ========================================================================== */
.auth-tabs-row {
  display: flex;
  background-color: var(--bg-subtle);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  gap: 4px;
}

.auth-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: var(--font-xs);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.auth-tab-btn.active {
  background-color: var(--bg-card);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.admin-quick-login-card {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.12), rgba(59, 130, 246, 0.08));
  border: 1px solid rgba(234, 179, 8, 0.35);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.admin-quick-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-crown {
  font-size: 1.4rem;
}

.admin-quick-info strong {
  display: block;
  font-size: var(--font-xs);
  color: #facc15;
}

.admin-quick-info p {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin: 0;
  font-family: var(--font-mono);
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 14px 0;
  color: var(--text-dim);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.auth-divider span {
  padding: 0 10px;
}

.auth-helper-banner {
  background-color: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  gap: 10px;
  font-size: var(--font-xs);
  color: var(--text-muted);
  margin-bottom: 16px;
}

.auth-helper-banner .helper-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.auth-helper-banner strong {
  color: var(--text-main);
  display: block;
  margin-bottom: 2px;
}

.field-hint {
  display: block;
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 4px;
}

/* Saved Accounts on Device list */
.saved-accounts-lead {
  font-size: var(--font-xs);
  color: var(--text-muted);
  margin-bottom: 12px;
}

.saved-accounts-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
}

.saved-account-item {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.saved-account-item.is-current {
  border-color: var(--brand-primary);
  background-color: rgba(59, 130, 246, 0.08);
}

.saved-acc-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.saved-acc-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: var(--brand-gradient);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.82rem;
}

.saved-acc-info {
  display: flex;
  flex-direction: column;
}

.saved-acc-name {
  font-size: var(--font-sm);
  font-weight: 700;
  color: var(--text-main);
}

.saved-acc-role {
  font-size: var(--font-2xs);
  color: var(--text-dim);
}

.saved-acc-bio {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 2px;
}

/* ==========================================================================
   DEDICATED CAMPUS AUTHENTICATION GATEWAY
   Enterprise Desktop/Mobile Login & Registration Experience
   ========================================================================== */
.insta-auth-gateway {
  width: 100%;
  min-height: 100vh;
  background-color: var(--bg-body);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 16px 32px;
  animation: fadeIn 0.25s ease;
}

/* Top Bar inside Gateway */
.insta-gateway-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 935px;
  margin: 0 auto 16px;
  width: 100%;
  padding: 8px 12px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
  gap: 10px;
}

.insta-campus-badge {
  font-size: var(--font-2xs);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--brand-accent);
}

.insta-sub-tag {
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-left: 8px;
  font-family: var(--font-mono);
}

/* Auth Center Container */
.insta-auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  max-width: 935px;
  margin: 20px auto 40px;
  width: 100%;
}

/* Phone Mockup on Left */
.insta-phone-container {
  width: 360px;
  height: 590px;
  flex-shrink: 0;
  display: block;
}

.insta-phone-mockup {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000000;
  border: 12px solid #262626;
  border-radius: 44px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), inset 0 0 10px rgba(255, 255, 255, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.insta-phone-speaker {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 4px;
  background-color: #333333;
  border-radius: 4px;
  z-index: 10;
}

.insta-phone-camera {
  position: absolute;
  top: 12px;
  left: calc(50% + 35px);
  width: 8px;
  height: 8px;
  background-color: #1a1a1a;
  border-radius: 50%;
  border: 1px solid #333;
  z-index: 10;
}

.insta-phone-screen {
  flex: 1;
  background-color: #0b0f19;
  padding: 30px 14px 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.insta-screen-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.65rem;
  color: #94a3b8;
  margin-bottom: 12px;
  padding: 0 4px;
}

.screen-time {
  font-weight: 700;
}

.screen-icons {
  display: flex;
  gap: 4px;
  font-size: 0.6rem;
}

.insta-screen-app-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #1e293b;
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.screen-app-title {
  font-family: 'Grand Hotel', cursive, sans-serif;
  font-size: 1.5rem;
  color: #ffffff;
}

.screen-app-badge {
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  padding: 2px 6px;
  border-radius: 10px;
}

.insta-screen-slider {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.insta-screen-slide {
  display: none;
  flex-direction: column;
  gap: 10px;
  animation: fadeIn 0.4s ease;
}

.insta-screen-slide.active {
  display: flex;
}

.screen-notice-card {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.screen-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.screen-tag {
  font-size: 0.55rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

.screen-tag.red-tag {
  background: rgba(37, 99, 235, 0.2);
  color: #f43f5e;
}

.screen-tag.blue-tag {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.screen-tag.green-tag {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.screen-ref {
  font-size: 0.55rem;
  color: #64748b;
  font-family: var(--font-mono);
}

.screen-notice-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 3px;
  line-height: 1.3;
}

.screen-notice-snippet {
  font-size: 0.62rem;
  color: #94a3b8;
  margin: 0 0 6px;
  line-height: 1.35;
}

.screen-card-footer {
  display: flex;
  gap: 12px;
  font-size: 0.58rem;
  color: #94a3b8;
  border-top: 1px solid #1f2937;
  padding-top: 4px;
}

.screen-chat-bubble {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.screen-chat-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.screen-chat-text strong {
  display: block;
  font-size: 0.62rem;
  color: #f8fafc;
}

.screen-chat-text p {
  font-size: 0.58rem;
  color: #94a3b8;
  margin: 2px 0 0;
}

.insta-screen-bottom-bar {
  display: flex;
  justify-content: space-around;
  padding-top: 8px;
  border-top: 1px solid #1e293b;
  color: #64748b;
  font-size: 0.85rem;
}

/* Auth Cards Column on Right */
.insta-auth-forms-wrapper {
  width: 400px;
  max-width: 95%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.insta-card {
  background-color: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.08);
}

.insta-main-card {
  padding: 34px 34px 20px;
  text-align: center;
}

.insta-brand-header {
  margin-bottom: 24px;
}

.insta-logo-text {
  font-family: 'Grand Hotel', cursive, sans-serif;
  font-size: 3.3rem;
  font-weight: 500;
  color: #000000;
  margin: 0;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.insta-brand-subtitle {
  font-size: 0.68rem;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 800;
  margin: 4px 0 0;
}

/* Floating Input Group */
.insta-form {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.insta-field-group {
  position: relative;
  margin-bottom: 7px;
  width: 100%;
}

.insta-input {
  width: 100%;
  height: 40px;
  background-color: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: 6px;
  padding: 14px 10px 4px 10px;
  font-size: 13px;
  color: #000000;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.insta-input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.insta-floating-label {
  position: absolute;
  left: 10px;
  top: 13px;
  font-size: 11px;
  color: var(--text-dim);
  pointer-events: none;
  transition: all 0.12s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 60px);
}

.insta-input:focus ~ .insta-floating-label,
.insta-input:not(:placeholder-shown) ~ .insta-floating-label {
  top: 3px;
  font-size: 9px;
  color: var(--text-dim);
}

.insta-textarea {
  height: 52px;
  resize: none;
  padding-top: 16px;
}

/* Password Group with Show/Hide button */
.insta-password-group {
  position: relative;
}

.insta-pass-toggle-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 4px;
}

.insta-pass-toggle-btn:hover {
  opacity: 0.75;
}

/* Primary Action Button (Sunset Pink-Orange Gradient) */
.insta-btn-primary {
  width: 100%;
  height: 38px;
  background: var(--brand-gradient);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-weight: 800;
  font-size: 13.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.insta-btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.insta-btn-primary:active {
  opacity: 0.85;
}

/* Divider with OR */
.insta-divider {
  display: flex;
  align-items: center;
  margin: 18px 0;
}

.insta-divider .divider-line {
  flex: 1;
  height: 1px;
  background-color: var(--border-color);
}

.insta-divider .divider-text {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
  padding: 0 16px;
  letter-spacing: 0.05em;
}

/* Admin Login as Facebook button replacement */
.insta-btn-admin-fb {
  background: transparent;
  border: none;
  color: #385185;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 6px;
  transition: opacity 0.15s ease;
}

[data-theme="dark"] .insta-btn-admin-fb {
  color: #60a5fa;
}

.insta-btn-admin-fb:hover {
  opacity: 0.8;
}

.insta-crown-icon {
  font-size: 1.15rem;
}

/* Privacy Guarantee Snippet */
.insta-privacy-secure-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.65rem;
  color: #10b981;
  font-weight: 700;
  margin: 14px 0 10px;
}

.insta-help-links {
  margin-top: 10px;
  text-align: center;
}

.insta-forgot-link {
  font-size: 11.5px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s ease;
}

.insta-forgot-link:hover {
  color: var(--text-main);
  text-decoration: underline;
}

.insta-dot {
  color: var(--text-dim);
  margin: 0 4px;
  font-size: 11px;
}

/* Sign Up Mode Extras */
.insta-signup-lead {
  font-size: var(--font-xs);
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 14px;
  line-height: 1.4;
}

.insta-pass-strength-bar {
  margin-bottom: 8px;
}

.insta-pass-strength-bar .strength-track {
  width: 100%;
  height: 4px;
  background-color: var(--bg-subtle);
  border-radius: 2px;
  overflow: hidden;
}

.insta-pass-strength-bar .strength-fill {
  height: 100%;
  width: 30%;
  background-color: #f59e0b;
  transition: width 0.2s ease, background-color 0.2s ease;
}

.insta-pass-strength-bar .strength-text {
  font-size: 0.65rem;
  color: var(--text-dim);
  display: block;
  margin-top: 2px;
}

/* Privacy Agreement inside Register */
.insta-privacy-agreement-card {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.45;
  margin: 10px 0 12px;
}

.insta-terms-text {
  margin: 0 0 6px;
}

.insta-policy-trigger {
  background: transparent;
  border: none;
  color: var(--brand-accent);
  font-size: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.insta-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 8px;
  font-size: 10.5px;
  color: var(--text-muted);
}

.insta-checkbox-row input {
  margin-top: 2px;
  cursor: pointer;
}

/* Card 2: Switcher Card */
.insta-switch-card {
  padding: 20px;
  text-align: center;
  font-size: 13.5px;
  color: var(--text-main);
}

.insta-switch-card a {
  color: var(--brand-accent);
  font-weight: 800;
  text-decoration: none;
}

.insta-switch-card a:hover {
  text-decoration: underline;
  color: var(--brand-primary);
}

/* Card 3: Terms & Conditions (T&C) & Data Privacy Component */
.insta-tc-card {
  padding: 0;
  overflow: hidden;
  transition: all 0.2s ease;
  border: 1.5px solid var(--border-color);
  background-color: #ffffff;
}

.insta-tc-toggle-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #000000;
  text-align: left;
  transition: background-color 0.18s ease;
  font-family: inherit;
}

.insta-tc-toggle-btn:hover {
  background-color: var(--bg-subtle);
}

.tc-btn-content {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.tc-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.tc-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #000000;
  letter-spacing: 0.01em;
}

.tc-btn-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.tc-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 700;
  background-color: var(--bg-subtle);
  color: var(--brand-accent);
  border: 1px solid var(--border-color);
  letter-spacing: 0.04em;
}

.tc-chevron {
  font-size: 0.65rem;
  color: var(--text-dim);
  transition: transform 0.22s ease;
}

.insta-tc-toggle-btn[aria-expanded="true"] .tc-chevron {
  transform: rotate(180deg);
  color: var(--brand-accent);
}

.insta-tc-drawer {
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.04), rgba(16, 185, 129, 0.04));
  border-top: 1px solid var(--border-color);
  animation: tcSlideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes tcSlideDown {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tc-actions-group {
  margin-top: 12px;
}

/* Card 4: Data Privacy & Institutional Trust Pillars */
.insta-privacy-pillar-card {
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(16, 185, 129, 0.05));
}

.privacy-pillar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.pillar-shield-icon {
  font-size: 1.4rem;
}

.privacy-pillar-header strong {
  display: block;
  font-size: 0.78rem;
  color: var(--text-main);
}

.privacy-pillar-header p {
  font-size: 0.68rem;
  color: var(--text-dim);
  margin: 0;
}

.privacy-pillar-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.privacy-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
}

.privacy-item .p-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.privacy-item strong {
  display: block;
  font-size: 0.72rem;
  color: var(--text-main);
}

.privacy-item span {
  font-size: 0.65rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.insta-full-policy-btn {
  width: 100%;
  background: transparent;
  border: 1px dashed var(--brand-primary);
  border-radius: var(--radius-sm);
  color: var(--brand-accent);
  padding: 8px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.insta-full-policy-btn:hover {
  background-color: rgba(59, 130, 246, 0.1);
}

/* Institutional Gateway Footer */
.insta-footer {
  max-width: 935px;
  margin: 20px auto 0;
  width: 100%;
  text-align: center;
  padding: 12px 16px;
}

.insta-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 12px;
}

.insta-footer-links a {
  font-size: 11.5px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s ease;
}

.insta-footer-links a:hover {
  color: var(--text-main);
}

.insta-footer-copyright {
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* ==========================================================================
   MODAL: DATA PRIVACY & USER PROTECTION MANIFESTO
   ========================================================================== */
.privacy-modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 65vh;
  overflow-y: auto;
  padding: 20px 24px;
}

.privacy-section-block {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.privacy-section-title {
  font-size: var(--font-sm);
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
}

.privacy-section-block p {
  font-size: var(--font-xs);
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 10px;
}

.privacy-rules-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.privacy-rules-list li {
  position: relative;
  padding-left: 20px;
  font-size: var(--font-xs);
  color: var(--text-main);
  line-height: 1.45;
}

.privacy-rules-list li::before {
  content: '•';
  position: absolute;
  left: 4px;
  color: var(--primary);
  font-size: 1rem;
  line-height: 1.1;
}

.privacy-certification-badge {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(59, 130, 246, 0.15));
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #10b981;
  letter-spacing: 0.05em;
}

/* Responsive queries for Authentication Gateway */
@media (max-width: 860px) {
  .insta-phone-container {
    display: none; /* Hide phone mockup on smaller screens */
  }

  .insta-auth-container {
    margin: 10px auto 20px;
  }
}

@media (max-width: 440px) {
  .insta-auth-gateway {
    padding: 8px 8px 24px;
  }

  .insta-card {
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .insta-main-card {
    padding: 24px 20px 18px;
  }
}

/* ==========================================================================
   AUTHENTICATION GATE & ZERO-ACCESS RESTRICTION SHIELD
   ========================================================================== */
.auth-gate-shield-card {
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 16px auto;
  max-width: 620px;
  animation: fadeIn 0.3s ease;
}

.gate-shield-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffe4e6, #ffedd5);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  margin-bottom: 20px;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.2);
  animation: pulse 2.5s infinite;
}

.gate-shield-title {
  font-size: var(--font-lg);
  font-weight: 800;
  color: #000000;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.gate-shield-desc {
  font-size: var(--font-sm);
  color: #111827;
  font-weight: 500;
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto 24px;
}

.gate-action-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 20px;
}

.gate-privacy-badge {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}

/* ==========================================================================
   FIREBASE AUTHENTICATION BUTTONS & PHONE DRAWER
   ========================================================================== */
.insta-btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 9px 16px;
  margin-top: 8px;
  background: #ffffff;
  color: #1f2937;
  border: 1px solid #d1d5db;
  border-radius: var(--radius-sm, 6px);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.insta-btn-google:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.google-icon-svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.insta-btn-phone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 9px 16px;
  margin-top: 8px;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-sm, 6px);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.insta-btn-phone:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #059669;
  transform: translateY(-1px);
}

.phone-auth-icon {
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
}

.firebase-phone-drawer {
  background: var(--bg-subtle, #0f172a);
  border: 1px solid var(--border-color, #27354f);
  border-radius: var(--radius-sm, 6px);
  padding: 12px;
  margin-top: 10px;
  margin-bottom: 8px;
  animation: fadeIn 0.25s ease;
}

/* ============================================================================
   ENTERPRISE VECTOR ICONOGRAPHY & BRAND STYLING
   ============================================================================ */
.cnms-svg-icon {
  display: inline-block;
  vertical-align: -0.15em;
  stroke-width: 2;
  transition: transform 0.15s ease, stroke 0.15s ease, color 0.15s ease;
}

.cnms-brand-logo-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.cnms-brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  box-shadow: 0 2px 10px rgba(79, 70, 229, 0.35);
  display: block;
  flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.cnms-brand-logo-wrapper:hover .cnms-brand-mark {
  transform: scale(1.05);
}

.status-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  background-color: #94A3B8;
  vertical-align: middle;
}

.status-indicator-dot.online {
  background-color: #10B981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.7);
}

.reaction-btn-modern {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  color: #1e293b;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reaction-btn-modern:hover {
  background: var(--bg-subtle);
  border-color: var(--brand-primary);
  color: #000000;
  transform: translateY(-1px);
}

.reaction-btn-modern.active {
  background: var(--brand-gradient);
  border-color: transparent;
  color: #ffffff;
}

.locked-metric-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #94A3B8;
}

.btn-icon-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   CAMPUS COMMUNITY LOUNGE: EMOJIS & ANIMATED GIFS ENGINE
   ========================================================================== */
.lounge-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.quick-reactions-strip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.lounge-popover-panel {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 12px;
  margin-top: 10px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
  animation: fadeInDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 20;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.popover-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.popover-panel-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.popover-close-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  border-radius: var(--radius-sm);
}

.popover-close-btn:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
}

/* Emoji Grid */
.emoji-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 4px;
}

.emoji-cell-btn {
  background: var(--bg-subtle);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 1.3rem;
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.emoji-cell-btn:hover {
  transform: scale(1.22);
  background: var(--bg-card-hover);
  border-color: var(--brand-accent);
}

/* Custom GIF Toolbar & Categories */
.custom-gif-url-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.custom-gif-input {
  flex: 1;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 0.8rem;
  color: var(--text-main);
  outline: none;
}

.custom-gif-input:focus {
  border-color: var(--brand-accent);
}

.gif-cat-pills-row {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.gif-pill {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-dim);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.gif-pill:hover, .gif-pill.active {
  background: var(--brand-accent);
  color: #ffffff;
  border-color: var(--brand-accent);
}

/* GIF Picker Grid - Neat Responsive Arrangement */
.gif-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(125px, 1fr));
  gap: 10px;
  max-height: 250px;
  overflow-y: auto;
  padding: 4px;
}

.gif-preview-card,
.gif-card-thumb {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  aspect-ratio: 16 / 10;
  cursor: pointer;
  background: var(--bg-subtle);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gif-preview-card:hover,
.gif-card-thumb:hover {
  transform: translateY(-2px) scale(1.03);
  border-color: var(--brand-accent);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

.gif-preview-card img,
.gif-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gif-card-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.82) 100%);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 10px 4px 4px;
  text-align: center;
  letter-spacing: 0.2px;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Chat Message GIF Render */
.lounge-gif-attachment {
  margin-top: 8px;
  border-radius: 12px;
  overflow: hidden;
  max-width: 280px;
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.lounge-msg-gif {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  display: block;
}

/* Cryptographic End-to-End Encryption (E2EE) Badges */
.e2ee-tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.32);
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 5px;
  user-select: none;
}

.e2ee-security-pill {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #10b981;
  cursor: pointer;
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.e2ee-security-pill:hover {
  transform: translateY(-2px);
  background: rgba(16, 185, 129, 0.22);
}

/* Super Admin Exclusive Real Identity Audit Badge */
.admin-audit-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.14);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 1px 7px;
  border-radius: 12px;
  margin-left: 6px;
  user-select: none;
}

[data-theme="dark"] .admin-audit-tag {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(245, 158, 11, 0.5);
}

/* User Profile Circular Photos & Explicit Size Boundaries */
.avatar-nav-img,
.avatar-hero-img,
.admin-user-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.avatar-msg-img {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  display: block !important;
  flex-shrink: 0 !important;
}

.comment-author-avatar {
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  min-height: 26px !important;
  max-width: 26px !important;
  max-height: 26px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: var(--brand-gradient);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  vertical-align: middle;
}

.comment-author-avatar img,
.avatar-comment-img {
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  min-height: 26px !important;
  max-width: 26px !important;
  max-height: 26px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  display: block !important;
  flex-shrink: 0 !important;
}

.comment-avatar-initials {
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
}

/* ==========================================================================
   PROFILE CUSTOMIZATION DRAWER & PRESET AVATARS
   ========================================================================== */
.profile-customize-drawer {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  animation: fadeInDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.customize-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.form-control-custom {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 0.82rem;
  color: var(--text-main);
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-control-custom:focus {
  border-color: var(--brand-accent);
}

.avatar-preset-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.avatar-preset-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-size: 0.78rem;
  padding: 4px 10px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.avatar-preset-pill:hover {
  border-color: var(--brand-accent);
  transform: translateY(-1px);
}

.avatar-preset-pill.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--brand-accent);
  color: var(--brand-accent);
  font-weight: 700;
}

/* ==========================================================================
   CAMPUS REAL-TIME TRAFFIC PULSE & 1M+ TELEMETRY STYLES
   ========================================================================== */
.campus-pulse-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 10px 18px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.campus-pulse-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #10b981, #0284c7);
}

.pulse-left-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.pulse-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-main);
}

.live-pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: livePulseGlow 2s infinite;
  display: inline-block;
  flex-shrink: 0;
}

@keyframes livePulseGlow {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 7px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.pulse-status-title {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.pulse-active-count {
  font-weight: 700;
  color: #059669;
}

.pulse-milestone-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.08), rgba(16, 185, 129, 0.12));
  border: 1px solid rgba(2, 132, 199, 0.25);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
}

.pulse-milestone-pill:hover {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.15), rgba(16, 185, 129, 0.2));
  transform: translateY(-1px);
}

.pulse-milestone-pill svg {
  color: #0284c7;
}

.milestone-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.milestone-number {
  font-weight: 800;
  color: var(--brand-primary);
  font-variant-numeric: tabular-nums;
}

.milestone-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  background: #0284c7;
  color: #ffffff;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.pulse-center-ticker {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 5px 12px;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  color: var(--text-main);
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.ticker-beacon-icon {
  display: flex;
  align-items: center;
  color: #0284c7;
  flex-shrink: 0;
}

.ticker-content {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.ticker-prefix {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.ticker-body {
  font-weight: 500;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.3s ease;
}

.pulse-right-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-capacity-telemetry {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1.5px solid var(--brand-primary);
  color: var(--brand-primary);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12);
  transition: var(--transition);
  cursor: pointer;
}

.btn-capacity-telemetry:hover {
  background: var(--brand-primary);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.capacity-grade-pill {
  font-size: 0.65rem;
  font-weight: 800;
  background: #10b981;
  color: #ffffff;
  padding: 1px 6px;
  border-radius: 4px;
}

/* Modal Telemetry Styles */
.telemetry-banner-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(16, 185, 129, 0.08));
  border: 1.5px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

.telemetry-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.telemetry-stats-grid .telemetry-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: var(--transition);
}

.telemetry-stat-card:hover {
  border-color: var(--brand-primary);
  transform: translateY(-1px);
}

.telemetry-stat-card .telemetry-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

.telemetry-stat-card .telemetry-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--brand-primary);
  font-variant-numeric: tabular-nums;
}

.telemetry-stat-card .telemetry-sub {
  font-size: 0.7rem;
  color: var(--text-dim);
}

@media (max-width: 992px) {
  .campus-pulse-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .pulse-left-group {
    justify-content: space-between;
  }
  .pulse-center-ticker {
    width: 100%;
  }
  .pulse-right-actions {
    justify-content: flex-end;
  }
}

@media (max-width: 600px) {
  .telemetry-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .pulse-left-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}







/* ==========================================================================
   THEME STUDIO & LIVE COLOR CUSTOMIZER (FULL AESTHETICS & RESPONSIVENESS)
   ========================================================================== */
.modal-dialog.modal-theme-studio {
  max-width: min(100%, 780px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--bg-card);
  color: var(--text-main);
  border: 1.5px solid var(--border-color);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
}

.theme-studio-badge {
  background: var(--brand-gradient);
  color: #ffffff !important;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.theme-studio-body {
  padding: clamp(14px, 3vw, 24px);
  display: flex;
  flex-direction: column;
  gap: 22px;
  flex: 1;
  overflow-y: auto;
}

/* Live Preview Swatch Strip */
.theme-preview-banner {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.theme-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.theme-preview-tag {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-primary);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.theme-preview-status {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.theme-preview-swatches {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.preview-swatch {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: transform 0.2s ease;
}
.preview-swatch:hover {
  transform: scale(1.15);
}

.theme-preview-note {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

/* Sections */
.theme-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.theme-section-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.theme-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.theme-section-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Preset Palettes Grid */
.preset-palettes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.preset-card {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
  color: var(--text-main);
}

.preset-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-primary);
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.preset-card.active {
  border-color: var(--brand-primary);
  background-color: var(--bg-subtle);
  outline: 2px solid var(--brand-primary);
}

.preset-preview {
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 8px;
  margin-bottom: 8px;
}

.preset-mini-card {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.preset-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.preset-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
}

.preset-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Color Controls Grid */
.color-controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.color-control-card {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.color-control-card:hover, .color-control-card:focus-within {
  border-color: var(--brand-primary);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.color-control-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.color-control-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
}

.color-var-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--text-muted);
}

.color-control-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.3;
  margin: 0;
  min-height: 26px;
}

.color-control-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.color-swatch-wrapper {
  position: relative;
  width: 42px;
  height: 36px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--border-color);
  box-shadow: inset 0 0 4px rgba(0,0,0,0.1);
  cursor: pointer;
  flex-shrink: 0;
}

.color-picker-input {
  position: absolute;
  top: -8px;
  left: -8px;
  width: 60px;
  height: 60px;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

.color-hex-input {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  color: var(--text-main);
  transition: border-color 0.2s ease;
  min-width: 0;
}

.color-hex-input:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* Modal Footer Actions */
.theme-studio-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-card);
  flex-wrap: wrap;
}

.footer-left-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-right-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}


/* ==========================================================================
   INSTANT NOTIFICATION DISPATCH BUS & NOTIFICATION CENTER
   ========================================================================== */
.nav-bell-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.bell-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--priority-urgent, #ef4444);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-surface);
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
  animation: bellPulse 1.8s infinite;
}

@keyframes bellPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); box-shadow: 0 0 12px rgba(239, 68, 68, 0.7); }
  100% { transform: scale(1); }
}

.notification-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 380px;
  max-width: calc(100vw - 28px);
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.08);
  z-index: 1500;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideDropdown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDropdown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.notif-dropdown-header {
  padding: 12px 16px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notif-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-main);
}

.notif-unread-count {
  font-size: 0.7rem;
  background: var(--brand-primary);
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 99px;
  font-weight: 700;
}

.notif-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notif-action-link {
  background: none;
  border: none;
  color: var(--brand-primary);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.notif-action-link:hover {
  color: var(--brand-hover);
}

.notif-sound-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 3px 6px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notif-permission-banner {
  padding: 8px 14px;
  background: #f0fdf4;
  border-bottom: 1px solid #bbf7d0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  color: #166534;
}

.notif-items-list {
  max-height: 380px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.notif-item {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  gap: 12px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  position: relative;
  text-align: left;
}

.notif-item:hover {
  background-color: var(--bg-hover);
}

.notif-item.unread {
  background-color: var(--bg-subtle);
  border-left: 3.5px solid var(--brand-primary);
}

.notif-item.unread.urgent {
  border-left-color: var(--priority-urgent, #ef4444);
}

.notif-item-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.notif-item-content {
  flex: 1;
  min-width: 0;
}

.notif-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
  gap: 6px;
}

.notif-item-dept {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
}

.notif-item-time {
  font-size: 0.68rem;
  color: var(--text-dim);
  white-space: nowrap;
}

.notif-item-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.notif-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notif-empty-state {
  padding: 36px 20px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.notif-dropdown-footer {
  padding: 8px 14px;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-color);
  font-size: 0.7rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
}

.dispatch-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

/* Floating High-Priority Broadcast Popup Toast */
.broadcast-toast {
  position: fixed;
  top: 76px;
  right: 24px;
  z-index: 2500;
  max-width: 440px;
  width: calc(100vw - 36px);
  background: var(--bg-card);
  border: 2px solid var(--brand-primary);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25), 0 0 20px rgba(37, 99, 235, 0.3);
  padding: 14px 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  animation: slideBroadcastToast 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.broadcast-toast.urgent {
  border-color: var(--priority-urgent, #ef4444);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28), 0 0 24px rgba(239, 68, 68, 0.4);
}

@keyframes slideBroadcastToast {
  from { transform: translateY(-24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.broadcast-toast-icon {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.broadcast-toast-body {
  flex: 1;
  min-width: 0;
}

.broadcast-toast-header {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--brand-primary);
  margin-bottom: 2px;
}

.broadcast-toast.urgent .broadcast-toast-header {
  color: var(--priority-urgent, #ef4444);
}

.broadcast-toast-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 4px;
}

.broadcast-toast-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.broadcast-toast-actions {
  display: flex;
  gap: 8px;
}

.notice-card.highlight-pulse {
  animation: noticeCardPulse 2.5s ease-out;
}

@keyframes noticeCardPulse {
  0% { box-shadow: 0 0 0 4px var(--brand-primary), 0 8px 24px rgba(37, 99, 235, 0.4); transform: scale(1.01); }
  50% { box-shadow: 0 0 0 3px var(--brand-primary), 0 4px 16px rgba(37, 99, 235, 0.2); }
  100% { box-shadow: var(--shadow-sm); transform: scale(1); }
}


/* ==========================================================================
   WHATSAPP-STYLE LIVE CHAT MESSAGING ENGINE
   ========================================================================== */

/* Feed Background & Spacing */
.lounge-messages-feed {
  background: var(--bg-card);
  background-image: radial-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px);
  background-size: 16px 16px;
  scroll-behavior: smooth;
}

[data-theme="dark"] .lounge-messages-feed {
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
}

/* Base message wrapper */
.lounge-msg-item {
  display: flex !important;
  gap: 10px !important;
  width: 100% !important;
  min-width: 0 !important;
  transition: all 0.2s ease;
}

/* Outgoing message (Sent by Me - WhatsApp Right Aligned) */
.lounge-msg-item.msg-outgoing {
  justify-content: flex-end !important;
  align-items: flex-end !important;
}

.lounge-msg-item.msg-outgoing .lounge-msg-avatar {
  order: 2;
  display: none !important;
}

.lounge-msg-item.msg-outgoing .lounge-msg-content {
  background: #d9fdd3 !important;
  color: #111b21 !important;
  border-color: #bbf7d0 !important;
  border-radius: 14px 14px 2px 14px !important;
  margin-left: auto !important;
  max-width: 78% !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="dark"] .lounge-msg-item.msg-outgoing .lounge-msg-content {
  background: #005c4b !important;
  color: #e9edef !important;
  border-color: #026e5a !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25) !important;
}

.lounge-msg-item.msg-outgoing .lounge-msg-author {
  color: #0f766e !important;
}

[data-theme="dark"] .lounge-msg-item.msg-outgoing .lounge-msg-author {
  color: #5eead4 !important;
}

.lounge-msg-item.msg-outgoing .lounge-msg-body {
  color: #111b21 !important;
}

[data-theme="dark"] .lounge-msg-item.msg-outgoing .lounge-msg-body {
  color: #e9edef !important;
}

/* Incoming message (Sent by Others - WhatsApp Left Aligned) */
.lounge-msg-item.msg-incoming {
  justify-content: flex-start !important;
  align-items: flex-start !important;
}

.lounge-msg-item.msg-incoming .lounge-msg-content {
  background: #ffffff !important;
  color: #111b21 !important;
  border-color: #e2e8f0 !important;
  border-radius: 14px 14px 14px 2px !important;
  margin-right: auto !important;
  max-width: 78% !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="dark"] .lounge-msg-item.msg-incoming .lounge-msg-content {
  background: #202c33 !important;
  color: #e9edef !important;
  border-color: #2a3942 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25) !important;
}

.lounge-msg-item.msg-incoming .lounge-msg-author {
  color: #128c7e !important;
  font-weight: 800;
}

[data-theme="dark"] .lounge-msg-item.msg-incoming .lounge-msg-author {
  color: #25d366 !important;
}

.lounge-msg-item.msg-incoming .lounge-msg-body {
  color: #111b21 !important;
}

[data-theme="dark"] .lounge-msg-item.msg-incoming .lounge-msg-body {
  color: #e9edef !important;
}

/* WhatsApp Double Blue Tick */
.wa-double-tick {
  color: #53bdeb;
  font-size: 0.85rem;
  font-weight: 800;
  margin-left: 4px;
  display: inline-block;
  letter-spacing: -2px;
}

[data-theme="dark"] .wa-double-tick {
  color: #53bdeb;
}

/* Pulse badge for unread chat messages on the tab */
.pulse-badge {
  animation: pulseGreen 1.5s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Floating WhatsApp-Style Incoming Message Toast */
.lounge-incoming-toast {
  position: fixed;
  top: 76px;
  right: 20px;
  background: #ffffff;
  color: #111b21;
  border: 1px solid #cbd5e1;
  border-left: 5px solid #25d366;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.16);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  max-width: 380px;
  z-index: 10000;
  cursor: pointer;
  animation: slideToastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.3s ease;
}

[data-theme="dark"] .lounge-incoming-toast {
  background: #202c33;
  color: #e9edef;
  border-color: #334155;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.lounge-incoming-toast.hide {
  opacity: 0;
  transform: translateY(-20px);
}

.lounge-incoming-toast:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.22);
}

.lounge-toast-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #128c7e;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.lounge-toast-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lounge-toast-info {
  flex: 1;
  min-width: 0;
}

.lounge-toast-author {
  font-size: 0.82rem;
  font-weight: 800;
  color: #128c7e;
  display: flex;
  align-items: center;
  gap: 6px;
}

[data-theme="dark"] .lounge-toast-author {
  color: #25d366;
}

.lounge-toast-author .wa-badge {
  font-size: 0.65rem;
  background: #dcfce7;
  color: #15803d;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
}

[data-theme="dark"] .lounge-toast-author .wa-badge {
  background: #064e3b;
  color: #a7f3d0;
}

.lounge-toast-preview {
  font-size: 0.8rem;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

[data-theme="dark"] .lounge-toast-preview {
  color: #94a3b8;
}

.lounge-toast-action-btn {
  background: #25d366;
  color: #ffffff;
  border: none;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

.lounge-toast-action-btn:hover {
  background: #1eb956;
}


/* ==========================================================================
   UPGRADE SUITE: WHATSAPP LOUNGE TOOLBAR, TYPING INDICATOR & EMOJI REACTIONS
   ========================================================================== */

/* Lounge Toolbar Card */
.lounge-toolbar-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--radius-md, 12px);
  padding: 10px 14px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  flex-wrap: wrap;
}

[data-theme="dark"] .lounge-toolbar-card {
  background: #111827;
  border-color: #1f293d;
}

.lounge-search-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-subtle, #f8fafc);
  border: 1px solid var(--border-color, #cbd5e1);
  border-radius: 20px;
  padding: 6px 14px;
  flex: 1 1 240px;
  min-width: 180px;
}

[data-theme="dark"] .lounge-search-wrapper {
  background: #1e293b;
  border-color: #334155;
}

.lounge-search-wrapper svg {
  color: var(--text-dim, #94a3b8);
  flex-shrink: 0;
}

.lounge-search-wrapper input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.85rem;
  color: var(--text-main, #0f172a);
  width: 100%;
}

[data-theme="dark"] .lounge-search-wrapper input {
  color: #f8fafc;
}

.lounge-search-clear-btn {
  background: transparent;
  border: none;
  color: var(--text-dim, #94a3b8);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0 4px;
}

.lounge-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lounge-filter-pill {
  background: var(--bg-subtle, #f1f5f9);
  color: var(--text-muted, #475569);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

[data-theme="dark"] .lounge-filter-pill {
  background: #1e293b;
  color: #94a3b8;
  border-color: #334155;
}

.lounge-filter-pill:hover,
.lounge-filter-pill.active {
  background: var(--primary, #2563eb);
  color: #ffffff !important;
  border-color: var(--primary, #2563eb);
}

.lounge-sound-toggle-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-subtle, #f1f5f9);
  color: var(--text-main, #0f172a);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

[data-theme="dark"] .lounge-sound-toggle-pill {
  background: #1e293b;
  color: #f8fafc;
  border-color: #334155;
}

.lounge-sound-toggle-pill:hover {
  border-color: var(--primary, #2563eb);
}

.lounge-sound-toggle-pill.muted {
  opacity: 0.6;
}

/* WhatsApp-Style Typing Indicator */
.lounge-typing-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: rgba(37, 211, 102, 0.08);
  border-left: 3px solid #25d366;
  border-radius: 6px;
  margin-top: 6px;
  animation: fadeIn 0.25s ease;
}

[data-theme="dark"] .lounge-typing-bar {
  background: rgba(37, 211, 102, 0.12);
}

.typing-bubble {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #25d366;
  animation: waTypingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
.typing-dot:nth-child(3) { animation-delay: 0s; }

@keyframes waTypingBounce {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  40% {
    transform: scale(1.1);
    opacity: 1;
  }
}

.typing-author {
  font-size: 0.8rem;
  font-weight: 600;
  color: #128c7e;
}

[data-theme="dark"] .typing-author {
  color: #25d366;
}

/* WhatsApp Message Hover Actions & Reaction Bar */
.lounge-msg-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s ease;
  position: relative;
}

.lounge-msg-item:hover .lounge-msg-actions,
.lounge-msg-actions.open {
  opacity: 1;
}

.lounge-react-trigger {
  background: transparent;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  line-height: 1;
}

.lounge-react-trigger:hover {
  background: rgba(0, 0, 0, 0.06);
}

.lounge-reaction-popover {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 0;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-color, #cbd5e1);
  border-radius: 24px;
  padding: 4px 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  z-index: 50;
  white-space: nowrap;
  animation: fadeIn 0.15s ease;
}

.lounge-reaction-popover.open {
  display: flex;
  align-items: center;
  gap: 6px;
}

[data-theme="dark"] .lounge-reaction-popover {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.react-btn {
  font-size: 1.15rem;
  cursor: pointer;
  transition: transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
  padding: 2px;
}

.react-btn:hover {
  transform: scale(1.35);
}

/* Reaction Chips below message bubble */
.lounge-reactions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.lounge-reaction-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 2px 7px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s ease;
  color: var(--text-muted, #475569);
}

[data-theme="dark"] .lounge-reaction-chip {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
}

.lounge-reaction-chip:hover {
  background: rgba(37, 211, 102, 0.15);
  border-color: #25d366;
}

.lounge-reaction-chip.my-reaction {
  background: rgba(37, 211, 102, 0.18);
  border-color: #25d366;
  color: #075e54;
}

[data-theme="dark"] .lounge-reaction-chip.my-reaction {
  background: rgba(37, 211, 102, 0.25);
  border-color: #25d366;
  color: #a7f3d0;
}

/* ==========================================================================
   MOBILE BOTTOM NAVIGATION DOCK (App-like mobile experience)
   ========================================================================== */
.mobile-bottom-dock {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--bg-card, #ffffff);
  border-top: 1.5px solid var(--border-color, #e2e8f0);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
  z-index: 900;
  justify-content: space-around;
  align-items: center;
  padding: 0 8px;
}

[data-theme="dark"] .mobile-bottom-dock {
  background: #0f172a;
  border-top-color: #1e293b;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.35);
}

.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  border: none;
  color: var(--text-muted, #64748b);
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  transition: color 0.15s ease;
  min-width: 60px;
}

.dock-item:hover,
.dock-item.active {
  color: var(--primary, #2563eb);
}

.dock-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dock-label {
  font-size: 0.68rem;
  font-weight: 600;
}

.dock-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  background: var(--primary, #2563eb);
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 700;
  border-radius: 10px;
  padding: 1px 5px;
  line-height: 1.2;
}

.dock-badge.green-badge {
  background: #10b981;
}

.dock-badge.red-badge {
  background: #ef4444;
}

@media (max-width: 768px) {
  .mobile-bottom-dock {
    display: flex !important;
  }
  body {
    padding-bottom: 68px !important;
  }
  .lounge-msg-actions {
    opacity: 1 !important;
  }
}

/* ==========================================================================
   INSTITUTIONAL AUDIT TRAIL MODAL (Examiner Defense Suite)
   ========================================================================== */
.audit-grid-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.audit-metric-card {
  background: var(--bg-subtle, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}

[data-theme="dark"] .audit-metric-card {
  background: #1e293b;
  border-color: #334155;
}

.audit-metric-card .metric-icon {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 4px;
}

.audit-metric-card .metric-val {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main, #0f172a);
}

[data-theme="dark"] .audit-metric-card .metric-val {
  color: #f8fafc;
}

.audit-metric-card .metric-lbl {
  font-size: 0.72rem;
  color: var(--text-muted, #64748b);
  margin-top: 2px;
}

.audit-ledger-table-wrap {
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
}

.audit-ledger-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  text-align: left;
}

.audit-ledger-table th {
  background: var(--bg-subtle, #f1f5f9);
  padding: 8px 12px;
  font-weight: 700;
  color: var(--text-main, #0f172a);
  border-bottom: 1px solid var(--border-color, #cbd5e1);
  position: sticky;
  top: 0;
}

[data-theme="dark"] .audit-ledger-table th {
  background: #1e293b;
  color: #f8fafc;
  border-bottom-color: #334155;
}

.audit-ledger-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  color: var(--text-muted, #475569);
}

[data-theme="dark"] .audit-ledger-table td {
  border-bottom-color: #334155;
  color: #cbd5e1;
}

.audit-ledger-table tr:hover td {
  background: rgba(37, 99, 235, 0.04);
}

.audit-security-invariants-box {
  margin-top: 14px;
  padding: 12px 16px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 8px;
  font-size: 0.8rem;
}

.audit-box-header {
  font-weight: 700;
  color: #10b981;
  margin-bottom: 6px;
}

.audit-box-item {
  color: var(--text-main, #0f172a);
  line-height: 1.5;
}

[data-theme="dark"] .audit-box-item {
  color: #e2e8f0;
}

/* ==========================================================================
   UPGRADE V6: VOICE NOTES, PINNED ANNOUNCEMENTS, PEERS & SHORTCUTS
   ========================================================================== */

/* 1. Pinned Announcement Banner */
.lounge-pinned-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(217, 119, 6, 0.06) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-left: 4px solid #f59e0b;
  border-radius: var(--radius-md, 8px);
  padding: 10px 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.08);
  animation: slideDownFade 0.25s ease-out;
}

[data-theme="dark"] .lounge-pinned-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.1) 100%);
  border-color: rgba(245, 158, 11, 0.45);
}

.lounge-pinned-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.lounge-pinned-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: #f59e0b;
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}

.lounge-pinned-details {
  min-width: 0;
}

.lounge-pinned-author {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main, #0f172a);
}

[data-theme="dark"] .lounge-pinned-author {
  color: #f8fafc;
}

.lounge-pinned-snippet {
  font-size: 0.78rem;
  color: var(--text-muted, #64748b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

[data-theme="dark"] .lounge-pinned-snippet {
  color: #94a3b8;
}

.lounge-pinned-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.lounge-pinned-unpin-btn {
  background: transparent;
  border: none;
  font-size: 0.9rem;
  color: var(--text-dim, #94a3b8);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.lounge-pinned-unpin-btn:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

/* Highlight pulse when jumping to pinned message */
@keyframes highlightGlow {
  0% {
    box-shadow: 0 0 0 4px #f59e0b;
    transform: scale(1.02);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(245, 158, 11, 0.4);
    transform: scale(1.02);
  }
  100% {
    box-shadow: none;
    transform: scale(1);
  }
}

.highlight-pinned-bubble {
  animation: highlightGlow 2s ease-in-out;
}

/* 2. Active Online Peers Drawer */
.lounge-peers-drawer {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--radius-md, 8px);
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  animation: slideDownFade 0.25s ease-out;
}

[data-theme="dark"] .lounge-peers-drawer {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.peers-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

[data-theme="dark"] .peers-drawer-header {
  border-bottom-color: #334155;
}

.peers-drawer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main, #0f172a);
}

[data-theme="dark"] .peers-drawer-title {
  color: #f8fafc;
}

.active-dot-live {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.35);
  animation: pulseDot 2s infinite ease-in-out;
}

.peers-close-btn {
  background: transparent;
  border: none;
  font-size: 1.1rem;
  color: var(--text-dim, #94a3b8);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}

.peers-close-btn:hover {
  color: var(--text-main, #0f172a);
  background: var(--bg-hover, #f1f5f9);
}

.peers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.peer-chip-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: var(--bg-hover, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 6px;
  transition: all 0.15s ease;
}

[data-theme="dark"] .peer-chip-card {
  background: #0f172a;
  border-color: #334155;
}

.peer-chip-card:hover {
  border-color: var(--primary, #2563eb);
}

.peer-chip-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.peer-avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary, #2563eb);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
  position: relative;
}

.peer-avatar-circle::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 7px;
  height: 7px;
  background: #10b981;
  border: 1.5px solid #ffffff;
  border-radius: 50%;
}

.peer-name-dept {
  min-width: 0;
}

.peer-name {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-main, #0f172a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="dark"] .peer-name {
  color: #f8fafc;
}

.peer-dept {
  font-size: 0.68rem;
  color: var(--text-dim, #64748b);
  white-space: nowrap;
}

.peer-mention-btn {
  background: transparent;
  border: 1px solid var(--border-color, #cbd5e1);
  color: var(--primary, #2563eb);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.peer-mention-btn:hover {
  background: var(--primary, #2563eb);
  color: #ffffff;
  border-color: var(--primary, #2563eb);
}

/* 3. Voice Recording Card */
.lounge-voice-recording-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(239, 68, 68, 0.07);
  border: 1.5px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-md, 8px);
  margin-bottom: 10px;
  animation: slideDownFade 0.2s ease-out;
}

[data-theme="dark"] .lounge-voice-recording-card {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.5);
}

.recording-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.recording-pulse-circle {
  width: 10px;
  height: 10px;
  background-color: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.4);
  animation: recordPulse 1s infinite alternate ease-in-out;
}

@keyframes recordPulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  100% { transform: scale(1.3); opacity: 1; }
}

.recording-status-text {
  font-size: 0.8rem;
  font-weight: 700;
  color: #ef4444;
}

.recording-timer {
  font-family: var(--font-mono, monospace);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main, #0f172a);
}

[data-theme="dark"] .recording-timer {
  color: #f8fafc;
}

.recording-waveform {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 24px;
  flex: 1;
  justify-content: center;
  max-width: 180px;
}

.wave-bar {
  width: 3px;
  height: 6px;
  background: #ef4444;
  border-radius: 2px;
  animation: waveBarBounce 0.8s infinite ease-in-out alternate;
}

.wave-bar:nth-child(2) { animation-delay: 0.1s; }
.wave-bar:nth-child(3) { animation-delay: 0.2s; }
.wave-bar:nth-child(4) { animation-delay: 0.3s; }
.wave-bar:nth-child(5) { animation-delay: 0.4s; }
.wave-bar:nth-child(6) { animation-delay: 0.5s; }
.wave-bar:nth-child(7) { animation-delay: 0.2s; }
.wave-bar:nth-child(8) { animation-delay: 0.4s; }
.wave-bar:nth-child(9) { animation-delay: 0.1s; }
.wave-bar:nth-child(10) { animation-delay: 0.3s; }

@keyframes waveBarBounce {
  0% { height: 4px; }
  100% { height: 22px; }
}

.recording-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* 4. WhatsApp-Style Voice Note Audio Player */
.lounge-voice-player {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 12px;
  margin-top: 6px;
  max-width: 340px;
}

[data-theme="dark"] .lounge-voice-player {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.35);
}

.voice-play-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #10b981;
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.35);
  transition: transform 0.15s ease, background 0.15s ease;
}

.voice-play-btn:hover {
  background: #059669;
  transform: scale(1.06);
}

.voice-player-track {
  flex: 1;
  min-width: 0;
}

.voice-wave-bars-track {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 20px;
  cursor: pointer;
  padding: 2px 0;
}

.voice-mini-bar {
  width: 3px;
  border-radius: 2px;
  background: #94a3b8;
  transition: background 0.15s ease;
}

.voice-mini-bar.played {
  background: #10b981;
}

.voice-time-speed-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
}

.voice-duration-text {
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  color: var(--text-dim, #64748b);
}

.voice-speed-chip {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: none;
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.voice-speed-chip:hover {
  background: rgba(16, 185, 129, 0.3);
}

/* 5. Keyboard Shortcuts Modal */
.shortcuts-modal-body {
  padding: 16px 20px;
  max-height: 70vh;
  overflow-y: auto;
}

.shortcuts-section {
  margin-bottom: 20px;
}

.shortcuts-section-title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--primary, #2563eb);
  margin-bottom: 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

[data-theme="dark"] .shortcuts-section-title {
  border-bottom-color: #334155;
}

.shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.2);
}

.shortcut-desc {
  font-size: 0.84rem;
  color: var(--text-main, #0f172a);
}

[data-theme="dark"] .shortcut-desc {
  color: #e2e8f0;
}

.shortcut-keys {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
}

kbd {
  display: inline-block;
  padding: 2px 7px;
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-main, #0f172a);
  background: var(--bg-hover, #f1f5f9);
  border: 1px solid var(--border-color, #cbd5e1);
  border-bottom-width: 2px;
  border-radius: 4px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] kbd {
  color: #f8fafc;
  background: #334155;
  border-color: #475569;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* 6. Dynamic Letterhead QR Code & Watermark */
.lh-watermark-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-30deg);
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 4px;
  color: rgba(15, 23, 42, 0.04);
  pointer-events: none;
  white-space: nowrap;
  user-select: none;
  text-transform: uppercase;
}

[data-theme="dark"] .lh-watermark-bg {
  color: rgba(255, 255, 255, 0.04);
}

.lh-qr-security-box {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

[data-theme="dark"] .lh-qr-security-box {
  background: #1e293b;
  border-color: #334155;
}

.lh-qr-code-img {
  width: 72px;
  height: 72px;
  background: #ffffff;
  padding: 4px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  flex-shrink: 0;
}

.lh-qr-details {
  font-size: 0.72rem;
  color: var(--text-muted, #64748b);
  line-height: 1.4;
}

.lh-qr-details strong {
  color: var(--text-main, #0f172a);
}

[data-theme="dark"] .lh-qr-details strong {
  color: #f8fafc;
}

.lh-hash-token {
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
  padding: 2px 4px;
  border-radius: 3px;
  word-break: break-all;
}
