:root {
  --uh-blue: #3c64a6;
  --uh-blue-dark: #24457a;
  --uh-blue-mid: #3c64a6;
  --uh-blue-soft: #edf2f9;
  --uh-gold: #f4b038;
  --uh-gold-soft: #fff6e3;
  --bg: #fefeff;
  --bg-accent: #f3f6fb;
  --surface: #fefeff;
  --border: #e4eaf3;
  --ink: #152238;
  --muted: #5b6b82;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: none;
  --sidebar-w: 272px;
  --sidebar-w-collapsed: 72px;
  --header-h: 64px;
  --font: 'Source Sans 3', system-ui, sans-serif;
  --font-display: 'DM Sans', var(--font);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--uh-blue);
}

.grid-app {
  display: flex;
  min-height: 100vh;
}

.grid-app.is-loading .grid-main {
  opacity: 0.55;
  pointer-events: none;
}

/* ——— Sidebar (soft premium chrome) ——— */
.grid-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: #f7f9fc;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  border-right: 1px solid var(--border);
  transition: width 0.2s ease;
}

.grid-shell {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  transition: margin-left 0.2s ease;
}

.grid-sidebar-collapse {
  position: absolute;
  top: 78px;
  right: -13px;
  z-index: 46;
  width: 26px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 0 10px 10px 0;
  background: #fff;
  color: var(--uh-blue-dark);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 8px rgba(21, 34, 56, 0.08);
  transition: background 0.15s ease, color 0.15s ease, transform 0.2s ease;
}

.grid-sidebar-collapse:hover,
.grid-sidebar-collapse:focus-visible {
  background: var(--uh-blue-soft);
  outline: none;
}

.grid-sidebar-collapse svg {
  display: block;
  transition: transform 0.2s ease;
}

.grid-app.sidebar-collapsed .grid-sidebar-collapse svg {
  transform: rotate(180deg);
}

.grid-brand {
  padding: 18px 16px 16px;
  border-bottom: 1px solid var(--border);
  background: #3c64a6;
  transition: padding 0.2s ease;
}

.grid-brand a {
  text-decoration: none;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 40px;
}

.grid-brand-logo {
  display: block;
  width: min(200px, 100%);
  height: auto;
  max-height: 52px;
  object-fit: contain;
  object-position: left center;
}

.grid-brand-mark {
  display: none;
  width: 36px;
  height: 36px;
  margin: 0 auto;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.02em;
  align-items: center;
  justify-content: center;
}

.grid-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 12px 12px;
  min-height: 0;
}

.grid-sidebar-footer {
  flex-shrink: 0;
  padding: 10px 12px 14px;
  border-top: 1px solid var(--border);
  background: #f3f6fb;
}

.grid-nav-section {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  opacity: 0.9;
  padding: 14px 12px 8px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
}

.grid-nav a,
.grid-nav button.nav-parent {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  color: #334155;
  text-decoration: none;
  font-size: 15.5px;
  font-weight: 600;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background 0.15s ease, color 0.15s ease;
}

.grid-nav-ico {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--uh-blue);
}

.grid-nav-ico svg {
  width: 18px;
  height: 18px;
  display: block;
}

.grid-nav a.active .grid-nav-ico {
  color: var(--uh-blue-dark);
}

.grid-nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 901px) {
  .grid-app.sidebar-collapsed {
    --sidebar-w: var(--sidebar-w-collapsed);
  }

  .grid-app.sidebar-collapsed .grid-brand {
    padding: 14px 10px;
  }

  .grid-app.sidebar-collapsed .grid-brand-logo {
    display: none;
  }

  .grid-app.sidebar-collapsed .grid-brand-mark {
    display: inline-flex;
  }

  .grid-app.sidebar-collapsed .grid-nav {
    padding: 12px 8px;
  }

  .grid-app.sidebar-collapsed .grid-nav-section {
    height: 10px;
    margin: 8px 8px 4px;
    padding: 0;
    font-size: 0;
    color: transparent;
    border-top: 1px solid var(--border);
  }

  .grid-app.sidebar-collapsed .grid-nav a,
  .grid-app.sidebar-collapsed .grid-nav button.nav-parent {
    justify-content: center;
    padding: 11px 8px;
    gap: 0;
  }

  .grid-app.sidebar-collapsed .grid-nav-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .grid-app.sidebar-collapsed .grid-nav-children {
    margin: 2px 0 8px;
    padding-left: 0;
    border-left: 0;
  }

  .grid-app.sidebar-collapsed .grid-sidebar-footer {
    padding: 10px 8px 12px;
  }

  .grid-app.sidebar-collapsed .grid-user-chip {
    grid-template-columns: 1fr;
    grid-template-areas: 'avatar';
    justify-items: center;
    padding: 8px 4px;
  }

  .grid-app.sidebar-collapsed .grid-user-meta,
  .grid-app.sidebar-collapsed .grid-user-chip .grid-role-badge,
  .grid-app.sidebar-collapsed .grid-user-caret {
    display: none;
  }

  .grid-app.sidebar-collapsed .grid-user-dropdown {
    left: calc(100% + 10px);
    right: auto;
    bottom: 8px;
    width: min(280px, calc(100vw - 96px));
    box-shadow: 0 14px 36px rgba(21, 34, 56, 0.14);
  }
}

