
.intranet-shell {
  min-height: 100vh;
  background: var(--background, #f5f7fb);
}

.intranet-header {
  padding: 1rem 1rem 0.75rem;
  background: var(--surface, #ffffff);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.intranet-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.intranet-title__logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #2563eb;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  flex: 0 0 auto;
}

.intranet-title__copy {
  min-width: 0;
}

.intranet-title__name {
  font-weight: 700;
  font-size: clamp(1.15rem, 2vw + 0.8rem, 1.75rem);
  line-height: 1.1;
  color: #2563eb;
  word-break: break-word;
}

.intranet-title__sub {
  margin-top: 0.2rem;
  font-size: 0.95rem;
  color: var(--text-muted, #64748b);
}

.intranet-main {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.intranet-hero {
  border-radius: 18px;
  overflow: hidden;
  background: transparent;
}

.intranet-hero__img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: cover;
  border-radius: 18px;
  background: #e5e7eb;
}

.intranet-status {
  padding: 0 0.25rem;
}

.intranet-card {
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, rgba(15, 23, 42, 0.08));
  border-radius: 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.intranet-card.is-refreshed {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.12);
}

.intranet-card__header {
  padding: 0.85rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.intranet-card__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary, #0f172a);
}

.intranet-card__meta {
  font-size: 0.8rem;
  color: var(--text-muted, #94a3b8);
  text-align: right;
}

.intranet-card__body {
  padding: 0.9rem 1rem 1rem;
}

.intranet-content {
  font-size: 0.98rem;
  line-height: 1.55;
  white-space: pre-wrap;
  color: var(--primary, #0f172a);
}

.intranet-card--accent {
  border-color: rgba(37, 99, 235, 0.16);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.08);
}

.intranet-quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}

.intranet-button {
  width: 100%;
  min-height: 3rem;
  border: 1px solid transparent;
  border-radius: 0.9rem;
  background: #2563eb;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.intranet-button--secondary {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.1);
}

.intranet-stack {
  display: grid;
  gap: 0.85rem;
}

.intranet-empty {
  padding: 0.5rem 0;
}

.intranet-entry {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  padding: 0.9rem;
  background: rgba(248, 250, 252, 0.9);
  display: grid;
  gap: 0.55rem;
}

.intranet-entry__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.intranet-entry__title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.intranet-entry__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.intranet-entry__text {
  white-space: pre-wrap;
  color: #0f172a;
  line-height: 1.5;
}

.intranet-entry__footer {
  color: #64748b;
  font-size: 0.88rem;
}

.intranet-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1;
}

.intranet-pill--poll {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.intranet-pill--eoi {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
}

.intranet-pill--lost {
  background: rgba(249, 115, 22, 0.12);
  color: #c2410c;
}

.intranet-pill--found {
  background: rgba(14, 165, 233, 0.12);
  color: #0369a1;
}

.intranet-poll-card {
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 16px;
  padding: 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.92));
  display: grid;
  gap: 0.8rem;
}

.intranet-poll-options {
  display: grid;
  gap: 0.55rem;
}

.intranet-poll-option {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: #ffffff;
}

.intranet-poll-option input {
  width: auto;
}

.intranet-poll-results {
  color: #64748b;
  font-size: 0.84rem;
  font-weight: 700;
}

.intranet-poll-form {
  display: grid;
  gap: 0.75rem;
}

.intranet-modal {
  max-width: 720px;
}

.intranet-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.intranet-modal__form {
  display: grid;
  gap: 0.5rem;
}

.muted {
  color: var(--text-muted, #64748b);
}

.intranet-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.intranet-actions--footer {
  margin-top: 0.25rem;
}

.intranet-action {
  display: flex;
  align-items: center;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, rgba(15, 23, 42, 0.08));
  padding: 0.9rem;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.intranet-action__icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-right: 0.75rem;
  flex: 0 0 auto;
}

.intranet-action__title {
  font-weight: 600;
  color: var(--primary, #0f172a);
}

.intranet-action__desc {
  font-size: 0.88rem;
  color: var(--text-muted, #64748b);
}

.intranet-action__chev {
  margin-left: auto;
  color: var(--text-muted, #94a3b8);
  font-size: 1.25rem;
}

.intranet-footer {
  margin-top: auto;
  padding: 0.75rem 0 1rem;
  text-align: center;
}

.tiny-muted {
  font-size: 0.8rem;
  color: var(--text-muted, #94a3b8);
}

.intranet-admin-fab {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: 3.25rem;
  height: 3.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
  text-decoration: none;
  font-size: 1.4rem;
  line-height: 1;
  z-index: 9998;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.intranet-admin-fab:hover,
.intranet-admin-fab:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.18);
}

.intranet-shell {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.2), transparent 34%),
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.18), transparent 28%),
    linear-gradient(180deg, #eef4ff 0%, #f7fbff 36%, #f6faf8 100%);
}

.intranet-shell::before,
.intranet-shell::after {
  content: '';
  position: fixed;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.intranet-shell::before {
  top: 5rem;
  right: -5rem;
  width: 15rem;
  height: 15rem;
  background: rgba(37, 99, 235, 0.16);
}

.intranet-shell::after {
  left: -4rem;
  bottom: 7rem;
  width: 12rem;
  height: 12rem;
  background: rgba(16, 185, 129, 0.14);
}

.intranet-header {
  position: sticky;
  top: 0;
  z-index: 12;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.06);
}

.intranet-title__logo {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.14);
}

