/* ═══════════════════════════════════════════════════════════════════════
   PPDO DMS — Design System (v4, redesign-skill pass)
   Cool near-white canvas · one desaturated navy-blue accent · Geist type
   Tinted shadows · tabular numbers · hover-expanding icon sidebar
   Loaded LAST so it may refine utility-classed markup where needed.
   ═══════════════════════════════════════════════════════════════════════ */

:root { /* integrated handoff */
  --ppdo-brand: #166b55;
  --dms-canvas: #f2f4f8;
  --dms-surface: #ffffff;
  --dms-surface-2: #f6f8fb;
  --dms-border: #e5e9f1;
  --dms-border-strong: #d3dae6;
  --dms-ink: #182032;
  --dms-ink-2: #4e586e;
  --dms-ink-3: #626f84;
  --dms-navy: #16244a;
  --dms-blue-700: #24439b;
  --dms-blue-600: #2b4faf;
  --dms-blue-500: #4169d1;
  --dms-blue-100: #d9e3f8;
  --dms-blue-50: #e9effb;
  --dms-green: #23724a;
  --dms-green-50: #ddf0e5;
  --dms-amber: #7d5a10;
  --dms-amber-50: #f7eeda;
  --dms-red: #9c3024;
  --dms-red-50: #f9e5e2;
  --dms-rail: 76px;
  --dms-sidebar-w: 272px;
  --dms-topbar-h: 68px;
  --dms-radius: 18px;
  --dms-shadow-pop: 0 16px 48px rgba(22, 36, 74, 0.15);
  --dms-ease: cubic-bezier(0.3, 0.7, 0.3, 1);
}

html { scroll-behavior: smooth; }
body.ppdo-app {
  background-color: var(--dms-canvas);
  background-image: radial-gradient(1100px 380px at 50% -140px, #e5ebf5, rgba(229, 235, 245, 0));
  background-repeat: no-repeat;
}

/* Numbers align in data-heavy views */
.overview-metric-value, .overview-doc-code, .staff-summary-value,
table, .font-mono, .dms-nav-badge { font-variant-numeric: tabular-nums; }

/* ── Accessibility foundations ───────────────────────────────────────── */
.ppdo-skip-link {
  position: fixed; top: -48px; left: 16px; z-index: 200;
  background: var(--dms-navy); color: #fff; font-size: 13px; font-weight: 600;
  padding: 10px 16px; border-radius: 0 0 10px 10px;
  transition: top 0.15s;
}
.ppdo-skip-link:focus { top: 0; }
:focus-visible { outline: 2px solid var(--dms-blue-500); outline-offset: 2px; }
.inp:focus-visible { outline: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ═══ SIDEBAR — collapsed icon rail, expands on hover/focus ═══════════ */
.dms-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--dms-rail);
  background: var(--dms-surface);
  border-right: 1px solid var(--dms-border);
  z-index: 80;
  display: flex; flex-direction: column;
  transition: width 0.22s var(--dms-ease), transform 0.25s var(--dms-ease), box-shadow 0.22s;
  overflow: hidden;
}
.dms-sidebar:hover, .dms-sidebar:focus-within {
  width: var(--dms-sidebar-w);
  box-shadow: var(--dms-shadow-pop);
}

.dms-sidebar-head {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 18px 14px;
  flex-shrink: 0;
}
.dms-sidebar-seal {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: var(--dms-blue-50);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.dms-sidebar-seal img { width: 32px; height: 32px; object-fit: contain; }
.dms-sidebar-title {
  white-space: nowrap; line-height: 1.2;
  font-size: 15px; font-weight: 700; color: var(--dms-navy); letter-spacing: -0.01em;
}
.dms-sidebar-title small {
  display: block; font-size: 11px; font-weight: 500; color: var(--dms-ink-3); letter-spacing: 0;
}
.dms-sidebar-close { display: none; }

.dms-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 4px 14px 12px; }
.dms-nav::-webkit-scrollbar { width: 0; }

.dms-nav-group { margin-bottom: 6px; }
.dms-nav-group-label {
  position: relative; height: 30px; margin: 8px 0 2px;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--dms-ink-3);
  display: flex; align-items: center;
}
.dms-nav-group-label .abbr {
  position: absolute; left: 0; width: 48px; text-align: center;
  transition: opacity 0.15s;
}
.dms-nav-group-label .full {
  position: absolute; left: 12px; white-space: nowrap; opacity: 0;
  transition: opacity 0.18s;
}
.dms-sidebar:hover .dms-nav-group-label .abbr,
.dms-sidebar:focus-within .dms-nav-group-label .abbr { opacity: 0; }
.dms-sidebar:hover .dms-nav-group-label .full,
.dms-sidebar:focus-within .dms-nav-group-label .full { opacity: 1; }