.grid-nav a:hover,
.grid-nav button.nav-parent:hover {
  background: #eef3fa;
  color: var(--uh-blue-dark);
}

.grid-nav a.active {
  background: #e8eef8;
  color: var(--uh-blue-dark);
  box-shadow: inset 3px 0 0 var(--uh-blue);
}

.grid-nav-group {
  margin-bottom: 4px;
}

.grid-nav-children {
  margin: 2px 0 8px 10px;
  padding-left: 10px;
  border-left: 1px solid var(--border);
}

.grid-nav-children a {
  font-size: 14.5px;
  font-weight: 500;
  padding: 8px 12px;
}

.grid-user-menu {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}

.grid-user-chip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    'avatar meta caret'
    'avatar badge caret';
  column-gap: 10px;
  row-gap: 4px;
  align-items: center;
  width: 100%;
  max-width: none;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.grid-user-chip:hover {
  background: #eef3fa;
  border-color: #d7e2f0;
}

.grid-user-chip:focus-visible {
  outline: 2px solid #9bb4d8;
  outline-offset: 2px;
}

.grid-user-chip[aria-expanded='true'] {
  border-color: #c5d2e4;
  background: #e8eef8;
}

.grid-user-avatar {
  grid-area: avatar;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #e8eef8;
  color: var(--uh-blue-dark);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.grid-user-meta {
  grid-area: meta;
  min-width: 0;
}

.grid-user-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.grid-user-email {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.grid-user-chip .grid-role-badge {
  grid-area: badge;
  justify-self: start;
  margin-left: 0;
}

.grid-user-caret {
  grid-area: caret;
  width: 0;
  height: 0;
  margin-left: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--muted);
  flex-shrink: 0;
  align-self: center;
  transition: transform 0.15s ease;
}

.grid-user-chip[aria-expanded='true'] .grid-user-caret {
  transform: rotate(180deg);
}

.grid-user-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  top: auto;
  width: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 -10px 28px rgba(21, 34, 56, 0.12);
  z-index: 50;
  overflow: hidden;
}

.grid-user-dropdown[hidden] {
  display: none !important;
}

.grid-user-dropdown-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 12px;
  background: var(--uh-gold-soft);
  border-bottom: 1px solid #f0e2c0;
}

.grid-user-dropdown-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--uh-blue);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.grid-user-dropdown-meta {
  min-width: 0;
  flex: 1;
}

.grid-user-dropdown-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.grid-user-dropdown-email {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.grid-user-dropdown-body {
  padding: 6px;
  background: #fff;
}

.grid-user-menu-item {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  border: 0;
  background: transparent;
  color: var(--uh-blue-dark);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 11px 12px;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  box-sizing: border-box;
}

.grid-user-menu-item:hover,
.grid-user-menu-item:focus-visible {
  background: var(--uh-blue-soft);
  outline: none;
}

.grid-user-menu-item.is-signout {
  color: #b4534a;
  font-weight: 600;
}

.grid-user-menu-item.is-signout:hover,
.grid-user-menu-item.is-signout:focus-visible {
  background: #fdf2f1;
  color: #9f3d35;
}

.grid-user-menu-ico {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.grid-user-menu-item[hidden] {
  display: none !important;
}

.grid-local-dev {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #f4f7fb;
}

.grid-local-dev[hidden] {
  display: none !important;
}

.grid-local-dev-card {
  width: min(360px, 100%);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.grid-local-dev-title {
  margin: 0 0 4px;
  font-weight: 700;
  color: var(--uh-blue-dark);
}

.grid-signin-hint {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.grid-local-dev-card .grid-auth-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  text-align: center;
}

.grid-app[hidden] {
  display: none !important;
}

.grid-signin-label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--uh-blue-dark);
  margin-bottom: 6px;
}

.grid-signin-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
  background: #fff;
}

.grid-signin-input:focus {
  outline: 2px solid #9bb4d8;
  outline-offset: 1px;
  border-color: var(--uh-blue);
}

.grid-signin-status {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: #9b1c1c;
}

.grid-signin-status.is-ok {
  color: #1f7a3a;
}

.grid-signin-status[hidden] {
  display: none !important;
}

.grid-auth-cta {
  background: var(--uh-blue) !important;
  border-color: var(--uh-blue) !important;
  color: #fff !important;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 12px;
  margin-top: 6px;
}

.grid-auth-cta:hover {
  background: var(--uh-blue-dark) !important;
  border-color: var(--uh-blue-dark) !important;
}

/* ——— Shell ——— */
.grid-topbar {
  min-height: var(--header-h);
  background: #3c64a6;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 28px;
  position: sticky;
  top: 0;
  z-index: 30;
  gap: 16px;
  color: #fff;
}

