/* =========================================================
   GOC Portal — Stylesheet
   Palette: deep teal corporate identity, warm neutral paper
   background, single amber accent reserved for the primary
   action (Phone Directory) and unread-mail state only.
   ========================================================= */

:root {
  --teal-900: #003c3f;
  --teal-800: #005458;
  --teal-700: #007377;   /* brand teal */
  --teal-600: #0a8b8f;
  --teal-100: #e3f1f1;
  --paper: #f3f2ee;
  --paper-card: #ffffff;
  --ink-900: #1c2323;
  --ink-600: #4d5a5a;
  --ink-400: #7c8888;
  --line: #e1e6e5;
  --amber: #c9862c;
  --danger: #a13d3d;
  --radius-card: 12px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 2px rgba(16, 40, 40, 0.05), 0 3px 10px rgba(16, 40, 40, 0.045);
  --shadow-card-hover: 0 2px 4px rgba(16, 40, 40, 0.07), 0 8px 20px rgba(16, 40, 40, 0.07);
  --shadow-fab: 0 6px 18px rgba(0, 60, 63, 0.28);
  --font-ui: "Segoe UI", "Inter", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  --font-display: "Segoe UI Semibold", "Inter", -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink-900);
  font-family: var(--font-ui);
  font-size: 14.5px;
  line-height: 1.42;
}

[hidden] {
  display: none !important;
}

a { color: inherit; text-decoration: none; }

button {
  font-family: inherit;
  cursor: pointer;
}

/* ---------------- Top navigation ---------------- */

.topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 0 20px;
  height: 52px;
  background: var(--teal-900);
  color: #eef6f6;
  position: sticky;
  top: 0;
  z-index: 30;
  min-width: 0;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}

.brand-logo {
  display: block;
  border-radius: 5px;
  background: #ffffff;
  padding: 2px;
}

.topbar-title {
  font-size: 14.5px;
  letter-spacing: 0.2px;
}

.topbar-title b {
  font-weight: 600;
  color: #ffffff;
  margin-left: 2px;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.topbar-nav::-webkit-scrollbar { display: none; }

.nav-link {
  flex: none;
  padding: 7px 10px;
  font-size: 12.5px;
  color: #cfe3e3;
  border-radius: 6px;
  white-space: nowrap;
  border: none;
  background: transparent;
  font-family: inherit;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav-link.active {
  background: var(--teal-700);
  color: #ffffff;
}

/* Timesheets dropdown (SGOC / AGSC submenu) */
.nav-item--dropdown {
  position: relative;
  flex: none;
}

.nav-link--dropdown {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.nav-caret {
  flex: none;
  transition: transform 0.15s ease;
}

.nav-item--dropdown.open .nav-link--dropdown,
.nav-link--dropdown[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav-item--dropdown.open .nav-caret {
  transform: rotate(180deg);
}

/* Rendered with position:fixed (top/left set by app.js) so it always
   escapes .topbar-nav's own overflow-x:auto clipping, regardless of
   scroll position. */
.nav-dropdown-menu {
  position: fixed;
  min-width: 160px;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(16, 40, 40, 0.2);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  z-index: 60;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.nav-item--dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-item {
  padding: 8px 11px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-900);
  transition: background-color 0.12s ease, color 0.12s ease;
}

.nav-dropdown-item:hover,
.nav-dropdown-item:focus-visible {
  background: var(--teal-100);
  color: var(--teal-800);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.btn-hamburger {
  display: none;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #eef6f6;
  margin-right: 2px;
}

.btn-hamburger:hover {
  background: rgba(255, 255, 255, 0.16);
}

.room-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 10px;
  margin-right: 4px;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
}

.btn-room {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: #dcecec;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-room svg { flex: none; opacity: 0.85; }

.btn-room:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.32);
  color: #ffffff;
}

@media (max-width: 760px) {
  .btn-room span { display: none; }
  .btn-room { padding: 6px 8px; }
  .room-buttons { padding-right: 6px; margin-right: 2px; }
}

@media (max-width: 480px) {
  .room-buttons { display: none; }
}

.btn-directory {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--amber);
  color: #241804;
  border: none;
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
}

.btn-directory:hover { background: #d99436; }

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 10px 3px 3px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--teal-600);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
}

.user-name {
  font-size: 12.5px;
  color: #eaf4f4;
}

/* Progressively collapse the header on narrow phones so the brand +
   action controls never force the page wider than the viewport. */
@media (max-width: 640px) {
  .topbar { gap: 10px; padding: 0 12px; }
  .btn-directory span { display: none; }
  .btn-directory { padding: 7px 9px; }
}

@media (max-width: 420px) {
  .topbar-title { display: none; }
  .user-name { display: none; }
  .user-chip { padding: 3px; }
}

/* ---------------- Global search (Microsoft 365) ---------------- */
/* A prominent full-width search bar sits between the top navigation and
   the mail/calendar/planner columns below — its own row, not squeezed
   into the header, so it reads as the portal's primary search entry
   point (mirroring how SharePoint places search above page content). */

.search-bar-row {
  max-width: 1500px;
  margin: 20px auto 4px;
  padding: 0 16px;
}

.search-bar-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding: 0 10px 0 10px;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.search-bar-inner:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: #cfdada;
}

