/* =========================================================
   01. DESIGN TOKENS / ROOT
   ========================================================= */

:root {
  --bg: #f6f9fc;
  --panel: #ffffff;
  --panel-2: #fbfcfe;
  --border: #e6ebf1;
  --border-strong: #d8e1ea;
  --text: #0f172a;
  --text-soft: #475569;
  --text-faint: #6b7280;
  --primary: #635bff;
  --primary-dark: #4f46e5;
  --primary-soft: #eef2ff;
  --success: #0f9f6e;
  --success-soft: #ecfdf5;
  --warning: #b7791f;
  --warning-soft: #fff7ed;
  --danger: #d14343;
  --danger-soft: #fef2f2;
  --info: #2563eb;
  --info-soft: #eff6ff;
  --purple-strong: #7c3aed;
  --purple-soft: #f5f3ff;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 10px;
  --shadow-soft: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
  --shadow-elevated: 0 6px 18px rgba(15, 23, 42, 0.08), 0 24px 44px rgba(15, 23, 42, 0.08);
  --transition: 180ms ease;
   --sidebar-width: 280px;
  --sidebar-collapsed-width: 92px;
  --topbar-height: 84px;
  --focus-ring: 0 0 0 4px rgba(99, 91, 255, 0.14);
}

/* =========================================================
   02. GLOBAL RESET / BASE
   ========================================================= */

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

html {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #f8fbff 0%, #f5f7fb 100%);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.hidden-visually {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* =========================================================
   03. GLOBAL TYPOGRAPHY / SHARED TEXT
   ========================================================= */

.guest-card h1,
.sidebar__title,
.page-title,
.section-title,
.modal__title {
  margin: 0;
  letter-spacing: -0.03em;
}

.guest-card h1 {
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.05;
}

.guest-copy,
.page-subtitle,
.metric-card__meta,
.detail-summary__label,
.detail-list dt,
.field__help,
.saved-at,
.modal-copy {
  color: var(--text-soft);
}

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

.eyebrow--tight {
  margin-bottom: 4px;
}

/* =========================================================
   04. APP ROOT / PAGE SHELL
   ========================================================= */

.portal-root {
  min-height: 100vh;
}

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

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

.content-shell {
  padding: 24px 32px 32px;
}

.view {
  display: none;
  animation: sectionFadeIn 220ms ease;
}

.view.is-active {
  display: block;
}

.app-shell.sidebar-collapsed .sidebar,
.sidebar.is-collapsed {
  width: var(--sidebar-collapsed-width);
  flex: 0 0 var(--sidebar-collapsed-width);
}

@keyframes sectionFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   05. GUEST / AUTH / LOADING SCREENS
   ========================================================= */

.guest-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
}

.guest-screen--muted .guest-card {
  opacity: 0.92;
}

.guest-card {
  width: min(560px, 100%);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(230, 235, 241, 0.95);
  border-radius: 28px;
  box-shadow: var(--shadow-elevated);
  padding: 32px;
}

.guest-copy {
  margin: 20px 0 0;
  max-width: 48ch;
  line-height: 1.6;
}

.guest-actions {
  margin-top: 28px;
}

.brand-lockup {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.brand-lockup--compact {
  align-items: center;
}

.brand-lockup__mark {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 24px rgba(99, 91, 255, 0.22);
  flex-shrink: 0;
}

.brand-lockup__copy {
  min-width: 0;
  overflow: hidden;
}

/* =========================================================
   06. SIDEBAR
   ========================================================= */

.sidebar {
  width: var(--sidebar-width);
  flex: 0 0 var(--sidebar-width);
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(20px);
  border-right: 1px solid rgba(230, 235, 241, 0.82);
  padding: 20px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 30;
  transition: width var(--transition), flex-basis var(--transition), padding var(--transition),
    transform var(--transition);
  overflow: hidden;
}

.sidebar__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  gap: 12px;
}

.sidebar__title {
  font-size: 16px;
  line-height: 1.1;
  white-space: nowrap;
}

.sidebar__close {
  display: none;
}