.grid-topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.grid-topbar-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.grid-topbar-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.grid-topbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
  min-width: 0;
}

.grid-topbar-action {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: 108px;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--uh-gold);
  color: #fff;
  text-decoration: none;
  text-align: center;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.15;
  border: 1px solid #e0a22e;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.grid-topbar-action:hover,
.grid-topbar-action:focus-visible {
  filter: brightness(0.97);
  outline: none;
}

.grid-topbar-action:focus-visible {
  box-shadow: 0 0 0 3px rgba(244, 176, 56, 0.35);
}

.grid-role-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--uh-blue-soft);
  color: var(--uh-blue-dark);
  border: 1px solid transparent;
}

.grid-role-badge.is-admin {
  background: var(--uh-gold-soft);
  color: #7a5608;
  border-color: #ecd18a;
}

.grid-mobile-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 0;
}

.grid-mobile-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

.grid-main {
  flex: 1;
  padding: 28px 28px 48px;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  transition: opacity 0.15s ease;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: clip;
}

.grid-main.grid-main--wide {
  max-width: none;
  padding-left: 20px;
  padding-right: 20px;
}

.grid-page-loading {
  text-align: center;
  padding: 64px 24px;
  color: var(--muted);
  font-weight: 500;
}

.grid-page-error {
  background: #fff5f5;
  border: 1px solid #fecaca;
  color: #9b1c1c;
  padding: 18px 20px;
  border-radius: var(--radius);
}

.grid-page-error p {
  margin: 8px 0 0;
}

.grid-page-content {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  min-height: 200px;
}

.grid-breadcrumb {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 14px;
  font-weight: 500;
}

.grid-breadcrumb a {
  color: var(--uh-blue);
  text-decoration: none;
  font-weight: 600;
}

.grid-breadcrumb a:hover {
  text-decoration: underline;
}

.grid-page-iframe-wrap {
  padding: 0;
  overflow: hidden;
}

.grid-page-iframe {
  display: block;
  width: 100%;
  min-height: 720px;
  border: none;
  background: var(--bg);
}

.grid-app:has(.grid-main--fill) {
  height: 100vh;
  overflow: hidden;
}

.grid-shell:has(.grid-main--fill) {
  height: 100vh;
  min-height: 0;
}

.grid-main.grid-main--fill {
  max-width: none;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 12px 16px 16px;
  overflow: hidden;
}

.grid-main--fill .grid-breadcrumb {
  flex-shrink: 0;
  margin-bottom: 8px;
}

.grid-main--fill .grid-page-iframe-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
}

.grid-main--fill .grid-page-iframe--fill {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
}

/* ——— Announcements ——— */
.grid-announce-row {
  display: flex;
  justify-content: center;
  padding: 10px 28px 0;
}

.grid-announce-row[hidden],
.grid-announce-bar[hidden] {
  display: none;
}

.grid-announce-bar,
.grid-announce-pill {
  display: inline-flex;
  align-items: flex-start;
  gap: 12px;
  max-width: min(920px, 100%);
  width: 100%;
  min-height: 44px;
  padding: 10px 10px 10px 12px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(244, 176, 56, 0.16) 0%, var(--uh-gold-soft) 28%, #fffdf8 100%);
  border: 1px solid color-mix(in srgb, var(--uh-gold) 38%, var(--border, #e4eaf3));
  border-left: 3px solid var(--uh-gold);
  font-size: 14.5px;
  color: var(--uh-blue-dark);
  line-height: 1.45;
  box-shadow: 0 1px 2px rgba(21, 34, 56, 0.04);
  box-sizing: border-box;
  min-width: 0;
}

.grid-announce-badge {
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--uh-gold);
  color: var(--uh-blue-dark);
  line-height: 1.2;
}

.grid-announce-viewport {
  flex: 1;
  min-width: 0;
  max-height: 7.6rem;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--uh-blue) 35%, transparent) transparent;
}

.grid-announce-text {
  display: block;
  width: 100%;
  text-align: left;
  font-weight: 500;
  color: var(--uh-blue-dark);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  transform: translateX(0);
  opacity: 1;
}

.grid-announce-text .announce-fmt-p {
  margin: 0 0 0.55em;
}

.grid-announce-text .announce-fmt-p:last-child {
  margin-bottom: 0;
}

.grid-announce-text .announce-fmt-ul {
  margin: 0.25em 0 0.65em;
  padding-left: 1.2em;
  list-style: disc;
}

.grid-announce-text .announce-fmt-ul:last-child {
  margin-bottom: 0;
}

.grid-announce-text .announce-fmt-ul li {
  margin: 0.15em 0;
}

.grid-announce-text strong {
  font-weight: 800;
}

.grid-announce-text em {
  font-style: italic;
}

.grid-announce-text.is-slide-out {
  animation: grid-announce-out 0.32s ease forwards;
}