.search-bar-inner:focus-within {
  border-color: var(--teal-600);
  box-shadow: 0 0 0 4px var(--teal-100), var(--shadow-card-hover);
  transform: translateY(-1px);
}

.search-icon {
  flex: none;
  width: 32px;
  height: 32px;
  padding: 7px;
  box-sizing: border-box;
  color: var(--teal-700);
  background: var(--teal-100);
  border-radius: 50%;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.search-bar-inner:focus-within .search-icon {
  background: var(--teal-700);
  color: #fff;
}

.search-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink-900);
  caret-color: var(--teal-700);
  letter-spacing: 0.1px;
}

.search-input::placeholder {
  color: var(--ink-400);
}

.search-spinner {
  flex: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid var(--teal-100);
  border-top-color: var(--teal-700);
  animation: search-spin 0.7s linear infinite;
}

@keyframes search-spin {
  to { transform: rotate(360deg); }
}

.search-clear {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--teal-100);
  color: var(--teal-800);
  margin-right: 4px;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.search-clear:hover {
  background: var(--teal-600);
  color: #fff;
  transform: scale(1.06);
}

/* Results panel — a wide card anchored under the bar, with hits grouped
   into their own mini-cards laid out responsively (side by side on wide
   screens, stacked on narrow ones) rather than one long single-column
   list. */

.search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  max-height: 65vh;
  overflow-y: auto;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: 0 24px 56px rgba(16, 40, 40, 0.18);
  padding: 10px;
  z-index: 45;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px;
  align-items: start;
}

.search-group {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
}

.search-group-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px 5px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink-400);
}

.search-group-label svg { flex: none; opacity: 0.8; }

.search-hit {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 7px 8px;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.search-hit:hover,
.search-hit:focus-visible,
.search-hit.is-active {
  background: var(--teal-100);
}

.search-hit-icon {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--teal-100);
  color: var(--teal-800);
}

.search-hit-icon.hit-person {
  background: #e9e3f7;
  color: #5b3ea6;
  border-radius: 50%; /* circular = person avatar, vs the rounded-square content-type icons */
  font-size: 11px;
  font-weight: 600;
}
.search-hit-icon.hit-mail {
  background: var(--teal-100);
  color: var(--teal-700);
}
.search-hit-icon.hit-file {
  background: #e6f0fb;
  color: #2563a8;
}
.search-hit-icon.hit-event {
  background: #fdeee0;
  color: var(--amber);
}
.search-hit-icon.hit-site {
  background: #e6f5ea;
  color: #1f8a4c;
}

.search-hit-main {
  min-width: 0;
  flex: 1 1 auto;
}

.search-hit-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-hit-sub {
  font-size: 11px;
  color: var(--ink-400);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-hit-snippet {
  font-size: 11px;
  color: var(--ink-600);
  margin-top: 2px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.search-hit-snippet mark {
  background: #fdf0d2;
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}

.search-state {
  grid-column: 1 / -1;
  padding: 26px 18px;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-400);
}

.search-state strong {
  color: var(--ink-900);
}

.search-footer {
  grid-column: 1 / -1;
  margin-top: 2px;
  padding: 8px 8px 2px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--ink-400);
  text-align: center;
}

@media (max-width: 640px) {
  .search-results { grid-template-columns: 1fr; }
}

/* ---------------- Sign-in gate ---------------- */