.intranet-title__logo-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.intranet-title__name {
  color: #0f172a;
}

.intranet-main {
  position: relative;
  z-index: 1;
  padding-bottom: 5rem;
}

.intranet-section {
  display: grid;
  gap: 1rem;
}

.intranet-section__heading {
  display: grid;
  gap: 0.35rem;
  padding: 0 0.15rem;
}

.intranet-section__eyebrow {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(37, 99, 235, 0.82);
}

.intranet-section__title {
  margin: 0;
  font-size: clamp(1.45rem, 2vw + 0.9rem, 2.2rem);
  line-height: 1.05;
  color: #0f172a;
}

.intranet-section__summary {
  margin: 0;
  max-width: 52rem;
  color: #475569;
  line-height: 1.55;
}

.intranet-section__grid {
  display: grid;
  gap: 1rem;
}

.intranet-section__grid--updates {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.intranet-section--community {
  margin-top: 0.35rem;
}

.intranet-section__heading--community {
  padding-bottom: 0.15rem;
}

.intranet-section__surface {
  position: relative;
  padding: 1.1rem;
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.18), transparent 28%),
    linear-gradient(145deg, rgba(219, 234, 254, 0.94), rgba(224, 242, 254, 0.8) 48%, rgba(209, 250, 229, 0.78) 100%);
  border: 1px solid rgba(125, 211, 252, 0.42);
  box-shadow: 0 28px 50px rgba(14, 116, 144, 0.14);
}

.intranet-section__surface::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0) 45%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0, rgba(255, 255, 255, 0.06) 14px, transparent 14px, transparent 28px);
  pointer-events: none;
}

.intranet-section__surface > * {
  position: relative;
  z-index: 1;
}

.intranet-section__intro {
  display: grid;
  gap: 0.8rem;
}

.intranet-section__intro-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.intranet-section__intro-copy {
  color: #164e63;
  line-height: 1.6;
  font-size: 1rem;
}

.intranet-section__grid--community {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.intranet-card--featured,
.intranet-actions--community {
  grid-column: 1 / -1;
}

.intranet-card {
  --section-accent: 37, 99, 235;
  position: relative;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.46)),
    rgba(255, 255, 255, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 22px 38px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(20px);
}

.intranet-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, rgba(var(--section-accent), 0.95), rgba(var(--section-accent), 0.22));
}

.intranet-card__header {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0));
}

.intranet-card--program { --section-accent: 37, 99, 235; }
.intranet-card--alerts { --section-accent: 245, 158, 11; }
.intranet-card--events { --section-accent: 249, 115, 22; }
.intranet-card--support { --section-accent: 8, 145, 178; }
.intranet-card--polls { --section-accent: 99, 102, 241; }
.intranet-card--lost { --section-accent: 234, 88, 12; }
.intranet-card--notice { --section-accent: 16, 185, 129; }

.intranet-section--community .intranet-card,
.intranet-section--community .intranet-action {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.55)),
    rgba(255, 255, 255, 0.42);
}

.intranet-entry,
.intranet-poll-card,
.intranet-action {
  background: rgba(255, 255, 255, 0.58);
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.07);
  backdrop-filter: blur(14px);
}

.intranet-action__icon {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.16), rgba(14, 165, 233, 0.1));
}

.intranet-dock {
  position: fixed;
  left: 50%;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 9997;
  width: min(94vw, 760px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
  padding: 0.7rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 24px 40px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(22px);
}

.intranet-dock__button {
  min-width: 0;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  padding: 0.75rem 0.55rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(226, 232, 240, 0.6));
  color: #0f172a;
  text-decoration: none;
  display: grid;
  justify-items: center;
  gap: 0.38rem;
  font: inherit;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.intranet-dock__icon {
  width: 2.4rem;
  height: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  font-size: 1.15rem;
}

.intranet-dock__label {
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.15;
}

.intranet-admin-fab {
  bottom: calc(5rem + env(safe-area-inset-bottom));
}

@media (max-width: 640px) {
  .intranet-header {
    padding: 0.9rem 0.9rem 0.6rem;
  }

  .intranet-main {
    padding: 0.9rem 0.9rem 5.5rem;
  }

  .intranet-section__grid--updates,
  .intranet-section__grid--community {
    grid-template-columns: 1fr;
  }

  .intranet-section__surface {
    padding: 0.85rem;
    border-radius: 24px;
  }

  .intranet-section__title {
    font-size: 1.7rem;
  }

  .intranet-hero__img {
    max-height: 160px;
  }

  .intranet-card__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .intranet-quick-actions {
    grid-template-columns: 1fr;
  }

  .intranet-entry__header {
    flex-direction: column;
  }

  .intranet-poll-option {
    grid-template-columns: auto 1fr;
  }

  .intranet-poll-results {
    grid-column: 1 / -1;
  }

  .intranet-modal__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .intranet-dock {
    width: calc(100vw - 1rem);
    gap: 0.45rem;
    padding: 0.55rem;
    bottom: calc(0.55rem + env(safe-area-inset-bottom));
  }

  .intranet-dock__button {
    padding: 0.62rem 0.3rem;
    border-radius: 16px;
  }

  .intranet-dock__icon {
    width: 2.2rem;
    height: 2.2rem;
    font-size: 1.05rem;
  }

  .intranet-dock__label {
    font-size: 0.72rem;
  }

  .intranet-admin-fab {
    right: 0.85rem;
    bottom: calc(5rem + env(safe-area-inset-bottom));
    width: 3rem;
    height: 3rem;
  }
}

@media (min-width: 768px) {
  .intranet-main {
    padding: 1.25rem;
  }

  .intranet-hero__img {
    max-height: 360px;
  }
}

@media (min-width: 1024px) {
  .intranet-main {
    padding: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
  }

  .intranet-hero__img {
    max-height: 420px;
  }
}

/* ============================================
   BOTTOM NAVIGATION BAR
   ============================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav, 200);
  height: calc(64px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
}

.bottom-nav__tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.5rem 0;
  background: none;
  border: none;
  color: #94a3b8;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--transition-fast, 150ms ease);
  min-height: 44px;
}

.bottom-nav__tab:active {
  transform: scale(0.92);
}

.bottom-nav__icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.bottom-nav__label {
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1;
}

.bottom-nav__tab--active {
  color: #2563eb;
}

.bottom-nav__tab--active .bottom-nav__icon {
  background: rgba(37, 99, 235, 0.1);
  border-radius: var(--radius-full, 9999px);
  padding: 3px 12px;
  width: auto;
}

/* More Sheet */
.more-sheet__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: calc(var(--z-nav, 200) + 1);
}

