:root {
  --portal-navy: #0D1B3E;
  --portal-purple-deep: #2B0A5A;
  --portal-purple-mid: #4B1D8F;
  --portal-purple: #6A2CFF;
  --portal-green: #2ECC71;
  --portal-bg: #f6f7fb;
  --portal-card: #ffffff;
  --portal-border: rgba(13, 27, 62, 0.11);
  --portal-muted: #667085;
  --portal-shadow: 0 18px 45px rgba(13, 27, 62, 0.1);
  --portal-nav-height: 64px;
  --portal-sidebar-width: 300px;
}

* { box-sizing: border-box; }
html { max-width: 100%; overflow-x: hidden; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--portal-bg);
  color: var(--portal-navy);
  max-width: 100%;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
img, svg, video { max-width: 100%; }

.client-logo {
  display: inline-flex;
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--portal-navy);
}
.client-logo span { color: var(--portal-purple); }
.client-pill {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 0.35rem 0.72rem;
  background: rgba(106, 44, 255, 0.1);
  color: var(--portal-purple);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 520px);
  gap: 30px;
  align-items: center;
  padding: 32px;
  background:
    radial-gradient(circle at 10% 10%, rgba(106, 44, 255, 0.16), transparent 30%),
    radial-gradient(circle at 90% 20%, rgba(46, 204, 113, 0.12), transparent 28%),
    var(--portal-bg);
}
.auth-brand {
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 8px;
  padding: clamp(28px, 5vw, 58px);
  color: #fff;
  background: linear-gradient(135deg, var(--portal-purple-deep), var(--portal-purple-mid));
  box-shadow: var(--portal-shadow);
}
.auth-brand .client-logo { color: #fff; margin-bottom: 28px; }
.auth-brand .client-logo span { color: #39FF14; }
.auth-brand h1 {
  max-width: 720px;
  margin: 18px 0 12px;
  font-size: clamp(2.2rem, 6vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: 0;
}
.auth-brand p {
  max-width: 620px;
  color: rgba(255,255,255,0.78);
  line-height: 1.75;
  font-size: 1.02rem;
}
.auth-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.auth-points span {
  border-radius: 999px;
  padding: 0.5rem 0.8rem;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-weight: 800;
}
.auth-card,
.portal-card {
  border: 1px solid var(--portal-border);
  border-radius: 8px;
  background: var(--portal-card);
  box-shadow: var(--portal-shadow);
}
.auth-card {
  padding: clamp(22px, 4vw, 34px);
}
.auth-card h2,
.portal-card h2 {
  margin: 0 0 8px;
  color: var(--portal-purple-deep);
}
.muted {
  color: var(--portal-muted);
  line-height: 1.65;
}

.client-form {
  display: grid;
  gap: 16px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-field {
  display: grid;
  gap: 7px;
}
.form-field label {
  font-size: 0.84rem;
  font-weight: 800;
}
.form-field input,
.form-field select,
.form-field textarea,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--portal-border);
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  background: #fff;
  color: var(--portal-navy);
}
.form-field textarea {
  min-height: 120px;
  resize: vertical;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  outline: 3px solid rgba(106, 44, 255, 0.16);
  border-color: var(--portal-purple);
}
.client-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, var(--portal-purple-deep), var(--portal-purple));
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}
.client-btn.secondary {
  background: #fff;
  color: var(--portal-purple-deep);
  border: 1px solid var(--portal-border);
}
.form-links {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 16px;
  color: var(--portal-purple);
  font-weight: 800;
}
.client-alert {
  border-radius: 8px;
  padding: 0.8rem 1rem;
  margin-bottom: 16px;
  font-weight: 700;
}
.client-alert-success {
  background: rgba(46, 204, 113, 0.13);
  color: #06723a;
}
.client-alert-error {
  background: rgba(220, 38, 38, 0.09);
  color: #b42318;
}

.client-app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
}
.client-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  background: #fff;
  border-right: 1px solid var(--portal-border);
}
.sidebar-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.sidebar-toggle {
  display: none;
  min-height: 36px;
  border: 1px solid var(--portal-border);
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  background: #fff;
  color: var(--portal-purple-deep);
  font-weight: 900;
  cursor: pointer;
}
.admin-sidebar .sidebar-toggle {
  border-color: rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.client-sidebar nav {
  display: grid;
  gap: 8px;
}
.client-sidebar nav a,
.logout-form button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  background: transparent;
  color: var(--portal-muted);
  font-weight: 850;
  text-align: left;
  cursor: pointer;
}
.client-sidebar nav a.active,
.client-sidebar nav a:hover,
.logout-form button:hover {
  background: rgba(106, 44, 255, 0.1);
  color: var(--portal-purple);
}
.logout-form { margin-top: auto; }
.client-main {
  min-width: 0;
  padding: 28px;
}
.client-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}
.client-topbar h1 {
  margin: 8px 0 0;
  font-size: clamp(1.7rem, 4vw, 2.7rem);
  color: var(--portal-purple-deep);
  letter-spacing: 0;
}
.client-user-chip {
  display: grid;
  gap: 3px;
  min-width: 220px;
  border: 1px solid var(--portal-border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  background: #fff;
}
.client-user-chip span { color: var(--portal-muted); font-size: 0.84rem; }

.stats-grid,
.dashboard-grid,
.card-grid {
  display: grid;
  gap: 16px;
}
.stats-grid {
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 18px;
}
.stat-box,
.portal-card {
  padding: 20px;
}
.stat-box {
  border: 1px solid var(--portal-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--portal-shadow);
}
.stat-box span {
  color: var(--portal-muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}
.stat-box strong {
  display: block;
  margin-top: 12px;
  font-size: 2rem;
  color: var(--portal-purple-deep);
}
.dashboard-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
}
.card-grid {
  grid-template-columns: repeat(4, 1fr);
}
.feature-card {
  border: 1px solid var(--portal-border);
  border-radius: 8px;
  padding: 18px;
  background: #fff;
}
.feature-card h3 { margin: 0 0 8px; color: var(--portal-purple-deep); }
.feature-card p { margin: 0; color: var(--portal-muted); line-height: 1.6; }
.progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(13, 27, 62, 0.1);
}
.progress-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--portal-purple), var(--portal-green));
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  overflow-wrap: anywhere;
}
.data-table th,
.data-table td {
  padding: 0.9rem;
  border-bottom: 1px solid var(--portal-border);
  text-align: left;
}
.data-table th {
  color: var(--portal-muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}
.status-badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.28rem 0.68rem;
  background: rgba(106, 44, 255, 0.11);
  color: var(--portal-purple);
  font-size: 0.76rem;
  font-weight: 900;
}
.status-badge.green {
  background: rgba(46, 204, 113, 0.14);
  color: #06723a;
}
.status-badge.blue {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}
.status-badge.orange {
  background: rgba(245, 158, 11, 0.15);
  color: #92400e;
}
.progress-cell {
  min-width: 130px;
  display: grid;
  gap: 6px;
}
.project-hero-card {
  border-top: 4px solid var(--portal-purple);
}
.project-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.project-summary-grid > div,
.detail-list > div {
  border: 1px solid var(--portal-border);
  border-radius: 8px;
  padding: 14px;
  background: rgba(13, 27, 62, 0.025);
}
.project-summary-grid span,
.detail-list span {
  display: block;
  margin-bottom: 6px;
  color: var(--portal-muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}
.project-summary-grid strong,
.detail-list strong {
  display: block;
  color: var(--portal-navy);
  line-height: 1.35;
}
.project-admin-grid {
  margin-top: 18px;
}
.detail-list,
.timeline-list {
  display: grid;
  gap: 12px;
}
.timeline-item {
  border: 1px solid var(--portal-border);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}
.timeline-item.internal {
  border-color: rgba(245, 158, 11, 0.32);
  background: rgba(245, 158, 11, 0.055);
}
.timeline-item strong,
.timeline-item small {
  display: block;
}
.timeline-item small {
  margin-top: 4px;
  color: var(--portal-muted);
}
.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--portal-muted);
  font-size: 0.84rem;
  font-weight: 800;
}
.empty-state {
  display: grid;
  justify-items: start;
  gap: 12px;
  border: 1px dashed rgba(106, 44, 255, 0.26);
  border-radius: 8px;
  padding: 24px;
  background: rgba(106, 44, 255, 0.05);
}
.activity-list {
  display: grid;
  gap: 12px;
}
.activity-list.compact {
  margin-top: 10px;
  gap: 8px;
}
.activity-item {
  border-radius: 8px;
  padding: 12px;
  background: rgba(13, 27, 62, 0.04);
}
.activity-item strong,
.activity-item small { display: block; }
.activity-item small { color: var(--portal-muted); }

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -8px 0 20px;
}
.admin-nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--portal-border);
  border-radius: 8px;
  padding: 0.58rem 0.85rem;
  background: #fff;
  color: var(--portal-muted);
  font-weight: 850;
}
.admin-nav a.active,
.admin-nav a:hover {
  border-color: rgba(106, 44, 255, 0.28);
  background: rgba(106, 44, 255, 0.1);
  color: var(--portal-purple);
}
.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(6, minmax(120px, 1fr));
  gap: 10px;
  align-items: end;
  margin: 14px 0 18px;
}
.action-row,
.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.table-actions a,
.table-actions button {
  min-height: 34px;
  border: 1px solid var(--portal-border);
  border-radius: 8px;
  padding: 0.42rem 0.62rem;
  background: #fff;
  color: var(--portal-purple);
  font-size: 0.82rem;
  font-weight: 850;
  cursor: pointer;
}
.table-link {
  color: var(--portal-purple);
  font-weight: 900;
}
.table-actions form {
  margin: 0;
}
.check-row {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--portal-navy);
  font-weight: 800;
}
.table-detail-row td {
  background: rgba(106, 44, 255, 0.035);
}