.signin-gate {
  min-height: calc(100vh - 52px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.signin-card {
  max-width: 400px;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 32px 30px;
  text-align: center;
}

.signin-logo {
  display: block;
  margin: 0 auto 16px;
  border-radius: 10px;
}

.signin-card h1 {
  font-size: 18px;
  margin: 0 0 8px;
  color: var(--teal-900);
}

.signin-card p {
  color: var(--ink-600);
  font-size: 13.5px;
  margin: 0 0 20px;
}

.btn-primary {
  background: var(--teal-700);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 600;
  width: 100%;
  transition: background-color 0.15s ease;
}

.btn-primary:hover { background: var(--teal-600); }

.signin-error {
  margin-top: 14px;
  color: var(--danger);
  font-size: 12.5px;
}

/* ---------------- Main grid ---------------- */

.app-grid {
  display: grid;
  grid-template-columns: 25% 45% 30%;
  gap: 16px;
  max-width: 1500px;
  margin: 16px auto;
  padding: 0 16px;
  align-items: start;
}

@media (max-width: 1180px) {
  .app-grid { grid-template-columns: 30% 70%; }
  .col-left { grid-column: 1; grid-row: 2; }
  .col-inbox { grid-column: 1 / -1; grid-row: 1; }
  .col-widgets { grid-column: 2; grid-row: 2; }
}

@media (max-width: 980px) {
  .app-grid { grid-template-columns: 1fr; }
  .col-left,
  .col-inbox,
  .col-widgets { grid-column: 1; grid-row: auto; }

  /* The inline nav becomes a slide-down panel toggled by the
     hamburger button; hidden until .topbar-nav.open is set. */
  .btn-hamburger { display: inline-flex; }

  .topbar-nav {
    display: none;
    position: fixed;
    top: 52px;
    left: 0;
    right: 0;
    max-height: calc(100vh - 52px);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 12px 14px;
    background: var(--teal-900);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 40;
  }

  .topbar-nav.open { display: flex; }

  .topbar-nav .nav-link {
    padding: 11px 12px;
    font-size: 13.5px;
    text-align: left;
  }

  .nav-item--dropdown { width: 100%; }

  .nav-link--dropdown {
    width: 100%;
    justify-content: space-between;
  }

  /* Inside the mobile panel the submenu expands inline (accordion)
     instead of floating, since position:fixed coordinates don't make
     sense stacked in a vertical list. */
  .nav-dropdown-menu {
    position: static;
    min-width: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0 0 0 14px;
    margin-top: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.18s ease;
  }

  .nav-item--dropdown.open .nav-dropdown-menu {
    max-height: 200px;
    margin-top: 2px;
  }

  .nav-dropdown-item {
    color: #cfe3e3;
  }

  .nav-dropdown-item:hover,
  .nav-dropdown-item:focus-visible {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
  }
}

.col-left,
.col-inbox,
.col-widgets {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* ---------------- Cards ---------------- */

.card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: box-shadow 0.18s ease;
}

/* app.js sets this card's height inline (in px) so the left / inbox /
   widgets columns always sum to the same total height. Its internal list
   flexes to fill whatever that height turns out to be, rather than
   relying on a fixed max-height. */
.card-inbox {
  display: flex;
  flex-direction: column;
}

.card:hover {
  box-shadow: var(--shadow-card-hover);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
}

.card-head h2 {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
  color: var(--teal-900);
  letter-spacing: 0.1px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.head-subtag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--teal-700);
  background: var(--teal-100);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}

.card-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-ghost {
  background: none;
  border: none;
  color: var(--ink-400);
  padding: 5px;
  border-radius: 6px;
  display: inline-flex;
}

.btn-ghost:hover {
  background: var(--teal-100);
  color: var(--teal-800);
}

/* ---------------- Embedded views (meeting rooms) ---------------- */

.embed-note {
  margin: 0;
  padding: 9px 16px;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--ink-400);
  background: var(--teal-100);
  border-bottom: 1px solid var(--line);
}

.embed-note a {
  color: var(--teal-800);
  font-weight: 600;
  text-decoration: underline;
}

.embed-frame {
  width: 100%;
  height: 320px;
  border: none;
  display: block;
  background: var(--paper);
}

.embed-frame--room {
  height: 68vh;
}

/* ---------------- Inbox list ---------------- */

.inbox-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.mail-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 11px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  align-items: start;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.15s ease;
}

.mail-row:hover, .mail-row:focus-visible {
  background-color: var(--teal-100);
  cursor: pointer;
}

.mail-row:last-child { border-bottom: none; }

.mail-row.unread { background: #fbf8f2; }

.mail-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--teal-700);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex: none;
}

.mail-main { min-width: 0; }