.more-sheet__panel {
  position: fixed;
  bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  left: 0.75rem;
  right: 0.75rem;
  z-index: calc(var(--z-nav, 200) + 2);
  background: #fff;
  border-radius: var(--radius-lg, 16px) var(--radius-lg, 16px) 0 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
  padding: 0.75rem 1rem 1rem;
  animation: sheet-up 0.25s ease-out;
}

@keyframes sheet-up {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.more-sheet__handle {
  width: 36px;
  height: 4px;
  background: #cbd5e1;
  border-radius: var(--radius-full, 9999px);
  margin: 0 auto 0.75rem;
}

.more-sheet__rows {
  display: grid;
  gap: 0.35rem;
}

.more-sheet__row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  width: 100%;
  box-sizing: border-box;
  padding: 0.85rem 0.75rem;
  border-radius: var(--radius-md, 12px);
  background: none;
  border: none;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: #0f172a;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  min-height: 48px;
  transition: background var(--transition-fast, 150ms ease);
  appearance: none;
  -webkit-appearance: none;
}

.more-sheet__row:hover,
.more-sheet__row:active {
  background: rgba(37, 99, 235, 0.06);
}

.more-sheet__row-icon {
  font-size: 1.2rem;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}

.more-sheet__row > span:not(.more-sheet__row-icon):not(.more-sheet__row-meta) {
  flex: 1 1 auto;
  min-width: 0;
}

.more-sheet__row-meta {
  margin-left: auto;
  font-size: 0.76rem;
  font-weight: 600;
  color: #94a3b8;
  text-align: right;
}

.more-sheet__row--ready .more-sheet__row-meta {
  color: #2563eb;
}

/* ============================================
   INSTALL BANNER
   ============================================ */
.install-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-install-banner, 500);
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  padding: 0.85rem 1rem;
  animation: slide-down 0.3s ease-out;
}

@keyframes slide-down {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

.install-banner__content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.install-banner__icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.install-banner__text {
  flex: 1;
  min-width: 0;
}

.install-banner__title {
  font-size: 0.95rem;
  font-weight: 600;
}

.install-banner__subtitle {
  font-size: 0.8rem;
  opacity: 0.85;
}

.install-banner__btn {
  background: #fff;
  color: #2563eb;
  border: none;
  border-radius: var(--radius-full, 9999px);
  padding: 0.45rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 36px;
}

.install-banner__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  min-width: 28px;
  min-height: 28px;
}

.install-banner__close:hover {
  color: #fff;
}

.install-banner__ios {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  opacity: 0.9;
  text-align: center;
}

.install-banner:not(.hidden) + .intranet-header {
  margin-top: 76px;
}

/* ============================================
   SKELETON LOADING
   ============================================ */
.skeleton {
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm, 8px);
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-line {
  height: 14px;
  margin-bottom: 8px;
}

.skeleton-line--short { width: 60%; }
.skeleton-line--medium { width: 80%; }
.skeleton-line--full { width: 100%; }

.skeleton-block {
  height: 100px;
  border-radius: var(--radius-md, 12px);
}

.skeleton-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.skeleton-circle {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  flex-shrink: 0;
}

.skeleton-lines {
  flex: 1;
  display: grid;
  gap: 6px;
}

/* ============================================
   WEATHER WIDGET
   ============================================ */
.weather-widget {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg, 16px);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(14, 165, 233, 0.06));
  border: 1px solid rgba(37, 99, 235, 0.1);
  flex-wrap: wrap;
}

.weather-widget__current {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.weather-widget__icon {
  font-size: 1.5rem;
}

.weather-widget__temp {
  font-size: 1.3rem;
  font-weight: 700;
  color: #0f172a;
}

.weather-widget__location {
  font-size: 0.78rem;
  color: #64748b;
}

.weather-widget__forecast {
  display: flex;
  gap: 1rem;
}

.weather-widget__day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  font-size: 0.72rem;
  color: #64748b;
}

.weather-widget__day-name {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.65rem;
}

.weather-widget__day-icon {
  font-size: 1rem;
}

.weather-widget__day-temps {
  display: flex;
  gap: 0.25rem;
}

.weather-widget__day-high {
  font-weight: 600;
  color: #0f172a;
}