.grid-announce-text.is-slide-in {
  animation: grid-announce-in 0.36s ease forwards;
}

@keyframes grid-announce-out {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-28px);
    opacity: 0;
  }
}

@keyframes grid-announce-in {
  from {
    transform: translateX(28px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.grid-announce-text a {
  color: var(--uh-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 700;
}

.grid-announce-dismiss {
  flex-shrink: 0;
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  background: rgba(60, 100, 166, 0.08);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--uh-blue);
  padding: 0;
}

.grid-announce-dismiss:hover {
  background: rgba(60, 100, 166, 0.14);
  border-color: color-mix(in srgb, var(--uh-blue) 22%, transparent);
}

.grid-domain-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 12px 20px;
  background: #fff5f5;
  border-bottom: 1px solid #fecaca;
  color: #9b1c1c;
  font-size: 14.5px;
  font-weight: 600;
}

.grid-domain-banner[hidden] {
  display: none;
}

.grid-domain-banner strong {
  font-weight: 800;
}

/* ——— Home / dashboard ——— */
.dash-root {
  max-width: 1120px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: clip;
}

.dash-welcome {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.dash-welcome-aside,
.mgr-welcome-aside {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 6px;
  margin-left: auto;
}

.dash-eyebrow {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--uh-blue);
}

.dash-greeting {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.6vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.15;
}

.dash-sub {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.dash-welcome-meta,
.grid-stamp {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  line-height: 1.2;
  text-align: right;
  width: 100%;
  max-width: 280px;
}

.grid-wx {
  min-width: min(100%, 220px);
}

.grid-wx-card {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 8px;
  min-height: 92px;
  min-width: 220px;
  max-width: 280px;
  padding: 12px 12px 12px 14px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--uh-blue) 22%, var(--border));
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(244, 176, 56, 0.28) 0%, transparent 45%),
    linear-gradient(145deg, #3c64a6 0%, #2a4d86 48%, #1f3d6d 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(36, 69, 122, 0.18);
  overflow: hidden;
}

.grid-wx-card.is-enter {
  animation: grid-wx-enter 0.55s ease;
}

@keyframes grid-wx-enter {
  from {
    transform: translateY(6px) scale(0.96);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.grid-wx-card.is-loading,
.grid-wx-card.is-empty {
  background: linear-gradient(145deg, #5a7fb8 0%, #3c64a6 100%);
}

.grid-wx-card.is-night,
.grid-wx-card.is-rain,
.grid-wx-card.is-snow {
  background:
    radial-gradient(100% 120% at 100% 0%, rgba(244, 176, 56, 0.12) 0%, transparent 40%),
    linear-gradient(145deg, #243b66 0%, #1a2f52 55%, #12243f 100%);
}

.grid-wx-card.is-wind {
  background:
    radial-gradient(100% 120% at 100% 0%, rgba(255, 255, 255, 0.12) 0%, transparent 42%),
    linear-gradient(145deg, #4a74b0 0%, #3c64a6 50%, #2f538c 100%);
}

.grid-wx-card.is-cloud {
  background:
    radial-gradient(100% 120% at 100% 0%, rgba(255, 255, 255, 0.16) 0%, transparent 45%),
    linear-gradient(145deg, #5f82b8 0%, #3c64a6 100%);
}

.grid-wx-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.grid-wx-temp {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.grid-wx-day,
.grid-wx-cond,
.grid-wx-place {
  font-size: 12.5px;
  font-weight: 600;
  opacity: 0.92;
  line-height: 1.25;
}

.grid-wx-place {
  opacity: 0.78;
  font-weight: 500;
  margin-top: 2px;
}

.grid-wx-art {
  position: relative;
  z-index: 1;
  width: 92px;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.92);
  align-self: center;
}

.grid-wx-scene {
  width: 100%;
  height: auto;
  display: block;
}

.grid-wx-sun {
  fill: var(--uh-gold);
  transform-origin: center;
  animation: grid-wx-sun-pulse 2.8s ease-in-out infinite;
}

.grid-wx-sun--dim {
  fill: rgba(244, 176, 56, 0.55);
}

.grid-wx-rays {
  color: var(--uh-gold);
  transform-origin: 78px 36px;
  animation: grid-wx-spin 18s linear infinite;
}

.grid-wx-cloud {
  fill: rgba(255, 255, 255, 0.92);
  animation: grid-wx-drift 5.5s ease-in-out infinite;
}

.grid-wx-cloud--soft {
  fill: rgba(255, 255, 255, 0.55);
}

.grid-wx-rain path {
  stroke: #cfe3ff;
  stroke-width: 2;
  stroke-linecap: round;
  animation: grid-wx-rain 0.9s linear infinite;
}

.grid-wx-rain path:nth-child(2) { animation-delay: 0.15s; }
.grid-wx-rain path:nth-child(3) { animation-delay: 0.3s; }
.grid-wx-rain path:nth-child(4) { animation-delay: 0.45s; }

.grid-wx-snow circle {
  fill: #fff;
  animation: grid-wx-snow 1.8s linear infinite;
}

.grid-wx-snow circle:nth-child(2) { animation-delay: 0.3s; }
.grid-wx-snow circle:nth-child(3) { animation-delay: 0.55s; }
.grid-wx-snow circle:nth-child(4) { animation-delay: 0.8s; }

.grid-wx-wind {
  color: rgba(255, 255, 255, 0.88);
  animation: grid-wx-wind 1.4s ease-in-out infinite;
}

.grid-wx-moon {
  fill: #f4d9a0;
  animation: grid-wx-moon-glow 2.6s ease-in-out infinite;
}

.grid-wx-star {
  fill: #fff8ea;
  animation: grid-wx-twinkle 2s ease-in-out infinite;
}

@keyframes grid-wx-sun-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

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

@keyframes grid-wx-drift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}

@keyframes grid-wx-rain {
  from { transform: translateY(-4px); opacity: 0; }
  30% { opacity: 1; }
  to { transform: translateY(10px); opacity: 0; }
}

@keyframes grid-wx-snow {
  from { transform: translateY(-2px); opacity: 0; }
  40% { opacity: 1; }
  to { transform: translateY(12px); opacity: 0; }
}

@keyframes grid-wx-wind {
  0%, 100% { transform: translateX(0); opacity: 0.7; }
  50% { transform: translateX(6px); opacity: 1; }
}

@keyframes grid-wx-moon-glow {
  0%, 100% { opacity: 0.88; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

@keyframes grid-wx-twinkle {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .grid-wx-card.is-enter,
  .grid-wx-sun,
  .grid-wx-rays,
  .grid-wx-cloud,
  .grid-wx-rain path,
  .grid-wx-snow circle,
  .grid-wx-wind,
  .grid-wx-moon,
  .grid-wx-star {
    animation: none !important;
  }
}

@media (max-width: 640px) {
  .dash-welcome-aside,
  .mgr-welcome-aside {
    width: 100%;
    align-items: stretch;
  }

  .grid-wx,
  .grid-wx-card {
    width: 100%;
    max-width: none;
  }

  .dash-welcome-meta,
  .grid-stamp,
  .mgr-meta {
    text-align: right;
  }
}

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 28px;
  min-width: 0;
}

.dash-widget--span {
  grid-column: 1 / -1;
}

.dash-widget {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  min-height: 280px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.dash-widget[data-widget='calendar'] {
  height: 100%;
}

.dash-widget[data-widget='calendar'] .crm-cal-week {
  flex-shrink: 0;
}

.dash-widget[data-widget='calendar'] .dash-list {
  flex: 1 1 auto;
  min-height: 140px;
  max-height: none;
  overflow: auto;
}

.dash-widget[data-widget='calendar'] .dash-action {
  margin-top: auto;
  flex-shrink: 0;
}

.dash-widget--tools {
  min-height: 0;
}

.dash-widget--tools .quick {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.dash-widget--tools .q {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 12px;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background 0.12s ease, border-color 0.12s ease;
  min-height: 72px;
}

.dash-widget--tools .q:hover {
  background: #f5f8fc;
  border-color: #b7c7de;
}

.dash-widget--tools .q > div {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--uh-blue-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-widget--tools .q img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.dash-widget--tools .q span {
  display: block;
  color: var(--uh-blue);
  font-weight: 700;
  font-size: 14.5px;
  line-height: 1.3;
  margin: 0;
}

.dash-widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.dash-widget-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.dash-widget-title h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.dash-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--uh-blue-soft);
  color: var(--uh-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-ico svg {
  width: 18px;
  height: 18px;
}

.dash-see-all {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--uh-blue);
  text-decoration: none;
  white-space: nowrap;
}

.dash-see-all:hover {
  text-decoration: underline;
}

.dash-widget-note {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
}

.dash-leave-gauge {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 12px;
  background: #f5f8fc;
  border: 1px solid #e8eef6;
}

.dash-gauge-ring {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 4px solid var(--uh-blue);
  border-top-color: var(--uh-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--uh-blue-dark);
  background: #fefeff;
}

.dash-gauge-label {
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
}

.dash-gauge-sub {
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 2px;
}

.dash-leave-sections {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  min-height: 0;
}

.dash-leave-section-title {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.dash-leave-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.dash-leave-actions .dash-action {
  margin-top: 0;
}

.dash-action--secondary {
  background: #f5f8fc;
  border-color: #c9d6ea;
  color: var(--uh-blue);
  cursor: pointer;
  font: inherit;
  width: 100%;
}

.dash-action--secondary:hover {
  background: var(--uh-blue-soft);
  border-color: #9bb4d8;
}

.dash-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 168px;
  overflow: auto;
}

.dash-widget[data-widget='tasks'] .dash-list,
.dash-widget[data-widget='leaves'] .dash-list {
  max-height: 280px;
}

.dash-widget[data-widget='pulse'] .dash-list--news {
  flex: 1;
  min-height: 0;
  max-height: none;
}

/* Leave calendar modal */
.leave-cal-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.leave-cal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(21, 34, 56, 0.45);
}

.leave-cal-dialog {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(88vh, 860px);
  display: flex;
  flex-direction: column;
  background: #fefeff;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.leave-cal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}

.leave-cal-kicker {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--uh-blue);
}

.leave-cal-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.leave-cal-close {
  border: 1px solid var(--border);
  background: transparent;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--muted);
  font-size: 16px;
}

.leave-cal-close:hover {
  background: #f5f8fc;
  color: var(--ink);
}

.leave-cal-body {
  padding: 16px 20px 20px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.leave-cal-week {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.leave-cal-week-label {
  margin: 0;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--uh-blue-dark);
  background: #f5f8fc;
  border-bottom: 1px solid var(--border);
}

.leave-cal-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.leave-cal-day {
  min-height: 92px;
  padding: 8px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid transparent;
}

.leave-cal-day:last-child {
  border-right: none;
}

.leave-cal-day.is-today {
  background: var(--uh-blue-soft);
}

.leave-cal-day.is-empty {
  background: #fafbfc;
}

.leave-cal-day-head {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 6px;
}

.leave-cal-dow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.leave-cal-dom {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.leave-cal-person {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--uh-blue-dark);
  background: #edf2f9;
  border-radius: 6px;
  padding: 3px 5px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leave-cal-more {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
}

.leave-cal-footer {
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border);
}

.leave-cal-footer .dash-action {
  margin-top: 0;
}

@media (max-width: 720px) {
  .leave-cal-days {
    grid-template-columns: 1fr;
  }

  .leave-cal-day {
    min-height: 0;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .leave-cal-day:last-child {
    border-bottom: none;
  }
}

.dash-list li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: #f8fafc;
  min-width: 0;
}

.dash-list li:hover {
  border-color: var(--border);
  background: #f5f8fc;
}

.dash-list-main {
  min-width: 0;
  flex: 1;
}

.dash-list-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.dash-list .dash-badge {
  flex-shrink: 0;
  margin-top: 2px;
}

a.dash-list-title-link {
  display: block;
  color: var(--brand, #3c64a6);
  text-decoration: none;
}

a.dash-list-title-link:hover {
  text-decoration: underline;
  color: #2f5088;
}

.dash-list-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.dash-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e8f6ec;
  color: #1f7a3a;
}

.dash-badge.is-pending {
  background: #fff4d6;
  color: #7a5608;
}

.dash-badge.is-news {
  background: var(--uh-blue-soft);
  color: var(--uh-blue-dark);
}

.dash-badge.is-overdue {
  background: #fde8e8;
  color: #9b1c1c;
}

.dash-badge.is-today-task {
  background: #fff4d6;
  color: #7a5608;
}

.dash-action {
  display: block;
  margin-top: 14px;
  text-align: center;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--uh-blue-dark);
  font-weight: 700;
  font-size: 14.5px;
  text-decoration: none;
  background: transparent;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.dash-action:hover {
  background: var(--uh-gold-soft);
  border-color: #e6c57a;
  color: var(--uh-blue-dark);
}

.dash-week {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.dash-week--pto {
  margin: 14px 0 0;
}

.crm-cal-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}

.crm-cal-day {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 6px;
  min-height: 72px;
  background: transparent;
}

.crm-cal-day.is-today {
  border-color: var(--uh-blue);
  background: var(--uh-blue-soft);
}

.crm-cal-day-head {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 6px;
}

.crm-cal-dow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.crm-cal-dom {
  font-size: 13px;
  font-weight: 700;
  color: var(--uh-blue-dark);
}

.crm-cal-pill {
  display: block;
  font-size: 10.5px;
  font-weight: 650;
  color: var(--uh-blue-dark);
  background: #edf2f9;
  border-radius: 6px;
  padding: 3px 5px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  border: none;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  font-family: inherit;
  cursor: default;
}

a.crm-cal-pill {
  cursor: pointer;
}

a.crm-cal-pill:hover {
  background: #dfe8f5;
  color: #1f3b73;
}

.crm-cal-more {
  display: inline-block;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 10px;
  font-weight: 700;
  color: var(--uh-blue);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

.crm-cal-more:hover {
  text-decoration: underline;
  color: var(--uh-blue-dark);
}

.crm-day-dialog {
  width: min(520px, 100%);
  max-height: min(80vh, 640px);
}

.crm-day-body {
  padding: 12px 16px 16px;
}

.crm-day-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.crm-day-list li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f8fafc;
}

.crm-day-list-main {
  min-width: 0;
  flex: 1;
}

.crm-day-list-title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--uh-blue-dark);
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-decoration: none;
}

a.crm-day-list-title:hover {
  text-decoration: underline;
  color: #1f3b73;
}

.crm-day-list-sub {
  margin-top: 4px;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.4;
}

.crm-day-list-time {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--uh-blue);
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--uh-blue-soft);
}

.crm-day-empty {
  margin: 8px 0;
  padding: 18px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  border: 1px dashed var(--border);
  border-radius: 12px;
}

@media (max-width: 720px) {
  .crm-cal-week {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.dash-day {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 6px;
  text-align: center;
  background: transparent;
}

.dash-day.is-today {
  border-color: var(--uh-blue);
  background: var(--uh-blue-soft);
}

.dash-day-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dash-day-num {
  margin-top: 4px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--uh-blue-dark);
}

.dash-kb {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* ——— Internal Directory (company resources) ——— */
.dir-root {
  max-width: 1120px;
  margin: 0 auto;
}

.dir-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 22px;
}

.dir-pto {
  margin-bottom: 16px;
  min-height: 0;
  padding: 12px 14px 12px;
  border-radius: 12px;
}

.dir-pto .dash-widget-head {
  margin-bottom: 6px;
}

.dir-pto .dash-widget-title {
  gap: 8px;
}

.dir-pto .dash-widget-title h2 {
  font-size: 15px;
}

.dir-pto .dash-ico {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.dir-pto .dash-ico svg {
  width: 14px;
  height: 14px;
}

.dir-pto .dash-widget-note {
  margin: 0 0 8px;
  font-size: 12px;
}

.dir-pto .dash-leave-gauge {
  padding: 8px 10px;
  gap: 10px;
  margin-bottom: 8px;
  border-radius: 10px;
}

.dir-pto .dash-gauge-ring {
  width: 40px;
  height: 40px;
  font-size: 15px;
}

.dir-pto .dash-gauge-label {
  font-size: 12px;
}

.dir-pto .dash-gauge-sub {
  font-size: 11px;
}

.dir-pto .dash-leave-sections {
  gap: 8px;
}

.dir-pto .dash-leave-section-title {
  font-size: 10px;
  margin-bottom: 4px;
}

.dir-pto .dash-list {
  max-height: 110px;
}

.dir-pto .dash-list-title {
  font-size: 13px;
}

.dir-pto .dash-list-sub {
  font-size: 11px;
}

.dir-pto .dash-leave-actions {
  margin-top: 8px;
  gap: 8px;
}

.dir-pto .dash-action {
  padding: 7px 11px;
  font-size: 12px;
}

.dir-pto .dash-week {
  margin-top: 8px;
}

.dir-pto--focus {
  margin-bottom: 8px;
}

.dir-search-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}

.dir-search-ico {
  width: 20px;
  height: 20px;
  color: var(--uh-blue);
  flex-shrink: 0;
}

.dir-search-ico svg {
  width: 20px;
  height: 20px;
  display: block;
}

.dir-search-label input {
  flex: 1;
  border: 0;
  outline: none;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: transparent;
  min-width: 0;
}

.dir-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dir-chip {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--uh-blue-dark);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.dir-chip:hover {
  background: var(--uh-blue-soft);
}

.dir-chip.is-active {
  background: var(--uh-blue);
  border-color: var(--uh-blue);
  color: #fff;
}

.dir-featured {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.dir-hero-link {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, #f5f8fc 0%, #fefeff 70%);
  text-decoration: none;
  color: inherit;
  min-height: 110px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dir-hero-link:hover {
  border-color: #9bb4d8;
  background: #f3f7fc;
}

.dir-hero-ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--uh-gold);
  color: var(--uh-blue-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dir-hero-ico svg {
  width: 22px;
  height: 22px;
}

.dir-hero-copy h2 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.dir-hero-copy p {
  margin: 0;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.4;
}

.dir-hero-cta {
  margin-top: 10px;
  display: inline-flex;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--uh-blue);
}

.dir-section {
  margin-bottom: 26px;
}

.dir-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.dir-section-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.dir-section-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.dir-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dir-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: transparent;
  min-height: 132px;
}

.dir-item:hover {
  background: #f8fafc;
  border-color: #d5e0ef;
}

.dir-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.dir-item-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--uh-blue-dark);
  line-height: 1.3;
}

.dir-item-tag {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--uh-blue-soft);
  color: var(--uh-blue);
}

.dir-item-summary {
  margin: 0;
  flex: 1;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
}

.dir-item-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dir-item-meta {
  font-size: 11.5px;
  color: var(--muted);
}

.dir-item-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--uh-gold);
  color: var(--uh-blue-dark);
  font-size: 13.5px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.dir-item-open:hover {
  filter: brightness(0.97);
}

.dir-empty {
  padding: 28px 16px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 14px;
  color: var(--muted);
  font-weight: 600;
}

.dir-empty-inline {
  text-align: left;
  padding: 16px;
}

.dir-inline-link {
  color: var(--uh-blue);
  font-weight: 700;
  text-decoration: none;
}

.dir-inline-link:hover {
  text-decoration: underline;
}

.dir-birthdays {
  margin-bottom: 8px;
}

.dir-bday-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  max-height: 320px;
  overflow-y: auto;
}