.dms-nav-item {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  margin-bottom: 2px;
  border: none; background: transparent;
  border-radius: 12px;
  font-size: 13.5px; font-weight: 500; color: var(--dms-ink-2);
  cursor: pointer; text-align: left; white-space: nowrap;
  transition: background-color 0.18s, color 0.18s, transform 0.15s;
}
.dms-nav-item:hover { background: var(--dms-surface-2); color: var(--dms-ink); }
.dms-nav-item:active { transform: scale(0.985); }
.dms-nav-item.active { background: var(--dms-blue-50); color: var(--dms-blue-700); font-weight: 600; }
.dms-nav-item.active .dms-nav-icon { color: var(--dms-blue-600); }
.dms-nav-icon {
  width: 24px; height: 24px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--dms-ink-3);
  transition: color 0.18s;
}
.dms-nav-icon svg { width: 20px; height: 20px; }
.dms-nav-item:hover .dms-nav-icon { color: var(--dms-ink-2); }
.dms-nav-label {
  opacity: 0; transition: opacity 0.18s; min-width: 0;
  overflow: hidden; text-overflow: ellipsis;
  flex: 1;
}
.dms-sidebar:hover .dms-nav-label,
.dms-sidebar:focus-within .dms-nav-label { opacity: 1; }
.dms-nav-badge {
  margin-left: auto; flex-shrink: 0;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px;
  background: var(--dms-red-50); color: var(--dms-red);
  font-size: 10.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.18s;
}
.dms-sidebar:hover .dms-nav-badge,
.dms-sidebar:focus-within .dms-nav-badge { opacity: 1; }
.dms-nav-item.active .dms-nav-badge { background: var(--dms-blue-100); color: var(--dms-blue-700); }
.dms-nav-item[data-has-badge="true"] .dms-nav-icon::after {
  content: ''; position: absolute; top: 8px; left: 30px;
  width: 7px; height: 7px; border-radius: 999px;
  background: #c8503f; border: 1.5px solid #fff;
  transition: opacity 0.15s;
}
.dms-sidebar:hover .dms-nav-item .dms-nav-icon::after,
.dms-sidebar:focus-within .dms-nav-item .dms-nav-icon::after { opacity: 0; }

.dms-sidebar-foot {
  flex-shrink: 0;
  border-top: 1px solid var(--dms-border);
  padding: 10px 14px 14px;
}
.dms-sidebar-user {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px; margin-bottom: 2px;
  white-space: nowrap;
}
.dms-sidebar-avatar {
  width: 32px; height: 32px; aspect-ratio: 1; border-radius: 10px; flex: 0 0 32px;
  background: var(--dms-navy); color: #fff;
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-left: -4px; overflow: hidden;
}
.dms-sidebar-avatar img,
.ppdo-account-avatar img,
.directory-person-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 24%;
  border-radius: inherit;
}
.record-count-inline {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  line-height: 1;
}
.activity-feed-toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, auto));
  align-items: end;
  gap: 10px;
}
@media (max-width: 900px) {
  .activity-feed-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
}
@media (max-width: 560px) {
  .activity-feed-toolbar { grid-template-columns: 1fr; }
}
.dms-sidebar-user .dms-nav-label strong {
  display: block; font-size: 13px; font-weight: 600; color: var(--dms-ink);
}
.dms-sidebar-user .dms-nav-label small {
  display: block; font-size: 11px; color: var(--dms-ink-3);
}
.dms-signout:hover { background: var(--dms-red-50); color: var(--dms-red); }
.dms-signout:hover .dms-nav-icon { color: var(--dms-red); }

.dms-nav-scrim {
  display: none;
  position: fixed; inset: 0; z-index: 79;
  background: rgba(16, 24, 46, 0.42);
}