.sidebar__footer {
  margin-top: auto;
  padding-top: 24px;
  display: grid;
  gap: 18px;
}

.sidebar.is-collapsed {
  padding-inline: 12px;
  align-items: stretch;
}

.sidebar.is-collapsed .sidebar__header {
  justify-content: center;
}

.sidebar.is-collapsed .brand-lockup {
  justify-content: center;
}

.sidebar.is-collapsed .brand-lockup__copy,
.sidebar.is-collapsed .nav__label,
.sidebar.is-collapsed .tenant-mini__meta,
.sidebar.is-collapsed .btn__label {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  width: 0;
  max-width: 0;
  overflow: hidden;
}

.sidebar.is-collapsed .nav {
  justify-items: stretch;
}

.sidebar.is-collapsed .nav__item {
  min-height: 52px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 16px;
}

.sidebar.is-collapsed .nav__item.is-active::before {
  left: 50%;
  top: auto;
  bottom: 4px;
  width: 22px;
  height: 3px;
  transform: translateX(-50%);
}

.sidebar.is-collapsed .tenant-mini {
  justify-content: center;
  padding: 12px;
}

.sidebar.is-collapsed .avatar,
.sidebar.is-collapsed .brand-lockup__mark {
  margin-inline: auto;
}


/* =========================================================
   07. SIDEBAR NAVIGATION
   ========================================================= */

.nav {
  display: grid;
  gap: 10px;
}

.nav__item {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-soft);
  padding: 14px 16px;
  border-radius: 16px;
  text-align: left;
  position: relative;
  overflow: hidden;
  transition:
    background var(--transition),
    border-color var(--transition),
    color var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
}

.nav__item:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--border);
  color: var(--text);
  transform: translateY(-1px);
}

.nav__item.is-active {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(99, 91, 255, 0.12);
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.nav__item.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 999px;
  background: var(--primary);
}

.nav__label {
  font-weight: 650;
  font-size: 15px;
  transition: opacity var(--transition);
}

.sidebar.is-collapsed .nav__item {
  width: 100%;
  min-height: 52px;
  padding-inline: 0;
  display: grid;
  place-items: center;
  text-align: center;
}

.sidebar.is-collapsed .nav__item.is-active::before {
  left: 50%;
  top: auto;
  bottom: 4px;
  width: 22px;
  height: 3px;
  transform: translateX(-50%);
}

/* =========================================================
   08. AVATARS / TENANT CHIP / TENANT MINI
   ========================================================= */

.tenant-mini,
.tenant-chip {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tenant-mini {
  padding: 14px;
  border: 1px solid rgba(230, 235, 241, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  transition: background var(--transition), border-color var(--transition),
    transform var(--transition), box-shadow var(--transition);
}

.tenant-mini:hover {
  background: rgba(255, 255, 255, 0.94);
  border-color: var(--border-strong);
}

.tenant-mini__title,
.tenant-chip__title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.tenant-mini__sub,
.tenant-chip__sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-soft);
}

.tenant-mini__meta {
  min-width: 0;
  transition: opacity var(--transition), visibility var(--transition);
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
  color: #fff;
  font-weight: 700;
  border: 1px solid rgba(99, 91, 255, 0.12);
  box-shadow: 0 10px 24px rgba(99, 91, 255, 0.14);
  flex-shrink: 0;
}

.avatar--sm {
  width: 44px;
  height: 44px;
  border-radius: 14px;
}

.tenant-chip {
  display: inline-flex;
}

.tenant-chip__meta {
  min-width: 0;
  display: flex;
  align-items: center;
}

.tenant-chip__title {
  white-space: nowrap;
}

.tenant-chip--compact {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 14px 6px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  min-height: 48px;
  transition: border-color var(--transition), box-shadow var(--transition),
    background var(--transition);
}

.tenant-chip--compact:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
}

/* =========================================================
   09. TOPBAR
   ========================================================= */

.topbar {
  min-height: 78px;
  padding: 14px 24px;
  border-bottom: 1px solid rgba(230, 235, 241, 0.92);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar__left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.topbar__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-shrink: 0;
}

.topbar__menu {
  display: inline-grid;
  flex-shrink: 0;
}