.dir-bday-list--full {
  max-height: min(70vh, 640px);
}

.dir-bday-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

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

.dir-bday-row:hover {
  background: #f8fafc;
}

.dir-bday-row.is-today {
  background: #fffaf0;
}

.dir-bday-main {
  min-width: 0;
  flex: 1;
}

.dir-bday-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--uh-blue-dark);
  line-height: 1.25;
}

.dir-bday-sub {
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dir-bday-aside {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-align: right;
}

.dir-bday-date {
  font-size: 14px;
  font-weight: 700;
  color: var(--uh-blue-dark);
  white-space: nowrap;
}

.dir-bday-when {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}

.dir-bday-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: var(--uh-blue-soft);
  color: var(--uh-blue);
  white-space: nowrap;
}

.dir-bday-badge.is-today {
  background: #fef3c7;
  color: #92400e;
}

@media (max-width: 720px) {
  .dir-featured,
  .dir-grid {
    grid-template-columns: 1fr;
  }
}

.home-section {
  margin-bottom: 28px;
}

.home-section-head {
  margin-bottom: 14px;
}

.home-section-head h2 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.home-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

@media (max-width: 960px) {
  .dash-grid {
    grid-template-columns: 1fr;
  }

  .dash-week {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .dash-widget--tools .quick {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .grid-announce-bar,
  .grid-announce-pill {
    align-items: flex-start;
    border-radius: 8px;
    padding: 8px 8px 8px 10px;
  }

  .grid-announce-text {
    width: 100%;
    font-size: 13.5px;
    text-align: left;
  }

  .dash-widget--tools .quick {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .grid-sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  .grid-app.sidebar-open .grid-sidebar {
    transform: translateX(0);
  }

  .grid-shell {
    margin-left: 0;
  }

  .grid-mobile-toggle {
    display: inline-flex;
  }

  .grid-sidebar-collapse {
    display: none;
  }

  .grid-topbar {
    flex-wrap: wrap;
    padding: 10px 16px;
    gap: 10px;
  }

  .grid-topbar-right {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
  }

  .grid-topbar-action {
    min-width: 96px;
    padding: 6px 12px;
    font-size: 10.5px;
  }

  .grid-main {
    padding: 20px 16px 40px;
  }
}

/* ——— First-login tour ——— */
body.grid-tour-active {
  overflow: hidden;
}

.grid-tour-root {
  position: fixed;
  inset: 0;
  z-index: 10050;
  pointer-events: none;
}

.grid-tour-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(21, 34, 56, 0.55);
  pointer-events: auto;
}

.grid-tour-hole {
  position: absolute;
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(21, 34, 56, 0.55);
  outline: 2px solid var(--uh-gold);
  outline-offset: 0;
  pointer-events: none;
  z-index: 1;
  transition: left 0.2s ease, top 0.2s ease, width 0.2s ease, height 0.2s ease;
}

.grid-tour-root .grid-tour-backdrop {
  /* hole uses its own dimming; keep backdrop for welcome only */
}

.grid-tour-root:has(.grid-tour-hole:not([hidden])) .grid-tour-backdrop {
  background: transparent;
  pointer-events: auto;
}

.grid-tour-target {
  position: relative;
  z-index: 10051 !important;
  pointer-events: none;
}

.grid-tour-welcome,
.grid-tour-card {
  position: absolute;
  z-index: 10052;
  pointer-events: auto;
  width: min(400px, calc(100vw - 24px));
  padding: 20px 20px 16px;
  border-radius: 14px;
  border: 1px solid #e4eaf3;
  background: #fff;
  box-shadow: 0 16px 40px rgba(21, 34, 56, 0.22);
  color: #152238;
  font-family: var(--font);
}

.grid-tour-welcome {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.grid-tour-kicker {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--uh-blue);
}

.grid-tour-welcome h2,
.grid-tour-card h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--uh-blue-dark);
}

.grid-tour-copy {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.5;
  color: #3a4a63;
}

.grid-tour-meta {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 750;
  color: var(--muted);
}

.grid-tour-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.grid-tour-actions-end {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.grid-tour-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.grid-tour-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.grid-tour-btn-primary {
  background: var(--uh-gold);
  color: #fff;
  border-color: #e0a22e;
}

.grid-tour-btn-primary:hover:not(:disabled),
.grid-tour-btn-primary:focus-visible {
  filter: brightness(0.97);
  outline: none;
}

.grid-tour-btn-secondary {
  background: #fff;
  color: var(--uh-blue-dark);
  border-color: #b7c7de;
}

.grid-tour-btn-secondary:hover:not(:disabled),
.grid-tour-btn-secondary:focus-visible {
  background: var(--uh-blue-soft);
  outline: none;
}

.grid-tour-btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
  font-weight: 650;
}

.grid-tour-btn-ghost:hover,
.grid-tour-btn-ghost:focus-visible {
  color: var(--uh-blue-dark);
  background: var(--uh-gold-soft);
  outline: none;
}

.grid-nav-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