/* ═══ TOPBAR ══════════════════════════════════════════════════════════ */
.ppdo-nav-host { position: sticky; top: 0; z-index: 60; }
.ppdo-topbar {
  background: color-mix(in srgb, var(--dms-canvas) 86%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.ppdo-topbar-inner {
  max-width: 1320px; margin: 0 auto;
  height: var(--dms-topbar-h);
  padding: 0 28px;
  display: flex; align-items: center; gap: 12px;
}
.dms-menu-btn {
  display: none;
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  border: 1px solid var(--dms-border-strong); background: var(--dms-surface);
  color: var(--dms-ink-2);
  align-items: center; justify-content: center; cursor: pointer;
}
.dms-menu-btn svg { width: 20px; height: 20px; }
.ppdo-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ppdo-brand-mark { display: none; }
.ppdo-brand-copy { line-height: 1.15; white-space: nowrap; }
.ppdo-brand-name {
  display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--dms-ink-3);
}
.ppdo-role-label { display: block; font-size: 15px; font-weight: 700; color: var(--dms-navy); letter-spacing: -0.01em; }
.ppdo-account { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.ppdo-account-person {
  display: flex; align-items: center; gap: 9px;
  background: transparent; border: 0;
  border-radius: 0; padding: 5px 2px;
  min-height: 42px;
}
.ppdo-account-avatar { display: flex; align-items: center; justify-content: center; }
.ppdo-avatar-shell {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 9px;
}
.ppdo-avatar-shell > img,
.ppdo-avatar-shell > span {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
}
.ppdo-avatar-shell > img { object-fit: cover; object-position: center 24%; }
.ppdo-avatar-shell > span { align-items: center; justify-content: center; }
.ppdo-account-avatar img, .ppdo-account-avatar .ppdo-avatar-shell {
  width: 30px !important; height: 30px !important; border-radius: 9px !important;
}
.ppdo-account-avatar .ppdo-avatar-shell > span { background: var(--dms-blue-50); color: var(--dms-blue-700); font-size: 12px; }
.ppdo-account-name { font-size: 13px; font-weight: 600; color: var(--dms-ink); white-space: nowrap; }
.dms-bell-slot { width: 42px; height: 42px; flex-shrink: 0; }
.ppdo-sign-out {
  border: 1px solid var(--dms-border-strong); background: var(--dms-surface);
  color: var(--dms-ink-2); font-size: 13px; font-weight: 600;
  border-radius: 999px; padding: 0 16px; min-height: 42px; min-width: 96px;
  cursor: pointer; white-space: nowrap;
  transition: background-color 0.18s, color 0.18s, border-color 0.18s, transform 0.15s;
}
.ppdo-sign-out:hover { background: var(--dms-red-50); border-color: #eccfc9; color: var(--dms-red); }
.ppdo-sign-out:active { transform: scale(0.98); }

/* Notification bell — fixed element aligned into the topbar action row */
.ppdo-notification-anchor {
  top: calc((var(--dms-topbar-h) - 42px) / 2) !important;
  right: 28px !important;
  height: 42px !important;
  z-index: 65 !important;
}
.ppdo-notification-anchor > button {
  width: 42px !important; height: 42px !important;
  border-radius: 999px !important;
  background: var(--dms-surface);
  border: 1px solid var(--dms-border);
  color: var(--dms-ink-2) !important;
}
.ppdo-notification-anchor > button:hover { background: var(--dms-surface-2) !important; color: var(--dms-ink) !important; }
.ppdo-notification-anchor > button > span {
  background: #c8503f !important;
  top: 1px !important; right: 1px !important;
}

/* ═══ PAGE FRAME ══════════════════════════════════════════════════════ */
body.ppdo-app { padding-left: var(--dms-rail); }
.ppdo-page-shell {
  max-width: 1320px; margin: 0 auto;
  padding: 10px 28px 64px;
}
#main-content:focus { outline: none; }
.ppdo-page-heading { padding: 14px 2px 22px; }
.ppdo-page-heading h2 {
  font-size: 27px !important; line-height: 1.2 !important;
  font-weight: 700 !important; letter-spacing: -0.022em;
  color: var(--dms-navy) !important;
}
.ppdo-page-heading p { margin-top: 5px; font-size: 14px !important; color: var(--dms-ink-3) !important; }
.ppdo-page-heading .inp { border-radius: 999px; padding-left: 38px !important; min-height: 44px; height: 44px; }
.ppdo-page-heading .inp:not(:focus) { border-color: var(--dms-border); }
.ppdo-page-heading svg { top: 14px !important; left: 15px !important; }

.admin-workspace-frame, .staff-main-workspace, .ppdc-main-workspace { overflow: hidden; }
.ppdo-content-area { min-height: 480px; }

.dms-offline-note > div {
  background: var(--dms-amber-50); border: 1px solid #e9dcb8;
  color: var(--dms-amber); border-radius: 12px;
}

/* Neutralize decorative gradients across the app */
.ppdo-app [class*="bg-gradient-"] { background-image: none !important; }
.ppdc-workspace-header { background-color: var(--dms-surface); }

/* ═══ ADMIN OVERVIEW / DASHBOARD BLOCKS ══════════════════════════════ */
.admin-overview { padding: 24px; }
.admin-overview-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; }
.admin-overview-main { min-width: 0; }
.overview-title-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 20px;
}
.overview-title-row h3 { font-size: 19px; font-weight: 700; color: var(--dms-navy); letter-spacing: -0.015em; }
.overview-title-row p { font-size: 13px; color: var(--dms-ink-3); margin-top: 3px; }

.overview-metrics {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--dms-border);
  border-bottom: 1px solid var(--dms-border);
  padding: 18px 0; margin-bottom: 24px;
}
.overview-metric { display: flex; align-items: center; gap: 14px; padding: 4px 20px; }
.overview-metric + .overview-metric { border-left: 1px solid var(--dms-border); }
.overview-metric:first-child { padding-left: 4px; }
.overview-metric-icon {
  width: 44px; height: 44px; border-radius: 999px; flex-shrink: 0;
  background: var(--dms-blue-50); color: var(--dms-blue-600);
  display: flex; align-items: center; justify-content: center;
}
.overview-metric-icon.warning { background: var(--dms-amber-50); color: var(--dms-amber); }
.overview-metric-label { font-size: 12px; color: var(--dms-ink-3); font-weight: 500; }
.overview-metric-value { font-size: 24px; font-weight: 700; color: var(--dms-navy); line-height: 1.15; letter-spacing: -0.01em; }

.overview-section { margin-bottom: 26px; }
.overview-section-header {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 12px;
}
.overview-section-header h4, .overview-context-section h4 {
  font-size: 15px; font-weight: 700; color: var(--dms-navy);
}
.overview-section-kicker {
  display: block; margin-bottom: 3px;
  color: var(--dms-blue-500); font-size: 9.5px; font-weight: 750;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.overview-link {
  font-size: 12.5px; font-weight: 600; color: var(--dms-blue-500);
  background: none; border: none; cursor: pointer; padding: 4px 2px;
}
.overview-link:hover { color: var(--dms-blue-700); }

.overview-priority {
  border: 1px solid var(--dms-border);
  border-radius: 16px;
  padding: 17px;
  background: #fbfcfe;
}
.overview-task-list {
  overflow: hidden;
  border: 1px solid var(--dms-border);
  border-radius: 13px;
  background: var(--dms-surface);
}
.overview-task-row {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) 116px 124px 100px;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 60px;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid var(--dms-border);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s;
}
.overview-task-row:last-child { border-bottom: none; }
.overview-task-row:hover { background: var(--dms-blue-50); }
.overview-task-row:focus-visible {
  position: relative;
  outline: 3px solid rgba(65, 105, 209, 0.2);
  outline-offset: -3px;
}
.overview-task-status {
  width: 7px; height: 7px; border-radius: 999px;
  background: var(--dms-amber); box-shadow: 0 0 0 4px var(--dms-amber-50);
}
.overview-task-status.in-progress {
  background: var(--dms-blue-500); box-shadow: 0 0 0 4px var(--dms-blue-50);
}
.overview-task-owner,
.overview-task-due {
  color: var(--dms-ink-3);
  font-size: 11px;
}
.overview-task-due { text-align: right; font-weight: 600; }
.overview-task-row > .badge, .overview-list-row > .badge { justify-self: start; width: auto; min-width: 0; text-align: center; white-space: nowrap; }
.overview-task-empty {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 96px; padding: 18px; color: var(--dms-ink-3);
}
.overview-task-empty-icon {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 999px;
  background: var(--dms-blue-50); color: var(--dms-blue-600);
}
.overview-task-empty-icon svg { width: 19px; height: 19px; }
.overview-task-empty strong {
  display: block; color: var(--dms-ink-2); font-size: 12.5px; font-weight: 650;
}
.overview-task-empty small { display: block; margin-top: 2px; font-size: 11px; }