.page-title {
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.05;
}

.page-title--topbar {
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.05;
  margin: 0;
  white-space: nowrap;
}

.page-subtitle {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.5;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(15, 159, 110, 0.12);
  background: var(--success-soft);
  color: #065f46;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.status-pill__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 6px rgba(15, 159, 110, 0.08);
}

/* =========================================================
   9. Notifications
   ========================================================= */

.notifications {
  position: relative;
  flex-shrink: 0;
}

.notifications__trigger {
  position: relative;
  flex-shrink: 0;
}

.notifications__icon {
  line-height: 1;
  font-size: 16px;
}

.notifications__count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #6a63ff 0%, var(--primary) 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border: 2px solid #fff;
  box-shadow: 0 8px 18px rgba(99, 91, 255, 0.24);
}

.notifications-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(420px, calc(100vw - 32px));
  max-height: min(72vh, 640px);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(230, 235, 241, 0.96);
  border-radius: 22px;
  box-shadow: 0 14px 44px rgba(15, 23, 42, 0.14);
  padding: 14px;
  z-index: 60;
  display: flex;
  flex-direction: column;
}

.notifications-dropdown__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(230, 235, 241, 0.78);
  flex-shrink: 0;
}

.notifications-dropdown__title {
  margin: 0;
  font-size: 18px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.notifications-dropdown__list {
  display: grid;
  gap: 14px;
  overflow-y: auto;
  padding-right: 4px;
  min-height: 0;
}

.notifications-dropdown__group {
  display: grid;
  gap: 10px;
}

.notifications-dropdown__group-heading {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-soft);
  letter-spacing: 0.01em;
  padding: 2px 2px 0;
}

.notifications-dropdown__group-list {
  display: grid;
  gap: 10px;
}

.notifications-dropdown__item {
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  transition: border-color var(--transition), box-shadow var(--transition),
    transform var(--transition), background var(--transition);
}

.notifications-dropdown__item:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
}

.notifications-dropdown__item--unread {
  background: linear-gradient(180deg, #f8f7ff 0%, #f3f1ff 100%);
  border-color: rgba(99, 91, 255, 0.24);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.03),
    0 10px 24px rgba(99, 91, 255, 0.08);
}

.notifications-dropdown__item-top {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.notifications-dropdown__item-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

.notifications-dropdown__item-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 6px rgba(99, 91, 255, 0.14);
  flex-shrink: 0;
}

.notifications-dropdown__item-text {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.55;
}

.notifications-dropdown__item-meta {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-soft);
  font-size: 12px;
}

.notifications-dropdown__empty {
  border: 1px dashed var(--border-strong);
  border-radius: 18px;
  padding: 18px;
  text-align: center;
  color: var(--text-soft);
  background: linear-gradient(180deg, #fff, #fcfdff);
}

.notifications-dropdown__list::-webkit-scrollbar {
  width: 8px;
}

.notifications-dropdown__list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}

.notifications-dropdown__list::-webkit-scrollbar-track {
  background: transparent;
}