/* Dark mode bottom nav */
[data-theme="dark"] .bottom-nav {
  background: rgba(15, 23, 42, 0.92);
  border-top-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .bottom-nav__tab {
  color: #64748b;
}

[data-theme="dark"] .bottom-nav__tab--active {
  color: #60a5fa;
}

[data-theme="dark"] .bottom-nav__tab--active .bottom-nav__icon {
  background: rgba(96, 165, 250, 0.12);
}

[data-theme="dark"] .more-sheet__panel {
  background: #1e293b;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .more-sheet__handle {
  background: #475569;
}

[data-theme="dark"] .more-sheet__row {
  color: #e2e8f0;
}

[data-theme="dark"] .more-sheet__row:hover,
[data-theme="dark"] .more-sheet__row:active {
  background: rgba(96, 165, 250, 0.08);
}

[data-theme="dark"] .skeleton {
  background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
  background-size: 200% 100%;
}

/* Dark mode weather */
[data-theme="dark"] .weather-widget {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.08), rgba(56, 189, 248, 0.05));
  border-color: rgba(96, 165, 250, 0.1);
}

[data-theme="dark"] .weather-widget__temp {
  color: #e2e8f0;
}

[data-theme="dark"] .weather-widget__location,
[data-theme="dark"] .weather-widget__day {
  color: #94a3b8;
}

[data-theme="dark"] .weather-widget__day-high {
  color: #e2e8f0;
}

/* ============================================
   DARK MODE — Intranet
   Applied via data-theme="dark" on <html>
   ============================================ */

[data-theme="dark"] .intranet-shell {
  background: #0f172a;
}
[data-theme="dark"] .intranet-shell::before {
  background: rgba(37, 99, 235, 0.08);
}
[data-theme="dark"] .intranet-shell::after {
  background: rgba(16, 185, 129, 0.06);
}

[data-theme="dark"] .intranet-header {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(18px);
  border-bottom-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .intranet-title__name {
  color: #e2e8f0;
}
[data-theme="dark"] .intranet-title__sub {
  color: #94a3b8;
}
[data-theme="dark"] .intranet-title__logo {
  background: rgba(37, 99, 235, 0.2);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .intranet-section__eyebrow {
  color: rgba(96, 165, 250, 0.9);
}
[data-theme="dark"] .intranet-section__title {
  color: #e2e8f0;
}
[data-theme="dark"] .intranet-section__summary {
  color: #94a3b8;
}

[data-theme="dark"] .intranet-card {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
}
[data-theme="dark"] .intranet-card__header {
  background: rgba(255, 255, 255, 0.03);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}
[data-theme="dark"] .intranet-card__title {
  color: #e2e8f0;
}
[data-theme="dark"] .intranet-card__meta {
  color: #64748b;
}
[data-theme="dark"] .intranet-card__body {
  color: #cbd5e1;
}
[data-theme="dark"] .intranet-content {
  color: #cbd5e1;
}
[data-theme="dark"] .intranet-card.is-refreshed {
  border-color: rgba(96, 165, 250, 0.3);
  box-shadow: 0 6px 18px rgba(96, 165, 250, 0.1);
}

[data-theme="dark"] .intranet-section__surface {
  background:
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.08), transparent 28%),
    linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(30, 41, 59, 0.85) 48%, rgba(20, 30, 48, 0.9) 100%);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}
[data-theme="dark"] .intranet-section__surface::before {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0) 45%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0, rgba(255, 255, 255, 0.02) 14px, transparent 14px, transparent 28px);
}
[data-theme="dark"] .intranet-section__intro-badge {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}
[data-theme="dark"] .intranet-section__intro-copy {
  color: #94a3b8;
}

[data-theme="dark"] .intranet-section--community .intranet-card,
[data-theme="dark"] .intranet-section--community .intranet-action {
  background: rgba(30, 41, 59, 0.7);
}

[data-theme="dark"] .intranet-entry {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(8px);
}
[data-theme="dark"] .intranet-entry__title {
  color: #e2e8f0;
}
[data-theme="dark"] .intranet-entry__text {
  color: #cbd5e1;
}
[data-theme="dark"] .intranet-entry__footer {
  color: #64748b;
}

[data-theme="dark"] .intranet-poll-card {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.9));
  border-color: rgba(96, 165, 250, 0.12);
}
[data-theme="dark"] .intranet-poll-option {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

[data-theme="dark"] .intranet-pill--poll {
  background: rgba(96, 165, 250, 0.15);
  color: #93c5fd;
}
[data-theme="dark"] .intranet-pill--eoi {
  background: rgba(52, 211, 153, 0.15);
  color: #6ee7b7;
}
[data-theme="dark"] .intranet-pill--lost {
  background: rgba(251, 146, 60, 0.15);
  color: #fdba74;
}
[data-theme="dark"] .intranet-pill--found {
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
}

[data-theme="dark"] .intranet-action {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}
[data-theme="dark"] .intranet-action__icon {
  background: linear-gradient(180deg, rgba(96, 165, 250, 0.15), rgba(56, 189, 248, 0.1));
}
[data-theme="dark"] .intranet-action__title {
  color: #e2e8f0;
}
[data-theme="dark"] .intranet-action__desc {
  color: #94a3b8;
}
[data-theme="dark"] .intranet-action__chev {
  color: #475569;
}

[data-theme="dark"] .intranet-dock {
  background: rgba(15, 23, 42, 0.75);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(22px);
}
[data-theme="dark"] .intranet-dock__button {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.7));
  border-color: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
[data-theme="dark"] .intranet-dock__icon {
  background: rgba(96, 165, 250, 0.12);
}