.admin-app-page {
  background: #eef2f8;
}
.admin-app {
  grid-template-columns: 292px minmax(0, 1fr);
}
.admin-sidebar {
  border-right: 0;
  background: linear-gradient(180deg, var(--portal-purple-deep), #1a1236 72%, var(--portal-navy));
  color: #fff;
}
.admin-sidebar .client-logo {
  color: #fff;
}
.admin-sidebar .client-logo span {
  color: #39FF14;
}
.admin-shell-label {
  width: fit-content;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  padding: 0.42rem 0.65rem;
  color: rgba(255,255,255,0.78);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}
.admin-sidebar .admin-nav {
  display: grid;
  gap: 8px;
  margin: 0;
}
.admin-sidebar .admin-nav a,
.admin-client-view,
.admin-sidebar .logout-form button {
  min-height: 44px;
  display: flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.75rem 0.85rem;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.78);
  font-weight: 850;
}
.admin-sidebar .admin-nav a.active,
.admin-sidebar .admin-nav a:hover,
.admin-client-view:hover,
.admin-sidebar .logout-form button:hover {
  border-color: rgba(57,255,20,0.38);
  background: rgba(57,255,20,0.12);
  color: #fff;
}
.admin-user-card {
  display: grid;
  gap: 8px;
  margin-top: auto;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255,255,255,0.08);
}
.admin-user-card span:first-child {
  color: rgba(255,255,255,0.62);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}
.admin-main {
  padding: 28px;
}
.admin-topbar,
.admin-command-strip {
  border: 1px solid var(--portal-border);
  border-radius: 8px;
  padding: 20px;
  background: #fff;
  box-shadow: var(--portal-shadow);
}
.admin-topbar {
  align-items: center;
}
.admin-top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.admin-command-strip {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
  border-top: 4px solid var(--portal-green);
}
.admin-command-strip h2 {
  margin: 10px 0 6px;
  color: var(--portal-purple-deep);
}
.admin-stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.admin-overview-grid {
  margin-bottom: 18px;
}
.admin-list {
  display: grid;
  gap: 10px;
}
.admin-list-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--portal-border);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}
.admin-list-item strong,
.admin-list-item small,
.data-table td small {
  display: block;
}
.admin-list-item small,
.data-table td small {
  margin-top: 4px;
  color: var(--portal-muted);
}
.admin-list-meta {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: 100px;
  font-weight: 900;
}
.admin-quick-actions {
  display: grid;
  gap: 10px;
}
.admin-quick-actions a {
  border: 1px solid var(--portal-border);
  border-radius: 8px;
  padding: 0.8rem 0.9rem;
  background: rgba(13, 27, 62, 0.035);
  color: var(--portal-purple-deep);
  font-weight: 900;
}
.table-wrap {
  width: 100%;
  overflow-x: auto;
}
.admin-project-filter {
  grid-template-columns: minmax(220px, 1.4fr) repeat(8, minmax(120px, 1fr)) auto auto;
}
.filter-reset-link {
  white-space: nowrap;
}
.admin-project-table {
  min-width: 1180px;
}
.table-actions .primary-action {
  background: var(--portal-purple);
  border-color: var(--portal-purple);
  color: #fff;
}
.admin-health-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.detail-description {
  margin: 16px 0 0;
  white-space: pre-line;
}
.project-controls-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.9fr) minmax(280px, 0.9fr);
  gap: 18px;
  margin-top: 18px;
}
.timeline-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}
.timeline-item .muted {
  white-space: pre-line;
}
.review-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.review-card,
.review-admin-item {
  border: 1px solid var(--portal-border);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}
.review-card h3 {
  margin: 12px 0 8px;
  color: var(--portal-purple-deep);
}
.review-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  color: var(--portal-muted);
  font-size: 0.82rem;
  font-weight: 800;
}
.confidentiality-panel {
  border-color: rgba(182, 130, 37, 0.26);
}
.inline-secure-form {
  margin: 0;
}
.inline-secure-form button {
  min-height: 44px;
}
.security-device-list .activity-item {
  border: 1px solid var(--portal-border);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}
.security-device-list .inline-secure-form {
  margin-top: 10px;
}
.detail-list.compact {
  margin: 12px 0;
}
.detail-list.compact > div {
  padding: 10px;
}
.review-feedback-note {
  border-left: 3px solid var(--portal-green);
  padding-left: 10px;
  color: var(--portal-muted);
  line-height: 1.6;
}
.feedback-mini-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.feedback-mini-list > div {
  border: 1px solid rgba(13, 27, 62, 0.09);
  border-radius: 8px;
  padding: 10px;
  background: rgba(46, 204, 113, 0.055);
}
.feedback-mini-list strong,
.feedback-mini-list small {
  display: block;
}
.feedback-mini-list small {
  margin-top: 4px;
  color: var(--portal-muted);
}
.review-filter {
  grid-template-columns: minmax(220px, 1.5fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr) auto;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  height: var(--portal-nav-height);
  padding: 0 20px;
  border-bottom: 1px solid var(--portal-border);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: box-shadow 0.25s ease;
}
.topbar.scrolled {
  box-shadow: 0 10px 30px rgba(13, 27, 62, 0.08);
}
.topbar-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar-logo,
.sidebar-logo {
  color: var(--portal-navy);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0;
}
.topbar-logo .logo-accent,
.sidebar-logo .logo-accent {
  color: var(--portal-purple);
}
.menu-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  min-width: 38px;
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  padding: 8px;
  background: transparent;
  cursor: pointer;
  transition: background 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}