@media (max-width: 680px) {
  .notifications-dropdown {
    right: -8px;
    width: min(380px, calc(100vw - 24px));
  }

  .notifications-dropdown__header {
    flex-direction: column;
    align-items: stretch;
  }

  .notifications-dropdown__item-meta {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =========================================================
   10. DASHBOARD / PAGE GRIDS
   ========================================================= */

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: start;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

#view-documents .panel-card {
  width: 100%;
  max-width: none;
}
/* =========================================================
   11. SHARED CARDS / PANELS / CALLOUTS / LIST ITEMS
   ========================================================= */

.metric-card,
.panel-card,
.callout-card,
.list-item,
.action-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.metric-card,
.panel-card,
.callout-card {
  border-radius: 22px;
}

.metric-card {
  padding: 22px 20px 18px;
}

.metric-card__label {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
}

.metric-card__value {
  margin: 0;
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 750;
}

.metric-card__value--small {
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.15;
}

.metric-card__meta {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.5;
}

.home-callout {
  margin-bottom: 24px;
}

.callout-card {
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.callout-card--priority {
  border-color: rgba(209, 67, 67, 0.22);
  background: linear-gradient(180deg, #fff, #fff8f8);
}

.callout-card__title {
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.callout-card__text {
  margin: 8px 0 0;
  color: var(--text-soft);
  line-height: 1.55;
}

.callout-card__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.panel-card {
  padding: 20px;
}

.panel-card--narrow {
  max-width: 680px;
}

/* =========================================================
   12. SECTION HEADERS
   ========================================================= */

.section-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 18px;
}

.section-header--stack-mobile {
  align-items: center;
}

.section-title {
  font-size: 20px;
  line-height: 1.1;
}

.section-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

/* =========================================================
   13. LISTS / ANNOUNCEMENTS / STACKS
   ========================================================= */

.list-stack {
  display: grid;
  gap: 14px;
}

.list-item {
  border-radius: 20px;
  padding: 18px 18px 16px;
  transition: transform var(--transition), box-shadow var(--transition),
    border-color var(--transition), background var(--transition);
}

.list-item--clickable {
  cursor: pointer;
}

.list-item--clickable:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevated);
  border-color: var(--border-strong);
}

.list-item__top,
.list-item__bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.list-item__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.list-item__meta,
.list-item__text,
.list-item__footer {
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.55;
}

.list-item__meta {
  margin: 8px 0 0;
}

.list-item__text {
  margin: 12px 0 0;
}

.list-item__footer {
  margin-top: 14px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.list-item__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.list-item--announcement-high {
  border-left: 4px solid var(--warning);
}

.list-item--announcement-urgent {
  border-left: 4px solid var(--danger);
  background: linear-gradient(180deg, #fff, #fff8f8);
}

/* =========================================================
   13B. DOCUMENTS
   ========================================================= */

#documentsList {
  display: grid;
  gap: 12px;
}

.document-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    transform var(--transition),
    background var(--transition);
}

.document-row:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
}

.document-row--featured {
  border-color: rgba(99, 91, 255, 0.16);
  background: linear-gradient(180deg, #ffffff 0%, #f7f7ff 100%);
}

.document-row__main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.document-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary-dark);
  background: linear-gradient(180deg, #f3f1ff 0%, #ece8ff 100%);
  border: 1px solid rgba(99, 91, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.document-meta {
  min-width: 0;
  flex: 1;
}

.document-title {
  margin: 0;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  word-break: break-word;
}

.document-sub {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-soft);
}

.document-sub span {
  white-space: nowrap;
}

.document-sub span:nth-child(2n) {
  color: var(--text-faint);
}

.document-source-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  border: 1px solid rgba(99, 91, 255, 0.12);
  font-size: 11px;
  font-weight: 700;
}

.document-row__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}

.document-row__actions .btn {
  min-width: 104px;
  width: auto;
}

/* =========================================================
   14. DETAIL LISTS / EDITABLE DETAIL ROWS
   ========================================================= */

.detail-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.detail-list__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid rgba(230, 235, 241, 0.7);
}

.detail-list__row:last-child {
  border-bottom: none;
}

.detail-list dt {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.detail-list dd {
  margin: 0;
  text-align: right;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.detail-list__value {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  text-align: right;
}

.detail-list__value--editable {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.detail-edit-btn {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-soft);
  display: inline-grid;
  place-items: center;
  padding: 0;
  line-height: 1;
  font-size: 13px;
  transition: border-color var(--transition), color var(--transition),
    background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.detail-edit-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
  transform: translateY(-1px);
}

.detail-edit-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* =========================================================
   15. QUICK ACTIONS / ACTION CARDS
   ========================================================= */

.quick-actions {
  display: grid;
  gap: 12px;
}

.action-card {
  width: 100%;
  text-align: left;
  border-radius: 18px;
  padding: 16px;
  transition: transform var(--transition), box-shadow var(--transition),
    border-color var(--transition);
}

.action-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-elevated);
  border-color: var(--border-strong);
}