[data-theme="dark"] .intranet-admin-fab {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .intranet-footer .tiny-muted,
[data-theme="dark"] .tiny-muted {
  color: #475569;
}
[data-theme="dark"] .muted {
  color: #64748b;
}
[data-theme="dark"] .intranet-hero__img {
  background: #1e293b;
}

/* Dark mode modals */
[data-theme="dark"] .modal {
  background: rgba(0, 0, 0, 0.7);
}
[data-theme="dark"] .modal-content,
[data-theme="dark"] .intranet-modal {
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .modal-content h2,
[data-theme="dark"] .intranet-modal h2 {
  color: #e2e8f0;
}
[data-theme="dark"] .modal-content label {
  color: #cbd5e1;
}
[data-theme="dark"] .modal-content input,
[data-theme="dark"] .modal-content select,
[data-theme="dark"] .modal-content textarea {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}
[data-theme="dark"] .modal-content input:focus,
[data-theme="dark"] .modal-content select:focus,
[data-theme="dark"] .modal-content textarea:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.15);
}
[data-theme="dark"] .modal-content button.secondary {
  background: #0f172a;
  border-color: #334155;
  color: #cbd5e1;
}

/* Smooth transitions on theme switch */
.intranet-shell,
.intranet-header,
.intranet-card,
.intranet-entry,
.intranet-poll-card,
.intranet-action,
.intranet-dock,
.intranet-dock__button,
.intranet-admin-fab,
.intranet-section__surface,
.modal-content {
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

/* Dark mode toggle knob state */
#dark-mode-toggle:checked ~ #dark-mode-slider {
  background: #3b82f6;
}
#dark-mode-toggle:checked ~ #dark-mode-knob {
  transform: translateX(20px);
}
[data-theme="dark"] label:has(#dark-mode-toggle) {
  background: rgba(255, 255, 255, 0.06);
}

/* ============================================
   STICKY HEADER - COLLAPSE ON SCROLL
   ============================================ */
.intranet-header {
  transition: padding 0.25s ease, box-shadow 0.25s ease;
}

.intranet-header--collapsed {
  padding: 0.5rem 1rem !important;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.1);
}

.intranet-header--collapsed .intranet-title__logo {
  width: 30px;
  height: 30px;
  transition: width 0.25s ease, height 0.25s ease;
}

.intranet-header--collapsed .intranet-title__name {
  font-size: 1rem !important;
  transition: font-size 0.25s ease;
}

.intranet-header--collapsed .intranet-title__sub {
  display: none;
}

.intranet-title__logo {
  transition: width 0.25s ease, height 0.25s ease;
}

.intranet-title__name {
  transition: font-size 0.25s ease;
}

/* ============================================
   HERO BANNER - ENHANCED
   ============================================ */
.intranet-hero--enhanced {
  position: relative;
  min-height: 160px;
  border-radius: 0 0 var(--radius-lg, 16px) var(--radius-lg, 16px);
  overflow: hidden;
}

.intranet-hero--enhanced .intranet-hero__img {
  border-radius: 0;
}

.intranet-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.55) 100%);
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  pointer-events: none;
}

.intranet-hero__welcome {
  pointer-events: auto;
}

.intranet-hero__welcome-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  line-height: 1.15;
}

.intranet-hero__welcome-dates {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 0.25rem;
}

.intranet-hero--no-image {
  background: linear-gradient(135deg, #2563eb, #1d4ed8, #1e40af);
  min-height: 140px;
}

.intranet-hero--no-image .intranet-hero__img {
  display: none;
}

.intranet-hero--no-image .intranet-hero__overlay {
  background: none;
}

/* ============================================
   SECTION ICONS
   ============================================ */
.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm, 8px);
  flex-shrink: 0;
  margin-right: 0.5rem;
}

.section-icon svg {
  width: 16px;
  height: 16px;
}