.menu-btn:hover,
.menu-btn:focus-visible {
  background: rgba(106, 44, 255, 0.12);
  outline: none;
}
.menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--portal-navy);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2998;
  background: rgba(13, 27, 62, 0.38);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s ease;
}
.sidebar-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 2999;
  width: var(--portal-sidebar-width);
  max-width: 88vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  transform: translateX(-100%);
  transition: transform 0.32s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.sidebar.open {
  transform: translateX(0);
}
.sidebar-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  border-right: 1px solid var(--portal-border);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 6px 0 40px rgba(13, 27, 62, 0.14), inset -1px 0 0 var(--portal-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  height: 68px;
  padding: 0 20px;
  border-bottom: 1px solid var(--portal-border);
}
.sidebar-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: rgba(106, 44, 255, 0.08);
  color: var(--portal-navy);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  transition: background 0.25s ease, color 0.25s ease;
}
.sidebar-close:hover,
.sidebar-close:focus-visible {
  background: rgba(106, 44, 255, 0.14);
  color: var(--portal-purple-deep);
  outline: none;
}
.admin-public-app {
  display: block;
  min-height: calc(100vh - var(--portal-nav-height));
  padding-top: var(--portal-nav-height);
}
.admin-public-app .admin-main,
.client-public-app .client-main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px;
}
.client-public-page {
  background: var(--portal-bg);
}
.client-public-app {
  display: block;
  min-height: calc(100vh - var(--portal-nav-height));
  padding-top: var(--portal-nav-height);
}
.admin-menu-sidebar .admin-shell-label {
  margin: 16px 20px 0;
  border-color: var(--portal-border);
  color: var(--portal-muted);
  background: rgba(13, 27, 62, 0.025);
}
.admin-menu-sidebar .admin-nav,
.admin-menu-sidebar .client-drawer-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 16px 0;
}
.admin-menu-sidebar .admin-nav a,
.admin-menu-sidebar .client-drawer-nav a {
  display: block;
  min-height: auto;
  margin-right: 12px;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 0 10px 10px 0;
  padding: 13px 20px;
  background: transparent;
  color: var(--portal-navy);
  font-size: 0.97rem;
  font-weight: 600;
  opacity: 0;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, padding-left 0.2s ease, box-shadow 0.2s ease;
}
.admin-menu-sidebar .admin-nav a:hover,
.admin-menu-sidebar .admin-nav a.active,
.admin-menu-sidebar .client-drawer-nav a:hover,
.admin-menu-sidebar .client-drawer-nav a.active {
  border-left-color: var(--portal-purple);
  background: rgba(106, 44, 255, 0.1);
  color: var(--portal-purple-deep);
  box-shadow: 0 14px 30px rgba(13, 27, 62, 0.08);
}
.admin-menu-sidebar .admin-nav a:hover,
.admin-menu-sidebar .client-drawer-nav a:hover {
  padding-left: 28px;
}
@keyframes adminSidebarLinkIn {
  from { opacity: 0; transform: translateX(-16px); }
  to { opacity: 1; transform: translateX(0); }
}
.admin-menu-sidebar.open .admin-nav a:nth-child(1) { animation: adminSidebarLinkIn 0.30s ease 0.04s forwards; }
.admin-menu-sidebar.open .admin-nav a:nth-child(2) { animation: adminSidebarLinkIn 0.30s ease 0.09s forwards; }
.admin-menu-sidebar.open .admin-nav a:nth-child(3) { animation: adminSidebarLinkIn 0.30s ease 0.14s forwards; }
.admin-menu-sidebar.open .admin-nav a:nth-child(4) { animation: adminSidebarLinkIn 0.30s ease 0.19s forwards; }
.admin-menu-sidebar.open .admin-nav a:nth-child(5) { animation: adminSidebarLinkIn 0.30s ease 0.24s forwards; }
.admin-menu-sidebar.open .admin-nav a:nth-child(6) { animation: adminSidebarLinkIn 0.30s ease 0.29s forwards; }
.admin-menu-sidebar.open .client-drawer-nav a:nth-child(1) { animation: adminSidebarLinkIn 0.30s ease 0.04s forwards; }
.admin-menu-sidebar.open .client-drawer-nav a:nth-child(2) { animation: adminSidebarLinkIn 0.30s ease 0.09s forwards; }
.admin-menu-sidebar.open .client-drawer-nav a:nth-child(3) { animation: adminSidebarLinkIn 0.30s ease 0.14s forwards; }
.admin-menu-sidebar.open .client-drawer-nav a:nth-child(4) { animation: adminSidebarLinkIn 0.30s ease 0.19s forwards; }
.admin-menu-sidebar.open .client-drawer-nav a:nth-child(5) { animation: adminSidebarLinkIn 0.30s ease 0.24s forwards; }
.admin-menu-sidebar.open .client-drawer-nav a:nth-child(6) { animation: adminSidebarLinkIn 0.30s ease 0.29s forwards; }
.admin-sidebar-footer {
  display: grid;
  gap: 12px;
  flex-shrink: 0;
  margin-top: auto;
  padding: 20px 16px 28px;
  border-top: 1px solid var(--portal-border);
}
.admin-menu-sidebar .admin-client-view,
.admin-menu-sidebar .logout-form button {
  min-height: 44px;
  display: flex;
  align-items: center;
  width: 100%;
  border: 1px solid var(--portal-border);
  border-radius: 8px;
  padding: 0.75rem 0.85rem;
  background: #fff;
  color: var(--portal-purple-deep);
  font-weight: 850;
}
.admin-menu-sidebar .admin-client-view:hover,
.admin-menu-sidebar .logout-form button:hover {
  border-color: rgba(106, 44, 255, 0.28);
  background: rgba(106, 44, 255, 0.1);
  color: var(--portal-purple);
}
.admin-menu-sidebar .admin-user-card {
  margin-top: 0;
  border-color: var(--portal-border);
  background: rgba(13, 27, 62, 0.025);
  color: var(--portal-navy);
}
.admin-menu-sidebar .admin-user-card span:first-child {
  color: var(--portal-muted);
}
.admin-menu-sidebar .admin-user-card small {
  color: var(--portal-muted);
  line-height: 1.45;
}
.admin-app-page .admin-topbar {
  margin-bottom: 24px;
}
.client-public-page .client-topbar {
  margin-bottom: 24px;
}

.mobile-bottom-nav,
.mobile-more-panel,
.mobile-more-backdrop,
.mobile-filter-toggle,
.mobile-section-tabs,
.mobile-quick-actions,
.client-mobile-admin-link {
  display: none;
}

.mobile-bottom-nav {
  --mobile-nav-height: 72px;
}

.mobile-quick-actions {
  gap: 10px;
  margin: -4px 0 18px;
}

.mobile-quick-actions a {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--portal-border);
  border-radius: 8px;
  padding: 0.72rem;
  background: #fff;
  color: var(--portal-purple-deep);
  box-shadow: 0 12px 28px rgba(13, 27, 62, 0.07);
  font-weight: 900;
}

.mobile-quick-actions span,
.mobile-bottom-nav span {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  border-radius: 8px;
  background: rgba(46, 204, 113, 0.13);
  color: #06723a;
  font-size: 0.78rem;
  font-weight: 950;
}