.action-card__title {
  display: block;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.action-card__text {
  display: block;
  color: var(--text-soft);
  line-height: 1.55;
  font-size: 13px;
}

/* =========================================================
   16. BUTTONS / ICON BUTTONS / CHIPS / INPUTS
   ========================================================= */

.btn,
.icon-btn,
.chip,
.input {
  transition: border-color var(--transition), background var(--transition),
    color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.btn,
.chip,
.icon-btn {
  border: 1px solid transparent;
  background: #fff;
  color: var(--text);
  border-radius: 14px;
}

.btn {
  min-height: 42px;
  padding: 0 16px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn:hover,
.icon-btn:hover,
.chip:hover {
  transform: translateY(-1px);
}

.btn:disabled,
.icon-btn:disabled,
.chip:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn--lg {
  min-height: 48px;
  padding-inline: 20px;
}

.btn--sm {
  min-height: 34px;
  padding-inline: 12px;
  font-size: 13px;
}

.btn--block {
  width: 100%;
}

.btn--primary {
  background: linear-gradient(180deg, #6a63ff 0%, var(--primary) 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(99, 91, 255, 0.2);
}

.btn--primary:hover {
  background: linear-gradient(180deg, #5d56f3 0%, var(--primary-dark) 100%);
}

.btn--ghost {
  background: #fff;
  border-color: var(--border);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--border-strong);
}

.btn--danger {
  background: linear-gradient(180deg, #df5a5a 0%, var(--danger) 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(209, 67, 67, 0.18);
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-color: var(--border);
}

.btn__label {
  display: inline;
}

.chip-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chip {
  min-height: 40px;
  padding: 0 14px;
  border-color: var(--border);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 650;
}

.chip.is-active {
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-color: rgba(99, 91, 255, 0.18);
}

.document-row__actions .btn--ghost {
  background: #fff;
  border-color: var(--border);
}

.document-row__actions .btn--ghost:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
}

/* =========================================================
   17. FORMS
   ========================================================= */

.form-stack {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field__label {
  font-size: 14px;
  font-weight: 650;
  color: var(--text);
}

.field__help {
  font-size: 12px;
}

.input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  box-shadow: inset 0 1px 1px rgba(15, 23, 42, 0.02);
}

.input:hover {
  border-color: var(--border-strong);
}

.input:focus-visible,
.btn:focus-visible,
.icon-btn:focus-visible,
.nav__item:focus-visible,
.chip:focus-visible,
.action-card:focus-visible,
.list-item--clickable:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.input--textarea {
  min-height: 140px;
  padding: 14px;
  resize: vertical;
}

.input--file {
  padding: 10px 12px;
}

.form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.form-message {
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.5;
}

.form-message--info {
  background: var(--info-soft);
  border-color: rgba(37, 99, 235, 0.14);
  color: #1e40af;
}

.form-message--success {
  background: var(--success-soft);
  border-color: rgba(15, 159, 110, 0.16);
  color: #047857;
}

.form-message--error {
  background: var(--danger-soft);
  border-color: rgba(209, 67, 67, 0.16);
  color: #b91c1c;
}

.saved-at {
  font-size: 13px;
}

/* =========================================================
   18. BADGES / STATUS LABELS
   ========================================================= */

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge--open {
  background: #e9f1ff;
  border-color: rgba(37, 99, 235, 0.18);
  color: #1d4ed8;
}

.badge--in-progress {
  background: #fff4db;
  border-color: rgba(180, 131, 22, 0.2);
  color: #a16207;
}

.badge--waiting-for-contractor {
  background: #f1ebff;
  border-color: rgba(124, 58, 237, 0.2);
  color: #6d28d9;
}

.badge--completed {
  background: #e8fbf2;
  border-color: rgba(15, 159, 110, 0.2);
  color: #047857;
}

.badge--default {
  background: #f8fafc;
  border-color: rgba(148, 163, 184, 0.15);
  color: #475569;
}

.badge--high {
  background: #fff3e6;
  border-color: rgba(183, 121, 31, 0.18);
  color: #b45309;
}

.badge--urgent {
  background: #fef2f2;
  border-color: rgba(209, 67, 67, 0.18);
  color: #b91c1c;
}

/* =========================================================
   19. EMPTY STATES / SKELETONS / FILE CHIPS
   ========================================================= */

.empty-state {
  border: 1px dashed var(--border-strong);
  border-radius: 18px;
  padding: 24px;
  background: linear-gradient(180deg, #fff, #fcfdff);
}

.empty-state__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.empty-state__text {
  margin: 8px 0 0;
  color: var(--text-soft);
  line-height: 1.55;
}

.empty-state__actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.empty-state__icon {
  font-size: 22px;
  line-height: 1;
  margin-bottom: 10px;
}

.skeleton-card {
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 16px;
}

.skeleton-line {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f2f4f7 25%, #e6eaf0 37%, #f2f4f7 63%);
  background-size: 400% 100%;
  animation: skeletonLoading 1.2s ease infinite;
}

.skeleton-line + .skeleton-line {
  margin-top: 10px;
}

.skeleton-line--lg {
  height: 16px;
  width: 54%;
}

.skeleton-line--md {
  width: 36%;
}

.skeleton-line--sm {
  width: 72%;
}

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

.file-chip-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.file-chip {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid var(--border);
  color: var(--text-soft);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 650;
}

/* =========================================================
   20. GENERIC MODAL SYSTEM
   ========================================================= */

.modal {
  position: fixed;
  inset: 0;
  z-index: 70;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(5px);
}

.modal__dialog {
  position: relative;
  width: min(680px, calc(100vw - 24px));
  max-height: calc(100vh - 48px);
  margin: 24px auto;
  background: #fff;
  border: 1px solid rgba(230, 235, 241, 0.96);
  border-radius: 24px;
  box-shadow: var(--shadow-elevated);
  padding: 20px;
  animation: modalEnter 180ms ease;
  overflow-y: auto;
}

.modal__dialog--wide {
  width: min(760px, calc(100vw - 24px));
}

.modal__dialog--small {
  width: min(480px, calc(100vw - 24px));
}

.modal__dialog--xl {
  width: min(1200px, calc(100vw - 32px));
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal__dialog--request {
  max-width: 920px;
  max-height: 90vh;
  overflow-y: auto;
  padding-bottom: 8px;
}

@keyframes modalEnter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal__header,
.modal__footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.modal__header {
  margin-bottom: 18px;
}

.modal__footer {
  margin-top: 18px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.modal__header--request {
  align-items: flex-start;
  margin-bottom: 14px;
}

.modal__meta-row {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 0.96rem;
}

.modal__footer--request {
  padding-top: 2px;
}

/* =========================================================
   21. GENERIC DETAIL SUMMARY / DETAIL BLOCKS
   ========================================================= */

.detail-summary {
  margin-bottom: 16px;
}

.detail-summary__meta {
  display: grid;
  gap: 10px;
}

.detail-summary__row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.detail-block {
  border-top: 1px solid rgba(230, 235, 241, 0.76);
  padding-top: 16px;
  margin-top: 16px;
}

.detail-block__label {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-soft);
}

.detail-block__text {
  margin: 0;
  color: var(--text);
  line-height: 1.65;
}

.detail-block__subtext--tight {
  margin: 2px 0 0;
  font-size: 0.92rem;
  color: var(--text-soft);
}

/* =========================================================
   22. TOASTS
   ========================================================= */

.toast {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 90;
  min-width: 220px;
  max-width: 420px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #111827;
  color: #fff;
  box-shadow: var(--shadow-elevated);
  animation: toastEnter 180ms ease;
}

@keyframes toastEnter {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   23. MOBILE SIDEBAR OVERLAY
   ========================================================= */

.mobile-sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(4px);
  z-index: 25;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.mobile-sidebar-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* =========================================================
   24. LARGE MAINTENANCE DETAIL MODAL LAYOUT
   ========================================================= */

.modal__body--split {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 20px;
  min-height: 0;
  overflow: hidden;
}

.maintenance-detail,
.maintenance-chat {
  min-height: 0;
}

.detail-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-soft);
}

.detail-card + .detail-card {
  margin-top: 16px;
}

.detail-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.detail-card__header h3 {
  margin: 0;
  font-size: 1rem;
}

.detail-card__meta {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}

.detail-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.detail-text {
  margin: 0;
  color: var(--text);
  line-height: 1.5;
  white-space: pre-wrap;
}

/* =========================================================
   25. REQUEST MODAL - SHARED CARDS
   ========================================================= */

.request-summary-card,
.request-chat-card,
.request-history-strip {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.request-summary-card,
.request-history-strip,
.request-chat-card {
  margin: 0 0 14px;
}

/* =========================================================
   26. REQUEST MODAL - SUMMARY
   ========================================================= */

.request-summary-card--simple {
  padding: 18px 20px;
}

.request-summary-simple {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  align-items: start;
}

.request-summary-simple__item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.request-summary-simple__item--status {
  min-width: 0;
}

.request-summary-item__label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  color: var(--text-faint);
}

/* =========================================================
   27. REQUEST MODAL - HISTORY STRIP / ACCORDION
   ========================================================= */

.request-history-strip {
  padding: 14px 20px;
}

.history-toggle--clean {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: transparent;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.history-toggle__left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.history-toggle__chevron {
  display: inline-block;
  transition: transform 0.2s ease;
  color: var(--text-soft);
}

.history-toggle[aria-expanded="true"] .history-toggle__chevron {
  transform: rotate(90deg);
}

.history-toggle__count {
  color: var(--text-soft);
  font-weight: 500;
  font-size: 0.92rem;
}

.history-panel {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* =========================================================
   28. TIMELINE / HISTORY
   ========================================================= */

.timeline-list,
.timeline-list--history {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.timeline-list {
  max-height: 48vh;
  overflow-y: auto;
  padding-right: 6px;
}

.timeline-item {
  position: relative;
  padding-left: 18px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--primary);
}

.timeline-item__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 6px;
}

.timeline-item__title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.timeline-item__meta {
  margin: 0 0 6px;
  font-size: 0.85rem;
  color: var(--text-soft);
  white-space: nowrap;
}

.timeline-item__body {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-wrap;
}

.timeline-item__sub {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--text-soft);
}

.timeline-empty {
  border: 1px dashed var(--border-strong);
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(180deg, #fff, #fcfdff);
}

.timeline-empty p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.55;
}

/* =========================================================
   29. REQUEST MODAL - CHAT CARD
   ========================================================= */

.request-chat-card--clean {
  padding: 18px 20px 16px;
  display: flex;
  flex-direction: column;
  min-height: 420px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.request-chat-card__header--tight {
  margin-bottom: 10px;
}

.chat-thread--clean {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 2px 16px;
  min-height: 180px;
  max-height: 360px;
  scroll-behavior: smooth;
}

.chat-empty {
  padding: 18px 16px;
  border: 1px dashed var(--border);
  border-radius: 16px;
  background: var(--panel-2);
  color: var(--text-soft);
  text-align: center;
  line-height: 1.5;
}

/* =========================================================
   30. REQUEST MODAL - CHAT MESSAGES
   ========================================================= */

.chat-message {
  max-width: 68%;
  padding: 12px 14px 13px;
  border-radius: 18px;
  line-height: 1.5;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.chat-message:hover {
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.chat-message--tenant {
  align-self: flex-end;
  background: linear-gradient(135deg, #635bff, #5b5ff7);
  color: #fff;
  border-bottom-right-radius: 6px;
}

.chat-message--staff {
  align-self: flex-start;
  background: #f1f5f9;
  color: var(--text);
  border: 1px solid #e8edf3;
  border-bottom-left-radius: 6px;
}

.chat-message__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  margin-bottom: 7px;
  line-height: 1.2;
}

.chat-message--tenant .chat-message__meta {
  color: rgba(255, 255, 255, 0.88);
}

.chat-message--staff .chat-message__meta {
  color: var(--text-soft);
}

.chat-message__author {
  font-weight: 700;
  letter-spacing: 0.01em;
}

.chat-message__body {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.99rem;
}

/* =========================================================
   31. REQUEST MODAL - CHAT COMPOSER
   ========================================================= */

.chat-composer-wrap {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.chat-composer--clean {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  padding-top: 0;
  margin-top: 0;
  border-top: none;
}

.chat-composer__input {
  flex: 1;
  min-height: 56px;
  max-height: 140px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 15px;
  font: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.chat-composer__input::placeholder {
  color: var(--text-faint);
}

.chat-composer__input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.12);
  background: #fcfcff;
}

.chat-composer__send {
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, #635bff, #5b5ff7);
  color: #fff;
  min-width: 108px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.chat-composer__send:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(99, 91, 255, 0.22);
}

.chat-composer__send:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.chat-composer__meta {
  margin: 10px 2px 0;
  font-size: 0.85rem;
  color: var(--text-soft);
}

/* =========================================================
   32. RESPONSIVE
   ========================================================= */

@media (max-width: 1180px) {
  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

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

@media (min-width: 921px) {
  .sidebar__close {
    display: none !important;
  }

  .topbar__menu {
    display: inline-grid;
  }
}

@media (max-width: 920px) {
  .app-shell.sidebar-collapsed .sidebar {
    width: var(--sidebar-width);
    flex-basis: var(--sidebar-width);
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    transform: translateX(-100%);
    transition: transform var(--transition);
    box-shadow: var(--shadow-elevated);
    width: min(320px, calc(100vw - 48px));
    flex-basis: auto;
  }

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

  .sidebar.is-collapsed {
    padding-inline: 18px;
  }

  .sidebar.is-collapsed .brand-lockup__copy,
  .sidebar.is-collapsed .nav__label,
  .sidebar.is-collapsed .tenant-mini__meta {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .sidebar.is-collapsed .nav__item {
    min-height: auto;
    padding: 14px 16px;
    display: block;
    text-align: left;
  }

  .sidebar.is-collapsed .nav__item.is-active::before {
    left: 0;
    top: 9px;
    bottom: 9px;
    width: 3px;
    height: auto;
    transform: none;
  }

  .sidebar__close,
  .topbar__menu {
    display: grid;
  }

  .topbar {
    padding: 12px 18px;
    min-height: 72px;
  }

  .content-shell {
    padding: 18px;
  }

  .topbar__right .tenant-chip {
    display: none;
  }

  .page-title--topbar {
    font-size: 24px;
  }
}

@media (max-width: 768px) {
  .modal__dialog--request {
    max-width: calc(100vw - 20px);
  }

  .request-summary-simple {
    grid-template-columns: 1fr;
  }

  .chat-message {
    max-width: 86%;
  }

  .chat-composer--clean {
    flex-direction: column;
    align-items: stretch;
  }

  .chat-composer__send {
    width: 100%;
  }
}

   .document-row {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 14px;
    padding: 16px;
  }

  .document-row__main {
    align-items: flex-start;
  }

  .document-row__actions {
    width: 100%;
    justify-content: stretch;
  }

  .document-row__actions .btn {
    width: 100%;
  }

  .document-title {
    font-size: 16px;
  }

  .document-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }
@media (max-width: 680px) {
  .timeline-item__top {
    flex-direction: column;
    align-items: flex-start;
  }

  .timeline-item__meta {
    white-space: normal;
  }

  .guest-card,
  .panel-card,
  .metric-card,
  .callout-card,
  .modal__dialog {
    border-radius: 20px;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .section-header,
  .callout-card,
  .list-item__top,
  .list-item__bottom,
  .detail-list__row {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-header--stack-mobile {
    align-items: flex-start;
  }

  .topbar {
    padding: 12px 16px;
    min-height: 72px;
  }

  .topbar__left {
    width: 100%;
  }

  .topbar__right {
    width: auto;
    margin-left: auto;
    gap: 10px;
  }

  .section-actions {
    width: 100%;
  }

  .chip-row {
    width: 100%;
  }

  .modal__footer {
    justify-content: stretch;
  }

  .modal__footer .btn {
    width: 100%;
  }

  .toast {
    right: 12px;
    left: 12px;
    max-width: none;
  }

  .modal__dialog {
    max-height: calc(100vh - 16px);
    margin: 8px auto;
  }
}