.section-icon--program {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

.section-icon--alerts {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.section-icon--events {
  background: rgba(124, 58, 237, 0.1);
  color: #7c3aed;
}

.section-icon--polls {
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
}

.section-icon--lost {
  background: rgba(234, 88, 12, 0.1);
  color: #ea580c;
}

.section-icon--notice {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.intranet-card__header {
  align-items: center !important;
  flex-direction: row !important;
  flex-wrap: wrap;
}

.intranet-card__header > div:first-child {
  min-width: 0;
}

/* ============================================
   CATEGORY PILLS - Extended
   ============================================ */
.intranet-pill--general {
  background: rgba(25, 118, 210, 0.1);
  color: #1565c0;
}

.intranet-pill--for-sale {
  background: rgba(56, 142, 60, 0.1);
  color: #2e7d32;
}

.intranet-pill--wanted {
  background: rgba(123, 31, 162, 0.1);
  color: #6a1b9a;
}

.intranet-pill--ride-share {
  background: rgba(245, 124, 0, 0.1);
  color: #e65100;
}

.intranet-pill--help-needed {
  background: rgba(211, 47, 47, 0.1);
  color: #c62828;
}

@media (max-width: 640px) {
  .intranet-hero__welcome-title {
    font-size: 1.4rem;
  }

  .intranet-hero--enhanced {
    min-height: 130px;
  }
}

@media (min-width: 768px) {
  .intranet-hero--enhanced {
    min-height: 200px;
  }

  .intranet-hero__welcome-title {
    font-size: 2rem;
  }
}

[data-theme="dark"] .intranet-header--collapsed {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .intranet-hero__overlay {
  background: linear-gradient(to bottom, rgba(2, 6, 23, 0.1) 0%, rgba(2, 6, 23, 0.72) 100%);
}

[data-theme="dark"] .intranet-hero--no-image {
  background: linear-gradient(135deg, #1d4ed8, #1e3a8a, #172554);
}

[data-theme="dark"] .section-icon--program {
  background: rgba(96, 165, 250, 0.12);
  color: #60a5fa;
}

[data-theme="dark"] .section-icon--alerts {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
}

[data-theme="dark"] .section-icon--events {
  background: rgba(167, 139, 250, 0.12);
  color: #a78bfa;
}

[data-theme="dark"] .section-icon--polls {
  background: rgba(129, 140, 248, 0.12);
  color: #818cf8;
}

[data-theme="dark"] .section-icon--lost {
  background: rgba(251, 146, 60, 0.12);
  color: #fb923c;
}

[data-theme="dark"] .section-icon--notice {
  background: rgba(52, 211, 153, 0.12);
  color: #34d399;
}

[data-theme="dark"] .intranet-pill--general {
  background: rgba(66, 165, 245, 0.15);
  color: #64b5f6;
}

[data-theme="dark"] .intranet-pill--for-sale {
  background: rgba(102, 187, 106, 0.15);
  color: #81c784;
}

[data-theme="dark"] .intranet-pill--wanted {
  background: rgba(171, 71, 188, 0.15);
  color: #ce93d8;
}

[data-theme="dark"] .intranet-pill--ride-share {
  background: rgba(255, 167, 38, 0.15);
  color: #ffb74d;
}

[data-theme="dark"] .intranet-pill--help-needed {
  background: rgba(239, 83, 80, 0.15);
  color: #ef9a9a;
}

.install-banner:not(.hidden) + #header-sentinel + .intranet-header {
  margin-top: 76px;
}

/* ============================================
   PROFILE SETUP PROMPT
   ============================================ */
.profile-prompt {
  display: flex;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: var(--radius-lg, 16px);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(16, 185, 129, 0.04));
  border: 1px solid rgba(37, 99, 235, 0.12);
}

.profile-prompt__icon {
  font-size: 1.75rem;
  flex-shrink: 0;
  line-height: 1;
}

.profile-prompt__content {
  flex: 1;
  min-width: 0;
}

.profile-prompt__title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.15rem;
}

.profile-prompt__subtitle {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 0.75rem;
}

.profile-prompt__form {
  display: grid;
  gap: 0.5rem;
}

.profile-prompt__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.profile-prompt__actions button {
  flex: 1 1 11rem;
}

.profile-prompt__form input {
  font-size: 0.9rem !important;
  padding: 0.55rem 0.75rem !important;
}

[data-theme="dark"] .profile-prompt {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.06), rgba(52, 211, 153, 0.04));
  border-color: rgba(96, 165, 250, 0.1);
}

[data-theme="dark"] .profile-prompt__title {
  color: #e2e8f0;
}

[data-theme="dark"] .profile-prompt__subtitle {
  color: #94a3b8;
}

[data-theme="dark"] .more-sheet__row-meta {
  color: #64748b;
}

[data-theme="dark"] .more-sheet__row--ready .more-sheet__row-meta {
  color: #93c5fd;
}

/* ============================================
   BOTTOM SHEET MODALS (mobile-first)
   ============================================ */
@media (max-width: 640px) {
  .modal {
    align-items: flex-end !important;
    padding: 0 !important;
  }

  .modal-content,
  .intranet-modal {
    max-width: 100% !important;
    width: 100% !important;
    border-radius: var(--radius-lg, 16px) var(--radius-lg, 16px) 0 0 !important;
    padding: 1.25rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom, 0px)) !important;
    max-height: 90vh !important;
    animation: modal-slide-up 0.3s ease-out;
  }

  @keyframes modal-slide-up {
    from { transform: translateY(100%); opacity: 0.5; }
    to { transform: translateY(0); opacity: 1; }
  }

  .modal-content::before,
  .intranet-modal::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    background: #cbd5e1;
    border-radius: var(--radius-full, 9999px);
    margin: 0 auto 1rem;
  }

  [data-theme="dark"] .modal-content::before,
  [data-theme="dark"] .intranet-modal::before {
    background: #475569;
  }
}

.intranet-modal__form input,
.intranet-modal__form select,
.intranet-modal__form textarea {
  font-size: 1rem !important;
  padding: 0.7rem 0.85rem !important;
  min-height: 44px;
  border-radius: var(--radius-sm, 8px) !important;
}

.intranet-modal__form input:focus,
.intranet-modal__form select:focus,
.intranet-modal__form textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.intranet-modal__form .form-actions button[type="submit"] {
  min-height: 48px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md, 12px);
  width: 100%;
}