.mobile-section-tabs {
  gap: 8px;
  overflow-x: auto;
  margin: 14px 0 -2px;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.mobile-section-tabs::-webkit-scrollbar {
  display: none;
}

.mobile-section-tabs a {
  white-space: nowrap;
  border: 1px solid var(--portal-border);
  border-radius: 999px;
  padding: 0.55rem 0.78rem;
  background: #fff;
  color: var(--portal-purple-deep);
  font-size: 0.82rem;
  font-weight: 900;
}

.mobile-section-tabs a.active,
.mobile-section-tabs a:focus-visible {
  border-color: rgba(46, 204, 113, 0.45);
  background: rgba(46, 204, 113, 0.12);
  outline: none;
}

@media (max-width: 860px) {
  html {
    scroll-padding-top: 88px;
  }

  .client-app-page {
    padding-bottom: calc(82px + env(safe-area-inset-bottom));
  }

  .client-app {
    display: block;
    min-height: 100vh;
  }

  .client-sidebar {
    position: sticky;
    top: 0;
    z-index: 1500;
    height: auto;
    gap: 10px;
    padding: 10px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--portal-border);
    background: rgba(255,255,255,0.94);
    box-shadow: 0 12px 26px rgba(13, 27, 62, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .sidebar-brand-row {
    min-height: 42px;
  }

  .client-sidebar .client-logo {
    font-size: 1.16rem;
  }

  .sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .client-sidebar nav {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding-top: 8px;
  }

  .client-sidebar nav.is-open {
    display: grid;
  }

  .client-sidebar nav a,
  .logout-form button {
    min-height: 40px;
    padding: 0.62rem 0.72rem;
    font-size: 0.88rem;
  }

  .client-sidebar .logout-form {
    display: none;
  }

  .client-sidebar nav.is-open + .logout-form {
    display: block;
    margin-top: 0;
  }

  .client-main {
    padding: 14px;
  }

  .client-topbar {
    align-items: flex-start;
    margin-bottom: 14px;
  }

  .client-topbar h1 {
    margin-top: 6px;
    font-size: 1.42rem;
    line-height: 1.15;
  }

  .client-user-chip {
    min-width: 0;
    max-width: 46%;
    padding: 0.65rem 0.72rem;
  }

  .client-user-chip strong,
  .client-user-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .client-pill {
    padding: 0.28rem 0.58rem;
    font-size: 0.66rem;
  }

  .client-mobile-admin-link {
    margin: -4px 0 14px;
  }

  .client-mobile-admin-link,
  .client-mobile-admin-link a {
    display: block;
  }

  .client-mobile-admin-link a {
    border: 1px solid rgba(106, 44, 255, 0.2);
    border-radius: 8px;
    padding: 0.72rem 0.82rem;
    background: rgba(106, 44, 255, 0.08);
    color: var(--portal-purple-deep);
    font-size: 0.88rem;
    font-weight: 900;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 2400;
    height: var(--mobile-nav-height);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    border: 1px solid rgba(13, 27, 62, 0.12);
    border-radius: 8px;
    padding: 7px;
    background: rgba(255,255,255,0.96);
    box-shadow: 0 18px 42px rgba(13, 27, 62, 0.22);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .mobile-bottom-nav a,
  .mobile-bottom-nav button {
    min-width: 0;
    min-height: 56px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 4px;
    border: 0;
    border-radius: 8px;
    padding: 0.3rem 0.16rem;
    background: transparent;
    color: var(--portal-muted);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-bottom-nav strong {
    max-width: 100%;
    overflow: hidden;
    color: inherit;
    font-size: 0.66rem;
    font-weight: 900;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-bottom-nav a.active,
  .mobile-bottom-nav button.active,
  .mobile-bottom-nav a:focus-visible,
  .mobile-bottom-nav button:focus-visible {
    background: rgba(106, 44, 255, 0.1);
    color: var(--portal-purple-deep);
    outline: none;
  }

  .mobile-bottom-nav a.active span,
  .mobile-bottom-nav button.active span {
    background: var(--portal-purple);
    color: #fff;
  }

  .mobile-quick-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-grid,
  .admin-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
  }

  .stat-box,
  .portal-card,
  .feature-card,
  .review-card,
  .review-admin-item,
  .timeline-item,
  .admin-list-item {
    padding: 14px;
    box-shadow: 0 10px 26px rgba(13, 27, 62, 0.07);
  }

  .stat-box strong {
    margin-top: 7px;
    font-size: 1.46rem;
  }

  .stat-box span {
    font-size: 0.68rem;
  }

  .dashboard-grid,
  .project-controls-grid,
  .project-summary-grid,
  .admin-health-grid,
  .review-card-grid,
  .review-filter,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .admin-command-strip,
  .admin-list-item,
  .review-card-head {
    flex-direction: column;
    gap: 10px;
  }

  .section-heading .client-btn,
  .admin-command-strip .client-btn {
    width: 100%;
  }

  .project-summary-grid {
    gap: 8px;
  }

  .project-summary-grid > div,
  .detail-list > div {
    padding: 11px;
  }

  .detail-list {
    gap: 8px;
  }

  .activity-list,
  .timeline-list,
  .admin-list {
    gap: 9px;
  }

  .activity-item {
    padding: 10px;
  }

  .mobile-section-tabs {
    display: flex;
    position: sticky;
    top: 72px;
    z-index: 1400;
    margin-bottom: 12px;
    padding: 8px 0;
    background: rgba(246, 247, 251, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .mobile-filter-toggle {
    display: inline-flex;
    width: 100%;
    margin: 4px 0 10px;
  }

  .filter-bar[data-mobile-filter-ready="true"] {
    display: none;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 0;
  }

  .filter-bar[data-mobile-filter-ready="true"].is-filter-open {
    display: grid;
  }

  .filter-bar input,
  .filter-bar select,
  .form-field input,
  .form-field select,
  .form-field textarea {
    min-height: 42px;
    padding: 0.62rem 0.72rem;
  }

  .table-wrap {
    overflow: visible;
  }

  .data-table,
  .data-table thead,
  .data-table tbody,
  .data-table tr,
  .data-table th,
  .data-table td {
    display: block;
  }

  .data-table {
    min-width: 0;
  }

  .data-table thead {
    display: none;
  }

  .data-table tr {
    margin-bottom: 12px;
    border: 1px solid var(--portal-border);
    border-radius: 8px;
    padding: 10px 12px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(13, 27, 62, 0.06);
  }

  .data-table td {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    border: 0;
    padding: 0.48rem 0;
    overflow-wrap: anywhere;
  }

  .data-table td::before {
    content: attr(data-label);
    flex: 0 0 38%;
    color: var(--portal-muted);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  .data-table td > * {
    min-width: 0;
  }

  .table-detail-row {
    margin-top: -4px;
    background: rgba(106, 44, 255, 0.04);
  }

  .table-detail-row td {
    display: block;
  }

  .table-detail-row td::before {
    content: none;
  }

  .table-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .table-actions a,
  .table-actions button,
  .table-actions form {
    width: 100%;
  }

  .table-actions a,
  .table-actions button {
    justify-content: center;
    text-align: center;
  }

  .table-actions .primary-action {
    grid-column: 1 / -1;
  }

  .topbar {
    height: 60px;
    padding: 0 14px;
  }

  .topbar-logo,
  .sidebar-logo {
    font-size: 1.14rem;
  }

  .admin-public-app {
    padding-top: 60px;
  }

  .admin-public-app .admin-main {
    padding: 14px;
  }

  .admin-app-page .admin-topbar {
    margin-bottom: 14px;
  }

  .admin-topbar {
    display: block;
    padding: 14px;
  }

  .admin-top-actions {
    display: none;
  }

  .admin-command-strip {
    padding: 14px;
    margin-bottom: 14px;
  }

  .admin-command-strip h2,
  .portal-card h2 {
    font-size: 1.08rem;
    line-height: 1.25;
  }

  .admin-menu-sidebar {
    width: min(320px, 88vw);
  }

  .mobile-more-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2490;
    background: rgba(13, 27, 62, 0.38);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
  }

  .mobile-more-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-more-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2500;
    display: block;
    max-height: min(78vh, 560px);
    overflow-y: auto;
    border-radius: 8px 8px 0 0;
    padding: 10px 14px calc(94px + env(safe-area-inset-bottom));
    background: #fff;
    box-shadow: 0 -22px 48px rgba(13, 27, 62, 0.22);
    transform: translateY(110%);
    transition: transform 0.28s ease;
  }

  .mobile-more-panel.open {
    transform: translateY(0);
  }

  .mobile-more-handle {
    width: 42px;
    height: 4px;
    margin: 0 auto 12px;
    border-radius: 999px;
    background: rgba(13, 27, 62, 0.18);
  }

  .mobile-more-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
  }

  .mobile-more-head h2 {
    margin: 7px 0 0;
    color: var(--portal-purple-deep);
    font-size: 1.16rem;
  }

  .mobile-more-head button {
    width: 36px;
    height: 36px;
    border: 1px solid var(--portal-border);
    border-radius: 8px;
    background: #fff;
    color: var(--portal-navy);
    cursor: pointer;
  }

  .mobile-more-links {
    display: grid;
    gap: 8px;
  }

  .mobile-more-links a,
  .mobile-more-logout button {
    min-height: 46px;
    display: flex;
    align-items: center;
    width: 100%;
    border: 1px solid var(--portal-border);
    border-radius: 8px;
    padding: 0.72rem 0.82rem;
    background: #fff;
    color: var(--portal-purple-deep);
    font-weight: 900;
  }

  .mobile-more-links a.active {
    border-color: rgba(106, 44, 255, 0.32);
    background: rgba(106, 44, 255, 0.1);
  }

  .mobile-more-logout {
    margin-top: 10px;
  }
}

@media (max-width: 1050px) {
  .auth-shell,
  .client-app,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .auth-brand { min-height: auto; }
  .client-sidebar {
    position: static;
    height: auto;
  }
  .client-sidebar nav {
    grid-template-columns: repeat(5, 1fr);
  }
  .logout-form { margin-top: 0; }
  .stats-grid,
  .card-grid,
  .filter-bar,
  .project-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .admin-app,
  .project-controls-grid {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    position: static;
    height: auto;
  }
  .admin-sidebar .admin-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .admin-user-card {
    margin-top: 0;
  }
  .admin-project-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .review-card-grid,
  .review-filter {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .auth-shell,
  .client-main {
    padding: 16px;
  }
  .auth-brand h1 {
    font-size: clamp(2rem, 12vw, 3.2rem);
  }
  .client-topbar h1 {
    font-size: 1.7rem;
  }
  .portal-card,
  .stat-box {
    padding: 16px;
  }
  .form-grid,
  .stats-grid,
  .card-grid,
  .client-sidebar nav {
    grid-template-columns: 1fr;
  }
  .client-topbar,
  .section-heading,
  .admin-command-strip {
    flex-direction: column;
  }
  .client-user-chip {
    width: 100%;
  }
  .sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .client-sidebar nav:not(.is-open),
  #admin-nav:not(.is-open) {
    display: none;
  }
  .client-sidebar nav.is-open,
  #admin-nav.is-open {
    display: grid;
  }
  .data-table,
  .data-table thead,
  .data-table tbody,
  .data-table tr,
  .data-table th,
  .data-table td {
    display: block;
  }
  .data-table thead { display: none; }
  .data-table tr {
    border-bottom: 1px solid var(--portal-border);
    padding: 0.8rem 0;
    background: #fff;
  }
  .data-table td {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    border: 0;
    padding: 0.45rem 0;
    overflow-wrap: anywhere;
  }
  .data-table td::before {
    content: attr(data-label);
    color: var(--portal-muted);
    font-weight: 850;
    flex: 0 0 42%;
  }
  .data-table td > * {
    min-width: 0;
  }
  .table-detail-row td {
    display: block;
  }
  .table-detail-row td::before {
    content: none;
  }
  .filter-bar,
  .project-summary-grid,
  .admin-health-grid,
  .action-row {
    grid-template-columns: 1fr;
  }
  .admin-sidebar .admin-nav,
  .admin-project-filter,
  .admin-stats-grid,
  .review-card-grid {
    grid-template-columns: 1fr;
  }
  .admin-project-table,
  .data-table {
    min-width: 0;
  }
  .admin-top-actions,
  .admin-top-actions .client-btn {
    width: 100%;
  }
  .action-row .client-btn,
  .filter-bar .client-btn {
    width: 100%;
  }
  .review-card-head,
  .admin-list-item {
    align-items: flex-start;
    flex-direction: column;
  }
  .table-actions,
  .table-actions a,
  .table-actions button {
    width: 100%;
  }
}

@media (max-width: 860px) {
  .client-app {
    display: block;
  }

  .client-sidebar {
    position: sticky;
    top: 0;
    z-index: 1500;
    height: auto;
    padding: 10px 14px;
  }

  .client-sidebar nav {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .client-sidebar nav.is-open {
    display: grid;
  }

  .client-main,
  .admin-public-app .admin-main {
    padding: 14px;
  }

  .client-topbar {
    align-items: flex-start;
    margin-bottom: 14px;
  }

  .client-topbar h1 {
    font-size: 1.42rem;
  }

  .stats-grid,
  .admin-stats-grid,
  .mobile-quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-summary-grid,
  .admin-health-grid,
  .dashboard-grid,
  .project-controls-grid,
  .review-card-grid,
  .review-filter,
  .form-grid,
  .admin-project-filter {
    grid-template-columns: 1fr;
  }

  .filter-bar[data-mobile-filter-ready="true"]:not(.is-filter-open) {
    display: none;
  }

  .filter-bar[data-mobile-filter-ready="true"].is-filter-open {
    display: grid;
    grid-template-columns: 1fr;
  }

  .table-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .table-actions .primary-action {
    grid-column: 1 / -1;
  }

  .mobile-bottom-nav {
    display: grid;
  }

  .mobile-section-tabs {
    display: flex;
  }
}

.client-dashboard-bento {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.bento-card {
  min-width: 0;
  overflow-wrap: anywhere;
  border: 1px solid rgba(13, 27, 62, 0.09);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(13, 27, 62, 0.07);
}

.bento-card h2,
.bento-card p {
  margin: 0;
}

.bento-card h2 {
  color: var(--portal-purple-deep);
  font-size: 1.08rem;
  line-height: 1.2;
}

.bento-card p {
  color: var(--portal-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.bento-span-2 {
  grid-column: span 2;
}

.bento-small {
  min-height: 112px;
}

.bento-medium {
  min-height: 138px;
}

.bento-tall {
  min-height: 190px;
}

.bento-welcome {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  border-top: 4px solid var(--portal-green);
  background: linear-gradient(135deg, rgba(43, 10, 90, 0.96), rgba(75, 29, 143, 0.93));
  color: #fff;
}

.bento-welcome h2 {
  margin: 10px 0 6px;
  color: #fff;
}

.bento-welcome p {
  max-width: 620px;
  color: rgba(255,255,255,0.78);
}

.bento-welcome .client-pill {
  background: rgba(57,255,20,0.14);
  color: #39FF14;
}

.bento-kpi {
  display: grid;
  align-content: space-between;
  gap: 8px;
}

.bento-kpi > span:not(.bento-mark),
.bento-account > span,
.bento-support > span {
  color: var(--portal-muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.bento-kpi strong {
  color: var(--portal-purple-deep);
  font-size: 2rem;
  line-height: 1;
}

.bento-mark {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(46, 204, 113, 0.13);
  color: #06723a;
  font-size: 0.8rem;
  font-weight: 950;
}

.bento-project,
.bento-list,
.bento-account,
.bento-support,
.bento-footer-note {
  display: grid;
  gap: 10px;
  align-content: start;
}

.bento-project {
  border-top: 4px solid var(--portal-purple);
}

.bento-next {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  background: rgba(106, 44, 255, 0.055);
}

.bento-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.bento-card-head a,
.bento-list-item a,
.bento-support a,
.bento-mini-link {
  color: var(--portal-purple);
  font-weight: 900;
}

.bento-mini-link {
  width: fit-content;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(106, 44, 255, 0.18);
  border-radius: 8px;
  padding: 0.45rem 0.62rem;
  background: #fff;
  font-size: 0.82rem;
}

.bento-list-item {
  display: grid;
  gap: 3px;
  border-top: 1px solid rgba(13, 27, 62, 0.08);
  padding-top: 9px;
}

.bento-list-item:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.bento-list-item strong,
.bento-account strong,
.bento-footer-note strong {
  color: var(--portal-navy);
  line-height: 1.3;
}

.bento-list-item small,
.bento-account small {
  color: var(--portal-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

@media (min-width: 861px) {
  .bento-project,
  .bento-list {
    grid-column: span 2;
  }

  .bento-footer-note {
    grid-column: span 4;
  }
}

@media (max-width: 767px) {
  .client-dashboard-bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding-bottom: 92px;
  }

  .client-public-page .client-topbar {
    margin-bottom: 12px;
  }

  .client-public-page .client-topbar h1 {
    font-size: 1.52rem;
  }

  .client-quick-actions {
    display: none;
  }

  .bento-card {
    border-radius: 8px;
    padding: 13px;
    box-shadow: 0 8px 22px rgba(13, 27, 62, 0.06);
  }

  .bento-span-2,
  .bento-welcome,
  .bento-next,
  .bento-footer-note {
    grid-column: span 2;
  }

  .bento-small {
    min-height: 88px;
  }

  .bento-medium {
    min-height: 118px;
  }

  .bento-tall {
    min-height: 158px;
  }

  .bento-welcome,
  .bento-next {
    display: grid;
    gap: 10px;
  }

  .bento-welcome h2,
  .bento-card h2 {
    font-size: 1rem;
  }

  .bento-card p {
    font-size: 0.82rem;
    line-height: 1.45;
  }

  .bento-kpi strong {
    font-size: 1.62rem;
  }

  .bento-kpi > span:not(.bento-mark),
  .bento-account > span,
  .bento-support > span {
    font-size: 0.66rem;
  }

  .bento-mark {
    width: 28px;
    height: 28px;
  }

  .bento-mini-link,
  .bento-next .client-btn {
    width: 100%;
    min-height: 40px;
    justify-content: center;
    font-size: 0.78rem;
  }

  .bento-list-item strong {
    font-size: 0.86rem;
  }

  .bento-list-item small {
    font-size: 0.72rem;
  }

  .bento-support p {
    font-size: 0.78rem;
  }

  .admin-app-page .admin-command-strip {
    display: grid;
    gap: 10px;
    padding: 13px;
  }

  .admin-app-page .admin-command-strip p {
    display: none;
  }

  .admin-app-page .admin-command-strip .action-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .admin-app-page .admin-command-strip .action-row .client-btn:first-child {
    grid-column: span 2;
  }

  .admin-app-page .admin-stats-grid .stat-box:nth-child(1),
  .admin-app-page .admin-stats-grid .stat-box:nth-child(5),
  .admin-app-page .admin-stats-grid .stat-box:nth-child(12) {
    grid-column: span 2;
  }

  .admin-overview-grid .portal-card {
    padding: 13px;
  }
}

/* Mobile typography and card spacing fixes */
@media (max-width: 767px) {
  .client-public-page,
  .admin-app-page {
    overflow-x: hidden;
  }

  .client-main,
  .admin-public-app .admin-main {
    padding-inline: 12px;
  }

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

  .client-topbar > div:first-child {
    min-width: 0;
  }

  .client-topbar h1 {
    max-width: 100%;
    margin-top: 4px;
    font-size: clamp(1.45rem, 7vw, 1.72rem);
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  .stats-grid,
  .admin-stats-grid,
  .card-grid,
  .client-dashboard-bento,
  .review-card-grid,
  .dashboard-grid,
  .project-summary-grid,
  .detail-list,
  .activity-list,
  .timeline-list {
    min-width: 0;
    max-width: 100%;
  }

  .stat-box,
  .portal-card,
  .feature-card,
  .review-card,
  .review-admin-item,
  .timeline-item,
  .activity-item,
  .admin-list-item,
  .bento-card,
  .project-summary-grid > div,
  .detail-list > div {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: anywhere;
    word-break: normal;
    white-space: normal;
  }

  .stats-grid,
  .admin-stats-grid {
    gap: 9px;
  }

  .stat-box {
    min-height: 96px;
    display: grid;
    align-content: space-between;
    gap: 8px;
    padding: 12px;
    border-radius: 14px;
  }

  .stat-box span {
    font-size: 0.68rem;
    line-height: 1.2;
    letter-spacing: 0;
  }

  .stat-box strong {
    margin-top: 0;
    font-size: clamp(1.3rem, 7vw, 1.52rem);
    line-height: 1.05;
    overflow-wrap: anywhere;
  }

  .portal-card {
    border-radius: 16px;
  }

  .portal-card h2,
  .review-card h3,
  .project-summary-grid strong,
  .detail-list strong,
  .activity-item strong,
  .timeline-item strong,
  .admin-list-item strong {
    line-height: 1.32;
    overflow-wrap: anywhere;
  }

  .portal-card p,
  .muted,
  .review-card p,
  .activity-item small,
  .timeline-item small,
  .data-table td small {
    line-height: 1.45;
  }

  .status-badge {
    max-width: 100%;
    padding: 0.24rem 0.52rem;
    font-size: 0.68rem;
    line-height: 1.15;
    white-space: normal;
    text-align: center;
  }

  .client-btn,
  .table-link,
  .bento-mini-link,
  .mobile-section-tabs a,
  .table-actions a,
  .table-actions button,
  .action-row .client-btn {
    min-width: 0;
    white-space: normal;
    line-height: 1.2;
  }
}

/* Mobile account chip */
@media (max-width: 767px) {
  .client-user-chip {
    width: auto;
    max-width: 152px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    border-radius: 999px;
    padding: 6px 9px 6px 6px;
    box-shadow: 0 10px 24px rgba(13, 27, 62, 0.09);
  }

  .client-user-chip .client-user-initial {
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--portal-purple), var(--portal-green));
    color: #fff;
    font-size: 0.72rem;
    font-weight: 950;
    line-height: 1;
  }

  .client-user-chip .client-user-copy {
    min-width: 0;
    display: grid;
    gap: 1px;
  }

  .client-user-chip .client-user-copy strong,
  .client-user-chip .client-user-copy span {
    max-width: 106px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .client-user-chip .client-user-copy strong {
    font-size: 0.74rem;
    line-height: 1.08;
  }

  .client-user-chip .client-user-copy span {
    color: var(--portal-muted);
    font-size: 0.62rem;
    line-height: 1.08;
  }
}

/* Mobile project card spacing */
@media (max-width: 767px) {
  .data-table tr {
    margin-bottom: 12px;
    border-radius: 16px;
    padding: 14px 15px;
  }

  .admin-project-table tr {
    padding: 15px;
  }

  .data-table td {
    align-items: flex-start;
    gap: 10px;
    padding: 0.42rem 0;
    font-size: 0.82rem;
    line-height: 1.42;
  }

  .data-table td::before {
    flex: 0 0 34%;
    min-width: 0;
    font-size: 0.66rem;
    line-height: 1.22;
    overflow-wrap: anywhere;
  }

  .data-table td > *:not(.status-badge) {
    min-width: 0;
    max-width: 100%;
  }

  .data-table td > strong,
  .data-table td > a,
  .data-table td strong a {
    font-size: 0.94rem;
    line-height: 1.32;
    overflow-wrap: anywhere;
  }

  .table-detail-row {
    margin-top: -2px;
    padding: 12px 14px;
  }

  .table-detail-row td {
    padding: 0;
  }

  .activity-list.compact,
  .review-card .detail-list.compact {
    gap: 9px;
  }

  .activity-item,
  .review-card,
  .review-admin-item {
    border-radius: 16px;
    padding: 14px;
  }

  .review-card-head {
    align-items: flex-start;
    gap: 8px;
  }

  .project-summary-grid > div,
  .detail-list > div {
    border-radius: 14px;
    padding: 12px;
  }

  .project-summary-grid span,
  .detail-list span {
    margin-bottom: 5px;
    font-size: 0.68rem;
    line-height: 1.2;
    letter-spacing: 0;
  }

  .project-summary-grid strong,
  .detail-list strong {
    font-size: 0.88rem;
  }

  .table-actions {
    gap: 8px;
  }

  .table-actions a,
  .table-actions button {
    min-height: 38px;
    padding: 0.52rem 0.58rem;
    font-size: 0.75rem;
  }

  .action-row {
    gap: 8px;
  }
}

/* Mobile bento readability */
@media (max-width: 767px) {
  .client-dashboard-bento {
    gap: 10px;
  }

  .bento-card {
    min-height: auto;
    border-radius: 16px;
    padding: 12px;
  }

  .bento-small {
    min-height: 96px;
  }

  .bento-medium {
    min-height: 122px;
  }

  .bento-tall {
    min-height: 164px;
  }

  .bento-kpi {
    gap: 7px;
  }

  .bento-kpi > span:not(.bento-mark),
  .bento-account > span,
  .bento-support > span {
    font-size: 0.66rem;
    line-height: 1.2;
    letter-spacing: 0;
  }

  .bento-kpi strong {
    font-size: clamp(1.42rem, 8vw, 1.7rem);
    line-height: 1;
  }

  .bento-card h2 {
    font-size: 0.98rem;
    line-height: 1.25;
  }

  .bento-card p {
    font-size: 0.8rem;
    line-height: 1.42;
  }

  .bento-list-item {
    gap: 4px;
    padding-top: 8px;
  }

  .bento-list-item strong {
    font-size: 0.84rem;
    line-height: 1.3;
  }

  .bento-list-item small,
  .bento-account small {
    font-size: 0.7rem;
    line-height: 1.3;
  }

  .bento-card-head {
    gap: 8px;
  }

  .bento-card-head a {
    font-size: 0.78rem;
  }
}

@media (max-width: 430px) {
  .client-main,
  .admin-public-app .admin-main {
    padding-inline: 10px;
  }

  .client-topbar h1 {
    font-size: clamp(1.38rem, 7vw, 1.58rem);
  }

  .client-user-chip {
    max-width: 144px;
  }

  .client-user-chip .client-user-copy strong,
  .client-user-chip .client-user-copy span {
    max-width: 98px;
  }

  .stats-grid,
  .admin-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-box {
    min-height: 92px;
    padding: 11px;
  }

  .stat-box strong {
    font-size: clamp(1.24rem, 7vw, 1.44rem);
  }

  .data-table tr {
    padding: 14px;
  }

  .data-table td {
    gap: 8px;
    font-size: 0.8rem;
  }

  .data-table td::before {
    flex-basis: 32%;
    font-size: 0.64rem;
  }

  .bento-card {
    padding: 11px;
  }
}

/* Mobile app shell */
.mobile-header-actions,
.client-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-header-icon,
.desktop-notification-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  border: 1px solid var(--portal-border);
  border-radius: 14px;
  background: #fff;
  color: var(--portal-navy);
}

.mobile-header-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.desktop-notification-link {
  min-width: auto;
  padding: 0 14px;
  font-size: 0.78rem;
  font-weight: 800;
}

.nav-notification-badge,
.drawer-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  border: 2px solid #fff;
  border-radius: 999px;
  padding: 0 4px;
  background: #ef3340;
  color: #fff;
  font-size: 0.59rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.mobile-header-icon .nav-notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
}

.drawer-nav-badge {
  margin-left: auto;
}

.sidebar-nav a {
  align-items: center;
}

.mobile-bottom-nav a,
.mobile-bottom-nav button {
  position: relative;
}

.mobile-bottom-nav .nav-notification-badge {
  position: absolute;
  top: 3px;
  left: calc(50% + 7px);
  z-index: 2;
}

.mobile-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Mobile Airtel-style dashboard */
.mobile-app-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
}

.mobile-app-dashboard > * {
  min-width: 0;
  max-width: 100%;
}

.app-account-card,
.app-section-card,
.app-status-card,
.app-final-grid > a {
  border: 1px solid var(--portal-border);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(13, 27, 62, 0.07);
}

.app-account-card {
  grid-column: 1 / -1;
  padding: 22px;
}

.app-account-head,
.app-section-head,
.app-status-card,
.app-account-actions,
.project-hub-summary,
.notification-meta,
.support-message > div {
  display: flex;
  align-items: center;
}

.app-account-head,
.app-section-head,
.notification-meta,
.support-message > div {
  justify-content: space-between;
}

.app-account-head > div,
.app-section-head > div,
.app-status-card > div,
.notification-copy,
.support-ticket-list a > span {
  min-width: 0;
}

.app-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--portal-purple);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.app-account-head h2,
.app-section-head h2,
.app-status-card h2 {
  margin: 0;
  overflow-wrap: anywhere;
}

.app-account-head h2 {
  font-size: clamp(1.24rem, 3vw, 1.6rem);
}

.app-account-head p,
.app-status-card p {
  margin: 4px 0 0;
  color: var(--portal-muted);
  font-size: 0.84rem;
}

.app-manage-button,
.app-section-head > a {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(106, 44, 255, 0.08);
  color: var(--portal-purple);
  font-size: 0.78rem;
  font-weight: 800;
}

.app-account-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 13px;
  color: var(--portal-muted);
  font-size: 0.76rem;
}

.app-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 16px;
  border: 1px solid var(--portal-border);
  border-radius: 16px;
  overflow: hidden;
}

.app-stat-grid > div {
  min-width: 0;
  padding: 14px;
  border-right: 1px solid var(--portal-border);
}

.app-stat-grid > div:last-child {
  border-right: 0;
}

.app-stat-grid strong,
.app-stat-grid span {
  display: block;
}

.app-stat-grid strong {
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  line-height: 1;
}

.app-stat-grid span {
  margin-top: 6px;
  color: var(--portal-muted);
  font-size: 0.72rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.app-account-actions {
  gap: 10px;
  margin-top: 14px;
}

.app-account-actions a {
  flex: 1;
  min-width: 0;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--portal-border);
  border-radius: 13px;
  padding: 9px 10px;
  background: #fff;
  font-size: 0.76rem;
  font-weight: 800;
  text-align: center;
  overflow-wrap: anywhere;
}

.app-section-card {
  padding: 20px;
}

.app-section-head {
  gap: 12px;
  margin-bottom: 15px;
}

.app-section-head h2 {
  font-size: 1.05rem;
}

.project-hub-summary {
  align-items: stretch;
  flex-direction: column;
  gap: 5px;
  border-radius: 15px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(43, 10, 90, 0.07), rgba(106, 44, 255, 0.05));
}

.project-hub-summary > strong {
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.project-hub-summary > span {
  color: var(--portal-muted);
  font-size: 0.74rem;
  overflow-wrap: anywhere;
}

.app-action-grid {
  display: grid;
  gap: 9px;
}

.app-action-grid-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 12px;
}

.app-quick-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.app-action-grid a {
  position: relative;
  min-width: 0;
  min-height: 98px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--portal-border);
  border-radius: 15px;
  padding: 11px 8px;
  text-align: center;
}

.app-action-grid a > span,
.app-status-mark,
.app-activity-list > div > span,
.app-final-grid b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: rgba(106, 44, 255, 0.09);
  color: var(--portal-purple);
  font-size: 0.86rem;
  font-weight: 900;
}

.app-action-grid a > strong {
  min-width: 0;
  font-size: 0.74rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.app-action-grid em {
  position: absolute;
  top: 7px;
  right: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  padding: 0 4px;
  background: #ef3340;
  color: #fff;
  font-size: 0.58rem;
  font-style: normal;
  font-weight: 900;
}

.app-secure-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-radius: 18px;
  padding: 14px 17px;
  background: var(--portal-navy);
  color: #fff;
  box-shadow: 0 12px 26px rgba(13, 27, 62, 0.18);
}

.app-secure-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(57, 255, 20, 0.13);
  color: #57f28a;
  font-weight: 900;
}