.overview-flow { display: flex; gap: 10px; align-items: flex-end; height: 120px; padding: 8px 4px 0; }
.overview-flow-day { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.overview-flow-bars { flex: 1; width: 100%; display: flex; gap: 4px; align-items: flex-end; justify-content: center; }
.overview-flow-bar { width: 12px; min-height: 4px; border-radius: 6px; background: var(--dms-blue-600); }
.overview-flow-bar.outgoing { background: var(--dms-blue-100); }
.overview-flow-day span { font-size: 10.5px; color: var(--dms-ink-3); font-weight: 500; }

.overview-list { border: 1px solid var(--dms-border); border-radius: 14px; overflow: hidden; }
.overview-list-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 100px 124px 100px;
  gap: 12px; align-items: center;
  padding: 12px 16px;
  background: transparent; border: none; border-bottom: 1px solid var(--dms-border);
  cursor: pointer; transition: background-color 0.15s;
}
.overview-list-row:last-child { border-bottom: none; }
.overview-list-row:hover { background: var(--dms-surface-2); }
.overview-doc-title { font-size: 13px; font-weight: 600; color: var(--dms-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.overview-doc-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: var(--dms-ink-3); margin-top: 2px; }
.overview-doc-meta { font-size: 11.5px; color: var(--dms-ink-3); text-align: left; }

.admin-overview-context { min-width: 0; }
.overview-profile {
  background: var(--dms-surface-2); border: 1px solid var(--dms-border);
  border-radius: 16px; padding: 16px; margin-bottom: 18px;
}
.overview-profile-row { display: flex; align-items: center; gap: 12px; }
.overview-profile-avatar {
  width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0;
  background: var(--dms-navy); color: #fff;
  font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.overview-context-section { margin-top: 4px; }
.overview-activity { margin-top: 10px; }
.overview-activity-item { display: flex; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--dms-border); }
.overview-activity-item:last-child { border-bottom: none; }
.overview-activity-icon {
  width: 30px; height: 30px; border-radius: 999px; flex-shrink: 0;
  background: var(--dms-blue-50); color: var(--dms-blue-700);
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.overview-activity-copy { font-size: 12.5px; color: var(--dms-ink-2); line-height: 1.45; min-width: 0; }
.overview-activity-copy strong { color: var(--dms-ink); font-weight: 600; }
.overview-activity-time { font-size: 11px; color: var(--dms-ink-3); margin-top: 2px; }

/* ═══ SUMMARY STRIPS ═════════════════════════════════════════════════ */
.staff-summary {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px; margin-bottom: 20px;
}
.ppdo-metric-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px; margin-bottom: 20px;
}
.staff-summary-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--dms-surface); border: 1px solid var(--dms-border);
  border-radius: 16px; padding: 16px 18px;
}
.staff-summary-icon {
  width: 44px; height: 44px; border-radius: 999px; flex-shrink: 0;
  background: var(--dms-blue-50); color: var(--dms-blue-600);
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.staff-summary-icon.warning { background: var(--dms-amber-50); color: var(--dms-amber); }
.staff-summary-label { font-size: 12px; color: var(--dms-ink-3); font-weight: 500; }
.staff-summary-value { font-size: 24px; font-weight: 700; color: var(--dms-navy); line-height: 1.15; }

/* ═══ DRAWERS / ALERTS / TABLES ══════════════════════════════════════ */
.ppdo-drawer {
  width: min(380px, 94vw) !important;
  border-left: 1px solid var(--dms-border);
  box-shadow: -24px 0 64px rgba(22, 36, 74, 0.16) !important;
}
.ppdo-overlay { background: rgba(16, 24, 46, 0.42) !important; }
.ppdo-drawer-enter { transition: transform 320ms cubic-bezier(.16,1,.3,1), opacity 220ms ease-out; }
.ppdo-drawer-leave { transition: transform 190ms cubic-bezier(.4,0,1,1), opacity 150ms ease-in; }
.ppdo-drawer-enter-start,.ppdo-drawer-leave-end { transform: translate3d(100%,0,0); opacity: .72; }
.ppdo-drawer-enter-end,.ppdo-drawer-leave-start { transform: translate3d(0,0,0); opacity: 1; }
.ppdo-overlay-enter { transition: opacity 240ms ease-out; }
.ppdo-overlay-leave { transition: opacity 160ms ease-in; }
.ppdo-overlay-enter-start,.ppdo-overlay-leave-end { opacity: 0; }
.ppdo-overlay-enter-end,.ppdo-overlay-leave-start { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .ppdo-drawer-enter,.ppdo-drawer-leave,.ppdo-overlay-enter,.ppdo-overlay-leave { transition-duration: 1ms; }
  .ppdo-drawer-enter-start,.ppdo-drawer-leave-end { transform: none; opacity: 0; }
}

.ppdo-bottom-alert {
  left: 50% !important; right: auto !important; bottom: 20px !important;
  transform: translateX(-50%);
  width: min(720px, calc(100vw - 32px));
  border-radius: 16px !important;
  background: var(--dms-navy) !important;
  box-shadow: 0 20px 48px rgba(15, 23, 46, 0.4) !important;
  overflow: hidden;
}
.ppdo-bottom-alert > div { padding: 14px 18px !important; }
.dms-alert-icon { display: inline-flex; color: #fff; opacity: 0.85; }
.dms-alert-icon svg { width: 19px; height: 19px; }

table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left; font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--dms-ink-3);
  padding: 10px 12px; border-bottom: 1px solid var(--dms-border);
  white-space: nowrap;
}
tbody td { padding: 11px 12px; border-bottom: 1px solid #eef1f6; font-size: 13px; vertical-align: top; }
tbody tr:hover { background: #f8fafd; }

/* ═══ LOGIN ══════════════════════════════════════════════════════════ */
body.ppdo-login-page {
  background-color: var(--dms-canvas);
  background-image: radial-gradient(1100px 420px at 50% -140px, #e5ebf5, rgba(229, 235, 245, 0));
  background-repeat: no-repeat;
  padding-left: 0;
}
.login-shell {
  min-height: 100dvh;
  display: grid; grid-template-columns: minmax(300px, 350px) minmax(0, 1fr);
  max-width: 880px; margin: 0 auto;
  padding: 24px; gap: 0;
  align-content: center;
}
.login-brand-panel {
  background: var(--dms-navy);
  border-radius: 24px 0 0 24px;
  color: #eef1f7;
  padding: 38px 34px;
  min-height: 500px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 16px;
  position: relative; overflow: hidden;
}
.login-brand-panel::before {
  content: '';
  position: absolute; top: -120px; right: -120px;
  width: 320px; height: 320px; border-radius: 999px;
  border: 56px solid rgba(255, 255, 255, 0.05);
}
.login-seal {
  width: 136px; height: 136px; object-fit: contain; object-position: left top;
  background: transparent;
  border-radius: 0; padding: 0;
  margin: -5px 0 auto -8px;
  filter: drop-shadow(0 10px 18px rgba(4, 14, 40, 0.22));
}
.login-brand-kicker {
  margin-bottom: 8px; color: #9fb0d3 !important;
  font-size: 11px !important; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
}
.login-brand-panel h1 { font-size: 24px; font-weight: 700; line-height: 1.25; letter-spacing: -0.015em; }
.login-brand-panel p { font-size: 13.5px; line-height: 1.6; color: #b3bed4; max-width: 34ch; }
/* Fixed height + top-anchored content so switching steps never resizes the card */
.login-form-panel {
  background: var(--dms-surface);
  border: 1px solid var(--dms-border); border-left: none;
  border-radius: 0 24px 24px 0;
  padding: 44px 48px;
  min-height: 500px;
  display: flex; flex-direction: column; justify-content: center;
}
.login-form-content { width: 100%; max-width: 410px; margin: 0 auto; }
.login-form-header { margin-bottom: 22px; }
.login-form-header h2 { font-size: 22px; font-weight: 700; color: var(--dms-navy); letter-spacing: -0.015em; }
.login-form-header p { font-size: 13.5px; color: var(--dms-ink-3); margin-top: 5px; }
.login-form-header .login-form-kicker {
  margin: 0 0 10px; color: var(--dms-blue-600);
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.13em;
  text-transform: uppercase;
}
.login-role-list { display: flex; flex-direction: column; gap: 10px; }
.login-role {
  display: flex; align-items: center; gap: 14px;
  width: 100%; text-align: left;
  background: var(--dms-surface); border: 1px solid var(--dms-border-strong);
  border-radius: 14px; padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.18s, background-color 0.18s, transform 0.15s;
  min-height: 64px;
}
.login-role:hover { border-color: var(--dms-blue-500); background: #fbfcfe; }
.login-role:active { transform: scale(0.99); }
.login-role.selected { border-color: var(--dms-blue-600); background: var(--dms-blue-50); }
.login-role-icon {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: var(--dms-blue-50); color: var(--dms-blue-700);
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.login-role.selected .login-role-icon { background: var(--dms-blue-600); color: #fff; }
.login-role-copy { flex: 1; min-width: 0; }
.login-role-copy strong { display: block; font-size: 14px; font-weight: 600; color: var(--dms-ink); }
.login-role-copy span { display: block; font-size: 12px; color: var(--dms-ink-3); margin-top: 2px; }
.login-role-radio {
  width: 18px; height: 18px; border-radius: 999px; flex-shrink: 0;
  border: 2px solid var(--dms-border-strong);
  transition: border-color 0.18s, box-shadow 0.18s;
}
.login-role.selected .login-role-radio {
  border-color: var(--dms-blue-600);
  box-shadow: inset 0 0 0 3.5px #fff;
  background: var(--dms-blue-600);
}
.login-back {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer;
  font-size: 12.5px; font-weight: 600; color: var(--dms-ink-3);
  padding: 4px 0; margin-bottom: 14px;
}
.login-back:hover { color: var(--dms-ink); }
.login-field { margin-bottom: 14px; }
.login-field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--dms-ink-2); margin-bottom: 6px; }
.login-field .inp { min-height: 44px; height: 44px; }
.login-field select.inp { height: 44px; }
.login-password-wrap { position: relative; }
.login-password-wrap .inp { padding-right: 62px; }
.login-password-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  min-width: 48px; min-height: 32px; border: 0; border-radius: 8px;
  background: transparent; color: var(--dms-blue-700);
  font-size: 11.5px; font-weight: 650; cursor: pointer;
}
.login-password-toggle:hover { background: var(--dms-blue-50); }
.login-error {
  background: var(--dms-red-50); color: var(--dms-red);
  font-size: 12.5px; font-weight: 500;
  border-radius: 10px; padding: 10px 12px; margin-bottom: 12px;
}
.login-submit { width: 100%; min-height: 46px; font-size: 14px; margin-top: 6px; }
.login-security-note {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; color: var(--dms-ink-3);
  margin-top: 22px;
}
.login-security-note span[aria-hidden] { color: var(--dms-green); font-size: 9px; }
.login-security-dot {
  width: 7px; height: 7px; border-radius: 999px;
  background: var(--dms-green); flex: none;
}
.ppdo-logo-fallback {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--dms-blue-50); color: var(--dms-blue-700);
  font-size: 12px; font-weight: 700;
  align-items: center; justify-content: center;
}

/* ═══ ADMIN SETTINGS ═════════════════════════════════════════════════ */
.settings-page,
.my-leave-page {
  padding: 26px;
  width: 100%;
}
.settings-heading,
.my-leave-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}
.settings-kicker {
  color: var(--dms-blue-600);
  font-size: 10px;
  line-height: 1;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.settings-heading h3,
.my-leave-heading h3 {
  color: var(--dms-ink);
  font-size: 21px;
  line-height: 1.2;
  font-weight: 720;
  letter-spacing: -0.025em;
}
.settings-heading p:not(.settings-kicker),
.my-leave-heading p:not(.settings-kicker) {
  color: var(--dms-ink-3);
  font-size: 12px;
  line-height: 1.55;
  margin-top: 5px;
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}
.settings-card {
  min-width: 0;
  min-height: 190px;
  padding: 22px;
  border: 1px solid var(--dms-border);
  border-radius: 18px;
  background: var(--dms-surface);
  display: flex;
  flex-direction: column;
}
.settings-card-wide { grid-column: 1 / -1; min-height: 0; }
.settings-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.settings-card-heading h4,
.my-leave-panel-heading h4 {
  color: var(--dms-ink);
  font-size: 14px;
  font-weight: 680;
  line-height: 1.35;
}
.settings-card-heading p,
.my-leave-panel-heading p {
  max-width: 620px;
  color: var(--dms-ink-3);
  font-size: 11px;
  line-height: 1.55;
  margin-top: 4px;
}
.settings-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #edf9f4;
  color: #14845d;
  font-size: 10.5px;
  font-weight: 650;
  white-space: nowrap;
}
.settings-status > span:first-child {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
}
.settings-status.is-error { color: #c14444; background: #fff1f1; }
.settings-health-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 20px;
  border: 1px solid var(--dms-border);
  border-radius: 13px;
  overflow: hidden;
}
.settings-health-list > div {
  min-width: 0;
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: var(--dms-surface-2);
}
.settings-health-list > div + div { border-left: 1px solid var(--dms-border); }
.settings-health-list span { color: var(--dms-ink-3); font-size: 10px; }
.settings-health-list strong { color: var(--dms-ink-2); font-size: 11.5px; font-weight: 650; }
.settings-toggle-row {
  min-height: 68px;
  padding: 12px 14px;
  margin-top: 18px;
  border: 1px solid var(--dms-border);
  border-radius: 13px;
  background: var(--dms-surface-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  cursor: pointer;
}
.settings-toggle-row > span:first-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.settings-toggle-row strong { color: var(--dms-ink-2); font-size: 12px; font-weight: 650; }
.settings-toggle-row small { color: var(--dms-ink-3); font-size: 10.5px; margin-top: 3px; }
.settings-actions {
  min-height: 38px;
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.settings-danger { border-color: #f2d5d5; }
.settings-danger h4 { color: #b83838; }

/* ═══ MY LEAVE ════════════════════════════════════════════════════════ */
.my-leave-balance-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 18px;
}
.my-leave-balance-card {
  min-width: 0;
  min-height: 124px;
  padding: 17px;
  border-width: 1px;
  border-radius: 17px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.my-leave-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 18px;
  align-items: start;
}
.my-leave-panel {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--dms-border);
  border-radius: 18px;
  background: var(--dms-surface);
}
.my-leave-panel-heading {
  min-height: 52px;
  padding-bottom: 15px;
  margin-bottom: 17px;
  border-bottom: 1px solid var(--dms-border);
}
.my-leave-history-row {
  min-height: 68px;
  padding: 13px 15px;
  border: 1px solid var(--dms-border);
  border-radius: 13px;
  background: var(--dms-surface-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.my-leave-empty {
  min-height: 255px;
  padding: 28px;
  border: 1px dashed var(--dms-border-strong);
  border-radius: 15px;
  background: var(--dms-surface-2);
  color: var(--dms-ink-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.my-leave-empty-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: var(--dms-blue-50);
  color: var(--dms-blue-600);
  display: flex;
  align-items: center;
  justify-content: center;
}
.my-leave-empty-icon svg { width: 19px; height: 19px; }
.my-leave-empty strong { color: var(--dms-ink-2); font-size: 12px; font-weight: 650; }
.my-leave-empty span { font-size: 10.5px; margin-top: 4px; }

/* Workflow controls: explicit grids prevent native selects and search fields
   from stretching or collapsing when labels/options change. */
.ppdc-document-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
  align-items: end;
}
.ppdc-document-filter-grid > div { min-width: 0; }
.ppdc-document-filter-grid label {
  display: block;
  margin: 0 0 5px 2px;
  color: var(--dms-ink-3);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.ppdc-document-filter-grid .ppdc-filter-search { grid-column: span 2; }
.ppdc-document-filter-grid .ppdc-filter-clear { min-height: 42px; align-self: end; }
.ppdc-assigned-heading { margin-bottom: 12px; }
.ppdc-assigned-toolbar {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) repeat(3, minmax(145px, max-content));
  gap: 8px;
  margin-top: 10px;
  align-items: center;
}
.ppdc-assigned-toolbar .inp { width: 100%; min-width: 0; }
.ppdc-assigned-search { min-width: 0; }
.ppdo-ppdc input[type="text"].inp.pl-9,
.ppdo-ppdc input[type="search"].inp.pl-9 { padding-left: 38px !important; }

.admin-outgoing-filter-bar,
.liquidation-filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(150px, max-content));
  gap: 10px;
  margin-bottom: 16px;
  align-items: center;
}
.liquidation-filter-bar { grid-template-columns: minmax(260px, 1fr) minmax(170px, 210px) minmax(190px, 250px); }
.admin-outgoing-filter-bar > *, .liquidation-filter-bar > * { width: 100% !important; min-width: 0; }

.document-editor-modal {
  width: min(980px, calc(100vw - 36px));
  max-width: 980px !important;
  padding: 26px;
}
.document-editor-modal textarea.inp { min-height: 108px; line-height: 1.5; resize: vertical; }
.document-editor-modal textarea[rows="2"] { min-height: 78px; }
.document-editor-modal input[type="file"] { width: 100%; }
.document-editor-modal .border-dashed { padding: 16px; }
.document-editor-modal .border-dashed > .grid { grid-template-columns: minmax(180px, .7fr) minmax(260px, 1.3fr) auto; }

.recycle-filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(190px, 260px) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}
.recycle-count { color: var(--dms-ink-3); font-size: 11px; white-space: nowrap; }
.recycle-record-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--dms-border);
  border-radius: 15px;
  background: var(--dms-surface);
}
.recycle-record-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.overview-activity-icon svg { width: 15px; height: 15px; }

/* ═══ RESPONSIVE ═════════════════════════════════════════════════════ */
@media (max-width: 1180px) {
  .admin-overview-grid { grid-template-columns: 1fr; }
  .my-leave-columns { grid-template-columns: 1fr; }
  .ppdc-document-filter-grid { grid-template-columns: repeat(3, minmax(145px, 1fr)); }
  .admin-outgoing-filter-bar { grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(145px, 190px)); }
}
@media (max-width: 1023px) {
  body.ppdo-app { padding-left: 0; }
  .dms-sidebar {
    width: min(312px, 86vw);
    transform: translateX(-105%);
    box-shadow: none;
  }
  .dms-sidebar { visibility: hidden; }
  body.nav-open .dms-sidebar { visibility: visible; transform: translateX(0); box-shadow: var(--dms-shadow-pop); }
  body.nav-open { overflow: hidden; }
  body.nav-open .dms-nav-scrim { display: block; }
  .dms-sidebar .dms-nav-label, .dms-sidebar .dms-nav-badge,
  .dms-sidebar .dms-nav-group-label .full { opacity: 1; }
  .dms-sidebar .dms-nav-group-label .abbr { opacity: 0; }
  .dms-nav-item .dms-nav-icon::after { display: none; }
  .dms-sidebar-close {
    display: flex; align-items: center; justify-content: center;
    margin-left: auto; width: 38px; height: 38px;
    border: none; background: transparent; border-radius: 10px;
    color: var(--dms-ink-3); cursor: pointer; flex-shrink: 0;
  }
  .dms-sidebar-close:hover { background: var(--dms-surface-2); color: var(--dms-ink); }
  .dms-sidebar-close svg { width: 18px; height: 18px; }
  .dms-menu-btn { display: inline-flex; }
  .ppdo-topbar-inner { padding: 0 16px; }
  .ppdo-page-shell { padding: 6px 16px 96px; }
  .ppdo-notification-anchor { right: 16px !important; }
}
@media (max-width: 860px) {
  .login-shell { grid-template-columns: 1fr; max-width: 540px; padding: 20px; }
  .login-brand-panel {
    border-radius: 24px 24px 0 0; min-height: 0;
    padding: 32px; gap: 12px;
  }
  .login-seal {
    width: 92px; height: 92px;
    padding: 0; border-radius: 0;
    margin: -3px 0 10px -4px;
  }
  .login-brand-panel h1 { font-size: 19px; }
  .login-form-panel { border-radius: 0 0 24px 24px; border-left: 1px solid var(--dms-border); border-top: none; padding: 34px 28px; min-height: 390px; }
}
@media (max-width: 720px) {
  .settings-page, .my-leave-page { padding: 18px; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-card-wide { grid-column: auto; }
  .settings-health-list { grid-template-columns: 1fr; }
  .settings-health-list > div + div { border-left: none; border-top: 1px solid var(--dms-border); }
  .settings-card-heading { flex-direction: column; }
  .my-leave-balance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .my-leave-balance-card:last-child { grid-column: 1 / -1; }
  .overview-metrics { grid-template-columns: 1fr; gap: 4px; padding: 10px 0; }
  .overview-metric { padding: 10px 4px; }
  .overview-metric + .overview-metric { border-left: none; border-top: 1px solid var(--dms-border); }
  .staff-summary, .ppdo-metric-grid { grid-template-columns: 1fr; }
  .overview-list-row { grid-template-columns: minmax(0, 1fr) auto; }
  .overview-list-row > :nth-child(2), .overview-list-row > :nth-child(4) { display: none; }
  .overview-task-row { grid-template-columns: 8px minmax(0, 1fr) auto; }
  .overview-task-owner, .overview-task-due { display: none; }
  .admin-overview { padding: 18px; }
  .ppdo-account-name { display: none; }
  .ppdo-account-person { padding: 5px 6px; }
  .ppdo-sign-out { min-width: 0; padding: 0 13px; }
  .ppdo-notification-anchor { right: 16px !important; }
  .ppdo-page-heading h2 { font-size: 22px !important; }
  .ppdo-brand-name { display: none; }
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-box { border-radius: 20px 20px 0 0; max-width: 100%; max-height: 92vh; }
  .btn { min-height: 44px; }
  .btn-sm { min-height: 38px; }
  .tab-btn { min-height: 44px; }
  .inp, input.inp, select.inp { min-height: 44px; height: 44px; }
  textarea.inp { height: auto; }
  .dms-nav-item { min-height: 48px; }
  .toast { left: 16px; right: 16px; bottom: 16px; max-width: none; }
  .ppdc-document-filter-grid,
  .ppdc-assigned-toolbar,
  .admin-outgoing-filter-bar,
  .liquidation-filter-bar,
  .recycle-filter-bar,
  .recycle-record-card { grid-template-columns: 1fr; }
  .ppdc-document-filter-grid .ppdc-filter-search { grid-column: auto; }
  .recycle-record-actions { justify-content: stretch; }
  .recycle-record-actions .btn { flex: 1; }
  .document-editor-modal { width: 100%; padding: 20px 16px; }
  .document-editor-modal .border-dashed > .grid { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  /* Compatibility breakpoint retained for the responsive DMS contract. */
}

/* ═══ PRINT ══════════════════════════════════════════════════════════ */
@media print {
  .dms-sidebar, .ppdo-nav-host, .ppdo-notification-anchor,
  .ppdo-bottom-alert, .dms-nav-scrim, .toast { display: none !important; }
  body.ppdo-app { padding-left: 0; background: #fff; }
  .card { border: none; }
}
.task-workflow-controls {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.875rem;
}

/* Office readiness: readable secondary text and bounded interactive panels. */
body.ppdo-app .text-gray-400 { color: var(--dms-ink-3); }
.inp::placeholder { color: var(--dms-ink-3); opacity: 1; }
.ppdo-notification-anchor button { min-width: 44px; min-height: 44px; }
.modal-box { max-height: 90dvh; overflow-y: auto; overscroll-behavior: contain; }
.ppdo-drawer { max-width: 100vw; overscroll-behavior: contain; }
.ppdo-overlay { z-index: 100; }
.ppdo-drawer { z-index: 110; }
.modal-overlay,
.ppdo-app > .fixed.inset-0:not(.ppdo-overlay):not(.dms-nav-scrim) { z-index: 120; }
@media (max-width: 720px) {
  .btn-sm, .modal-close, .login-password-toggle { min-height: 44px; }
  .modal-close, .login-password-toggle { min-width: 44px; }
}

.task-status-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
}

.task-file-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin: 0.875rem 0 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid #eef2f7;
}

.task-file-actions .btn,
.task-file-actions button {
  min-height: 2.45rem;
}

@media (max-width: 640px) {
  .task-status-row {
    grid-template-columns: 1fr;
  }

  .task-status-row .btn,
  .task-status-row button {
    width: 100%;
  }
}

.calendar-mobile-hint { display: none; }
.calendar-day-cell { position: relative; overflow: visible; }
.calendar-day-cell:hover,.calendar-day-cell:focus-within { z-index: 30; }
.calendar-day-items { position: relative; }
.calendar-event-chip { position: relative; cursor: help; }
.calendar-event-chip:focus-visible { outline: 2px solid #4169d1; outline-offset: 2px; }
.calendar-event-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 80;
  width: min(300px, calc(100vw - 40px));
  padding: 12px 13px;
  border: 1px solid #d3dae6;
  border-radius: 12px;
  background: #fff;
  color: #182032;
  box-shadow: 0 14px 36px rgba(22,36,74,.18);
  text-align: left;
  line-height: 1.45;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -4px);
  transition: opacity 150ms ease, transform 200ms cubic-bezier(.16,1,.3,1), visibility 0s linear 200ms;
}
.calendar-event-chip:hover .calendar-event-popover,.calendar-event-chip:focus .calendar-event-popover,.calendar-event-chip:focus-within .calendar-event-popover { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 80ms,80ms,0s; }
.calendar-day-cell[data-column="0"] .calendar-event-popover,.calendar-day-cell[data-column="1"] .calendar-event-popover { left: 0; transform: translate(0,-4px); }
.calendar-day-cell[data-column="0"] .calendar-event-chip:hover .calendar-event-popover,.calendar-day-cell[data-column="0"] .calendar-event-chip:focus .calendar-event-popover,.calendar-day-cell[data-column="1"] .calendar-event-chip:hover .calendar-event-popover,.calendar-day-cell[data-column="1"] .calendar-event-chip:focus .calendar-event-popover { transform: translate(0,0); }
.calendar-day-cell[data-column="5"] .calendar-event-popover,.calendar-day-cell[data-column="6"] .calendar-event-popover { left: auto; right: 0; transform: translate(0,-4px); }
.calendar-day-cell[data-column="5"] .calendar-event-chip:hover .calendar-event-popover,.calendar-day-cell[data-column="5"] .calendar-event-chip:focus .calendar-event-popover,.calendar-day-cell[data-column="6"] .calendar-event-chip:hover .calendar-event-popover,.calendar-day-cell[data-column="6"] .calendar-event-chip:focus .calendar-event-popover { transform: translate(0,0); }
.calendar-event-popover-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; color: #4e586e; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.calendar-event-popover strong { display: block; font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.calendar-event-popover p { margin: 7px 0 0; color: #4e586e; font-size: 11px; }
.calendar-event-popover dl { display: grid; gap: 5px; margin: 9px 0 0; font-size: 10.5px; }
.calendar-event-popover dl div { display: grid; grid-template-columns: 72px minmax(0,1fr); gap: 7px; }
.calendar-event-popover dt { color: #8792a6; font-weight: 600; }
.calendar-event-popover dd { margin: 0; color: #4e586e; overflow-wrap: anywhere; }
.calendar-more { width: 100%; min-height: 26px; border: 0; background: transparent; color: #2b4faf; font: inherit; font-size: 10px; font-weight: 650; text-align: left; cursor: pointer; }
@media (max-width: 640px) {
  .calendar-mobile-hint { display: block; font-size: 12px; color: var(--dms-ink-3); margin-bottom: 12px; }
  .calendar-month, .calendar-weekdays { gap: 3px; }
  .calendar-weekdays > div { padding: 4px 0; font-size: 9px; letter-spacing: 0; }
  .calendar-month > [role="button"] { min-height: 64px; padding: 5px 2px; border-radius: 8px; }
  .calendar-month > [role="button"] > div:first-child { flex-direction: column; gap: 4px; margin: 0; }
  .calendar-month > [role="button"] > div:last-child { display: none; }
  .calendar-event-popover { display: none; }
}
@media (prefers-reduced-motion: reduce) { .calendar-event-popover { transition-duration: 1ms; transform: none !important; } }