.intranet-modal__header button.secondary.small {
  min-width: 36px;
  min-height: 36px;
  border-radius: var(--radius-full, 9999px);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   PULL TO REFRESH
   ============================================ */
.ptr-indicator {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-60px);
  z-index: calc(var(--z-sticky, 100) + 5);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface, #fff);
  border-radius: var(--radius-full, 9999px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease, opacity 0.2s ease;
  pointer-events: none;
  opacity: 0;
}

.ptr-indicator svg {
  width: 20px;
  height: 20px;
  color: #2563eb;
}

.ptr-indicator--visible {
  transform: translateX(-50%) translateY(80px);
  opacity: 1;
}

.ptr-indicator--refreshing svg {
  animation: ptr-spin 0.8s linear infinite;
}

@keyframes ptr-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

[data-theme="dark"] .ptr-indicator {
  background: #1e293b;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .ptr-indicator svg {
  color: #60a5fa;
}

/* ============================================
   EVENT CARDS - SWIPEABLE CAROUSEL
   ============================================ */
.events-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: var(--space-md, 16px);
  padding: 0.25rem 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.events-carousel::-webkit-scrollbar {
  display: none;
}

.event-card {
  flex: 0 0 calc(80vw);
  max-width: 300px;
  min-height: 150px;
  scroll-snap-align: start;
  border-radius: var(--radius-lg, 16px);
  background: var(--surface, #fff);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.event-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #7c3aed, rgba(124, 58, 237, 0.3));
}

.event-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.event-card__time {
  font-size: 0.82rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.event-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: auto;
  padding-top: 0.75rem;
  gap: 0.75rem;
}

.event-card__countdown {
  font-size: 0.75rem;
  font-weight: 500;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.event-card__countdown--soon {
  color: #f59e0b;
}

.event-card__countdown--now {
  color: #10b981;
  font-weight: 600;
}

.event-card__countdown--now::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #10b981;
  animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }
}

.event-card__cal-btn {
  font-size: 0.72rem;
  color: #2563eb;
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius-sm, 8px);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 32px;
}

.event-card__cal-btn:hover {
  background: rgba(37, 99, 235, 0.06);
}

.events-text-fallback {
  white-space: pre-wrap;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--primary, #0f172a);
}

[data-theme="dark"] .event-card {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .event-card::before {
  background: linear-gradient(90deg, #a78bfa, rgba(167, 139, 250, 0.3));
}

[data-theme="dark"] .event-card__title {
  color: #e2e8f0;
}

[data-theme="dark"] .event-card__time {
  color: #94a3b8;
}

[data-theme="dark"] .event-card__countdown {
  color: #94a3b8;
}

[data-theme="dark"] .event-card__cal-btn {
  color: #60a5fa;
}

[data-theme="dark"] .event-card__cal-btn:hover {
  background: rgba(96, 165, 250, 0.08);
}

@media (min-width: 768px) {
  .event-card {
    flex: 0 0 280px;
  }
}

/* ============================================
   POLL RESULTS - ANIMATED BARS
   ============================================ */
.intranet-poll-option--voted {
  border-color: rgba(37, 99, 235, 0.25);
  background: rgba(37, 99, 235, 0.04);
}

.intranet-poll-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: rgba(37, 99, 235, 0.08);
  border-radius: 12px;
  transition: width 0.6s ease-out;
  z-index: 0;
  width: 0;
}

.intranet-poll-option {
  position: relative;
  overflow: hidden;
}

.intranet-poll-option > * {
  position: relative;
  z-index: 1;
}

.intranet-poll-pct {
  font-size: 0.82rem;
  font-weight: 700;
  color: #2563eb;
  margin-left: auto;
  min-width: 36px;
  text-align: right;
}

[data-theme="dark"] .intranet-poll-option--voted {
  border-color: rgba(96, 165, 250, 0.2);
  background: rgba(96, 165, 250, 0.04);
}

[data-theme="dark"] .intranet-poll-bar {
  background: rgba(96, 165, 250, 0.1);
}

[data-theme="dark"] .intranet-poll-pct {
  color: #60a5fa;
}

/* ============================================
   NOTICEBOARD SEARCH & FILTER
   ============================================ */
.nb-search {
  margin-bottom: 0.75rem;
  display: grid;
  gap: 0.5rem;
}

.nb-search__input-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: var(--radius-full, 9999px);
  padding: 0.45rem 0.85rem;
}

.nb-search__input-wrap input {
  flex: 1;
  border: none !important;
  background: none !important;
  padding: 0.3rem 0 !important;
  box-shadow: none !important;
  font-size: 0.9rem !important;
  min-height: 32px;
}

.nb-search__input-wrap input:focus {
  box-shadow: none !important;
}

.nb-search__clear {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.25rem;
  min-width: 24px;
  min-height: 24px;
}

.nb-filter-chips {
  display: flex;
  overflow-x: auto;
  gap: 0.4rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.nb-filter-chips::-webkit-scrollbar {
  display: none;
}

.nb-chip {
  flex-shrink: 0;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full, 9999px);
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: var(--surface, #fff);
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
  min-height: 32px;
  transition: all var(--transition-fast, 150ms ease);
}

.nb-chip--active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.nb-search__count {
  font-size: 0.75rem;
  color: #94a3b8;
}

[data-theme="dark"] .nb-search__input-wrap {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .nb-search__input-wrap input {
  color: #e2e8f0 !important;
}

[data-theme="dark"] .nb-chip {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

[data-theme="dark"] .nb-chip--active {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

/* ============================================
   NOTIFICATION BADGES
   ============================================ */

.nav-badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 20px);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-full, 9999px);
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--surface, #fff);
  line-height: 1;
  animation: badge-pop 0.3s ease-out;
  pointer-events: none;
}

.nav-badge--dot {
  min-width: 8px;
  height: 8px;
  padding: 0;
  right: calc(50% - 14px);
  top: 8px;
}

@keyframes badge-pop {
  0% {
    transform: scale(0);
  }

  60% {
    transform: scale(1.3);
  }

  100% {
    transform: scale(1);
  }
}

.bottom-nav__tab {
  position: relative;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-full, 9999px);
  background: #ef4444;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  margin-left: 0.4rem;
  line-height: 1;
  animation: badge-pop 0.3s ease-out;
  vertical-align: middle;
}