.mail-top-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.mail-sender {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mail-row.unread .mail-sender { color: var(--teal-900); }

.mail-time {
  font-size: 11px;
  color: var(--ink-400);
  flex: none;
}

.mail-subject {
  font-size: 13px;
  color: var(--ink-900);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mail-preview {
  font-size: 12px;
  color: var(--ink-400);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.unread-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  margin-top: 5px;
  flex: none;
}

/* ---------------- Widget lists ---------------- */
/* Fixed max-height + scroll keeps each card from growing past its box
   as new Outlook/Planner/Teams items arrive — the card stays a tidy
   rectangle and extra rows scroll instead of pushing the layout around. */

.widget-list {
  padding: 4px 3px;
  max-height: 300px;
  overflow-y: auto;
}

/* Static lists (e.g. Downloads & Setup) show every row in full rather
   than scrolling a fixed viewport. When app.js grows this card's total
   height to help match the other columns, the extra space simply sits
   below the last row inside the card (it's overflow:hidden), so this
   never needs to scroll on its own. */
.widget-list--flat {
  max-height: none;
  overflow: visible;
}

.widget-row {
  display: flex;
  gap: 10px;
  padding: 8px 13px;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.15s ease;
}

.widget-row:hover, .widget-row:focus-visible {
  background-color: var(--teal-100);
  cursor: pointer;
}

.widget-row + .widget-row {
  border-top: 1px solid var(--line);
}

.widget-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--teal-100);
  color: var(--teal-800);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  font-size: 10.5px;
  font-weight: 700;
}

/* Circular, initials-based avatar for widget rows that represent a
   *person* (Vacation Calendar, Teams Chats) — background/color are set
   inline per-name by app.js. Deliberately round, versus .widget-icon's
   rounded square, so a person reads as an avatar at a glance and not as
   a status badge (a day, a percentage, a platform label). */
.person-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--teal-700);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  font-size: 11px;
  font-weight: 600;
}

.widget-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-900);
}

.widget-sub {
  font-size: 11.5px;
  color: var(--ink-400);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.widget-empty, .inbox-empty {
  padding: 16px;
  font-size: 12.5px;
  color: var(--ink-400);
  text-align: center;
}

.widget-error, .inbox-error {
  padding: 13px 16px;
  font-size: 12px;
  color: var(--danger);
}

/* ---------------- Skeleton loading ---------------- */

.skeleton-list { padding: 10px 16px; }

.skeleton-row {
  height: 40px;
  border-radius: 6px;
  margin-bottom: 9px;
  background: linear-gradient(90deg, #eef0ee 25%, #f6f7f5 37%, #eef0ee 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}

.skeleton-row--sm { height: 27px; }

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

@media (prefers-reduced-motion: reduce) {
  .skeleton-row { animation: none; }
}

/* ---------------- Floating action buttons ---------------- */

.fab-new-mail,
.fab-citrix {
  position: fixed;
  right: 26px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  padding: 13px 20px 13px 17px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-fab);
  font-size: 13.5px;
  font-weight: 600;
  z-index: 40;
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.fab-new-mail {
  bottom: 26px;
  background: var(--teal-700);
}

.fab-new-mail:hover {
  background: var(--teal-600);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 60, 63, 0.34);
}

/* Citrix Connect sits directly above New Mail */
.fab-citrix {
  bottom: 84px;
  background: var(--teal-900);
}

.fab-citrix:hover {
  background: var(--teal-800);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 60, 63, 0.34);
}

.fab-new-mail:active,
.fab-citrix:active {
  transform: translateY(0);
}

@media (max-width: 640px) {
  .fab-new-mail span,
  .fab-citrix span { display: none; }
  .fab-new-mail,
  .fab-citrix {
    padding: 14px;
    right: 18px;
  }
  .fab-new-mail { bottom: 18px; }
  .fab-citrix { bottom: 72px; }
}

/* ---------------- Modals (directory / meeting rooms) ---------------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 20, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}

.modal-overlay[hidden] { display: none; }

.modal-panel {
  background: var(--paper-card);
  border-radius: var(--radius-card);
  width: 100%;
  max-width: 620px;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.modal-panel--wide {
  max-width: 920px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 0;
  font-size: 15px;
  color: var(--teal-900);
}

.modal-body {
  padding: 15px 20px 18px;
  overflow-y: auto;
  overflow-x: auto;
  max-width: 100%;
}

.modal-body--frame {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.directory-search {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 13px;
  margin-bottom: 13px;
}

.directory-search:focus {
  outline: 2px solid var(--teal-600);
  outline-offset: 1px;
}

.directory-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.directory-table th {
  text-align: left;
  font-size: 11px;
  color: var(--ink-400);
  font-weight: 600;
  padding: 7px 10px;
  border-bottom: 2px solid var(--line);
}

.directory-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-900);
}

.directory-group-row td {
  background: var(--teal-100);
  color: var(--teal-900);
  font-weight: 600;
  font-size: 12px;
  padding: 6px 10px;
}

.directory-note {
  margin-top: 13px;
  font-size: 11.5px;
  color: var(--ink-400);
}

/* Focus visibility for keyboard users */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--teal-600);
  outline-offset: 2px;
}