.app-secure-strip span:nth-child(2) {
  min-width: 0;
}

.app-secure-strip strong,
.app-secure-strip small {
  display: block;
  overflow-wrap: anywhere;
}

.app-secure-strip strong {
  font-size: 0.84rem;
}

.app-secure-strip small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.69rem;
}

.app-secure-strip b {
  font-size: 1.8rem;
  font-weight: 400;
}

.app-status-card {
  gap: 14px;
  padding: 18px;
}

.app-status-mark {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, var(--portal-purple-deep), var(--portal-purple));
  color: #fff;
}

.app-status-card h2 {
  font-size: 0.98rem;
}

.app-status-card > a {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(106, 44, 255, 0.08);
  color: var(--portal-purple);
  font-size: 0.74rem;
  font-weight: 800;
}

.app-activity-list {
  display: grid;
  gap: 10px;
}

.app-activity-list > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  border-top: 1px solid var(--portal-border);
  padding-top: 10px;
}

.app-activity-list > div:first-child {
  border-top: 0;
  padding-top: 0;
}

.app-activity-list > div > span {
  width: 34px;
  height: 34px;
  border-radius: 11px;
}

.app-activity-list p,
.app-activity-list strong,
.app-activity-list small {
  display: block;
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.app-activity-list strong {
  font-size: 0.82rem;
}

.app-activity-list small {
  margin-top: 3px;
  color: var(--portal-muted);
  font-size: 0.7rem;
}

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

.app-final-grid > a {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px;
}

.app-final-grid strong,
.app-final-grid small {
  display: block;
  overflow-wrap: anywhere;
}

.app-final-grid strong {
  font-size: 0.9rem;
}

.app-final-grid small {
  margin-top: 4px;
  color: var(--portal-muted);
  font-size: 0.72rem;
}

.app-admin-workspace-link {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 16px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--portal-purple-deep), var(--portal-purple-mid));
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
}