[data-theme="dark"] .nav-badge {
  border-color: rgba(15, 23, 42, 0.9);
}

[data-theme="dark"] .section-badge {
  background: #f87171;
}

/* ============================================
   SHARE BUTTON - NOTICEBOARD
   ============================================ */

.entry-share-btn {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(15, 23, 42, 0.04);
  border-radius: var(--radius-full, 9999px);
  cursor: pointer;
  color: #94a3b8;
  font-size: 0.9rem;
  transition: background var(--transition-fast, 150ms ease), color var(--transition-fast, 150ms ease);
  padding: 0;
  line-height: 1;
}

.entry-share-btn:hover,
.entry-share-btn:active {
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
}

.intranet-entry {
  position: relative;
}

[data-theme="dark"] .entry-share-btn {
  background: rgba(255, 255, 255, 0.04);
  color: #64748b;
}

[data-theme="dark"] .entry-share-btn:hover,
[data-theme="dark"] .entry-share-btn:active {
  background: rgba(96, 165, 250, 0.1);
  color: #60a5fa;
}

/* ============================================
   PINNED / PRIORITY NOTIFICATIONS
   ============================================ */

.notification-item {
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  line-height: 1.5;
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-item--pinned {
  border-left: 3px solid #2563eb;
  padding-left: 0.75rem;
  background: rgba(37, 99, 235, 0.03);
  border-radius: 0 var(--radius-sm, 8px) var(--radius-sm, 8px) 0;
  margin-bottom: 0.5rem;
}

.notification-item--urgent {
  border-left: 3px solid #ef4444;
  padding-left: 0.75rem;
  background: rgba(239, 68, 68, 0.03);
  border-radius: 0 var(--radius-sm, 8px) var(--radius-sm, 8px) 0;
  margin-bottom: 0.5rem;
}

.notification-pin-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.15rem;
}

.notification-pin-label--pinned {
  color: #2563eb;
}

.notification-pin-label--urgent {
  color: #ef4444;
}

[data-theme="dark"] .notification-item {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .notification-item--pinned {
  border-left-color: #60a5fa;
  background: rgba(96, 165, 250, 0.04);
}

[data-theme="dark"] .notification-item--urgent {
  border-left-color: #f87171;
  background: rgba(248, 113, 113, 0.04);
}

[data-theme="dark"] .notification-pin-label--pinned {
  color: #60a5fa;
}

[data-theme="dark"] .notification-pin-label--urgent {
  color: #f87171;
}

/* ============================================
   OFFLINE BANNER
   ============================================ */

.offline-banner {
  position: sticky;
  top: 56px;
  z-index: calc(var(--z-sticky, 100) - 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  background: #ff8f00;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  transition: opacity 0.3s ease, max-height 0.3s ease;
}

.offline-banner--back {
  background: #10b981;
}

.offline-banner__icon {
  font-size: 1rem;
  flex-shrink: 0;
}

[data-theme="dark"] .offline-banner {
  background: #b45309;
}

[data-theme="dark"] .offline-banner--back {
  background: #059669;
}

/* ============================================
   PWA STATUS BAR BLEND
   ============================================ */

html,
body {
  background: var(--intranet-top-chrome, #071c39);
}

.intranet-shell {
  min-height: calc(100vh + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  background:
    linear-gradient(180deg, var(--intranet-top-chrome, #071c39) 0, rgba(7, 28, 57, 0.92) 112px, transparent 250px),
    var(--background, #f5f7fb);
}

.intranet-header {
  margin-top: calc(-1 * env(safe-area-inset-top, 0px));
  padding-top: calc(1rem + env(safe-area-inset-top, 0px));
}

.install-banner {
  padding-top: calc(0.85rem + env(safe-area-inset-top, 0px));
}

.install-banner:not(.hidden) + #header-sentinel + .intranet-header {
  margin-top: calc(76px + env(safe-area-inset-top, 0px));
}

.offline-banner {
  top: calc(56px + env(safe-area-inset-top, 0px));
}

[data-theme="dark"] .intranet-shell {
  background:
    linear-gradient(180deg, var(--intranet-top-chrome, #08111f) 0, rgba(8, 17, 31, 0.94) 112px, transparent 250px),
    #0f172a;
}

/* ============================================
   FOOTER COUNTERS
   ============================================ */

.intranet-footer-tools {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.5rem 0 0.75rem;
}

.intranet-live-counters {
  display: inline-flex;
  align-items: stretch;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.intranet-live-counter {
  min-width: 120px;
  padding: 0.7rem 0.95rem;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(15, 23, 42, 0.08);
  display: grid;
  gap: 0.2rem;
  text-align: center;
}

.intranet-live-counter__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted, #64748b);
}

.intranet-live-counter__value {
  font-size: 1.15rem;
  color: #0f172a;
}

.theme-toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
}

.theme-toggle-pill__switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.theme-toggle-pill__input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.theme-toggle-pill__track {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background 0.25s ease;
  cursor: pointer;
}

.theme-toggle-pill__knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 999px;
  transition: transform 0.25s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

[data-theme="dark"] .intranet-live-counter,
[data-theme="dark"] .theme-toggle-pill {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .intranet-live-counter__value {
  color: #e2e8f0;
}

@media (max-width: 640px) {
  .intranet-footer-tools {
    flex-direction: column;
    align-items: stretch;
  }

  .intranet-live-counters {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .theme-toggle-pill {
    justify-content: center;
  }
}