/* Mobile notification badges */
.notification-center-head {
  margin-bottom: 15px;
}

.notification-filters {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.notification-filters a {
  border-radius: 999px;
  padding: 8px 13px;
  background: var(--portal-bg);
  color: var(--portal-muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.notification-filters a.active {
  background: var(--portal-navy);
  color: #fff;
}

.notification-list {
  display: grid;
  gap: 11px;
}

.notification-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 13px;
  border: 1px solid var(--portal-border);
  border-radius: 17px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(13, 27, 62, 0.05);
}

.notification-item.is-unread {
  border-color: rgba(106, 44, 255, 0.28);
  box-shadow: inset 4px 0 0 var(--portal-purple), 0 8px 20px rgba(13, 27, 62, 0.06);
}

.notification-type-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: rgba(106, 44, 255, 0.1);
  color: var(--portal-purple);
  font-weight: 900;
}

.notification-meta {
  gap: 10px;
}

.notification-meta time {
  color: var(--portal-muted);
  font-size: 0.68rem;
}

.notification-copy h2 {
  margin: 9px 0 5px;
  font-size: 0.94rem;
  overflow-wrap: anywhere;
}

.notification-copy p {
  margin: 0 0 11px;
  color: var(--portal-muted);
  font-size: 0.79rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.admin-notification-list {
  max-height: 600px;
  overflow-y: auto;
}

/* Support center */
.support-intro,
.support-ticket-hero,
.support-conversation {
  margin-bottom: 15px;
}

.support-create-form {
  margin-top: 16px;
}

.support-ticket-list {
  display: grid;
  gap: 9px;
}

.support-ticket-list a {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--portal-border);
  border-radius: 14px;
  padding: 13px 14px;
}

.support-ticket-list strong,
.support-ticket-list small {
  display: block;
  overflow-wrap: anywhere;
}

.support-ticket-list strong {
  font-size: 0.85rem;
}

.support-ticket-list small {
  margin-top: 4px;
  color: var(--portal-muted);
  font-size: 0.7rem;
}

.support-conversation {
  display: grid;
  gap: 10px;
}

.support-message {
  max-width: 86%;
  border-radius: 15px 15px 15px 4px;
  padding: 12px 13px;
  background: #f1f3f8;
}

.support-message.is-client {
  justify-self: end;
  border-radius: 15px 15px 4px 15px;
  background: rgba(106, 44, 255, 0.1);
}

.support-message.is-internal {
  max-width: 100%;
  border: 1px dashed rgba(239, 154, 54, 0.55);
  background: rgba(255, 247, 230, 0.9);
}

.support-message > div {
  gap: 10px;
}

.support-message strong,
.support-message time {
  font-size: 0.68rem;
}

.support-message time {
  color: var(--portal-muted);
}

.support-message p {
  margin: 7px 0 0;
  font-size: 0.8rem;
  line-height: 1.48;
  overflow-wrap: anywhere;
}

.support-reply-form {
  margin-top: 8px;
  border-top: 1px solid var(--portal-border);
  padding-top: 14px;
}

@media (max-width: 767px) {
  .desktop-notification-link,
  .client-public-page .client-topbar {
    display: none;
  }

  .topbar-inner {
    gap: 10px;
  }

  .mobile-app-dashboard {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .mobile-app-dashboard > *,
  .app-account-card,
  .app-secure-strip,
  .app-final-grid,
  .app-admin-workspace-link {
    grid-column: 1;
  }

  .app-account-card,
  .app-section-card {
    border-radius: 17px;
    padding: 15px;
  }

  .app-account-head {
    gap: 10px;
  }

  .app-account-head h2 {
    font-size: 1.08rem;
  }

  .app-account-head p {
    font-size: 0.74rem;
  }

  .app-manage-button,
  .app-section-head > a {
    padding: 8px 12px;
    font-size: 0.72rem;
  }

  .app-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-stat-grid > div {
    border-bottom: 1px solid var(--portal-border);
    padding: 12px;
  }

  .app-stat-grid > div:nth-child(2) {
    border-right: 0;
  }

  .app-stat-grid > div:nth-child(n + 3) {
    border-bottom: 0;
  }

  .app-stat-grid strong {
    font-size: 1.48rem;
  }

  .app-account-actions {
    gap: 7px;
  }

  .app-account-actions a {
    min-height: 40px;
    padding: 8px 5px;
    font-size: 0.69rem;
    line-height: 1.25;
  }

  .app-section-head h2 {
    font-size: 0.98rem;
  }

  .app-action-grid-four,
  .app-quick-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .app-action-grid a {
    min-height: 88px;
    border: 0;
    padding: 8px 3px;
  }

  .app-action-grid a > span {
    width: 35px;
    height: 35px;
    border-radius: 12px;
  }

  .app-action-grid a > strong {
    font-size: 0.65rem;
    line-height: 1.22;
  }

  .app-action-grid em {
    top: 3px;
    right: 3px;
  }

  .app-secure-strip {
    border-radius: 16px;
    padding: 13px 14px;
  }

  .app-secure-strip strong {
    font-size: 0.78rem;
  }

  .app-secure-strip small {
    font-size: 0.64rem;
  }

  .app-status-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    border-radius: 17px;
    padding: 14px;
  }

  .app-status-card p {
    font-size: 0.72rem;
    line-height: 1.38;
  }

  .app-status-card > a {
    padding: 7px 9px;
  }

  .notification-item {
    gap: 10px;
    border-radius: 15px;
    padding: 13px;
  }

  .notification-type-mark {
    width: 34px;
    height: 34px;
  }

  .notification-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .support-ticket-list a {
    align-items: flex-start;
    padding: 12px;
  }

  .support-message {
    max-width: 92%;
  }
}

@media (max-width: 430px) {
  .app-action-grid a > strong {
    font-size: 0.62rem;
  }

  .app-account-actions a {
    font-size: 0.65rem;
  }

  .app-status-card {
    gap: 9px;
  }

  .app-status-mark {
    width: 38px;
    height: 38px;
  }

  .app-status-card > a {
    font-size: 0.66rem;
  }
}
