:root {
  --bg: #eef2f7;
  --card: #ffffff;
  --surface: #f8fafc;
  --surface-strong: #f1f5f9;
  --line: #d7dee9;
  --text: #111827;
  --muted: #667085;
  --primary: #1769e0;
  --primary-dark: #0b4fb3;
  --green: #15803d;
  --accent: #008a6a;
  --gold: #b7791f;
  --danger: #b42318;
  --radius: 8px;
  --shadow-soft: 0 1px 2px rgba(15, 23, 42, .05), 0 12px 34px rgba(15, 23, 42, .07);
  --shadow-lift: 0 14px 34px rgba(15, 23, 42, .14);
  --control-bg: #f8fafc;
  --glass: rgba(255, 255, 255, .86);
  --content-max: 1520px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  background:
    linear-gradient(180deg, #fbfdff 0%, #eef3f9 46%, #e9eef6 100%);
  color: var(--text);
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
body.is-busy { cursor: progress; }

::selection {
  background: rgba(24, 119, 242, .2);
}

:focus-visible {
  outline: 3px solid rgba(24, 119, 242, .35);
  outline-offset: 2px;
}

.toast {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 100;
  max-width: min(420px, calc(100vw - 36px));
  padding: 12px 16px;
  border-radius: var(--radius);
  background: #1c1e21;
  color: #fff;
  box-shadow: 0 10px 32px rgba(0,0,0,.22);
  font-weight: 900;
}

.toast.error { background: var(--danger); }

.incoming-call-overlay {
  position: fixed;
  top: 72px;
  right: 16px;
  left: 16px;
  z-index: 140;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.incoming-call-card {
  pointer-events: auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: min(680px, 100%);
  padding: 12px;
  border: 1px solid rgba(24, 119, 242, .22);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 36px rgba(0,0,0,.18);
}

.incoming-call-card strong,
.incoming-call-card span {
  display: block;
}

.incoming-call-card span {
  color: var(--muted);
  margin-top: 2px;
}

.call-pulse {
  position: relative;
}

.call-pulse::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(24, 119, 242, .32);
  animation: callPulse 1.2s infinite;
}

.incoming-call-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@keyframes callPulse {
  from { transform: scale(.88); opacity: .9; }
  to { transform: scale(1.25); opacity: 0; }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto minmax(260px, 460px) auto;
  grid-template-areas:
    "brand search actions"
    "nav nav nav";
  column-gap: 16px;
  row-gap: 8px;
  align-items: center;
  min-height: 112px;
  padding: 10px max(18px, calc((100vw - var(--content-max)) / 2 + 18px)) 8px;
  background: var(--glass);
  border-bottom: 1px solid rgba(215, 222, 233, .86);
  box-shadow: 0 1px 0 rgba(255,255,255,.8), 0 10px 32px rgba(15,23,42,.08);
  backdrop-filter: blur(18px) saturate(1.15);
}

.install-app-entry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(24, 119, 242, .24);
  border-radius: var(--radius);
  background: #e7f0ff;
  color: var(--primary);
  font-weight: 900;
  white-space: nowrap;
}

.install-app-entry:hover {
  background: var(--primary);
  color: #fff;
}

.install-app-entry svg,
.install-app-logo svg,
.install-platform-card svg,
.install-actions svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex: 0 0 auto;
}

.brand, .account-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-weight: 900;
  min-width: 0;
}

.brand {
  grid-area: brand;
  justify-self: start;
  min-height: 44px;
  padding: 0 6px;
  border-radius: var(--radius);
}

.brand:hover {
  background: rgba(23, 105, 224, .07);
}

.brand span:last-child,
.account-pill span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-actions {
  grid-area: actions;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.language-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(24, 119, 242, .22);
  border-radius: var(--radius);
  background: rgba(255,255,255,.92);
  color: var(--primary);
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .05);
}

.language-toggle:hover {
  background: #e7f0ff;
  border-color: rgba(24, 119, 242, .38);
}

.language-toggle .ui-icon {
  width: 17px;
  height: 17px;
}

.logout-btn .ui-icon {
  width: 16px;
  height: 16px;
}

.compact {
  min-height: 34px;
  padding: 0 10px;
}

.brand-mark, .avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-weight: 900;
}

.brand-mark {
  border-radius: var(--radius);
  box-shadow: inset 0 -10px 18px rgba(15, 95, 196, .24), 0 8px 20px rgba(23, 105, 224, .18);
}

.avatar.small { width: 30px; height: 30px; font-size: 12px; }
.avatar.large { width: 60px; height: 60px; font-size: 20px; }
.avatar.xlarge { width: 96px; height: 96px; border: 5px solid #fff; font-size: 30px; }

.avatar-img {
  object-fit: cover;
  background: #e4e6eb;
}

.avatar-fallback {
  background: #e4e6eb;
  color: #8f969e;
  overflow: hidden;
}

.avatar-fallback.female {
  background: #e5e7eb;
  color: #9aa0a6;
}

.avatar-fallback.male {
  background: #e4e6eb;
  color: #7e8790;
}

.avatar-fallback svg {
  width: 72%;
  height: 72%;
  fill: currentColor;
  display: block;
}

.search-box {
  grid-area: search;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(215, 222, 233, .92);
  background: rgba(248,250,252,.92);
  color: var(--muted);
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.search-box:focus-within {
  border-color: rgba(24, 119, 242, .32);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(24, 119, 242, .10);
}

.nav {
  grid-area: nav;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  width: 100%;
  padding-top: 8px;
  border-top: 1px solid rgba(215, 222, 233, .72);
}

.nav-menu {
  position: relative;
}

.nav button,
.nav-menu-trigger {
  min-height: 44px;
  min-width: 108px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.nav-menu-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
}

.nav-item-icon,
.nav-chevron {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.nav-item-icon .ui-icon {
  width: 18px;
  height: 18px;
}

.nav-chevron .ui-icon {
  width: 14px;
  height: 14px;
}

.nav button span:not(.nav-item-icon):not(.nav-chevron),
.nav-menu-trigger span:not(.nav-item-icon):not(.nav-chevron) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e41e3f;
  color: #fff;
  font-size: 11px;
  line-height: 1;
}

.nav button.active,
.nav button:hover,
.nav-menu.active > .nav-menu-trigger,
.nav-menu:hover > .nav-menu-trigger,
.nav-menu:focus-within > .nav-menu-trigger {
  background: linear-gradient(180deg, #eef6ff, #e7f0ff);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(23, 105, 224, .10);
}

.nav-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: auto;
  left: auto;
  inset-inline-start: 0;
  z-index: 90;
  display: none;
  min-width: 260px;
  max-width: min(360px, calc(100vw - 32px));
  max-height: min(520px, calc(100vh - 150px));
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 22px 52px rgba(15, 23, 42, .18);
}

.nav-menu:last-child .nav-menu-panel {
  inset-inline-start: auto;
  inset-inline-end: 0;
}

.nav-menu:hover .nav-menu-panel,
.nav-menu:focus-within .nav-menu-panel {
  display: grid;
  gap: 4px;
}

.nav-menu-panel button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0 12px;
  text-align: start;
}

.nav-menu-panel .nav-badge {
  margin-inline-start: auto;
}

.social-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 760px) 340px;
  gap: 18px;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 18px;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(23, 105, 224, .12), rgba(0, 138, 106, .10)),
    var(--bg);
}

.auth-language-toggle {
  position: fixed;
  top: 16px;
  inset-inline-end: 16px;
  z-index: 5;
}

.auth-panel {
  width: min(460px, 100%);
  display: grid;
  gap: 18px;
  padding: 26px;
  border-color: rgba(23, 105, 224, .18);
  box-shadow: 0 24px 70px rgba(15, 23, 42, .14);
}

.auth-panel h1 {
  margin: 12px 0 6px;
  letter-spacing: 0;
}

.auth-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.single-layout {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 18px;
}

.app-shell {
  min-height: 100dvh;
}

.left-rail, .right-rail {
  position: sticky;
  top: 74px;
  align-self: start;
  display: grid;
  gap: 10px;
}

.side-button, .contact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  padding: 0 10px;
  text-align: start;
  font-weight: 800;
}

.side-button:hover, .side-button.active, .contact-row:hover {
  background: #eaf2ff;
  color: var(--primary);
}

.contact-row span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.contact-row small {
  color: var(--muted);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-card, .rail-card, .social-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.mini-card, .rail-card { padding: 16px; display: grid; gap: 10px; }
.mini-card span, .rail-card span { color: var(--muted); }
.rail-card h3 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.4;
}

.mini-card strong,
.rail-card strong {
  color: var(--text);
}

.member-finder {
  display: grid;
  gap: 10px;
}

.member-finder-results {
  display: grid;
  gap: 8px;
}

.member-finder-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.member-finder-row .contact-row {
  padding: 6px;
  min-height: 46px;
  background: #f7f8fa;
}

.quick-link {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-align: start;
  font-weight: 900;
}

.quick-link:hover {
  border-color: rgba(23, 105, 224, .35);
  background: #e7f0ff;
  color: var(--primary);
  transform: translateY(-1px);
}

.quick-link span {
  color: var(--muted);
  font-size: 12px;
}

.main-feed, .feed { display: grid; gap: 14px; }

.reels-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  overflow: hidden;
}

.reel-composer {
  display: grid;
  gap: 10px;
}

.reel-composer[hidden] {
  display: none;
}

.reels-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(150px, 190px);
  gap: 10px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding-bottom: 4px;
  scroll-snap-type: inline mandatory;
}

.reel-card {
  position: relative;
  min-height: 260px;
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #111;
  scroll-snap-align: start;
  cursor: pointer;
}

.reel-card video {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  display: block;
  background: #111;
}

.reel-meta {
  position: absolute;
  right: 0;
  left: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 34px 10px 10px;
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.72));
}

.reel-meta div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.reel-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.reel-meta small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255,255,255,.78);
  font-size: 11px;
}

.reel-empty {
  min-height: 120px;
}

.danger-chip {
  background: #fdecea;
  color: var(--danger);
}

.reel-viewer {
  position: fixed;
  inset: 0;
  z-index: 120;
  overflow: hidden;
  padding: 0;
  background: #000;
}

body.reel-viewer-open {
  overflow: hidden;
}

.reel-viewer-track {
  height: 100dvh;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  background: #000;
}

.reel-viewer-track::-webkit-scrollbar {
  display: none;
}

.reel-viewer-slide {
  position: relative;
  display: grid;
  place-items: center;
  width: 100vw;
  height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  background: #000;
}

.reel-viewer-slide video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
}

.reel-viewer-close {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 121;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.16);
  color: #fff;
  font-size: 26px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.reel-viewer-gradient {
  position: absolute;
  inset: auto 0 0;
  height: 36%;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.82));
}

.reel-viewer-actions {
  position: absolute;
  left: max(12px, env(safe-area-inset-left));
  bottom: max(104px, calc(env(safe-area-inset-bottom) + 94px));
  z-index: 3;
  display: grid;
  gap: 12px;
  justify-items: center;
}

.reel-viewer-actions button,
.reel-view-count {
  display: grid;
  gap: 4px;
  justify-items: center;
  min-width: 48px;
  border: 0;
  background: transparent;
  color: #fff;
  text-shadow: 0 1px 5px rgba(0,0,0,.65);
}

.reel-viewer-actions span,
.reel-view-count span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(0,0,0,.34);
  font-size: 24px;
  backdrop-filter: blur(10px);
}

.reel-viewer-actions .ui-icon,
.reel-view-count .ui-icon {
  width: 25px;
  height: 25px;
}

.reel-viewer-actions button.active span {
  background: #1877f2;
}

.reel-viewer-actions button.active.dislike span {
  background: #ef4444;
}

.reel-viewer-actions b,
.reel-view-count b {
  font-size: 12px;
  line-height: 1;
}

.reel-viewer-meta {
  position: absolute;
  right: 0;
  left: 0;
  bottom: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  width: min(520px, 100%);
  margin: 0 auto;
  padding: 64px 16px max(18px, env(safe-area-inset-bottom));
  color: #fff;
}

.reel-viewer-meta div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.reel-viewer-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer, .post, .section-head, .profile-card, .message-card, .service-card, .market-card, .member-card, .admin-card {
  padding: 18px;
}

.section-head {
  display: grid;
  gap: 8px;
  border-inline-start: 4px solid var(--primary);
  background:
    linear-gradient(135deg, rgba(23, 105, 224, .08), rgba(0, 138, 106, .07)),
    #fff;
}

.section-head h1 {
  font-size: clamp(22px, 2.2vw, 34px);
  line-height: 1.25;
}

.section-head p {
  line-height: 1.7;
}

.post,
.composer {
  overflow: hidden;
}

.openable-card {
  cursor: pointer;
}

.openable-card:focus-visible {
  box-shadow: 0 0 0 4px rgba(24, 119, 242, .18);
}

.composer-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

textarea, input, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--control-bg);
  color: var(--text);
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}

textarea:focus,
input:focus,
select:focus {
  outline: 0;
  border-color: rgba(24, 119, 242, .38);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(24, 119, 242, .10);
}

textarea::placeholder,
input::placeholder {
  color: #8a9097;
}

textarea {
  min-height: 96px;
  resize: vertical;
  padding: 12px;
  line-height: 1.8;
}

input, select {
  min-height: 42px;
  padding: 0 12px;
}

.composer-tools, .post-actions, .card-actions, .meta, .upload-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.composer-tools {
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.primary-btn, .ghost-btn, .danger-btn, .tool-button, .upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: var(--radius);
  padding: 0 16px;
  font-weight: 900;
  gap: 7px;
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 10px 22px rgba(23, 105, 224, .18);
}

.primary-btn:hover {
  background: linear-gradient(135deg, #1b76f2, var(--primary-dark));
  box-shadow: 0 12px 26px rgba(23, 105, 224, .24);
  transform: translateY(-1px);
}

.primary-btn:disabled,
.ghost-btn:disabled,
.tool-button:disabled {
  cursor: not-allowed;
  opacity: .6;
}

.ghost-btn, .tool-button, .upload-btn {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.94);
  color: var(--text);
}

.ghost-btn:hover,
.tool-button:hover,
.upload-btn:hover {
  border-color: rgba(24, 119, 242, .32);
  background: #f5f9ff;
  color: var(--primary);
}

.danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #fecaca;
  background: #fee2e2;
  color: #b91c1c;
}

.danger-btn:hover {
  background: #dc2626;
  color: #fff;
}

.post-head, .profile-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.post-head > .ghost-btn {
  margin-inline-start: auto;
}

.post-author-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 900;
  text-align: start;
}

.post-author-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

.post-head span, .post-counts, .card p, .section-head p, .profile-top p {
  color: var(--muted);
}

.post-body {
  margin: 12px 0;
  color: var(--text);
  font-size: 17px;
  line-height: 1.8;
  white-space: pre-wrap;
}

.post-media-cover {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 12px -16px 0;
  background: #000;
}

.post-media-cover img,
.post-media-cover video {
  width: 100%;
  min-height: 220px;
  max-height: 520px;
  object-fit: cover;
  background: #000;
}

.post-media-cover > :first-child:nth-last-child(1) {
  grid-column: 1 / -1;
}

.post-downloads {
  margin-top: 12px;
}

.post-counts {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.post-counts button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
}

.post-counts button:hover {
  color: var(--primary);
  text-decoration: underline;
}

.post-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.post-actions button {
  display: inline-grid;
  place-items: center;
  min-height: 38px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.post-actions button:hover { background: #f0f2f5; color: var(--primary); }

.ui-icon {
  display: block;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.post-action-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
}

.post-actions button:hover .post-action-icon {
  background: #e7f0ff;
}

.comments {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.comments[hidden] {
  display: none !important;
}

.post-actions button.active .post-action-icon {
  background: #e7f0ff;
  color: var(--primary);
}

.comment-thread {
  display: grid;
  gap: 6px;
  margin-inline-start: calc(var(--depth, 0) * 18px);
}

.comment {
  width: fit-content;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 16px;
  background: #f0f2f5;
}

.comment p { margin: 4px 0 0; line-height: 1.6; }

.comment-author-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  font-weight: 900;
}

.comment-author-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

.likes-member-list {
  display: grid;
  gap: 8px;
}

.likes-member {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: var(--radius);
  background: #f7f8fa;
  color: var(--text);
  font-weight: 900;
  text-align: start;
}

.likes-member:hover {
  background: #e7f0ff;
  color: var(--primary);
}

.comment-reply-btn {
  margin-top: 4px;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 900;
}

.comment-replies {
  display: grid;
  gap: 6px;
  border-inline-start: 2px solid #e4e6eb;
  padding-inline-start: 8px;
}

.reply-form {
  max-width: min(520px, 100%);
  margin-inline-start: 8px;
}

.reply-form[hidden] {
  display: none !important;
}

.shared-post-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  color: var(--text);
}

.message-bubble .shared-post-box {
  min-width: min(280px, 72vw);
  box-shadow: none;
}

.shared-post-box .post-media-cover {
  margin-top: 8px;
}

.comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.section-head h1, .profile-summary h1 {
  margin: 0 0 8px;
}

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

.service-list {
  display: grid;
  gap: 12px;
}

.publisher-services {
  display: grid;
  gap: 12px;
}

.service-card {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 190px;
  grid-template-areas:
    "gallery head info"
    "gallery desc info"
    "gallery video actions";
  gap: 12px;
  align-items: start;
  min-height: 210px;
  overflow: hidden;
}

.service-card h3 {
  margin: 0 0 4px;
  line-height: 1.5;
}

.service-card-head {
  grid-area: head;
  display: grid;
  gap: 2px;
}

.service-description {
  grid-area: desc;
  margin: 0;
  color: var(--text);
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.service-gallery {
  grid-area: gallery;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  height: 178px;
  padding-bottom: 4px;
}

.service-gallery img {
  width: 100%;
  height: 174px;
  border-radius: var(--radius);
  object-fit: cover;
  background: #e4e6eb;
  scroll-snap-align: start;
}

.service-gallery-empty {
  grid-area: gallery;
  display: grid;
  place-items: center;
  min-height: 174px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: #f7f8fa;
}

.service-info-table {
  grid-area: info;
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-size: 14px;
}

.service-info-table th,
.service-info-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: start;
}

.service-info-table tr:last-child th,
.service-info-table tr:last-child td {
  border-bottom: 0;
}

.service-info-table th {
  width: 36%;
  background: #f7f8fa;
  color: var(--muted);
  font-weight: 900;
}

.service-video-row {
  grid-area: video;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.service-card .card-actions {
  grid-area: actions;
  align-self: end;
  justify-content: flex-end;
}

.directory-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(22, 163, 74, .09), rgba(255, 255, 255, .96) 42%),
    #fff;
}

.directory-hero h1,
.directory-hero p {
  margin: 0;
}

.directory-hero p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.8;
}

.directory-hero h1 {
  font-size: 28px;
  line-height: 1.25;
}

.directory-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.directory-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.directory-stats span {
  display: grid;
  gap: 2px;
  min-height: 66px;
  padding: 11px 12px;
  border: 1px solid rgba(22, 163, 74, .13);
  border-radius: 8px;
  background: rgba(255,255,255,.78);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.directory-stats strong {
  color: #166534;
  font-size: 22px;
  line-height: 1;
}

.directory-stats small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.directory-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.directory-filters {
  position: sticky;
  top: 74px;
  display: grid;
  gap: 11px;
  padding: 14px;
}

.directory-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.directory-filters input,
.directory-filters select {
  min-height: 42px;
  border-radius: 8px;
  background: #f8fafc;
}

.directory-results {
  display: grid;
  gap: 12px;
}

.directory-results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 10px 12px;
}

.directory-results-bar div {
  display: grid;
  gap: 2px;
}

.directory-results-bar strong {
  color: var(--text);
  font-size: 15px;
}

.directory-results-bar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.directory-service-card {
  grid-template-columns: 220px minmax(0, 1fr) 132px;
  grid-template-areas: none;
  min-height: 188px;
  padding: 0;
  gap: 0;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.directory-service-card:hover {
  border-color: rgba(22, 163, 74, .25);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .10);
}

.service-listing-media {
  position: relative;
  min-height: 188px;
  background: #f0f2f5;
}

.service-listing-media img,
.service-listing-placeholder {
  width: 100%;
  height: 100%;
  min-height: 188px;
  object-fit: cover;
}

.service-listing-placeholder {
  display: grid;
  place-items: center;
  color: var(--primary);
  font-size: 30px;
  font-weight: 1000;
  background: linear-gradient(135deg, #ecfdf5, #f7f8fa);
}

.service-category-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: #fff;
  color: #166534;
  font-size: 12px;
  font-weight: 1000;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .14);
}

.service-category-badge.inline {
  position: static;
  justify-self: start;
  box-shadow: none;
  border: 1px solid var(--line);
}

.service-listing-main {
  display: grid;
  gap: 9px;
  grid-template-rows: auto minmax(0, auto) auto auto;
  min-width: 0;
  padding: 15px;
}

.service-listing-main .service-card-head {
  grid-area: auto;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  min-width: 0;
}

.service-listing-main .service-card-head > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.service-listing-main .service-card-head h3 {
  margin: 0;
  line-height: 1.35;
  overflow-wrap: anywhere;
  font-size: 18px;
}

.service-listing-main .service-card-head p {
  margin: 0;
  line-height: 1.45;
}

.service-listing-price {
  flex: 0 0 auto;
  color: #166534;
  font-size: 18px;
  white-space: nowrap;
}

.directory-service-card .service-description {
  grid-area: auto;
  min-height: 48px;
  margin: 0;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.service-provider-mini {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid #edf0f3;
  border-radius: 8px;
  background: #fbfcfd;
}

.service-provider-mini .avatar,
.service-provider-mini img {
  width: 32px;
  height: 32px;
  object-fit: cover;
}

.service-provider-mini div {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.service-provider-mini strong,
.service-provider-mini span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-provider-mini span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.service-directory-meta {
  grid-area: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.service-directory-meta span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #f5f6f8;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-listing-actions {
  display: grid;
  gap: 8px;
  align-content: center;
  padding: 12px;
  border-inline-start: 1px solid var(--line);
  background: #fbfcfd;
}

.service-listing-actions .primary-btn,
.service-listing-actions .ghost-btn,
.service-listing-actions .danger-btn {
  width: 100%;
  justify-content: center;
  min-height: 36px;
  white-space: nowrap;
}

.provider-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.provider-strip span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.service-detail {
  overflow: hidden;
  padding: 0;
  background: #f6f7f9;
}

.service-detail-toolbar {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  margin: 12px 20px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.94);
}

.service-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, .92fr);
  gap: 20px;
  padding: 20px;
}

.service-detail-hero-pro {
  align-items: start;
}

.service-detail-cover {
  width: 100%;
  min-height: 380px;
  max-height: 560px;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  background: #e7f0ff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .09);
}

.service-detail-cover.placeholder {
  display: grid;
  place-items: center;
  color: var(--primary);
  font-size: 42px;
  font-weight: 900;
}

.service-detail-side {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}

.service-detail-side .muted-line {
  font-weight: 850;
}

.service-detail-kickers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.service-detail-side h1 {
  margin: 0;
  line-height: 1.35;
  font-size: clamp(22px, 2.2vw, 30px);
}

.service-detail-price-card {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid rgba(22, 163, 74, .14);
  border-radius: 8px;
  background: #f0fdf4;
}

.service-detail-info-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.service-detail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.service-detail-actions .primary-btn,
.service-detail-actions .ghost-btn,
.service-detail-actions .danger-btn {
  width: 100%;
  justify-content: center;
  min-height: 42px;
}

.service-detail-actions .primary-btn {
  grid-column: 1 / -1;
}

.service-detail-price-card span {
  color: #166534;
  font-size: 12px;
  font-weight: 900;
}

.service-detail-price-card strong {
  color: #14532d;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.15;
}

.service-detail-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.service-detail-metrics span {
  display: grid;
  gap: 2px;
  min-height: 58px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f8fa;
}

.service-detail-metrics strong {
  color: var(--text);
  font-size: 18px;
}

.service-detail-metrics small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.service-detail-content {
  display: grid;
  gap: 16px;
  padding: 0 20px 20px;
}

.service-detail-panel {
  border-radius: 14px;
}

.service-detail-panel h3 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.service-detail-panel h3 .ui-icon {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.detail-section-panel {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.detail-section-panel h3 {
  margin: 0;
}

.detail-section-panel p {
  margin: 0;
  line-height: 1.9;
  white-space: pre-wrap;
}

.service-detail-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.service-detail-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  object-fit: cover;
  background: #e4e6eb;
}

.service-video-viewer {
  position: fixed;
  inset: 0;
  z-index: 125;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0,0,0,.82);
}

.service-video-body {
  width: min(860px, calc(100vw - 36px));
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}

.service-video-body video {
  width: 100%;
  max-height: calc(100vh - 72px);
  display: block;
  background: #000;
}

.service-video-close {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 126;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--text);
  font-size: 26px;
  font-weight: 900;
}

.link-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 900;
}

.link-button:hover {
  text-decoration: underline;
}

.market-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding: 18px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(24, 119, 242, .08), rgba(255, 255, 255, .94) 42%),
    #fff;
}

.market-hero h1 {
  margin: 6px 0 6px;
  color: var(--text);
  font-size: 28px;
  line-height: 1.25;
  font-weight: 1000;
}

.market-hero p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.market-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.market-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.market-stats span {
  display: grid;
  gap: 2px;
  min-height: 66px;
  padding: 11px 12px;
  border: 1px solid rgba(24, 119, 242, .12);
  border-radius: 8px;
  background: rgba(255, 255, 255, .78);
}

.market-stats strong {
  color: var(--primary-dark);
  font-size: 22px;
  line-height: 1;
}

.market-stats small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.market-layout {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.filters {
  position: sticky;
  top: 74px;
  align-self: start;
  padding: 14px;
  display: grid;
  gap: 11px;
}

.filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 4px;
}

.filters-head strong {
  color: var(--text);
  font-size: 15px;
}

.filters label {
  display: grid;
  gap: 5px;
}

.filters label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.filters input,
.filters select {
  min-height: 42px;
  border-radius: 8px;
  background: #f8fafc;
}

.filters .primary-btn {
  margin-top: 2px;
}

.market-main {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.market-results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 10px 12px;
}

.market-results-bar div {
  display: grid;
  gap: 2px;
}

.market-results-bar strong {
  color: var(--text);
  font-size: 15px;
}

.market-results-bar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(218px, 1fr));
  gap: 14px;
}

.woo-product-card {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0;
  min-height: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.woo-product-card:hover {
  border-color: rgba(24, 119, 242, .25);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .10);
}

.woo-product-media {
  position: relative;
  overflow: hidden;
  background: #f6f7f9;
}

.market-thumb {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 0;
  background: linear-gradient(135deg, #eef4ff, #f7f8fa);
  color: var(--primary);
  font-size: 42px;
  font-weight: 900;
}

.market-thumb.compact {
  width: 58px;
  height: 58px;
  aspect-ratio: auto;
  font-size: 22px;
}

.market-cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  border-radius: 0;
  object-fit: cover;
  border: 0;
  background: #f0f2f5;
}

.woo-badge,
.woo-media-badge {
  position: absolute;
  top: 8px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .14);
}

.woo-badge {
  right: 8px;
  background: #fff;
  color: var(--text);
}

.woo-media-badge {
  left: 8px;
  background: #111827;
  color: #fff;
}

.woo-product-body {
  display: grid;
  gap: 7px;
  padding: 10px 12px 0;
}

.woo-product-body h3 {
  min-height: 40px;
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
  font-weight: 900;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.woo-product-body p {
  min-height: 36px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.woo-publisher {
  justify-self: stretch;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-align: inherit;
}

.woo-publisher .avatar,
.woo-publisher img {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

.woo-publisher span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.woo-publisher:hover {
  color: var(--primary);
  text-decoration: underline;
}

.woo-product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.woo-product-meta span {
  padding: 3px 7px;
  border-radius: 999px;
  background: #f5f6f8;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.woo-price {
  color: var(--primary-dark);
  font-size: 17px;
  font-weight: 1000;
  line-height: 1.4;
}

.woo-stock-line {
  color: #15803d;
  font-size: 11px;
  font-weight: 900;
}

.woo-stock-line.out-stock {
  color: #b91c1c;
}

.woo-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin: 10px 12px 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.woo-actions .primary-btn {
  grid-column: 1 / -1;
}

.woo-actions .primary-btn,
.woo-actions .ghost-btn,
.woo-actions .danger-btn {
  width: 100%;
  justify-content: center;
  min-height: 34px;
  padding: 0 8px;
  font-size: 12px;
  white-space: nowrap;
}

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

.product-media img,
.product-media video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  object-fit: cover;
  background: #f0f2f5;
}

.download-list {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  padding: 10px;
  border-radius: var(--radius);
  background: #f7f8fa;
}

.download-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  font-weight: 800;
}

.download-item span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.download-item small {
  flex: 0 0 auto;
  color: var(--muted);
}

.groups-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff 0%, #eef5ff 48%, #ecfdf5 100%);
}

.section-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 1000;
}

.groups-hero h1 {
  margin: 0 0 8px;
  font-size: 34px;
}

.groups-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.groups-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(92px, 1fr));
  gap: 10px;
}

.groups-stats span,
.group-metrics span {
  display: grid;
  gap: 2px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.78);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.groups-stats strong,
.group-metrics strong {
  color: var(--text);
  font-size: 18px;
}

.groups-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.group-search {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 900;
}

.group-create {
  display: grid;
  gap: 12px;
}

.group-create-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.group-create-head h3,
.group-create-head p {
  margin: 0;
}

.group-create-head p {
  color: var(--muted);
}

.groups-workspace {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr) minmax(250px, 320px);
  grid-template-areas: "right main left";
  gap: 16px;
  align-items: start;
}

.groups-main-panel {
  grid-area: main;
  display: grid;
  gap: 12px;
  min-width: 0;
}

.groups-side-panel {
  position: sticky;
  top: 126px;
  display: grid;
  gap: 12px;
  align-self: start;
  padding: 14px;
}

.groups-side-panel-right {
  grid-area: right;
}

.groups-side-panel-left {
  grid-area: left;
}

.group-detail-right {
  grid-area: right;
}

.group-detail-left {
  grid-area: left;
}

.groups-side-title {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.groups-side-title > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #e7f3ff;
  color: var(--primary);
}

.groups-side-title .ui-icon {
  width: 20px;
  height: 20px;
}

.groups-side-title h2,
.groups-side-title p {
  margin: 0;
}

.groups-side-title h2 {
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.groups-side-title p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.group-create-inline {
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.group-create-inline textarea {
  min-height: 82px;
}

.groups-head-metrics,
.groups-side-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.groups-side-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.groups-head-metrics span,
.groups-side-stats span,
.groups-side-stats .stat-button {
  display: grid;
  gap: 2px;
  min-height: 58px;
  place-items: center;
  border: 1px solid #e7ebf0;
  border-radius: 10px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.groups-head-metrics strong,
.groups-side-stats strong {
  color: var(--text);
  font-size: 18px;
  font-weight: 950;
}

.groups-head-metrics small,
.groups-side-stats small {
  color: var(--muted);
  font-size: 11px;
}

.side-list-block {
  display: grid;
  gap: 7px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.side-list-block h3 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
}

.group-side-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 7px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  text-align: start;
  cursor: pointer;
}

.group-side-row:hover {
  background: #f1f5f9;
}

.group-side-row span:not(.avatar):not(.avatar-fallback):not(.group-side-thumb) {
  display: grid;
  min-width: 0;
}

.group-side-row strong,
.group-side-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-side-row strong {
  font-size: 13px;
  font-weight: 950;
}

.group-side-row small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.group-side-thumb {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  overflow: hidden;
  border-radius: 9px;
  background: linear-gradient(135deg, #1877f2, #20a67a);
  color: #fff;
  font-size: 12px;
  font-weight: 1000;
}

img.group-side-thumb {
  object-fit: cover;
  background: #eef0f3;
}

.group-side-cover {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(135deg, #1877f2, #20a67a);
  color: #fff;
  font-size: 32px;
  font-weight: 1000;
}

.group-side-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.group-side-tabs .group-tabs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.group-side-tabs .group-tabs button {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 42px;
  padding: 0 10px;
  text-align: start;
}

.groups-side-panel .group-admin-panel {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.groups-side-panel .group-settings-form {
  grid-template-columns: 1fr;
}

.groups-side-panel .group-settings-form textarea {
  grid-column: auto;
}

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

.groups-compact-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 14px;
  align-items: end;
}

.groups-compact-head h1,
.groups-compact-head p {
  margin: 0;
}

.groups-compact-head p {
  color: var(--muted);
  margin-top: 6px;
}

.compact-create {
  padding: 12px;
}

.groups-compact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
}

.group-mini-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  grid-template-areas:
    "cover content"
    "cover actions";
  gap: 10px 12px;
  align-items: stretch;
  min-height: 112px;
  padding: 12px;
  border: 1px solid #dde2ea;
  background: #fff;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.group-mini-card:hover {
  border-color: rgba(24, 119, 242, .24);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .10);
  transform: translateY(-2px);
}

.group-mini-card.is-joined {
  border-color: rgba(24, 119, 242, .24);
  background: linear-gradient(180deg, #fff, #f8fbff);
}

.group-mini-cover-wrap {
  grid-area: cover;
  position: relative;
  width: 86px;
  min-height: 86px;
}

.group-mini-cover {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(24, 119, 242, .92), rgba(32, 166, 122, .86)),
    radial-gradient(circle at 22% 18%, rgba(255,255,255,.32), transparent 30%);
  color: #fff;
  font-weight: 1000;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .10);
}

.group-mini-cover.image-cover {
  display: block;
  object-fit: cover;
  background: #e4e6eb;
}

.group-mini-content {
  grid-area: content;
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
}

.group-mini-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.group-mini-card h3 {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  font-weight: 950;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef2f7;
  color: #526070;
  font-size: 11px;
  font-weight: 900;
}

.group-mini-card.is-joined .group-status-chip {
  background: #e7f3ff;
  color: var(--primary);
}

.group-mini-card.is-pending .group-status-chip {
  background: #fff7ed;
  color: #b45309;
}

.group-mini-content p {
  display: -webkit-box;
  min-height: 36px;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.group-mini-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.group-mini-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  max-width: 100%;
  padding: 3px 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #f5f7fa;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-mini-meta .ui-icon {
  width: 14px;
  height: 14px;
}

.group-mini-actions {
  grid-area: actions;
  align-self: end;
}

.group-mini-actions .primary-btn,
.group-mini-actions .ghost-btn {
  width: 100%;
  min-height: 36px;
  border-radius: 9px;
  padding-inline: 12px;
}

.group-page,
.group-members-page {
  overflow: hidden;
  padding: 0;
}

.group-page-cover {
  display: grid;
  place-items: center;
  min-height: 220px;
  background: linear-gradient(135deg, #1877f2, #20a67a);
  color: #fff;
  font-size: 54px;
  font-weight: 1000;
}

.group-page-cover.image-cover {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: cover;
  background: #e4e6eb;
}

.group-page-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.group-page-head h1,
.group-page-head p {
  margin: 0;
}

.group-page-head p,
.group-page-head small {
  color: var(--muted);
  line-height: 1.7;
}

.group-page-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 16px;
}

.group-page-stats span,
.stat-button {
  display: grid;
  gap: 3px;
  min-height: 64px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7f8fa;
  color: var(--muted);
  font-weight: 900;
}

.stat-button {
  cursor: pointer;
}

.group-page-stats strong,
.stat-button strong {
  color: var(--text);
  font-size: 22px;
}

.group-admin-panel {
  display: grid;
  gap: 10px;
  margin: 0 16px 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7f8fa;
}

.group-admin-list {
  display: grid;
  gap: 8px;
}

.group-admin-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: var(--radius);
  background: #fff;
}

.group-settings-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 220px) auto;
  gap: 8px;
  align-items: start;
}

.group-settings-form textarea {
  grid-column: 1 / 3;
  min-height: 72px;
}

.pinned-post {
  border-color: rgba(24, 119, 242, .38);
  background: #f8fbff;
}

.highlight-post {
  box-shadow: 0 0 0 3px rgba(24, 119, 242, .22), 0 8px 24px rgba(15, 23, 42, .12);
  border-color: rgba(24, 119, 242, .55);
}

.pinned-chip {
  width: fit-content;
  margin-bottom: 4px;
  background: #e7f0ff;
  color: var(--primary-dark);
}

.post-admin-actions {
  margin-top: 0;
  margin-inline-start: auto;
}

.group-feed-page {
  display: grid;
  gap: 12px;
}

.group-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
}

.group-tabs button {
  display: grid;
  gap: 2px;
  min-height: 54px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}

.group-tabs button.active {
  background: #e7f3ff;
  color: var(--primary);
}

.group-tabs b {
  color: inherit;
  font-size: 13px;
}

.group-tab-panel {
  padding: 14px;
}

.group-media-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.group-media-grid img,
.group-media-grid video {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  background: #f0f2f5;
}

.group-member-list {
  display: grid;
  gap: 4px;
  padding: 12px;
}

.group-member-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: right;
  font-weight: 900;
}

.group-member-person {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: right;
  font-weight: 900;
}

.group-member-person span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-card {
  display: grid;
  gap: 12px;
  overflow: hidden;
  padding: 0;
}

.group-card.is-joined {
  border-color: rgba(24, 119, 242, .28);
}

.group-cover {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 170px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(24,119,242,.92), rgba(32,166,122,.86)),
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.4), transparent 28%);
  color: #fff;
}

.group-cover-glow {
  position: absolute;
  inset: auto 10% -38px 10%;
  height: 90px;
  border-radius: 999px;
  background: rgba(255,255,255,.24);
  filter: blur(16px);
}

.group-cover span {
  position: relative;
  font-size: 46px;
  font-weight: 1000;
}

.group-cover small {
  position: absolute;
  right: 14px;
  bottom: 14px;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: var(--text);
  font-weight: 900;
}

.group-head,
.group-description,
.group-metrics,
.group-actions,
.group-posts {
  margin-inline: 14px;
}

.group-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.group-head h3 {
  margin: 0 0 4px;
  font-size: 20px;
}

.group-head p,
.group-description {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.group-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.group-actions {
  margin-bottom: 4px;
}

.group-posts {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.group-composer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.group-feed {
  display: grid;
  gap: 10px;
}

.group-post {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.group-post p {
  margin: 10px 0;
  line-height: 1.8;
}

.group-post-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.group-locked {
  padding: 12px;
  border-radius: var(--radius);
  background: #f7f8fa;
  color: var(--muted);
  font-weight: 900;
}

.member-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 14px;
}

.muted-line {
  color: var(--muted);
  overflow-wrap: anywhere;
}

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

.service-form { display: grid; gap: 10px; }

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e7f0ff;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 900;
}

.chip-button {
  border: 0;
  cursor: pointer;
}

.chip-button:hover {
  background: var(--primary);
  color: #fff;
}

.product-detail {
  overflow: hidden;
  padding: 0;
}

.woo-detail {
  background: #f6f7f9;
}

.detail-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.detail-cover {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #f6f7f9;
  color: var(--primary);
  font-size: 56px;
  font-weight: 900;
}

.woo-detail-main {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(380px, .94fr);
  gap: 20px;
  padding: 20px;
}

.woo-detail-gallery {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.woo-detail-primary {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f7f9;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .09);
}

.woo-detail-thumbs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.woo-detail-thumbs img,
.woo-detail-thumbs video {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  background: #f0f2f5;
}

.woo-detail-summary {
  align-self: start;
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}

.woo-detail-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.woo-badge.inline {
  position: static;
  justify-self: start;
  box-shadow: none;
  border: 1px solid var(--line);
  background: #f7f8fa;
}

.woo-detail-summary h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.25;
  font-weight: 1000;
  overflow-wrap: anywhere;
}

.woo-detail-price {
  color: var(--primary-dark);
  font-size: clamp(24px, 2.5vw, 32px);
  font-weight: 1000;
  line-height: 1.2;
}

.woo-detail-status,
.product-spec-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.woo-detail-status span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: #f5f6f8;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.woo-detail-status .in-stock {
  background: #dcfce7;
  color: #15803d;
}

.woo-detail-status .out-stock {
  background: #fee2e2;
  color: #b91c1c;
}

.woo-detail-summary p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-seller-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.product-seller-strip div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.product-seller-strip strong,
.product-seller-strip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-seller-strip span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

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

.product-spec-grid span {
  display: grid;
  gap: 2px;
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f8fa;
}

.product-spec-grid small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.product-spec-grid strong {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.woo-detail-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.woo-detail-table th,
.woo-detail-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  vertical-align: top;
}

.woo-detail-table th {
  width: 110px;
  background: #f7f8fa;
  color: var(--muted);
  font-weight: 900;
}

.woo-detail-table tr:last-child th,
.woo-detail-table tr:last-child td {
  border-bottom: 0;
}

.woo-detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.woo-quantity-row {
  display: grid;
  grid-template-columns: auto 110px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f8fa;
  font-weight: 900;
}

.woo-quantity-row input {
  height: 38px;
  text-align: center;
  background: #fff;
}

.woo-detail-actions .primary-btn,
.woo-detail-actions .ghost-btn,
.woo-detail-actions .danger-btn,
.full-width {
  width: 100%;
  justify-content: center;
}

.woo-detail-tabs {
  display: grid;
  gap: 12px;
  padding: 0 18px 18px;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
  padding: 20px;
}

.detail-content h1 {
  margin: 0 0 10px;
}

.detail-content p {
  margin: 0;
  line-height: 1.8;
}

.detail-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: start;
}

.detail-actions {
  width: 100%;
  margin-top: 6px;
}

.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.cart-items-panel,
.cart-summary-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.cart-summary-panel {
  position: sticky;
  top: 74px;
}

.woo-cart-table {
  display: grid;
  gap: 10px;
}

.woo-cart-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 120px 130px 130px auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.cart-product-cell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: right;
}

.cart-product-cell img {
  width: 58px;
  height: 58px;
  border-radius: var(--radius);
  object-fit: cover;
  background: #f0f2f5;
}

.cart-product-cell strong,
.cart-product-cell small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-product-cell small,
.cart-price-cell,
.cart-qty-cell span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.cart-price-cell {
  color: var(--text);
}

.cart-qty-cell {
  display: grid;
  gap: 4px;
}

.cart-qty-cell input {
  height: 38px;
  text-align: center;
}

.cart-row-actions {
  display: flex;
  gap: 6px;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.cart-summary-row strong {
  color: var(--primary-dark);
}

.detail-section {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.detail-section h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.detail-section p {
  margin: 0;
  color: var(--text);
  line-height: 1.9;
}

.woo-related {
  margin: 0 22px 22px;
}

.detail-media {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.detail-media img,
.detail-media video {
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  object-fit: cover;
  background: #f0f2f5;
}

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

.media-preview img, .media-preview video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #f0f2f5;
}

.booking-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.booking-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0,0,0,.52);
}

.booking-dialog {
  position: relative;
  display: grid;
  gap: 12px;
  width: min(460px, 100%);
  padding: 18px;
}

.booking-dialog h3 {
  margin: 0;
}

.checkout-product-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7f8fa;
}

.checkout-product-summary img {
  width: 58px;
  height: 58px;
  border-radius: var(--radius);
  object-fit: cover;
}

.checkout-product-summary strong,
.checkout-product-summary small {
  display: block;
}

.checkout-product-summary small {
  color: var(--muted);
  font-weight: 900;
}

.checkout-total-line {
  padding: 10px 12px;
  border-radius: var(--radius);
  background: #e7f0ff;
  color: var(--primary-dark);
  font-weight: 1000;
}

.cart-checkout-dialog {
  width: min(560px, 100%);
}

.checkout-list {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}

.checkout-list div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7f8fa;
}

.checkout-list span {
  color: var(--primary-dark);
  font-weight: 1000;
}

.share-dialog textarea,
.share-dialog select {
  width: 100%;
}

.share-dialog textarea {
  min-height: 92px;
  resize: vertical;
}

.share-dialog-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border-radius: var(--radius);
  background: #f0f2f5;
}

.share-dialog-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.share-dialog-tabs button.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
}

.share-panel {
  display: grid;
  gap: 10px;
}

.share-panel[hidden] {
  display: none !important;
}

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

.share-platform-grid button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  font-weight: 900;
}

.share-platform-grid button:hover {
  background: #e7f3ff;
  color: var(--primary);
}

.share-platform-grid .ui-icon,
.share-dialog .mini-actions .ui-icon {
  width: 18px;
  height: 18px;
}

.booking-close {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #f0f2f5;
  color: var(--text);
  font-size: 22px;
  font-weight: 900;
}

.install-app-modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: start center;
  padding: 82px 18px 18px;
  background: rgba(0,0,0,.48);
}

.install-app-dialog {
  position: relative;
  display: grid;
  gap: 16px;
  width: min(680px, 100%);
  padding: 18px;
}

.install-app-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding-left: 36px;
}

.install-app-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
}

.install-app-head h3 {
  margin: 0 0 4px;
  font-size: 22px;
}

.install-app-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.install-device-help {
  padding: 12px;
  border: 1px solid rgba(24, 119, 242, .22);
  border-radius: var(--radius);
  background: #e7f0ff;
  color: var(--text);
  line-height: 1.8;
  font-weight: 800;
}

.install-platform-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.install-platform-card {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.install-platform-card span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: #f0f2f5;
  color: var(--primary);
}

.install-platform-card strong {
  font-size: 15px;
}

.install-platform-card small {
  color: var(--muted);
  line-height: 1.6;
}

.install-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.install-actions .primary-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.install-download-link {
  text-decoration: none;
}

.install-download-link.is-disabled {
  cursor: not-allowed;
  opacity: .55;
  filter: grayscale(.25);
}

.install-release-note {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.profile-hero { overflow: hidden; padding: 0; }
.profile-cover { min-height: 190px; background: linear-gradient(135deg, #1877f2, #44b0ff); }
.profile-cover.image-cover {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: cover;
}
.profile-summary { display: flex; align-items: end; gap: 16px; padding: 0 20px 20px; margin-top: -48px; }

.profile-photo {
  width: 112px;
  height: 112px;
  border: 5px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
}

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

.profile-resume div {
  padding: 12px;
  border-radius: var(--radius);
  background: #f7f8fa;
}

.profile-resume p {
  margin: 6px 0 0;
  line-height: 1.7;
  white-space: pre-wrap;
}

.profile-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.profile-gallery img,
.profile-gallery video {
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  object-fit: cover;
  background: #f0f2f5;
}

.publisher-action {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  border-color: rgba(24, 119, 242, .35);
  background: #f7fbff;
}

.publisher-action h3,
.publisher-action p {
  margin: 0;
}

.publisher-action p {
  margin-top: 6px;
  color: var(--muted);
}

.my-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px;
}

.my-page-shell {
  display: grid;
  gap: 14px;
}

.my-hero {
  overflow: hidden;
  padding: 0;
  border: 1px solid #dde2ea;
  background: #fff;
}

.my-hero-cover {
  display: block;
  width: 100%;
  height: 240px;
  background:
    linear-gradient(135deg, rgba(24, 119, 242, .86), rgba(0, 138, 106, .72)),
    radial-gradient(circle at 16% 20%, rgba(255,255,255,.32), transparent 34%);
  object-fit: cover;
}

.my-hero-body {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  padding: 0 20px 20px;
  margin-top: -48px;
}

.my-hero-person {
  display: flex;
  gap: 16px;
  align-items: end;
  min-width: 0;
}

.my-hero-person h1,
.my-hero-person p {
  margin: 0;
}

.my-hero-person h1 {
  color: var(--text);
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.15;
}

.my-hero-person p {
  max-width: 620px;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.55;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 4px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 950;
}

.my-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  min-width: 220px;
}

.my-overview-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.my-overview-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 92px;
  padding: 12px;
  border: 1px solid #dde2ea;
}

.my-overview-card.has-alert {
  border-color: rgba(220, 38, 38, .22);
  background: #fffafa;
}

.my-overview-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #e7f3ff;
  color: var(--primary);
}

.my-overview-card.has-alert .my-overview-icon {
  background: #fee2e2;
  color: #b91c1c;
}

.my-overview-icon .ui-icon {
  width: 21px;
  height: 21px;
}

.my-overview-card div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.my-overview-card strong {
  color: var(--text);
  font-size: 22px;
  font-weight: 950;
  line-height: 1;
}

.my-overview-card span:not(.my-overview-icon) {
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
}

.my-overview-card small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-action-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.my-action-card {
  display: grid;
  justify-items: start;
  gap: 6px;
  min-height: 100px;
  padding: 12px;
  border: 1px solid #dde2ea;
  background: #fff;
  color: var(--text);
  text-align: start;
  cursor: pointer;
}

.my-action-card:hover {
  border-color: rgba(24, 119, 242, .28);
  background: #f8fbff;
}

.my-action-card > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #f1f5f9;
  color: var(--primary);
}

.my-action-card .ui-icon {
  width: 18px;
  height: 18px;
}

.my-action-card strong {
  font-size: 14px;
  font-weight: 950;
}

.my-action-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.my-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
}

.pro-my-dashboard {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
}

.my-main,
.my-side {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.my-side {
  position: sticky;
  top: 126px;
}

.my-side-head {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-color: rgba(24, 119, 242, .22);
  background: #f8fbff;
}

.my-side-head strong {
  color: var(--text);
  font-size: 16px;
}

.my-side-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.my-content-section {
  display: grid;
  gap: 12px;
}

.my-panel {
  display: grid;
  gap: 10px;
}

.collapsible-panel {
  padding: 12px;
}

.collapsible-panel.is-collapsed {
  gap: 0;
}

.collapsible-panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.panel-toggle {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 38px;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  text-align: start;
  cursor: pointer;
}

.panel-toggle strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-arrow {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f0f2f5;
  color: var(--primary-dark);
  font-weight: 1000;
}

.panel-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: #e7f3ff;
  color: var(--primary);
}

.panel-icon .ui-icon {
  width: 16px;
  height: 16px;
}

.panel-count {
  justify-self: end;
}

.panel-count.has-new {
  background: #fee2e2;
  color: #b91c1c;
}

.collapsible-panel-body {
  display: grid;
  gap: 10px;
  padding-top: 10px;
}

.important-panel {
  border-color: rgba(24, 119, 242, .34);
  background: #f7fbff;
}

.managed-group-list {
  display: grid;
  gap: 8px;
}

.managed-group-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 58px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  text-align: start;
}

.managed-group-row:hover {
  border-color: rgba(24, 119, 242, .35);
  background: #e7f0ff;
}

.managed-group-row span:last-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.managed-group-row strong,
.managed-group-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.managed-group-row small {
  color: var(--muted);
  font-weight: 800;
}

.group-mini-cover.tiny {
  width: 42px;
  height: 42px;
  font-size: 13px;
}

.managed-group-row .group-mini-cover.image-cover {
  width: 42px;
  height: 42px;
}

.dashboard-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.dashboard-notification {
  margin-top: 6px;
}

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

.section-title-row h3 {
  margin: 0;
}

.open-row {
  width: 100%;
  border: 0;
  color: var(--text);
  text-align: start;
}

.messenger {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  min-height: calc(100vh - 112px);
  overflow: hidden;
  padding: 0;
  border-radius: var(--radius);
}

.messenger-sidebar {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border-left: 1px solid var(--line);
  background: #fff;
}

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

.messenger-title h1 {
  margin: 0;
  font-size: 24px;
}

.messenger-title p {
  margin: 4px 0 0;
  color: var(--muted);
}

.messenger-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #31a24c;
  box-shadow: 0 0 0 5px rgba(49, 162, 76, .12);
}

.messenger-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f0f2f5;
  color: var(--muted);
}

.messenger-search input {
  min-height: auto;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
}

.chat-list {
  display: grid;
  align-content: start;
  gap: 6px;
  overflow-y: auto;
  min-height: 0;
}

.chat-group-form {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.chat-group-form select {
  min-height: 92px;
}

.guest-participation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(42, 171, 238, .2);
  background: linear-gradient(135deg, #ffffff, #f8fcff);
}

.guest-participation div:first-child {
  display: grid;
  gap: 4px;
}

.guest-participation strong {
  color: var(--text);
  font-size: 15px;
}

.guest-participation span {
  color: var(--muted);
  font-size: 13px;
}

.seo-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.seo-link-grid a,
.seo-preview-grid a {
  color: var(--primary);
  font-weight: 800;
}

.seo-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.seo-preview-grid section {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.seo-preview-grid h2 {
  margin: 0 0 8px;
  font-size: 16px;
}

.seo-preview-grid ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-inline-start: 18px;
}

.seo-preview-grid p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 680px) {
  .guest-participation {
    align-items: stretch;
    flex-direction: column;
  }
}

.chat-list-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 68px;
  padding: 8px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  text-align: start;
}

.chat-list-item:hover,
.chat-list-item.active {
  background: #e7f0ff;
}

.chat-list-text {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.chat-list-text strong,
.chat-list-text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-list-text small,
.chat-list-meta time {
  color: var(--muted);
}

.chat-list-meta {
  display: grid;
  justify-items: end;
  gap: 4px;
  font-size: 12px;
}

.chat-list-meta b {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
}

.chat-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  min-width: 0;
  background:
    linear-gradient(rgba(239,242,245,.84), rgba(239,242,245,.84)),
    radial-gradient(circle at 18% 12%, rgba(32,166,122,.12), transparent 28%),
    radial-gradient(circle at 78% 82%, rgba(24,119,242,.10), transparent 32%);
}

.chat-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 74px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.chat-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.call-banner {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #e7f0ff;
  color: var(--primary-dark);
}

.whatsapp-call {
  background: #e8f7ef;
  color: #146c43;
}

.call-avatar {
  flex: 0 0 auto;
}

.call-banner div:first-child {
  display: grid;
  gap: 3px;
}

.call-banner span {
  font-size: 12px;
  font-weight: 800;
}

.chat-person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mobile-chat-back {
  display: none;
}

.chat-person div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.chat-person span:not(.avatar) {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 9px;
  overflow-y: auto;
  min-height: 0;
  padding: 18px;
  direction: ltr;
}

.message-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  width: fit-content;
  max-width: min(74%, 680px);
  position: relative;
  direction: ltr;
}

.message-row.mine {
  align-self: flex-end;
}

.message-row.theirs {
  align-self: flex-start;
}

.message-bubble {
  position: relative;
  display: grid;
  gap: 6px;
  min-width: 110px;
  padding: 8px 10px 6px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 1px rgba(15, 23, 42, .10);
  color: var(--text);
  direction: rtl;
  text-align: right;
}

.message-row.mine .message-bubble {
  background: #d9fdd3;
  color: #0b2817;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 3px;
}

.message-row.theirs .message-bubble {
  background: #fff;
  color: var(--text);
  border-bottom-right-radius: 12px;
  border-bottom-left-radius: 3px;
}

.message-author {
  color: var(--muted);
  font-size: 12px;
}

.message-bubble p {
  margin: 0;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message-bubble time {
  display: block;
  color: inherit;
  font-size: 11px;
  opacity: .58;
}

.typing-indicator {
  align-self: flex-start;
  direction: rtl;
  padding: 7px 11px;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  box-shadow: 0 1px 1px rgba(15, 23, 42, .08);
}

.chat-media {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 2px;
}

.media-open-link,
.chat-media-open {
  display: block;
  min-width: 0;
}

.chat-media img,
.chat-media video {
  width: 100%;
  max-height: 260px;
  border-radius: 10px;
  object-fit: cover;
  background: #000;
}

.chat-audio,
.chat-files {
  display: grid;
  gap: 6px;
  margin-top: 2px;
}

.chat-audio audio {
  width: min(320px, 100%);
}

.voice-note {
  display: grid;
  gap: 6px;
  min-width: min(320px, 70vw);
  padding: 8px;
  border-radius: 12px;
  background: rgba(255,255,255,.55);
}

.voice-note span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.message-reaction-trigger {
  position: absolute;
  bottom: 8px;
  left: -30px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 999px;
  background: linear-gradient(180deg, #fff, #f7f8fa);
  color: var(--muted);
  font-size: 13px;
  font-weight: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,.14);
  opacity: .86;
}

.reaction-plus {
  margin-inline-end: -2px;
  font-size: 14px;
  line-height: 1;
}

.reaction-plus .ui-icon {
  width: 11px;
  height: 11px;
}

.reaction-trigger-symbol {
  display: inline-grid;
  place-items: center;
  width: 13px;
  height: 13px;
  color: var(--primary-dark);
  line-height: 1;
}

.reaction-trigger-symbol .ui-icon {
  width: 14px;
  height: 14px;
}

.reaction-emoji {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: var(--primary-dark);
  line-height: 1;
}

.reaction-emoji .ui-icon {
  width: 22px;
  height: 22px;
}

.message-reaction-trigger:hover,
.message-row.show-reactions .message-reaction-trigger {
  background: #fff;
  color: var(--primary-dark);
  opacity: 1;
  border-color: rgba(24, 119, 242, .22);
}

.message-row.mine .message-reaction-trigger {
  right: -30px;
  left: auto;
}

.message-reactions {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 4;
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
  backdrop-filter: blur(8px);
}

.message-row.mine .message-reactions {
  right: 0;
  left: auto;
}

.message-row.show-reactions .message-reactions {
  display: flex;
}

.message-reactions button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.04);
  transition: transform .14s ease, background-color .14s ease, box-shadow .14s ease;
}

.message-reactions button:hover {
  background: #f0f2f5;
  box-shadow: 0 5px 14px rgba(0,0,0,.12);
  transform: translateY(-2px) scale(1.08);
}

.reaction-summary {
  width: fit-content;
  display: inline-flex;
  gap: 1px;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
}

.reaction-summary .reaction-emoji {
  width: 18px;
  height: 18px;
}

.reaction-summary .reaction-emoji .ui-icon {
  width: 16px;
  height: 16px;
}

.chat-file {
  display: grid;
  gap: 2px;
  min-width: min(280px, 100%);
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
}

.chat-file:hover {
  border-color: rgba(32, 166, 122, .45);
  background: #f4fbf7;
}

.chat-file span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
}

.chat-file small {
  color: var(--muted);
  font-weight: 800;
}

.chat-composer {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.chat-tool-btn.is-recording {
  border-color: #ef4444;
  background: #fee2e2;
  color: #b91c1c;
}

.chat-composer textarea {
  min-height: 44px;
  max-height: 130px;
  border-radius: 18px;
  background: #f0f2f5;
}

.chat-upload-status {
  padding: 0 14px 12px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chat-attachment-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px 0;
  background: #fff;
}

.chat-attachment-preview:empty {
  display: none;
}

.chat-attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: min(260px, 100%);
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7f8fa;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.chat-attachment-chip strong {
  color: #128c7e;
}

.chat-attachment-chip small {
  color: var(--muted);
}

.metric, .admin-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius);
  background: #f7f8fa;
}

.admin-list { display: grid; gap: 8px; }
.danger { color: var(--danger); }

.admin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
  gap: 16px;
  align-items: end;
}

.admin-hero h1 {
  margin: 4px 0;
  font-size: clamp(1.45rem, 2.4vw, 2.2rem);
}

.admin-hero-tools {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-hero-tools input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  background: var(--control-bg);
}

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

.admin-stat {
  display: grid;
  gap: 5px;
  min-height: 118px;
}

.admin-stat span,
.admin-stat small,
.admin-row-main small {
  color: var(--muted);
}

.admin-stat strong {
  font-size: 2rem;
  line-height: 1;
}

.admin-section-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.admin-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.admin-section-card {
  display: grid;
  gap: 12px;
}

.admin-section-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #eef4ff;
  color: var(--primary);
}

.admin-control-row {
  align-items: center;
  background: var(--surface);
  border: 1px solid transparent;
}

.admin-control-row:hover {
  border-color: var(--line);
  background: #fff;
}

.admin-row-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.admin-row-main strong,
.admin-row-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-row-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.notification-item,
.request-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: var(--radius);
  background: #f7f8fa;
}

.notification-item {
  grid-template-columns: minmax(0, 1fr);
}

.notification-item.unread {
  border: 1px solid rgba(24, 119, 242, .22);
  background: #e7f0ff;
}

.notification-item.actionable {
  width: 100%;
  border: 0;
  text-align: start;
  cursor: pointer;
}

.notifications-dropdown {
  position: fixed;
  top: 66px;
  left: 16px;
  z-index: 120;
  display: grid;
  gap: 10px;
  width: min(420px, calc(100vw - 32px));
  max-height: min(620px, calc(100vh - 86px));
  overflow: auto;
  padding: 14px;
  box-shadow: 0 18px 42px rgba(0,0,0,.18);
}

.notifications-dropdown-list {
  display: grid;
  gap: 8px;
}

.notification-item.actionable:hover {
  background: #dbeafe;
}

.notification-item small {
  color: var(--muted);
  font-weight: 800;
}

.notification-item.unread {
  background: #e7f0ff;
  color: var(--primary-dark);
  font-weight: 900;
}

.request-list {
  display: grid;
  gap: 8px;
}

.mini-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.company-hero,
.company-page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px) auto;
  gap: 14px;
  align-items: center;
}

.company-hero {
  padding: 18px;
}

.company-hero h1,
.company-page h1 {
  margin: 4px 0;
  font-size: 28px;
  line-height: 1.25;
}

.company-hero p,
.company-page p {
  margin: 0;
  color: var(--muted);
}

.company-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  font-weight: 800;
}

.company-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
}

.company-hero-stats,
.company-dashboard-grid,
.company-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.company-hero-stats span,
.company-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f6f7f9;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.company-create {
  margin-top: 12px;
  padding: 16px;
}

.company-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.company-card {
  display: grid;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
}

.company-card-cover,
.company-page-cover {
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #e7f0ff, #f6f7f9);
  color: var(--primary);
  font-weight: 900;
}

.company-card-cover {
  height: 116px;
  font-size: 30px;
}

.company-card-cover img,
.company-page-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.company-card-body {
  display: grid;
  gap: 8px;
  padding: 0 14px 14px;
}

.company-logo {
  width: 58px;
  height: 58px;
  margin-top: -30px;
  border: 4px solid #fff;
  border-radius: 8px;
  background: #fff;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .14);
}

.company-logo.large {
  width: 92px;
  height: 92px;
  margin-top: -52px;
}

.text-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-weight: 900;
}

.company-card h3 {
  margin: 0;
  font-size: 18px;
}

.company-card p {
  margin: 0;
  color: var(--muted);
  min-height: 22px;
}

.company-card-actions,
.company-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.company-page {
  padding: 0;
  overflow: hidden;
}

.company-page-cover {
  height: 220px;
  font-size: 38px;
}

.company-page-head {
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 0 18px 18px;
}

.company-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 0 18px 18px;
}

.company-admin-layout,
.company-sections {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.company-admin-layout {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.company-admin-panel,
.company-sections > .social-card {
  padding: 16px;
}

.company-team-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.company-team-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  text-align: inherit;
}

.company-team-row span,
.company-team-row small {
  display: block;
  min-width: 0;
}

.company-team-row small {
  color: var(--muted);
  font-size: 12px;
}

.business-hero,
.business-page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px) auto;
  gap: 14px;
  align-items: center;
}

.business-hero {
  padding: 18px;
}

.business-hero h1,
.business-page h1 {
  margin: 4px 0;
  font-size: 28px;
  line-height: 1.25;
}

.business-hero p,
.business-page p {
  margin: 0;
  color: var(--muted);
}

.business-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.business-card {
  display: grid;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
}

.business-card-cover,
.business-page-cover {
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #f7f9fc, #e8f1ff);
  color: var(--primary);
  font-weight: 900;
}

.business-card-cover {
  height: 132px;
  font-size: 28px;
}

.business-card-cover img,
.business-page-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.business-card-body {
  display: grid;
  gap: 10px;
  padding: 0 14px 14px;
}

.business-logo {
  width: 62px;
  height: 62px;
  margin-top: -32px;
  border: 4px solid #fff;
  border-radius: 10px;
  background: #fff;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .14);
}

.business-logo.large {
  width: 98px;
  height: 98px;
  margin-top: -54px;
}

.business-card h3 {
  margin: 0;
  font-size: 19px;
}

.business-card p {
  min-height: 42px;
  margin: 0;
  color: var(--muted);
}

.business-owner-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.business-page {
  padding: 0;
  overflow: hidden;
}

.business-page-cover {
  height: 240px;
  font-size: 38px;
}

.business-page-head {
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 0 18px 18px;
}

.business-layout {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.business-about,
.business-video-panel,
.business-catalog-panel,
.business-editor {
  padding: 16px;
}

.business-video-panel video {
  width: 100%;
  max-height: 520px;
  border-radius: var(--radius);
  background: #000;
}

.business-catalog,
.business-current-media {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.business-catalog img,
.business-catalog video,
.business-current-media img,
.business-current-media video {
  width: 100%;
  height: 150px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f6f7f9;
  object-fit: cover;
}

.business-current-media {
  margin: 10px 0;
  align-items: end;
}

.business-current-media span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.company-media-hub,
.company-story-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  margin-top: 14px;
}

.company-gallery-panel {
  grid-column: 1 / -1;
}

.company-video-panel video {
  width: 100%;
  max-height: 420px;
  border-radius: var(--radius);
  background: #000;
}

.company-story-list {
  display: grid;
  gap: 10px;
}

.company-story-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fff;
}

.company-story-item p {
  margin: 6px 0 0;
  color: var(--muted);
}

.my-contracts-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 14px;
}

.jobs-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 18px;
}

.jobs-hero h1 {
  margin: 4px 0;
  font-size: 28px;
  line-height: 1.25;
}

.jobs-hero p {
  margin: 0;
  color: var(--muted);
}

.jobs-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  margin-top: 14px;
}

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

.jobs-list.compact {
  margin-top: 10px;
}

.job-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px;
}

.job-company-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  background: #eef4ff;
  color: var(--primary);
  font-weight: 900;
  overflow: hidden;
}

.job-company-mark.large {
  width: 86px;
  height: 86px;
}

.job-company-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.job-card-main {
  display: grid;
  gap: 8px;
}

.job-card h3 {
  margin: 0;
  font-size: 18px;
}

.job-card p,
.job-detail p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.job-meta span,
.job-meta a {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f6f7f9;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.job-card-actions,
.applicant-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.job-detail {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.job-detail-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}

.job-detail-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.job-detail-hero-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid #dbe7f6;
  border-radius: 14px;
  background:
    radial-gradient(circle at 8% 12%, rgba(24,119,242,.12), transparent 30%),
    linear-gradient(135deg, #ffffff 0%, #f4f8ff 52%, #eefaf5 100%);
}

.job-detail-title {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.job-detail-head h1 {
  margin: 4px 0;
  font-size: 30px;
  line-height: 1.25;
}

.job-detail-location {
  font-weight: 800;
}

.job-detail-highlights {
  display: grid;
  grid-template-columns: repeat(4, minmax(96px, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.job-detail-highlights span {
  display: grid;
  gap: 2px;
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid rgba(24,119,242,.14);
  border-radius: 10px;
  background: rgba(255,255,255,.78);
}

.job-detail-highlights b {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 1000;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-detail-highlights small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.job-detail-actions {
  min-width: 176px;
}

.job-detail-actions .primary-btn,
.job-detail-actions .ghost-btn {
  width: 100%;
  justify-content: center;
}

.job-detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 14px;
  align-items: start;
}

.job-detail-main,
.job-detail-side {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.job-detail-side {
  position: sticky;
  top: 118px;
}

.job-detail-panel,
.job-info-card {
  border-radius: 14px;
}

.job-detail-panel h3,
.job-info-card h3 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.job-detail-panel .ui-icon,
.job-info-card .ui-icon {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.job-info-table {
  margin-top: 10px;
}

.company-admin-panel.wide {
  grid-column: span 2;
}

.applicant-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.applicant-list {
  display: grid;
  gap: 8px;
}

.applicant-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.applicant-row p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.academy-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  padding: 20px;
}

.academy-hero h1 {
  margin: 6px 0;
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1.25;
}

.academy-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.edunova-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: stretch;
  padding: 18px;
  overflow: hidden;
}

.edunova-hero-copy {
  display: grid;
  align-content: center;
  gap: 12px;
}

.edunova-hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(25px, 3vw, 42px);
  line-height: 1.25;
}

.edunova-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.edunova-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.edunova-actions .ui-icon {
  width: 18px;
  height: 18px;
}

.edunova-command-card {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 14px;
  border: 1px solid rgba(24, 119, 242, .18);
  border-radius: var(--radius);
  background: #f7fbff;
}

.learning-focus-card {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 14px;
  border: 1px solid rgba(46, 125, 50, .2);
  border-radius: var(--radius);
  background: #f5fbf6;
}

.learning-focus-card p {
  color: var(--text);
  font-weight: 900;
}

.edunova-command-card strong {
  font-size: 16px;
}

.edunova-command-card p {
  font-size: 13px;
}

.edunova-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.edunova-search .ui-icon {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.edunova-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.edunova-metrics,
.edunova-paths {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.edunova-metric,
.edunova-path {
  display: grid;
  gap: 9px;
  padding: 14px;
}

.edunova-metric {
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
}

.edunova-metric > span,
.edunova-path-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: #edf5ff;
  color: var(--primary);
}

.edunova-metric .ui-icon,
.edunova-path-icon .ui-icon {
  width: 22px;
  height: 22px;
}

.edunova-metric small,
.edunova-metric em {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}

.edunova-metric strong {
  display: block;
  margin: 2px 0;
  font-size: 21px;
  line-height: 1.2;
}

.edunova-path p {
  margin: 0;
  min-height: 48px;
  color: var(--muted);
  line-height: 1.6;
}

.edunova-field-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
  padding: 12px;
}

.edunova-field-strip strong {
  margin-inline-end: 4px;
}

.academy-results-head {
  margin-bottom: 10px;
}

.academy-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  margin-top: 14px;
}

.academy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.course-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 0;
  overflow: hidden;
}

.course-card-cover {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  background: #eef4ff;
  color: var(--primary);
  overflow: hidden;
}

.course-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.course-card-cover .ui-icon {
  width: 54px;
  height: 54px;
}

.course-card-body {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.course-card h3 {
  margin: 0;
  line-height: 1.35;
}

.course-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-owner-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-weight: 900;
}

.course-owner-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.course-detail {
  padding: 0;
  overflow: hidden;
}

.course-detail .detail-toolbar {
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.course-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 420px;
  gap: 16px;
  padding: 16px;
}

.course-cover-panel {
  display: grid;
  gap: 10px;
  align-content: start;
}

.course-cover-panel img,
.course-cover-panel video {
  width: 100%;
  border-radius: var(--radius);
  background: #111;
  object-fit: cover;
  display: block;
}

.course-cover-panel img {
  aspect-ratio: 16 / 9;
}

.course-cover-placeholder {
  display: grid;
  place-items: center;
  min-height: 280px;
  border-radius: var(--radius);
  background: #eef4ff;
  color: var(--primary);
}

.course-cover-placeholder .ui-icon {
  width: 72px;
  height: 72px;
}

.course-summary-panel {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.course-summary-panel h1 {
  margin: 0;
  line-height: 1.25;
}

.course-summary-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.course-progress-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7f8fa;
}

.progress-track {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #e4e6eb;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.certificate-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(46, 125, 50, .25);
  border-radius: var(--radius);
  background: #f1f8f3;
  color: #1b5e20;
}

.certificate-card .ui-icon {
  width: 30px;
  height: 30px;
}

.course-lessons-panel,
.course-quiz-panel,
.course-reviews-panel,
.detail-section-panel {
  margin: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.course-lesson-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.course-lesson-card:first-of-type {
  border-top: 0;
}

.lesson-number {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #e7f0ff;
  color: var(--primary);
  font-weight: 1000;
}

.course-lesson-card.is-complete .lesson-number {
  background: #e8f5e9;
  color: var(--green);
}

.course-lesson-card h4 {
  margin: 0;
}

.course-lesson-card p {
  margin: 6px 0;
  color: var(--muted);
  line-height: 1.65;
}

.course-lesson-video {
  width: 100%;
  max-height: 420px;
  margin-top: 10px;
  border-radius: var(--radius);
  background: #111;
}

.course-lesson-comments {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.course-quiz-form {
  display: grid;
  gap: 12px;
}

.course-quiz-form fieldset {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}

.course-quiz-form label {
  display: flex;
  gap: 8px;
  align-items: center;
}

.course-review-list,
.learning-list {
  display: grid;
  gap: 12px;
}

.review-row,
.learning-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
}

.learning-row > img,
.learning-placeholder {
  width: 96px;
  height: 64px;
  border-radius: var(--radius);
  object-fit: cover;
  background: #eef4ff;
  color: var(--primary);
  display: grid;
  place-items: center;
}

.learning-row strong,
.learning-row small {
  display: block;
  min-width: 0;
}

.learning-row small {
  color: var(--muted);
  margin: 4px 0 8px;
}

.learning-progress {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.teacher-admin-head,
.teacher-page {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
}

.teacher-admin-cover,
.teacher-page-cover {
  display: grid;
  place-items: center;
  width: 220px;
  height: 140px;
  border-radius: var(--radius);
  background: #eef4ff;
  color: var(--primary);
  overflow: hidden;
}

.teacher-admin-cover .ui-icon,
.teacher-page-cover .ui-icon {
  width: 54px;
  height: 54px;
}

.teacher-directory-hero {
  align-items: stretch;
}

.teacher-feature-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.teacher-feature-strip span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(24, 119, 242, .14);
  border-radius: 999px;
  background: #f7fbff;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.teacher-feature-strip .ui-icon {
  width: 17px;
  height: 17px;
  color: var(--primary);
}

.teacher-admin-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.teacher-admin-metric {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 94px;
  padding: 12px;
}

.teacher-admin-metric-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: #edf5ff;
  color: var(--primary);
}

.teacher-admin-metric .ui-icon {
  width: 22px;
  height: 22px;
}

.teacher-admin-metric small,
.teacher-admin-metric em {
  display: block;
  min-width: 0;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}

.teacher-admin-metric strong {
  display: block;
  min-width: 0;
  margin: 3px 0;
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.teacher-admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
  margin-top: 14px;
}

.teacher-admin-main,
.teacher-admin-side,
.teacher-compact-list,
.teacher-student-list,
.teacher-discussion-list {
  display: grid;
  gap: 12px;
}

.teacher-panel,
.teacher-content-panel {
  padding: 16px;
}

.teacher-section-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.teacher-section-grid > .course-lesson-card,
.teacher-file-card,
.teacher-section-grid > .teacher-exam-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.teacher-section-grid > .course-lesson-card,
.teacher-section-grid > .teacher-exam-card {
  border-top: 1px solid var(--line);
}

.teacher-file-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.teacher-file-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--primary);
}

.teacher-file-icon .ui-icon {
  width: 23px;
  height: 23px;
}

.teacher-file-body {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.teacher-file-body h3,
.teacher-file-body p {
  margin: 0;
  overflow-wrap: anywhere;
}

.teacher-file-body p {
  color: var(--muted);
  line-height: 1.65;
}

.teacher-file-card.is-locked {
  background: #fbfcfd;
}

.teacher-page-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  grid-column: span 2;
}

.teacher-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.teacher-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
}

.teacher-tabs button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  padding: 0 14px;
  font-weight: 900;
}

.teacher-tabs button.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.teacher-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
}

.teacher-overview p,
.teacher-payment-box p,
.teacher-enroll-box p {
  color: var(--muted);
  line-height: 1.7;
}

.teacher-overview video {
  width: 100%;
  border-radius: var(--radius);
  background: #111;
}

.teacher-media-preview {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7f8fa;
}

.teacher-media-preview video {
  width: 100%;
  max-height: 260px;
  border-radius: var(--radius);
  background: #111;
}

.teacher-overview-body {
  display: grid;
  gap: 12px;
}

.teacher-info-table {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.teacher-info-table span,
.teacher-info-table strong {
  min-width: 0;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.teacher-info-table span:nth-last-child(-n+2),
.teacher-info-table strong:nth-last-child(-n+1) {
  border-bottom: 0;
}

.teacher-info-table span {
  background: #f7f8fa;
  color: var(--muted);
  font-weight: 900;
}

.teacher-info-table strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.teacher-payment-box,
.teacher-enroll-box,
.teacher-locked-box {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7f8fa;
}

.teacher-progress-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 280px) auto;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbff;
}

.teacher-progress-panel p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.teacher-progress-meter {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #dbe7f7;
}

.teacher-progress-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #16a34a);
}

.teacher-progress-percent {
  min-width: 58px;
  text-align: center;
  color: var(--primary);
}

.teacher-progress-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.teacher-progress-stats span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  font-weight: 900;
}

.teacher-enroll-box textarea,
.teacher-enroll-box input {
  width: 100%;
}

.compact-unlock {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.teacher-item-unlock {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.teacher-item-unlock input {
  width: 100%;
}

.teacher-locked-box {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  color: var(--muted);
}

.teacher-locked-box .ui-icon {
  width: 28px;
  height: 28px;
  color: var(--primary);
}

.teacher-exam-card {
  display: grid;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.teacher-exam-card:first-child {
  border-top: 0;
}

.teacher-section-grid > .teacher-exam-card:first-child {
  border-top: 1px solid var(--line);
}

.teacher-compact-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.teacher-compact-row strong,
.teacher-compact-row span,
.teacher-compact-row small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.teacher-student-row {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.teacher-student-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.teacher-student-head small {
  color: var(--muted);
}

.teacher-access-picker {
  display: grid;
  gap: 6px;
  max-height: 210px;
  overflow: auto;
  padding: 8px;
  border-radius: var(--radius);
  background: #f7f8fa;
}

.teacher-access-picker label {
  display: flex;
  gap: 7px;
  align-items: center;
  color: var(--text);
}

.teacher-question-builder,
.teacher-question-list,
.teacher-learning-notes {
  display: grid;
  gap: 12px;
}

.teacher-question-builder {
  padding: 12px;
  border: 1px solid rgba(24, 119, 242, .14);
  border-radius: var(--radius);
  background: #fbfcff;
}

.teacher-question-row,
.teacher-learning-note {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.teacher-question-grid,
.teacher-options-grid {
  display: grid;
  gap: 8px;
}

.teacher-question-grid {
  grid-template-columns: 150px minmax(0, 1fr) minmax(180px, .45fr);
}

.teacher-options-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.teacher-question-row textarea,
.teacher-question-row input,
.teacher-question-row select {
  width: 100%;
}

.teacher-learning-notes {
  margin-top: 12px;
}

.teacher-learning-note {
  border-inline-start: 4px solid #f59e0b;
}

.teacher-learning-note.is-correct {
  border-inline-start-color: #16a34a;
}

.teacher-learning-note span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.teacher-learning-note p {
  margin: 0;
  color: var(--text);
  line-height: 1.7;
}

.edunova-hero,
.academy-hero.teacher-directory-hero,
.teacher-admin-head,
.teacher-page {
  border-color: rgba(24, 119, 242, .14);
  background: linear-gradient(135deg, #ffffff 0%, #f7fbff 56%, #f2fbf6 100%);
}

.edunova-hero,
.academy-hero.teacher-directory-hero {
  min-height: 248px;
}

.edunova-hero h1,
.academy-hero h1,
.teacher-page-head h1,
.teacher-admin-head h1 {
  margin: 4px 0;
  font-size: 30px;
  line-height: 1.25;
}

.edunova-command-card,
.learning-focus-card {
  background: #fff;
  border-color: rgba(15, 23, 42, .10);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}

.edunova-search:focus-within,
.teacher-item-unlock:focus-within,
.compact-unlock:focus-within {
  border-color: rgba(24, 119, 242, .35);
}

.edunova-metric,
.edunova-path,
.course-card,
.learning-row {
  border-color: rgba(15, 23, 42, .09);
  background: #fff;
}

.edunova-metric {
  min-height: 88px;
}

.edunova-metric:nth-child(2n) > span,
.edunova-path:nth-child(2n) .edunova-path-icon {
  background: #eefaf2;
  color: #15803d;
}

.edunova-path {
  align-content: start;
  min-height: 178px;
}

.edunova-path button {
  margin-top: auto;
}

.edunova-field-strip {
  border-color: rgba(15, 23, 42, .08);
  background: #fff;
}

.academy-layout {
  align-items: start;
}

.academy-layout > section {
  min-width: 0;
}

.academy-layout .directory-filters {
  border-top: 4px solid var(--primary);
  background: #fff;
}

.academy-layout .directory-filters input,
.academy-layout .directory-filters select {
  min-height: 40px;
}

.academy-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.course-card {
  min-height: 372px;
}

.course-card-cover {
  position: relative;
  background: linear-gradient(135deg, #eef4ff 0%, #f3faf6 100%);
}

.course-card-cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, .16) 100%);
  pointer-events: none;
}

.course-card-cover img {
  transition: transform .2s ease;
}

.course-card:hover .course-card-cover img {
  transform: scale(1.025);
}

.course-card-body {
  gap: 10px;
  padding: 14px;
}

.course-card h3,
.teacher-file-body h3,
.teacher-exam-card h3 {
  line-height: 1.35;
}

.course-card p {
  display: -webkit-box;
  min-height: 50px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-owner-row {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.course-detail {
  padding: 0;
  overflow: hidden;
}

.course-detail .detail-toolbar {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.course-detail-hero {
  padding: 16px;
  background: #f8fbff;
}

.course-summary-panel {
  border-top: 4px solid var(--primary);
}

.progress-track span,
.teacher-progress-meter span {
  background: linear-gradient(90deg, var(--primary), #16a34a);
}

.course-lessons-panel,
.course-quiz-panel,
.course-reviews-panel,
.detail-section-panel {
  margin: 12px 16px 16px;
}

.course-lesson-card {
  margin-top: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.course-lesson-card:first-of-type {
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.course-lesson-video {
  border: 1px solid rgba(15, 23, 42, .18);
}

.course-quiz-form fieldset {
  background: #fbfcff;
}

.teacher-admin-cover,
.teacher-page-cover {
  height: 160px;
  border: 1px solid rgba(24, 119, 242, .12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .65);
}

.teacher-admin-summary {
  gap: 12px;
}

.teacher-admin-metric,
.teacher-panel,
.teacher-content-panel {
  border-color: rgba(15, 23, 42, .09);
}

.teacher-admin-metric:nth-child(2n) .teacher-admin-metric-icon {
  background: #eefaf2;
  color: #15803d;
}

.teacher-panel > .section-title-row,
.teacher-content-panel > .section-title-row {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.teacher-tabs {
  border-color: rgba(15, 23, 42, .08);
  background: #fff;
}

.teacher-tabs button {
  flex: 1 1 130px;
  border-radius: var(--radius);
}

.teacher-tabs button.active {
  box-shadow: 0 8px 18px rgba(24, 119, 242, .18);
}

.teacher-section-grid {
  gap: 14px;
}

.teacher-section-grid > .course-lesson-card,
.teacher-file-card,
.teacher-section-grid > .teacher-exam-card {
  border-inline-start: 4px solid rgba(24, 119, 242, .30);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
}

.teacher-section-grid > .course-lesson-card.is-complete {
  border-inline-start-color: #16a34a;
}

.teacher-exam-card,
.teacher-file-card {
  background: #fff;
}

.teacher-file-card.is-locked,
.teacher-locked-box {
  background: #fffaf3;
  border-color: #fed7aa;
}

.teacher-locked-box {
  color: #7c2d12;
}

.teacher-item-unlock input,
.compact-unlock input {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 0 10px;
}

.teacher-progress-panel {
  border-inline-start: 4px solid #16a34a;
  background: #fff;
}

.teacher-compact-row {
  background: #fbfcff;
}

.teacher-access-picker {
  border: 1px dashed rgba(24, 119, 242, .22);
  background: #fff;
}

.learning-row {
  border-inline-start: 4px solid rgba(24, 119, 242, .22);
}

.learning-progress strong {
  color: var(--primary);
}

.success-chip {
  background: #e8f5e9;
  color: #1b5e20;
  border-color: rgba(46, 125, 50, .24);
}

.profile-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.profile-stats-row span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f6f7f9;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.follow-strip {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.followers-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.follower-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  text-align: inherit;
}

.follower-row span,
.follower-row small {
  display: block;
  min-width: 0;
}

.follower-row small {
  color: var(--muted);
  font-size: 12px;
}

.social-card,
.side-button,
.contact-row,
.nav button,
.primary-btn,
.ghost-btn,
.tool-button,
.upload-btn {
  transition: background-color .16s ease, color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.social-card:hover {
  border-color: rgba(23, 105, 224, .18);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .10);
}

.openable-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lift);
}

.focus-panel {
  border-color: rgba(24, 119, 242, .45);
  box-shadow: 0 0 0 3px rgba(24, 119, 242, .12);
}

.empty {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.78);
  color: var(--muted);
  text-align: center;
  font-weight: 900;
}

html[dir="ltr"] .toast {
  left: auto;
  right: 18px;
}

html[dir="ltr"] .incoming-call-actions {
  justify-content: flex-start;
}

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

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: auto minmax(220px, 1fr) auto;
  }

  .nav {
    justify-content: flex-start;
  }

  html[dir="ltr"] .nav {
    justify-content: flex-start;
  }

  .nav button,
  .nav-menu-trigger {
    min-width: 96px;
  }

  .social-layout { grid-template-columns: 240px minmax(0, 1fr); }
  .right-rail { display: none; }
  .market-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .groups-hero { grid-template-columns: 1fr; }
  .groups-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .groups-compact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .groups-compact-head { grid-template-columns: 1fr; }
  .woo-detail-main { grid-template-columns: 1fr; }
  .woo-detail-thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cart-layout { grid-template-columns: 1fr; }
  .cart-summary-panel { position: static; }
  .woo-cart-row { grid-template-columns: minmax(0, 1fr) 100px 120px; }
  .cart-price-cell:nth-of-type(2), .cart-row-actions { grid-column: 1 / -1; }
  .directory-hero { grid-template-columns: 1fr; }
  .directory-layout { grid-template-columns: 1fr; }
  .directory-filters { position: static; }
  .company-hero,
  .company-admin-layout,
  .academy-hero,
  .edunova-hero,
  .edunova-metrics,
  .edunova-paths,
  .academy-layout,
  .course-detail-hero,
  .teacher-admin-head,
  .teacher-admin-layout,
  .teacher-page,
  .teacher-overview,
  .jobs-hero,
  .jobs-layout,
  .job-detail-content { grid-template-columns: 1fr; }
  .edunova-metrics,
  .edunova-paths { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .teacher-admin-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .company-page-head { grid-template-columns: auto minmax(0, 1fr); }
  .company-page-actions { grid-column: 1 / -1; }
  .company-dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .company-admin-panel.wide { grid-column: auto; }
  .job-card,
  .job-detail-head,
  .applicant-row { grid-template-columns: auto minmax(0, 1fr); }
  .job-card-actions,
  .applicant-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .job-detail-side { position: static; }
  .job-detail-actions { min-width: 0; }
  .job-detail-actions .primary-btn,
  .job-detail-actions .ghost-btn { width: auto; }
  .applicant-filters { grid-template-columns: 1fr; }
  .service-card {
    grid-template-columns: 200px minmax(0, 1fr);
    grid-template-areas:
      "gallery head"
      "gallery desc"
      "gallery info"
      "gallery video"
      "gallery actions";
  }
  .service-detail-hero { grid-template-columns: 1fr; }
  .service-detail-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .messenger { grid-template-columns: 300px minmax(0, 1fr); }
}

@media (max-width: 820px) {
  body {
    padding-bottom: 0;
    background: #eef2f7;
  }

  .company-hero h1,
  .company-page h1 {
    font-size: 22px;
  }

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

  .company-page-cover {
    height: 170px;
  }

  .company-page-head {
    grid-template-columns: 1fr;
  }

  .company-logo.large {
    margin-top: -48px;
  }

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

  .academy-hero {
    padding: 12px;
  }

  .edunova-hero {
    padding: 12px;
    min-height: 0;
  }

  .edunova-hero h1,
  .academy-hero h1,
  .teacher-page-head h1,
  .teacher-admin-head h1 {
    font-size: 24px;
  }

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

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

  .course-card {
    min-height: 0;
  }

  .course-card p {
    min-height: 0;
    -webkit-line-clamp: 3;
  }

  .course-detail-hero {
    padding: 8px;
  }

  .course-lessons-panel,
  .course-quiz-panel,
  .course-reviews-panel,
  .detail-section-panel {
    margin: 8px;
    padding: 12px;
  }

  .course-lesson-card {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .teacher-file-card {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .teacher-file-icon {
    width: 38px;
    height: 38px;
  }

  .course-lesson-card > button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .learning-row {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .learning-row > img,
  .learning-placeholder {
    width: 72px;
    height: 54px;
  }

  .learning-progress {
    grid-column: 1 / -1;
    justify-items: start;
  }

  .teacher-admin-cover,
  .teacher-page-cover {
    width: 100%;
    height: 160px;
  }

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

  .teacher-tabs button {
    width: 100%;
    padding: 0 8px;
  }

  .teacher-admin-summary {
    grid-template-columns: 1fr;
  }

  .teacher-admin-metric {
    min-height: 78px;
  }

  .teacher-page-head {
    grid-template-columns: 1fr;
    grid-column: auto;
  }

  .teacher-page-actions,
  .compact-unlock,
  .teacher-item-unlock {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .teacher-page-actions > *,
  .compact-unlock button,
  .teacher-item-unlock button {
    width: 100%;
  }

  .teacher-progress-panel {
    grid-template-columns: 1fr;
  }

  .teacher-progress-stats {
    justify-content: stretch;
  }

  .teacher-progress-stats span {
    flex: 1 1 120px;
    text-align: center;
  }

  .teacher-question-grid,
  .teacher-options-grid {
    grid-template-columns: 1fr;
  }

  .teacher-compact-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .teacher-compact-row button,
  .teacher-compact-row small {
    grid-column: 1 / -1;
  }

  .jobs-hero h1,
  .job-detail-head h1 {
    font-size: 22px;
  }

  .job-detail {
    gap: 10px;
    padding: 10px;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .job-detail-toolbar {
    position: sticky;
    top: 126px;
    z-index: 5;
    margin: -2px -2px 0;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(12px);
  }

  .job-card,
  .job-detail-head,
  .applicant-row {
    grid-template-columns: 1fr;
  }

  .job-detail-hero-card {
    gap: 12px;
    padding: 14px;
    border-radius: 14px;
  }

  .job-company-mark.large {
    width: 68px;
    height: 68px;
  }

  .job-detail-head .job-company-mark.large {
    justify-self: start;
  }

  .job-detail-location {
    font-size: 13px;
  }

  .job-detail-highlights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .job-detail-highlights span {
    min-height: 54px;
    padding: 8px;
  }

  .job-detail-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .job-detail-actions .primary-btn,
  .job-detail-actions .ghost-btn {
    width: 100%;
    min-height: 42px;
    padding-inline: 10px;
  }

  .job-detail-panel,
  .job-info-card {
    padding: 13px;
    border-radius: 12px;
  }

  .job-detail-panel p {
    color: #344054;
    font-size: 14px;
    line-height: 1.85;
  }

  .job-info-table,
  .job-info-table tbody,
  .job-info-table tr,
  .job-info-table th,
  .job-info-table td {
    display: block;
    width: 100%;
  }

  .job-info-table tr {
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
  }

  .job-info-table tr:last-child {
    border-bottom: 0;
  }

  .job-info-table th,
  .job-info-table td {
    padding: 0;
    border: 0;
  }

  .job-info-table th {
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 12px;
  }

  .job-info-table td {
    color: var(--text);
    font-weight: 900;
  }

  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "brand search actions"
      "nav nav nav";
    gap: 8px;
    min-height: 126px;
    padding: 8px 10px 10px;
  }

  .brand {
    min-width: 42px;
  }

  .brand span:last-child {
    display: none;
  }

  .search-box {
    min-height: 38px;
    padding: 0 10px;
  }

  .search-box span {
    display: none;
  }

  .account-actions {
    gap: 0;
  }

  .language-toggle {
    min-width: 38px;
    padding: 0 8px;
  }

  .language-toggle .ui-icon {
    display: none;
  }

  .account-pill {
    padding: 0;
  }

  .account-pill span:not(.avatar):not(.avatar-fallback) {
    display: none;
  }

  .account-actions .ghost-btn {
    display: none;
  }

  .install-app-modal {
    align-items: end;
    padding: 12px;
  }

  .install-app-dialog {
    max-height: calc(100vh - 24px);
    overflow: auto;
  }

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

  .incoming-call-overlay {
    top: 128px;
    right: 8px;
    left: 8px;
  }

  .incoming-call-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .incoming-call-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .nav {
    grid-area: nav;
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    width: 100%;
    padding: 6px 2px 0;
    border-top: 1px solid rgba(215, 222, 233, .78);
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .nav-menu {
    position: relative;
    min-width: 0;
  }

  .nav-menu-trigger {
    width: 100%;
  }

  .nav-menu-panel {
    position: fixed;
    top: 128px;
    right: 8px;
    left: 8px;
    bottom: auto;
    width: auto;
    min-width: 0;
    max-height: min(420px, calc(100vh - 146px));
    overflow: auto;
  }

  html[dir="ltr"] .nav-menu-panel {
    right: 8px;
    left: 8px;
  }

  .nav-menu:last-child .nav-menu-panel {
    inset-inline-start: 8px;
    inset-inline-end: 8px;
  }

  .nav button,
  .nav-menu-trigger {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    min-height: 48px;
    padding: 4px 2px;
    border-radius: 0;
    font-size: 10px;
    line-height: 1.2;
  }

  .nav .nav-item-icon .ui-icon {
    width: 19px;
    height: 19px;
  }

  .nav-menu-trigger .nav-chevron {
    display: none;
  }

  .nav-menu-panel button {
    flex-direction: row;
    justify-content: flex-start;
    min-height: 44px;
    padding: 0 12px;
    font-size: 13px;
  }

  .nav-badge {
    position: absolute;
    top: 3px;
    inset-inline-end: 10px;
    min-width: 18px;
    height: 18px;
    font-size: 10px;
  }

  .nav-menu-panel .nav-badge {
    position: static;
    margin-inline-start: auto;
  }

  .woo-cart-row {
    grid-template-columns: 1fr;
  }

  .cart-product-cell {
    width: 100%;
  }

  .cart-row-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

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

  .directory-service-card {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .service-listing-media,
  .service-listing-media img,
  .service-listing-placeholder {
    min-height: 132px;
  }

  .service-listing-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-inline-start: 0;
    border-top: 1px solid var(--line);
  }

  .notifications-dropdown {
    top: 128px;
    right: 8px;
    bottom: auto;
    left: 8px;
    width: auto;
    max-height: min(520px, calc(100vh - 146px));
  }

  .nav button.active,
  .nav-menu.active > .nav-menu-trigger {
    background: transparent;
    color: var(--primary);
    box-shadow: inset 0 3px 0 var(--primary);
  }

  .social-layout,
  .single-layout,
  .market-layout,
  .messenger {
    grid-template-columns: 1fr;
    max-width: none;
    width: 100%;
    padding: 8px 0 12px;
  }

  .main-feed,
  .feed {
    gap: 7px;
  }

  .left-rail,
  .right-rail,
  .filters {
    display: none;
  }

  .social-card,
  .composer,
  .post,
  .profile-card,
  .section-head,
  .service-card,
  .market-card,
  .member-card {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .composer,
  .post,
  .group-tab-panel {
    padding: 12px;
  }

  .composer-top {
    gap: 8px;
  }

  .composer-top .avatar {
    width: 38px;
    height: 38px;
  }

  textarea {
    min-height: 82px;
    line-height: 1.65;
  }

  .upload-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin-top: 10px;
  }

  .upload-row .chip {
    grid-column: 1 / -1;
    text-align: center;
  }

  .upload-btn,
  .tool-button,
  .primary-btn,
  .ghost-btn {
    min-height: 42px;
    padding: 0 10px;
  }

  .composer-tools {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 7px;
    align-items: center;
    margin-top: 10px;
  }

  .composer-tools .chip {
    grid-column: 1 / 3;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .post-head {
    margin-bottom: 8px;
  }

  .post-head .avatar {
    width: 40px;
    height: 40px;
  }

  .post-head div {
    min-width: 0;
  }

  .post-head strong,
  .post-head span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .post-body {
    margin: 9px 0;
    font-size: 15.5px;
    line-height: 1.72;
  }

  .post-media-cover {
    gap: 3px;
    margin: 10px -12px 0;
  }

  .post-media-cover img,
  .post-media-cover video {
    min-height: 260px;
    max-height: 70vh;
  }

  .post-counts {
    gap: 6px;
    padding: 8px 0;
    font-size: 12px;
    white-space: nowrap;
  }

  .post-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin-top: 0;
    padding: 2px 0 6px;
  }

  .post-actions button {
    min-height: 44px;
    border-radius: 0;
    font-size: 13px;
  }

  .comments {
    margin-top: 8px;
  }
  .comment-thread {
    margin-inline-start: min(calc(var(--depth, 0) * 10px), 56px);
  }
  .comment-replies {
    padding-inline-start: 6px;
  }

  .comment {
    max-width: calc(100vw - 56px);
    padding: 7px 10px;
    font-size: 13px;
  }

  .comment-form {
    grid-template-columns: minmax(0, 1fr) 74px;
    gap: 6px;
  }

  .reels-panel {
    border-radius: 0;
    border-right: 0;
    border-left: 0;
  }

  .reels-strip {
    grid-auto-columns: minmax(132px, 42vw);
    padding-inline: 10px;
    margin-inline: -14px;
  }

  .reel-card,
  .reel-card video {
    min-height: 230px;
  }

  .market-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .business-hero,
  .business-page-head {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  .business-grid {
    grid-template-columns: 1fr;
    gap: 7px;
  }
  .business-card,
  .business-page,
  .business-editor,
  .business-about,
  .business-video-panel,
  .business-catalog-panel {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }
  .business-page-cover {
    height: 160px;
  }
  .business-logo.large {
    margin-top: -48px;
  }
  .business-catalog,
  .business-current-media {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cards-grid, .form-grid, .media-preview, .product-media, .detail-content, .detail-media, .profile-resume, .profile-gallery { grid-template-columns: 1fr; }
  .groups-grid,
  .groups-compact-grid,
  .groups-toolbar,
  .groups-stats,
  .group-metrics {
    grid-template-columns: 1fr;
  }

  .group-composer {
    grid-template-columns: 1fr;
  }

  .groups-compact-head {
    gap: 10px;
    padding: 14px 12px;
  }

  .groups-compact-head h1 {
    font-size: 24px;
  }

  .groups-compact-head p {
    font-size: 13px;
    line-height: 1.6;
  }

  .group-search {
    gap: 5px;
  }

  .compact-create {
    padding: 12px;
  }

  .compact-create textarea {
    min-height: 76px;
  }

  .groups-compact-grid {
    gap: 7px;
  }

  .group-mini-card {
    grid-template-columns: 72px minmax(0, 1fr);
    grid-template-areas:
      "cover content"
      "cover actions";
    min-height: 98px;
    padding: 10px 12px;
    border-radius: 0;
  }

  .group-mini-cover-wrap,
  .group-mini-cover {
    width: 72px;
    min-height: 72px;
    height: 72px;
  }

  .group-mini-card h3 {
    font-size: 14px;
  }

  .group-mini-content p {
    min-height: 20px;
    -webkit-line-clamp: 1;
  }

  .group-mini-actions .primary-btn,
  .group-mini-actions .ghost-btn {
    min-height: 36px;
    padding: 0 10px;
  }

  .group-page-head,
  .group-page-stats {
    grid-template-columns: 1fr;
  }

  .group-page {
    margin-bottom: 7px;
  }

  .group-page-cover {
    min-height: 118px;
    font-size: 36px;
  }

  .group-page-head {
    gap: 10px;
    padding: 12px;
  }

  .group-page-head h1 {
    font-size: 23px;
    line-height: 1.35;
  }

  .group-page-head p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13px;
  }

  .group-page-head > button {
    width: 100%;
  }

  .group-page-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 0 12px 12px;
  }

  .group-page-stats span,
  .stat-button {
    min-height: 54px;
  }

  .group-admin-panel {
    margin: 0 12px 12px;
    padding: 12px;
  }

  .group-admin-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .group-admin-row .mini-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .group-feed-page {
    gap: 7px;
  }

  .group-tabs {
    position: sticky;
    top: 55px;
    z-index: 20;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(108px, 1fr);
    grid-template-columns: none;
    gap: 4px;
    overflow-x: auto;
    padding: 7px 8px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    scrollbar-width: none;
  }

  .group-tabs::-webkit-scrollbar {
    display: none;
  }

  .group-tabs button {
    min-height: 48px;
    white-space: nowrap;
  }

  .group-media-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
  }

  .group-media-grid img,
  .group-media-grid video {
    border-radius: 0;
  }

  .group-member-list {
    padding: 0;
  }

  .group-member-row {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 56px;
    padding: 0 4px;
    text-align: right;
  }

  .group-member-row .ghost-btn {
    grid-column: 1 / -1;
    width: 100%;
  }

  .groups-hero h1 {
    font-size: 28px;
  }
  .group-head,
  .group-description,
  .group-metrics,
  .group-actions,
  .group-posts {
    margin-inline: 12px;
  }
  .woo-detail-main,
  .woo-detail-tabs {
    padding: 12px;
  }
  .woo-detail-summary {
    padding: 14px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .woo-detail-summary h1 {
    font-size: 24px;
  }
  .woo-detail-price {
    font-size: 24px;
  }
  .woo-detail-thumbs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .woo-detail-actions {
    grid-template-columns: 1fr;
  }
  .woo-related {
    margin: 0 12px 12px;
  }
  .service-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "gallery"
      "head"
      "desc"
      "info"
      "video"
      "actions";
    min-height: auto;
  }
  .service-gallery,
  .service-gallery-empty {
    height: auto;
    min-height: 210px;
  }
  .service-gallery img {
    height: 210px;
  }
  .service-detail-hero,
  .service-detail-content {
    padding: 12px;
  }
  .service-detail-toolbar {
    margin: 10px 12px 0;
  }
  .service-detail-cover {
    min-height: 240px;
  }
  .service-detail-gallery {
    grid-template-columns: 1fr;
  }
  .profile-summary { align-items: flex-start; flex-direction: column; }
  .my-hero-cover {
    height: 180px;
  }
  .my-hero-body,
  .my-hero-person {
    align-items: flex-start;
    flex-direction: column;
  }
  .my-hero-body {
    gap: 12px;
    padding: 0 14px 14px;
  }
  .my-hero-person {
    gap: 10px;
  }
  .my-hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    min-width: 0;
  }
  .my-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .my-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .pro-my-dashboard,
  .my-dashboard {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .my-side {
    position: static;
  }
  .my-action-card {
    min-height: 92px;
  }
  .panel-toggle {
    grid-template-columns: auto auto minmax(0, 1fr);
  }
  .panel-count {
    grid-column: 2 / -1;
    justify-self: start;
  }
  .member-search { grid-template-columns: 1fr; }
  .messenger {
    min-height: calc(100dvh - 108px);
    height: calc(100dvh - 108px);
    padding: 0;
    border: 0;
    background: #efeae2;
  }
  .messenger-sidebar {
    min-height: 0;
    border-left: 0;
    border-bottom: 0;
    padding: 12px;
  }
  .messenger.chat-open .messenger-sidebar { display: none; }
  .messenger.mobile-list-mode .chat-panel { display: none; }
  .messenger-title h1 { font-size: 22px; }
  .messenger-search { min-height: 46px; }
  .chat-list {
    max-height: none;
    gap: 2px;
  }
  .chat-list-item {
    min-height: 72px;
    padding: 10px 6px;
    border-radius: 0;
    border-bottom: 1px solid rgba(0,0,0,.06);
  }
  .chat-group-form {
    border-top: 0;
    padding: 10px 0 max(10px, env(safe-area-inset-bottom));
  }
  .chat-panel {
    grid-template-rows: auto auto minmax(0, 1fr) auto auto;
    height: 100%;
    min-height: 0;
    background: #efeae2;
  }
  .chat-header {
    min-height: 58px;
    padding: 8px 10px;
    background: #075e54;
    color: #fff;
  }
  .chat-header .avatar {
    width: 38px;
    height: 38px;
  }
  .chat-person {
    gap: 8px;
    flex: 1 1 auto;
  }
  .chat-person span:not(.avatar) {
    color: rgba(255,255,255,.78);
    font-size: 12px;
  }
  .mobile-chat-back {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #fff;
    font-size: 34px;
    line-height: 1;
  }
  .chat-header-actions {
    flex: 0 0 auto;
    gap: 4px;
  }
  .chat-header-actions .ghost-btn {
    min-height: 34px;
    padding: 0 9px;
    border-color: rgba(255,255,255,.24);
    background: rgba(255,255,255,.12);
    color: #fff;
    font-size: 12px;
  }
  .call-banner {
    padding: 8px 10px;
    font-size: 12px;
  }
  .chat-thread {
    min-height: 0;
    padding: 12px 8px;
    gap: 7px;
  }
  .message-row {
    max-width: 86%;
  }
  .message-bubble {
    min-width: 72px;
    padding: 7px 9px 5px;
    border-radius: 10px;
    box-shadow: 0 1px .5px rgba(11, 20, 26, .18);
  }
  .message-row.mine .message-bubble {
    background: #d9fdd3;
    border-bottom-right-radius: 2px;
  }
  .message-row.theirs .message-bubble {
    background: #fff;
    border-bottom-left-radius: 2px;
  }
  .message-reaction-trigger {
    left: -22px;
    width: 26px;
    height: 26px;
  }
  .message-row.mine .message-reaction-trigger {
    right: -22px;
    left: auto;
  }
  .message-reactions button {
    width: 38px;
    height: 38px;
  }
  .reaction-emoji {
    font-size: 21px;
  }
  .message-bubble p {
    line-height: 1.55;
    font-size: 14px;
  }
  .message-bubble time {
    float: inline-end;
    margin-inline-start: 8px;
    padding-top: 3px;
  }
  .chat-media {
    grid-template-columns: 1fr;
    min-width: min(260px, 72vw);
  }
  .chat-media img,
  .chat-media video {
    max-height: 240px;
    border-radius: 8px;
  }
  .voice-note {
    min-width: min(270px, 72vw);
    background: rgba(255,255,255,.44);
  }
  .chat-file {
    min-width: min(260px, 72vw);
    border-radius: 10px;
  }
  .chat-composer {
    position: sticky;
    bottom: 0;
    z-index: 6;
    grid-template-columns: 42px 42px minmax(0, 1fr) 46px;
    gap: 6px;
    align-items: end;
    padding: 8px 8px max(8px, env(safe-area-inset-bottom));
    border-top: 0;
    background: #efeae2;
  }
  .chat-composer .chat-tool-btn {
    width: 42px;
    min-width: 42px;
    min-height: 42px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #54656f;
    overflow: hidden;
    text-indent: -999px;
    position: relative;
  }
  .chat-composer .chat-tool-btn::after {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    text-indent: 0;
    font-size: 20px;
  }
  .chat-composer label.chat-tool-btn::after { content: "+"; }
  .chat-composer button.chat-tool-btn::after { content: "●"; font-size: 18px; }
  .chat-composer textarea {
    min-height: 42px;
    max-height: 110px;
    padding: 10px 13px;
    border: 0;
    border-radius: 21px;
    background: #fff;
    line-height: 1.45;
  }
  .chat-composer .primary-btn {
    min-width: 46px;
    min-height: 42px;
    padding: 0;
    border-radius: 999px;
    background: #00a884;
    color: #fff;
    overflow: hidden;
    text-indent: -999px;
    position: relative;
  }
  .chat-composer .primary-btn::after {
    content: ">";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    text-indent: 0;
    font-size: 20px;
    font-weight: 900;
  }
  .chat-attachment-preview {
    order: 4;
    padding: 7px 8px 0;
    background: #efeae2;
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .chat-attachment-chip {
    flex: 0 0 auto;
    max-width: 240px;
    border-radius: 12px;
    background: #fff;
  }
  .chat-upload-status {
    order: 5;
    padding: 2px 10px 8px;
    background: #efeae2;
    font-size: 11px;
  }
  .service-card { min-height: auto; }
  .publisher-action { align-items: stretch; flex-direction: column; }
  .my-dashboard { grid-template-columns: 1fr; }
  .my-actions { display: grid; grid-template-columns: 1fr; }
  .dashboard-row {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .dashboard-row .mini-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
  .managed-group-row {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }
  .toast { left: 10px; right: 10px; bottom: 10px; max-width: none; }
}

@media (max-width: 1180px) {
  .service-card.directory-service-card {
    grid-template-columns: 180px minmax(0, 1fr) 112px;
    grid-template-areas: none;
  }
}

@media (max-width: 820px) {
  .service-card.directory-service-card {
    grid-template-columns: 112px minmax(0, 1fr);
    grid-template-areas: none;
  }

  .company-media-hub,
  .company-story-grid {
    grid-template-columns: 1fr;
  }

  .company-gallery-panel {
    grid-column: auto;
  }
}

@media (max-width: 520px) {
  body {
    padding-bottom: 0;
  }

  .topbar {
    grid-template-columns: auto auto;
    grid-template-areas:
      "brand actions"
      "search search"
      "nav nav";
    align-items: center;
    min-height: 164px;
    padding: 8px 10px 10px;
  }

  .brand {
    justify-self: start;
    min-width: 42px;
    padding: 0;
  }

  .account-actions {
    justify-self: end;
    gap: 5px;
  }

  .language-toggle {
    min-width: 36px;
    min-height: 32px;
    padding: 0 7px;
    font-size: 12px;
  }

  .account-pill .avatar,
  .account-pill .avatar-fallback {
    width: 32px;
    height: 32px;
  }

  .search-box {
    width: 100%;
    min-height: 38px;
  }

  .incoming-call-overlay {
    top: 166px;
  }

  .nav {
    min-height: 56px;
    padding: 6px 0 0;
  }

  .nav button,
  .nav-menu-trigger {
    min-height: 58px;
    padding: 4px 1px;
    font-size: 9.5px;
    gap: 3px;
  }

  .nav button span:not(.nav-item-icon):not(.nav-chevron),
  .nav-menu-trigger span:not(.nav-item-icon):not(.nav-chevron) {
    display: -webkit-box;
    max-width: 100%;
    white-space: normal;
    line-height: 1.12;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .nav .nav-item-icon .ui-icon {
    width: 18px;
    height: 18px;
  }

  .nav-badge {
    top: 2px;
    inset-inline-end: 6px;
  }

  .nav-menu-panel {
    right: 6px;
    left: 6px;
    top: 166px;
    bottom: auto;
    max-height: min(390px, calc(100vh - 184px));
    padding: 8px;
  }

  html[dir="ltr"] .nav-menu-panel,
  .nav-menu:last-child .nav-menu-panel {
    right: 6px;
    left: 6px;
    inset-inline-start: 6px;
    inset-inline-end: 6px;
  }

  .nav-menu-panel button {
    min-height: 42px;
    font-size: 13px;
  }

  .notifications-dropdown {
    top: 166px;
    bottom: auto;
    max-height: min(420px, calc(100vh - 184px));
  }

  .service-card.directory-service-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .install-platform-grid {
    grid-template-columns: 1fr;
  }

  .install-platform-card {
    min-height: 0;
  }

  .install-actions .primary-btn,
  .install-actions .ghost-btn {
    width: 100%;
  }
}

@media (max-width: 380px) {
  .topbar {
    padding-inline: 8px;
  }

  .nav button,
  .nav-menu-trigger {
    font-size: 9px;
  }

  .nav button span:not(.nav-item-icon):not(.nav-chevron),
  .nav-menu-trigger span:not(.nav-item-icon):not(.nav-chevron) {
    -webkit-line-clamp: 2;
  }

  .language-toggle {
    min-width: 34px;
    padding: 0 6px;
  }
}

/* Calm professional polish layer */
:root {
  --bg: #f0f2f5;
  --card: #ffffff;
  --surface: #f5f6f8;
  --surface-strong: #eef1f5;
  --line: #e1e5eb;
  --text: #1c1e21;
  --muted: #65676b;
  --primary: #1877f2;
  --primary-dark: #166fe5;
  --accent: #31a24c;
  --radius: 8px;
  --shadow-soft: 0 1px 2px rgba(15, 23, 42, .08);
  --shadow-lift: 0 2px 10px rgba(15, 23, 42, .10);
  --glass: rgba(255, 255, 255, .96);
}

html {
  background: var(--bg);
}

body {
  background: var(--bg);
  letter-spacing: 0;
}

img,
video {
  max-width: 100%;
}

.topbar {
  min-height: 104px;
  background: rgba(255, 255, 255, .98);
  border-bottom: 1px solid #dddfe2;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}

.brand-mark {
  background: var(--primary);
  box-shadow: none;
}

.search-box,
.member-finder-row .contact-row,
.quick-link,
.upload-btn,
.chip,
.tool-button,
.ghost-btn,
.language-toggle,
.form-grid input,
.form-grid select,
.service-form input,
.service-form select,
.service-form textarea,
.comment-form input,
.composer textarea,
.chat-composer textarea {
  background: var(--surface);
  border-color: transparent;
  box-shadow: none;
}

.search-box:focus-within,
.form-grid input:focus,
.form-grid select:focus,
.service-form input:focus,
.service-form select:focus,
.service-form textarea:focus,
.comment-form input:focus,
.composer textarea:focus,
.chat-composer textarea:focus {
  background: #fff;
  border-color: rgba(24, 119, 242, .35);
  box-shadow: 0 0 0 3px rgba(24, 119, 242, .12);
}

.nav {
  border-top-color: #eef0f3;
  gap: 4px;
}

.nav button,
.nav-menu-trigger {
  min-width: 96px;
  color: #606770;
  border-radius: 6px;
}

.nav button.active,
.nav button:hover,
.nav-menu.active > .nav-menu-trigger,
.nav-menu:hover > .nav-menu-trigger,
.nav-menu:focus-within > .nav-menu-trigger {
  background: #f0f2f5;
  color: var(--primary);
  box-shadow: none;
}

.nav-menu-panel,
.notifications-dropdown,
.booking-dialog,
.install-app-dialog {
  border-color: #dddfe2;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .14);
}

.social-layout {
  grid-template-columns: 280px minmax(0, 720px) 320px;
  gap: 16px;
}

.single-layout {
  padding-block: 16px;
}

.mini-card,
.rail-card,
.social-card {
  border-color: #dddfe2;
  box-shadow: var(--shadow-soft);
}

.social-card,
.post,
.composer,
.section-head,
.profile-card,
.service-card,
.market-card,
.member-card,
.company-card,
.business-card,
.job-card,
.course-card,
.group-mini-card,
.teacher-panel,
.admin-card {
  background: #fff;
}

.post,
.composer,
.service-card,
.market-card,
.company-card,
.business-card,
.job-card,
.course-card,
.group-mini-card,
.member-card,
.learning-row,
.admin-card {
  content-visibility: auto;
  contain-intrinsic-size: 280px;
}

.social-card:hover {
  transform: none;
  box-shadow: var(--shadow-soft);
}

.openable-card:hover,
.quick-link:hover,
.side-button:hover,
.contact-row:hover {
  transform: none;
  box-shadow: var(--shadow-lift);
}

.left-rail,
.right-rail {
  top: 126px;
}

.side-button,
.quick-link,
.contact-row {
  border-radius: 8px;
}

.side-button:hover,
.side-button.active,
.contact-row:hover,
.quick-link:hover {
  background: #e7f3ff;
  color: var(--primary);
}

.main-feed,
.feed {
  gap: 12px;
}

.composer,
.post {
  padding: 14px;
}

.post-head,
.composer-top {
  gap: 10px;
}

.post-body,
.service-description,
.business-card p,
.company-card p,
.course-card p,
.muted-line {
  color: var(--muted);
  line-height: 1.65;
}

.post-actions {
  border-top-color: #eef0f3;
}

.post-actions button {
  border-radius: 6px;
}

.post-actions button:hover {
  background: #f0f2f5;
}

.primary-btn {
  background: var(--primary);
  box-shadow: none;
}

.primary-btn:hover {
  background: var(--primary-dark);
  box-shadow: none;
}

.ghost-btn {
  color: #4b5563;
}

.ghost-btn:hover,
.upload-btn:hover,
.tool-button:hover {
  background: #e7f3ff;
  border-color: transparent;
  color: var(--primary);
}

.market-grid,
.business-grid,
.company-grid,
.academy-grid,
.groups-compact-grid,
.cards-grid {
  gap: 14px;
}

.market-card,
.service-card,
.company-card,
.business-card,
.course-card,
.job-card {
  border-radius: 8px;
}

.company-card-cover,
.business-card-cover,
.profile-cover,
.group-cover,
.service-thumb,
.market-image,
.woo-media-main {
  background: #eef0f3;
}

.company-card-cover,
.business-card-cover {
  min-height: 116px;
}

.avatar,
.brand-mark {
  transition: none;
}

.toast {
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}

.empty {
  color: var(--muted);
  background: #f6f7f9;
  border-color: #e5e7eb;
}

@media (max-width: 1180px) {
  .social-layout {
    grid-template-columns: minmax(0, 1fr);
    max-width: 760px;
  }

  .groups-workspace {
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    grid-template-areas:
      "right main"
      "left main";
  }

  .left-rail,
  .right-rail {
    position: static;
  }

  .groups-side-panel {
    position: static;
  }

  .my-overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .my-action-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .my-side {
    position: static;
  }
}

@media (max-width: 820px) {
  .topbar {
    min-height: 132px;
    row-gap: 6px;
  }

  .social-layout,
  .single-layout {
    padding: 10px;
  }

  .groups-workspace {
    grid-template-columns: 1fr;
    grid-template-areas:
      "right"
      "main"
      "left";
    gap: 8px;
  }

  .groups-side-panel {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .group-detail-layout .groups-side-panel-right,
  .group-detail-layout .group-detail-right {
    order: -2;
  }

  .group-detail-layout .groups-side-panel-left,
  .group-detail-layout .group-detail-left {
    order: 3;
  }

  .mini-card,
  .rail-card,
  .social-card {
    border-radius: 8px;
  }

  .post,
  .composer,
  .service-card,
  .market-card,
  .company-card,
  .business-card,
  .job-card,
  .course-card {
    box-shadow: none;
  }
}

@media (max-width: 520px) {
  .topbar {
    min-height: 156px;
    background: #fff;
  }

  .brand span:last-child,
  .account-pill span:last-child,
  .logout-btn span {
    display: none;
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    overflow: visible;
  }

  .nav-menu {
    min-width: 0;
  }

  .nav button,
  .nav-menu-trigger {
    width: 100%;
    min-width: 0;
    min-height: 52px;
    font-size: 10px;
  }

  .nav-menu-panel,
  .notifications-dropdown {
    top: 156px;
  }

  .incoming-call-overlay {
    top: 156px;
  }

  .main-feed,
  .feed {
    gap: 10px;
  }

  .composer,
  .post {
    padding: 12px;
  }
}

/* Professional comments and threaded replies */
.comments {
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid #eef0f3;
}

.comment-thread {
  position: relative;
  gap: 7px;
  margin-inline-start: min(calc(var(--depth, 0) * 22px), 132px);
}

.comment-thread::before {
  content: "";
  position: absolute;
  inset-block: 0 10px;
  inset-inline-start: -12px;
  width: 2px;
  border-radius: 99px;
  background: transparent;
}

.comment-thread[style*="--depth:1"]::before,
.comment-thread[style*="--depth:2"]::before,
.comment-thread[style*="--depth:3"]::before,
.comment-thread[style*="--depth:4"]::before,
.comment-thread[style*="--depth:5"]::before,
.comment-thread[style*="--depth:6"]::before,
.comment-thread[style*="--depth:7"]::before,
.comment-thread[style*="--depth:8"]::before {
  background: #e4e6eb;
}

.comment {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.comment .avatar,
.comment .avatar-fallback {
  margin-top: 2px;
}

.comment-main {
  min-width: 0;
  display: grid;
  justify-items: start;
  gap: 3px;
}

/* Mobile header and navigation refinement */
@media (max-width: 820px) {
  .topbar {
    min-height: 142px;
    padding: 10px 12px 12px;
    border-bottom-color: rgba(221, 223, 226, .9);
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .08), 0 10px 22px rgba(15, 23, 42, .06);
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .search-box {
    min-height: 40px;
    border-radius: 999px;
    background: #f0f2f5;
  }

  .account-actions {
    gap: 6px;
  }

  .language-toggle,
  .account-pill {
    min-height: 38px;
    border-radius: 999px;
    background: #f0f2f5;
  }

  .nav {
    min-height: 62px;
    gap: 4px;
    padding: 8px 0 0;
    border-top: 1px solid #edf0f4;
  }

  .nav button,
  .nav-menu-trigger {
    min-height: 56px;
    border-radius: 12px;
    color: #5f6670;
    -webkit-tap-highlight-color: transparent;
  }

  .nav-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #f0f2f5;
    color: #404853;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .04);
  }

  .nav .nav-item-icon .ui-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2.15;
  }

  .nav-menu-trigger span:not(.nav-item-icon):not(.nav-chevron),
  .nav button span:not(.nav-item-icon):not(.nav-chevron) {
    font-weight: 800;
    letter-spacing: 0;
  }

  .nav button.active,
  .nav button:hover,
  .nav-menu.active > .nav-menu-trigger,
  .nav-menu:hover > .nav-menu-trigger,
  .nav-menu:focus-within > .nav-menu-trigger {
    background: #eef5ff;
    color: var(--primary);
    box-shadow: none;
  }

  .nav button.active .nav-item-icon,
  .nav button:hover .nav-item-icon,
  .nav-menu.active > .nav-menu-trigger .nav-item-icon,
  .nav-menu:hover > .nav-menu-trigger .nav-item-icon,
  .nav-menu:focus-within > .nav-menu-trigger .nav-item-icon {
    background: var(--primary);
    color: #fff;
  }

  .nav-menu-panel,
  .notifications-dropdown {
    top: 142px;
    right: 10px;
    left: 10px;
    max-height: min(520px, calc(100vh - 160px));
    padding: 10px;
    border-radius: 18px;
    border: 1px solid rgba(221, 223, 226, .95);
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 18px 44px rgba(15, 23, 42, .18);
  }

  .nav-menu-panel button {
    min-height: 48px;
    gap: 10px;
    padding: 6px 10px;
    border-radius: 12px;
    font-size: 14px;
  }

  .nav-menu-panel .nav-item-icon {
    width: 34px;
    height: 34px;
    background: #eef2f7;
  }

  .nav-menu-panel button:hover .nav-item-icon,
  .nav-menu-panel button.active .nav-item-icon {
    background: var(--primary);
    color: #fff;
  }

  .nav-badge {
    top: 4px;
    inset-inline-end: 9px;
    min-width: 18px;
    height: 18px;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(228, 30, 63, .24);
  }

  .nav-menu-panel .nav-badge {
    border: 0;
    box-shadow: none;
  }

  .incoming-call-overlay {
    top: 144px;
  }
}

@media (max-width: 520px) {
  .topbar {
    grid-template-columns: auto auto;
    grid-template-areas:
      "brand actions"
      "search search"
      "nav nav";
    min-height: 172px;
    padding: 10px 10px 12px;
    row-gap: 8px;
  }

  .brand {
    min-height: 40px;
  }

  .account-actions {
    align-self: center;
  }

  .language-toggle {
    min-width: 38px;
    min-height: 34px;
  }

  .account-pill .avatar,
  .account-pill .avatar-fallback {
    width: 34px;
    height: 34px;
  }

  .search-box {
    min-height: 42px;
    padding-inline: 12px;
  }

  .search-box input {
    font-size: 14px;
  }

  .nav {
    min-height: 64px;
    gap: 3px;
    padding-top: 8px;
  }

  .nav button,
  .nav-menu-trigger {
    min-height: 58px;
    padding: 5px 2px;
    border-radius: 13px;
    font-size: 10px;
  }

  .nav-item-icon {
    width: 34px;
    height: 34px;
  }

  .nav .nav-item-icon .ui-icon {
    width: 18px;
    height: 18px;
  }

  .nav button span:not(.nav-item-icon):not(.nav-chevron),
  .nav-menu-trigger span:not(.nav-item-icon):not(.nav-chevron) {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.15;
  }

  .nav-menu-panel,
  .notifications-dropdown {
    top: 172px;
    right: 8px;
    left: 8px;
    max-height: min(430px, calc(100vh - 190px));
    border-radius: 16px;
  }

  html[dir="ltr"] .nav-menu-panel,
  .nav-menu:last-child .nav-menu-panel {
    right: 8px;
    left: 8px;
    inset-inline-start: 8px;
    inset-inline-end: 8px;
  }

  .nav-menu-panel button {
    min-height: 48px;
    font-size: 13px;
  }

  .incoming-call-overlay {
    top: 174px;
  }
}

@media (max-width: 380px) {
  .topbar {
    min-height: 176px;
    padding-inline: 8px;
  }

  .nav {
    gap: 2px;
  }

  .nav button,
  .nav-menu-trigger {
    font-size: 9px;
  }

  .nav-item-icon {
    width: 31px;
    height: 31px;
  }

  .nav-menu-panel,
  .notifications-dropdown {
    top: 176px;
    right: 6px;
    left: 6px;
  }
}

.comment-bubble {
  max-width: min(620px, 100%);
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: #f0f2f5;
  color: var(--text);
}

.comment-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.comment-meta time {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.comment p {
  margin: 3px 0 0;
  color: #25282c;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.comment-author-link,
.comment strong {
  max-width: 100%;
  color: #1c1e21;
  font-size: 13px;
  font-weight: 900;
}

.comment-author-link:hover {
  color: var(--primary);
  text-decoration: none;
}

.comment-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-inline-start: 10px;
  min-height: 22px;
}

.comment-reply-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  margin: 0;
  padding: 0 6px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.comment-reply-btn .ui-icon {
  width: 13px;
  height: 13px;
}

.comment-reply-btn:hover {
  background: #e7f3ff;
  color: var(--primary);
}

.comment-replies {
  display: grid;
  gap: 8px;
  margin-top: 1px;
  padding-inline-start: 12px;
  border-inline-start: 0;
}

.reply-form,
.top-comment-form {
  width: min(620px, 100%);
}

.reply-form {
  margin-inline-start: 38px;
}

.comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.comment-form input {
  min-height: 38px;
  border-radius: 999px;
  padding-inline: 14px;
}

.comment-form .primary-btn,
.comment-form .ghost-btn {
  min-height: 36px;
  border-radius: 999px;
  padding-inline: 14px;
}

.top-comment-form {
  margin-top: 4px;
}

/* Professional member cards */
.pro-member-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100%;
  overflow: hidden;
  padding: 0;
  border: 1px solid #dde2ea;
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.pro-member-card:hover {
  border-color: rgba(24, 119, 242, .24);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .10);
  transform: translateY(-2px);
}

.member-card-cover {
  height: 76px;
  background:
    linear-gradient(135deg, rgba(24, 119, 242, .14), rgba(0, 138, 106, .10)),
    linear-gradient(90deg, #f7f9fc, #eef3f8);
  border-bottom: 1px solid #e6ebf1;
}

.member-card-body {
  display: grid;
  grid-template-rows: auto auto auto auto 1fr;
  gap: 12px;
  height: 100%;
  padding: 0 16px 16px;
}

.member-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: end;
  margin-top: -32px;
}

.member-avatar-button,
.member-name-link {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.member-avatar-button {
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
}

.member-avatar-button .avatar {
  width: 72px;
  height: 72px;
  border: 4px solid #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .14);
}

.member-identity {
  display: grid;
  min-width: 0;
  padding-bottom: 4px;
}

.member-name-link {
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  color: var(--text);
  font-size: 17px;
  font-weight: 950;
  line-height: 1.25;
  text-align: start;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-name-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

.member-identity span,
.member-bio,
.member-contact-list span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.member-bio {
  display: -webkit-box;
  min-height: 40px;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.member-placeholder {
  visibility: hidden;
  pointer-events: none;
}

.member-contact-list {
  display: grid;
  gap: 7px;
}

.member-contact-list span {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-contact-list .ui-icon {
  width: 16px;
  height: 16px;
  color: #667085;
}

.member-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #e7ebf0;
  border-radius: 10px;
  background: #f8fafc;
}

.member-stats span {
  display: grid;
  gap: 2px;
  justify-items: center;
  min-width: 0;
  padding: 9px 6px;
  border-inline-start: 1px solid #e7ebf0;
}

.member-stats span:first-child {
  border-inline-start: 0;
}

.member-stats strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 950;
}

.member-stats small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.member-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-self: end;
  margin-top: auto;
}

.member-card-actions .primary-btn,
.member-card-actions .ghost-btn {
  min-height: 38px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 13px;
}

.member-card-actions .ui-icon {
  width: 17px;
  height: 17px;
}

.member-card-actions .primary-btn:last-child:nth-child(odd),
.member-card-actions .ghost-btn:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

@media (max-width: 820px) {
  .comment-thread {
    margin-inline-start: min(calc(var(--depth, 0) * 14px), 70px);
  }

  .comment-bubble {
    max-width: 100%;
  }
}

@media (max-width: 520px) {
  .comments {
    gap: 9px;
  }

  .comment-thread {
    margin-inline-start: min(calc(var(--depth, 0) * 9px), 45px);
  }

  .comment {
    gap: 7px;
  }

  .comment .avatar,
  .comment .avatar-fallback {
    width: 28px;
    height: 28px;
  }

  .comment-bubble {
    padding: 7px 10px;
    border-radius: 14px;
  }

  .reply-form {
    margin-inline-start: 34px;
  }

  .member-card-cover {
    height: 66px;
  }

  .member-card-body {
    padding-inline: 12px;
  }

  .member-avatar-button .avatar {
    width: 64px;
    height: 64px;
  }

  .member-card-head {
    gap: 10px;
    margin-top: -28px;
  }

  .member-name-link {
    font-size: 16px;
  }

  .member-card-actions {
    grid-template-columns: 1fr;
  }

  .member-card-actions .primary-btn:last-child:nth-child(odd),
  .member-card-actions .ghost-btn:last-child:nth-child(odd) {
    grid-column: auto;
  }
}

/* Marketplace polish */
@media (min-width: 1181px) {
  .market-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .market-hero {
    grid-template-columns: 1fr;
  }

  .market-hero-actions {
    justify-content: flex-start;
  }

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

@media (max-width: 820px) {
  .market-hero {
    padding: 14px;
    border-radius: 8px;
  }

  .market-hero h1 {
    font-size: 22px;
  }

  .market-hero-actions,
  .market-results-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .market-layout {
    grid-template-columns: 1fr;
    padding: 0 10px 12px;
  }

  .market-layout .filters {
    display: grid;
    position: static;
    border-radius: 8px;
  }

  .market-main {
    gap: 10px;
  }

  .market-results-bar {
    border-radius: 8px;
  }

  .market-results-bar div {
    min-width: 0;
  }

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

  .woo-product-body {
    padding-inline: 10px;
  }

  .woo-actions {
    grid-template-columns: 1fr;
    margin-inline: 10px;
  }

  .woo-actions .primary-btn {
    grid-column: auto;
  }

  .woo-detail-main {
    padding: 10px;
    gap: 10px;
  }

  .woo-detail-summary {
    padding: 14px;
  }

  .woo-detail-thumbs,
  .detail-media,
  .product-spec-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .market-stats {
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }

  .market-stats span {
    min-height: 58px;
    padding: 9px;
  }

  .market-stats strong {
    font-size: 18px;
  }

  .market-hero-actions,
  .market-results-bar {
    grid-template-columns: 1fr;
  }

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

  .woo-product-card {
    grid-template-columns: 118px minmax(0, 1fr);
    grid-template-rows: auto auto;
  }

  .woo-product-media {
    grid-row: 1 / 3;
  }

  .market-cover,
  .market-thumb {
    height: 100%;
    min-height: 154px;
    aspect-ratio: auto;
  }

  .woo-product-body h3 {
    min-height: 0;
    font-size: 14px;
  }

  .woo-product-body p,
  .woo-product-meta {
    display: none;
  }

  .woo-actions {
    align-self: end;
  }

  .woo-detail-actions {
    grid-template-columns: 1fr;
  }

  .woo-detail-thumbs,
  .detail-media,
  .product-spec-grid {
    grid-template-columns: 1fr;
  }

  .product-seller-strip {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .product-seller-strip button {
    grid-column: 1 / -1;
  }
}

/* Service directory polish */
@media (max-width: 1180px) {
  .directory-hero {
    grid-template-columns: 1fr;
  }

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

  .directory-hero-actions {
    justify-content: flex-start;
  }

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

  .service-card.directory-service-card {
    grid-template-columns: 188px minmax(0, 1fr) 126px;
    grid-template-areas: none;
  }

  .service-detail-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .directory-hero {
    padding: 14px;
    border-radius: 8px;
  }

  .directory-hero h1 {
    font-size: 22px;
  }

  .directory-layout {
    grid-template-columns: 1fr;
    padding: 0 10px 12px;
  }

  .directory-filters {
    position: static;
    border-radius: 8px;
  }

  .directory-results-bar {
    border-radius: 8px;
  }

  .service-card.directory-service-card {
    grid-template-columns: 132px minmax(0, 1fr);
    grid-template-areas: none;
    border-radius: 8px;
  }

  .service-listing-media,
  .service-listing-media img,
  .service-listing-placeholder {
    min-height: 168px;
  }

  .service-listing-main {
    padding: 12px;
  }

  .service-listing-main .service-card-head {
    display: grid;
    gap: 6px;
  }

  .service-listing-main .service-card-head h3 {
    font-size: 15px;
  }

  .service-listing-price {
    font-size: 16px;
  }

  .service-provider-mini,
  .service-directory-meta {
    display: none;
  }

  .directory-service-card .service-description {
    min-height: 0;
    -webkit-line-clamp: 2;
  }

  .service-listing-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-inline-start: 0;
    border-top: 1px solid var(--line);
  }

  .service-detail-hero,
  .service-detail-content {
    padding: 10px;
    gap: 10px;
  }

  .service-detail {
    border-radius: 0;
    background: #eef2f7;
    box-shadow: none;
  }

  .service-detail-toolbar {
    position: sticky;
    top: 126px;
    z-index: 8;
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 0 10px 8px;
    padding: 8px;
    border-radius: 12px;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(12px);
  }

  .service-detail-toolbar .ghost-btn {
    width: 100%;
    justify-content: center;
    min-height: 40px;
    padding-inline: 8px;
  }

  .service-detail-toolbar .ghost-btn span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .service-detail-side {
    gap: 10px;
    padding: 14px;
    border-radius: 14px;
  }

  .service-detail-cover {
    min-height: auto;
    max-height: none;
    aspect-ratio: 16 / 10;
    border-radius: 14px;
  }

  .service-detail-gallery,
  .service-detail-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-detail-side h1 {
    font-size: 22px;
    line-height: 1.3;
  }

  .service-detail-price-card {
    padding: 10px;
    border-radius: 12px;
  }

  .service-detail-price-card strong {
    font-size: 24px;
  }

  .service-detail-actions {
    grid-template-columns: 1fr 1fr;
  }

  .service-detail-actions .primary-btn,
  .service-detail-actions .ghost-btn,
  .service-detail-actions .danger-btn {
    min-height: 42px;
    padding-inline: 8px;
  }

  .service-detail-info-table,
  .service-detail-info-table tbody,
  .service-detail-info-table tr,
  .service-detail-info-table th,
  .service-detail-info-table td {
    display: block;
    width: 100%;
  }

  .service-detail-info-table {
    padding: 0 10px;
  }

  .service-detail-info-table tr {
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
  }

  .service-detail-info-table tr:last-child {
    border-bottom: 0;
  }

  .service-detail-info-table th,
  .service-detail-info-table td {
    padding: 0;
    border: 0;
  }

  .service-detail-info-table th {
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 12px;
  }

  .service-detail-info-table td {
    color: var(--text);
    font-weight: 900;
  }

  .service-detail-panel {
    padding: 13px;
    border-radius: 12px;
  }

  .service-detail-panel p {
    color: #344054;
    font-size: 14px;
    line-height: 1.85;
  }
}

@media (max-width: 520px) {
  .admin-stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .admin-hero-tools,
  .admin-row-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .directory-stats {
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }

  .directory-stats span {
    min-height: 58px;
    padding: 9px;
  }

  .directory-stats strong {
    font-size: 18px;
  }

  .directory-results-bar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .service-card.directory-service-card {
    grid-template-columns: 116px minmax(0, 1fr);
  }

  .service-listing-media,
  .service-listing-media img,
  .service-listing-placeholder {
    min-height: 158px;
  }

  .service-category-badge {
    top: 8px;
    right: 8px;
    max-width: calc(100% - 16px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .service-listing-main {
    gap: 7px;
    padding: 10px;
  }

  .service-listing-main .service-card-head p {
    display: none;
  }

  .service-listing-actions {
    grid-template-columns: 1fr;
  }

  .service-detail-metrics,
  .service-detail-gallery {
    grid-template-columns: 1fr;
  }

  .service-detail-toolbar {
    top: 126px;
  }

  .service-detail-actions {
    grid-template-columns: 1fr;
  }

  .service-detail-actions .primary-btn {
    grid-column: auto;
  }

  .provider-strip {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .provider-strip button {
    grid-column: 1 / -1;
  }
}

/* Education system polish */
.edunova-hero,
.academy-hero.teacher-directory-hero,
.teacher-admin-head,
.teacher-page {
  border: 1px solid #dde5ee;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(24, 119, 242, .08), rgba(22, 163, 74, .06) 58%, rgba(255, 255, 255, .98)),
    #fff;
}

.edunova-hero,
.academy-hero.teacher-directory-hero {
  position: relative;
}

.edunova-hero h1,
.academy-hero.teacher-directory-hero h1,
.teacher-admin-head h1,
.teacher-page-head h1 {
  letter-spacing: 0;
}

.edunova-command-card,
.learning-focus-card,
.teacher-panel,
.teacher-content-panel,
.course-summary-panel,
.course-lessons-panel,
.course-quiz-panel,
.course-reviews-panel {
  border-radius: 8px;
  border-color: #dde5ee;
  box-shadow: var(--shadow-soft);
}

.edunova-command-card,
.learning-focus-card {
  background: rgba(255, 255, 255, .82);
}

.edunova-search {
  border-radius: 8px;
}

.edunova-metric,
.edunova-path,
.teacher-admin-metric {
  border: 1px solid #dde5ee;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.edunova-metric > span,
.edunova-path-icon,
.teacher-admin-metric-icon,
.teacher-file-icon,
.lesson-number {
  border-radius: 8px;
  background: #eef6ff;
}

.edunova-path {
  min-height: 178px;
  align-content: start;
}

.edunova-path button {
  align-self: end;
  justify-self: start;
}

.edunova-field-strip {
  border-color: #dde5ee;
  border-radius: 8px;
  background: #fff;
}

.academy-layout {
  align-items: start;
}

.academy-layout .directory-filters {
  border-radius: 8px;
  border-color: #dde5ee;
}

.academy-layout .directory-filters input,
.academy-layout .directory-filters select {
  min-height: 42px;
  border-radius: 8px;
  background: #f8fafc;
}

.academy-grid,
.teacher-platform-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.course-card {
  border: 1px solid #dde5ee;
  border-radius: 8px;
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.course-card:hover {
  border-color: rgba(24, 119, 242, .28);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .10);
}

.course-card-cover {
  position: relative;
  background: #eef2f7;
}

.course-card-cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(0deg, rgba(15, 23, 42, .34), transparent);
  pointer-events: none;
}

.course-cover-badge {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  max-width: calc(100% - 20px);
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  color: var(--text);
  font-size: 12px;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .12);
}

.course-card-cover img {
  transition: transform .2s ease;
}

.course-card:hover .course-card-cover img {
  transform: scale(1.02);
}

.course-card-body {
  gap: 10px;
}

.course-card h3,
.teacher-file-body h3,
.teacher-exam-card h3 {
  font-size: 18px;
  overflow-wrap: anywhere;
}

.course-card p {
  min-height: 52px;
}

.course-card-progress {
  display: grid;
  gap: 7px;
  padding: 9px 10px;
  border: 1px solid #edf0f3;
  border-radius: 8px;
  background: #fbfcfd;
}

.course-card-progress div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.course-card-progress strong {
  color: var(--primary);
}

.education-card-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.education-card-stats span {
  display: grid;
  gap: 1px;
  min-height: 52px;
  padding: 7px;
  border: 1px solid #edf0f3;
  border-radius: 8px;
  background: #fbfcfd;
}

.education-card-stats strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1;
}

.education-card-stats small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.course-detail {
  border-radius: 8px;
  background: #f6f7f9;
}

.course-detail .detail-toolbar {
  background: #fff;
}

.course-detail-hero {
  gap: 20px;
  padding: 20px;
}

.course-cover-panel img,
.course-cover-panel video,
.course-cover-placeholder,
.teacher-admin-cover,
.teacher-page-cover {
  border: 1px solid #dde5ee;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

.course-summary-panel h1 {
  font-size: clamp(22px, 2.35vw, 32px);
}

.progress-track {
  background: #e5edf7;
}

.progress-track span {
  background: linear-gradient(90deg, var(--primary), #16a34a);
}

.course-lessons-panel,
.course-quiz-panel,
.course-reviews-panel,
.detail-section-panel {
  margin-inline: 20px;
}

.course-lesson-card {
  border: 1px solid #dde5ee;
  border-radius: 8px;
  background: #fff;
}

.course-lesson-card:first-of-type {
  border-top: 1px solid #dde5ee;
}

.course-lesson-video {
  border-radius: 8px;
}

.course-quiz-form fieldset {
  border-radius: 8px;
  background: #fbfcfd;
}

.teacher-admin-cover,
.teacher-page-cover {
  width: 230px;
  height: 152px;
}

.teacher-admin-summary {
  gap: 12px;
}

.teacher-admin-metric,
.teacher-panel,
.teacher-content-panel {
  border-color: #dde5ee;
}

.teacher-panel > .section-title-row,
.teacher-content-panel > .section-title-row {
  padding-bottom: 8px;
  border-bottom: 1px solid #edf0f3;
}

.teacher-tabs {
  border: 1px solid #dde5ee;
  border-radius: 8px;
  background: #fff;
}

.teacher-tabs button {
  border-radius: 8px;
}

.teacher-tabs button.active {
  box-shadow: none;
}

.teacher-section-grid {
  gap: 14px;
}

.teacher-section-grid > .course-lesson-card,
.teacher-file-card,
.teacher-section-grid > .teacher-exam-card {
  border-color: #dde5ee;
  border-radius: 8px;
  box-shadow: none;
}

.teacher-section-grid > .course-lesson-card.is-complete {
  border-color: rgba(22, 163, 74, .28);
  background: #f7fdf9;
}

.teacher-exam-card,
.teacher-file-card {
  background: #fff;
}

.teacher-file-card.is-locked,
.teacher-locked-box {
  background: #fbfcfd;
}

.teacher-locked-box {
  border-style: dashed;
}

.teacher-item-unlock input,
.compact-unlock input {
  min-height: 40px;
}

.teacher-question-row,
.teacher-learning-note,
.teacher-access-picker,
.teacher-student-row,
.teacher-compact-row {
  border-radius: 8px;
}

.teacher-progress-panel {
  border-inline-start: 4px solid #16a34a;
  background: #fff;
}

.learning-row {
  border: 1px solid #dde5ee;
  border-inline-start: 4px solid rgba(24, 119, 242, .28);
  border-radius: 8px;
}

.learning-progress strong {
  color: var(--primary);
}

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

  .teacher-admin-head,
  .teacher-page {
    grid-template-columns: 200px minmax(0, 1fr);
  }

  .teacher-page-head {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .edunova-hero,
  .academy-hero.teacher-directory-hero,
  .teacher-admin-head,
  .teacher-page {
    padding: 12px;
  }

  .edunova-hero h1,
  .academy-hero.teacher-directory-hero h1,
  .teacher-page-head h1,
  .teacher-admin-head h1 {
    font-size: 24px;
  }

  .academy-grid,
  .teacher-platform-grid {
    grid-template-columns: 1fr;
  }

  .course-card {
    min-height: 0;
  }

  .course-card p {
    min-height: 0;
    -webkit-line-clamp: 3;
  }

  .course-detail-hero,
  .course-lessons-panel,
  .course-quiz-panel,
  .course-reviews-panel,
  .detail-section-panel {
    margin-inline: 0;
    padding: 12px;
  }

  .teacher-admin-head,
  .teacher-page {
    grid-template-columns: 1fr;
  }

  .teacher-admin-cover,
  .teacher-page-cover {
    width: 100%;
    height: 170px;
  }

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

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

  .teacher-tabs button {
    width: 100%;
    padding: 0 8px;
  }

  .teacher-overview,
  .teacher-progress-panel {
    grid-template-columns: 1fr;
  }

  .teacher-progress-stats {
    justify-content: stretch;
  }

  .teacher-progress-stats span {
    flex: 1 1 120px;
    text-align: center;
  }
}

@media (max-width: 520px) {
  .edunova-metrics,
  .edunova-paths {
    gap: 8px;
  }

  .edunova-path {
    min-height: 0;
  }

  .course-owner-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .course-owner-row strong {
    grid-column: 1 / -1;
  }

  .teacher-admin-summary,
  .education-card-stats {
    grid-template-columns: 1fr;
  }

  .teacher-tabs {
    grid-template-columns: 1fr;
  }
}

/* Final mobile navigation skin */
@media (max-width: 820px) {
  .topbar {
    min-height: 142px;
    padding: 10px 12px 12px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .08), 0 10px 22px rgba(15, 23, 42, .06);
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .search-box {
    min-height: 40px;
    border-radius: 999px;
  }

  .language-toggle,
  .account-pill {
    min-height: 38px;
    border-radius: 999px;
  }

  .nav {
    min-height: 62px;
    gap: 4px;
    padding: 8px 0 0;
    border-top: 1px solid #edf0f4;
  }

  .nav button,
  .nav-menu-trigger {
    min-height: 56px;
    border-radius: 12px;
    color: #5f6670;
  }

  .nav-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #f0f2f5;
    color: #404853;
  }

  .nav .nav-item-icon .ui-icon,
  .nav-menu-panel .nav-item-icon .ui-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2.15;
  }

  .nav button.active,
  .nav button:hover,
  .nav-menu.active > .nav-menu-trigger,
  .nav-menu:hover > .nav-menu-trigger,
  .nav-menu:focus-within > .nav-menu-trigger {
    background: #eef5ff;
    color: var(--primary);
    box-shadow: none;
  }

  .nav button.active .nav-item-icon,
  .nav button:hover .nav-item-icon,
  .nav-menu.active > .nav-menu-trigger .nav-item-icon,
  .nav-menu:hover > .nav-menu-trigger .nav-item-icon,
  .nav-menu:focus-within > .nav-menu-trigger .nav-item-icon,
  .nav-menu-panel button:hover .nav-item-icon,
  .nav-menu-panel button.active .nav-item-icon {
    background: var(--primary);
    color: #fff;
  }

  .nav-menu-panel,
  .notifications-dropdown {
    top: 142px;
    right: 10px;
    left: 10px;
    max-height: min(520px, calc(100vh - 160px));
    padding: 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 18px 44px rgba(15, 23, 42, .18);
  }

  .nav-menu-panel button {
    min-height: 48px;
    gap: 10px;
    padding: 6px 10px;
    border-radius: 12px;
    font-size: 14px;
  }

  .nav-menu-panel .nav-item-icon {
    width: 34px;
    height: 34px;
    background: #eef2f7;
  }

  .nav-badge {
    top: 4px;
    inset-inline-end: 9px;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(228, 30, 63, .24);
  }

  .nav-menu-panel .nav-badge {
    border: 0;
    box-shadow: none;
  }
}

@media (max-width: 520px) {
  .topbar {
    grid-template-columns: auto auto;
    grid-template-areas:
      "brand actions"
      "search search"
      "nav nav";
    min-height: 172px;
    padding: 10px 10px 12px;
    row-gap: 8px;
  }

  .search-box {
    min-height: 42px;
    padding-inline: 12px;
  }

  .account-actions {
    gap: 6px;
  }

  .language-toggle {
    min-width: 38px;
    min-height: 34px;
  }

  .account-pill .avatar,
  .account-pill .avatar-fallback {
    width: 34px;
    height: 34px;
  }

  .nav {
    min-height: 64px;
    gap: 3px;
  }

  .nav button,
  .nav-menu-trigger {
    min-height: 58px;
    padding: 5px 2px;
    border-radius: 13px;
    font-size: 10px;
  }

  .nav-item-icon {
    width: 34px;
    height: 34px;
  }

  .nav button span:not(.nav-item-icon):not(.nav-chevron),
  .nav-menu-trigger span:not(.nav-item-icon):not(.nav-chevron) {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.15;
  }

  .nav-menu-panel,
  .notifications-dropdown {
    top: 172px;
    right: 8px;
    left: 8px;
    max-height: min(430px, calc(100vh - 190px));
    border-radius: 16px;
  }

  html[dir="ltr"] .nav-menu-panel,
  .nav-menu:last-child .nav-menu-panel {
    right: 8px;
    left: 8px;
    inset-inline-start: 8px;
    inset-inline-end: 8px;
  }

  .incoming-call-overlay {
    top: 174px;
  }
}

@media (max-width: 380px) {
  .topbar {
    min-height: 176px;
  }

  .nav button,
  .nav-menu-trigger {
    font-size: 9px;
  }

  .nav-item-icon {
    width: 31px;
    height: 31px;
  }

  .nav-menu-panel,
  .notifications-dropdown {
    top: 176px;
  }
}

/* Mobile full navigation tree */
.brand-cluster {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 8px;
  min-width: 0;
}

html[dir="rtl"] .brand-cluster {
  direction: rtl;
  flex-direction: row;
}

html[dir="rtl"] .brand-cluster .mobile-nav-tree-trigger {
  order: 0;
}

html[dir="rtl"] .brand-cluster .brand {
  order: 1;
}

html[dir="rtl"] .brand-cluster .mobile-notifications-icon {
  order: 2;
}

html[dir="rtl"] .brand-cluster .mobile-cart-icon {
  order: 3;
}

html[dir="rtl"] .brand-cluster .mobile-jobs-icon {
  order: 4;
}

.mobile-nav-tree-trigger,
.mobile-header-icon {
  display: none;
}

.mobile-nav-tree {
  display: none;
}

@media (max-width: 820px) {
  .brand-cluster .brand {
    grid-area: auto;
    justify-self: auto;
  }

  .mobile-nav-tree-trigger,
  .mobile-header-icon {
    position: relative;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 14px;
    background: #f0f2f5;
    color: #1c1e21;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .05);
  }

  .mobile-nav-tree-trigger .ui-icon,
  .mobile-header-icon .ui-icon {
    width: 21px;
    height: 21px;
    stroke-width: 2.25;
  }

  .mobile-nav-tree-trigger:hover,
  .mobile-nav-tree-trigger[aria-expanded="true"],
  .mobile-header-icon:hover {
    background: var(--primary);
    color: #fff;
  }

  .mobile-header-badge {
    position: absolute;
    top: -3px;
    inset-inline-end: -3px;
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #e41e3f;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(228, 30, 63, .24);
  }

  .mobile-nav-tree {
    position: fixed;
    top: 142px;
    right: 10px;
    left: 10px;
    z-index: 95;
    display: grid;
    gap: 10px;
    max-height: min(560px, calc(100vh - 160px));
    overflow: auto;
    padding: 12px;
    border: 1px solid rgba(221, 223, 226, .95);
    border-radius: 18px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 20px 50px rgba(15, 23, 42, .20);
  }

  .mobile-nav-tree-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 2px 2px 8px;
    border-bottom: 1px solid #eef0f3;
  }

  .mobile-nav-tree-head strong {
    font-size: 16px;
  }

  .mobile-nav-tree-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .mobile-nav-tree-section {
    display: grid;
    gap: 8px;
    padding: 10px;
    border-radius: 14px;
    background: #f7f8fa;
  }

  .mobile-nav-tree-section h3 {
    margin: 0;
    color: #65676b;
    font-size: 12px;
    font-weight: 900;
  }

  .mobile-nav-tree-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .mobile-nav-tree-list button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    min-width: 0;
    min-height: 48px;
    padding: 8px;
    border: 0;
    border-radius: 12px;
    background: #fff;
    color: #1c1e21;
    font-size: 13px;
    font-weight: 900;
    text-align: start;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
  }

  .mobile-nav-tree-list button.active,
  .mobile-nav-tree-list button:hover {
    background: #e7f3ff;
    color: var(--primary);
  }

  .mobile-nav-tree-list .nav-item-icon {
    width: 34px;
    height: 34px;
    background: #eef2f7;
  }

  .mobile-nav-tree-list button.active .nav-item-icon,
  .mobile-nav-tree-list button:hover .nav-item-icon {
    background: var(--primary);
    color: #fff;
  }

  .mobile-nav-tree-list button > span:not(.nav-item-icon):not(.nav-chevron) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 520px) {
  .mobile-nav-tree {
    top: 172px;
    right: 8px;
    left: 8px;
    max-height: min(460px, calc(100vh - 190px));
  }

  .mobile-nav-tree-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 380px) {
  .mobile-nav-tree {
    top: 176px;
    right: 6px;
    left: 6px;
  }

  .mobile-nav-tree-trigger,
  .mobile-header-icon {
    width: 36px;
    height: 36px;
  }
}

/* Global visual refresh */
:root {
  --bg: #eef2f6;
  --card: #ffffff;
  --surface: #f5f7fb;
  --surface-strong: #e9eef6;
  --line: #dbe2ec;
  --text: #172033;
  --muted: #667085;
  --primary: #1b74e4;
  --primary-dark: #1559b7;
  --accent: #12a67a;
  --green: #1f8f4d;
  --gold: #b88218;
  --danger: #c4362d;
  --glass: rgba(255, 255, 255, .94);
  --shadow-soft: 0 1px 2px rgba(23, 32, 51, .06), 0 10px 28px rgba(23, 32, 51, .08);
  --shadow-lift: 0 14px 36px rgba(23, 32, 51, .14);
}

body {
  background:
    radial-gradient(circle at top right, rgba(27, 116, 228, .08), transparent 30vw),
    linear-gradient(180deg, #f7f9fc 0%, #eef2f6 44%, #e9eef5 100%);
  color: var(--text);
}

.topbar {
  background: rgba(255, 255, 255, .96);
  border-bottom-color: rgba(219, 226, 236, .95);
  box-shadow: 0 1px 2px rgba(23, 32, 51, .06), 0 14px 34px rgba(23, 32, 51, .07);
}

.brand-mark {
  background: linear-gradient(135deg, #1b74e4, #12a67a);
  box-shadow: inset 0 -8px 18px rgba(21, 89, 183, .22);
}

.social-card,
.mini-card,
.rail-card,
.post,
.composer,
.market-card,
.service-card,
.company-card,
.business-card,
.job-card,
.course-card,
.group-mini-card,
.admin-card,
.detail-section-panel,
.teacher-panel {
  border-color: rgba(219, 226, 236, .96);
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 1px 2px rgba(23, 32, 51, .06);
}

.social-card:hover,
.openable-card:hover,
.quick-link:hover,
.side-button:hover,
.contact-row:hover {
  border-color: rgba(27, 116, 228, .22);
  box-shadow: 0 8px 24px rgba(23, 32, 51, .10);
}

.rail-card,
.mini-card {
  background: linear-gradient(180deg, #fff 0%, #f9fbfd 100%);
}

.search-box,
.member-finder-row .contact-row,
.quick-link,
.upload-btn,
.chip,
.tool-button,
.ghost-btn,
.language-toggle,
.form-grid input,
.form-grid select,
.service-form input,
.service-form select,
.service-form textarea,
.comment-form input,
.composer textarea,
.chat-composer textarea,
input,
select,
textarea {
  background-color: #f5f7fb;
  border-color: rgba(219, 226, 236, .9);
  color: var(--text);
}

.search-box:focus-within,
input:focus,
select:focus,
textarea:focus {
  background-color: #fff;
  border-color: rgba(27, 116, 228, .42);
  box-shadow: 0 0 0 3px rgba(27, 116, 228, .12);
}

.primary-btn {
  background: linear-gradient(135deg, #1b74e4, #1559b7);
  color: #fff;
  box-shadow: 0 6px 14px rgba(27, 116, 228, .18);
}

.primary-btn:hover {
  background: linear-gradient(135deg, #216fe0, #124da1);
  box-shadow: 0 8px 18px rgba(27, 116, 228, .22);
}

.ghost-btn,
.tool-button,
.upload-btn {
  color: #475467;
}

.ghost-btn:hover,
.tool-button:hover,
.upload-btn:hover {
  background: #eaf3ff;
  color: var(--primary);
}

.nav button.active,
.nav button:hover,
.nav-menu.active > .nav-menu-trigger,
.nav-menu:hover > .nav-menu-trigger,
.nav-menu:focus-within > .nav-menu-trigger,
.side-button:hover,
.side-button.active,
.quick-link:hover {
  background: #eaf3ff;
  color: var(--primary);
}

.nav-menu-panel,
.notifications-dropdown,
.booking-dialog,
.install-app-dialog,
.mobile-nav-tree {
  border-color: rgba(219, 226, 236, .98);
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 22px 58px rgba(23, 32, 51, .18);
}

.booking-modal,
.install-app-modal {
  background: rgba(15, 23, 42, .42);
  backdrop-filter: blur(8px);
}

.booking-dialog,
.install-app-dialog {
  background:
    linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
}

.booking-dialog h3,
.section-title-row h3,
.rail-card h3,
.mini-card h3 {
  color: #172033;
}

.post-counts,
.post-actions,
.comments {
  border-color: #eef2f6;
}

.post-actions button:hover,
.post-actions button.active .post-action-icon {
  background: #eaf3ff;
  color: var(--primary);
}

.toast {
  background: #172033;
  box-shadow: 0 12px 30px rgba(23, 32, 51, .24);
}

.toast.error,
.danger-btn {
  background: var(--danger);
  color: #fff;
}

.success-chip,
.chip.success-chip {
  background: #e9f8f1;
  color: #167047;
}

.mobile-nav-tree-trigger,
.mobile-header-icon,
.nav-item-icon {
  background: #eef2f6;
  color: #344054;
}

.mobile-nav-tree-trigger:hover,
.mobile-nav-tree-trigger[aria-expanded="true"],
.mobile-header-icon:hover,
.mobile-nav-tree-list button.active .nav-item-icon,
.mobile-nav-tree-list button:hover .nav-item-icon,
.nav button.active .nav-item-icon,
.nav button:hover .nav-item-icon,
.nav-menu.active > .nav-menu-trigger .nav-item-icon,
.nav-menu:hover > .nav-menu-trigger .nav-item-icon,
.nav-menu:focus-within > .nav-menu-trigger .nav-item-icon {
  background: var(--primary);
  color: #fff;
}

.mobile-nav-tree-section {
  background: #f5f7fb;
}

.mobile-nav-tree-list button,
.share-platform-grid button {
  background: #fff;
  border-color: rgba(219, 226, 236, .9);
}

.share-dialog-tabs {
  background: #eef2f6;
}

.share-dialog-tabs button.active {
  color: var(--primary);
}

@media (max-width: 820px) {
  body {
    background: #eef2f6;
  }

  .topbar {
    background: rgba(255, 255, 255, .98);
  }
}

/* Signature messenger experience */
.messenger {
  border-radius: 18px;
  border: 1px solid rgba(219, 226, 236, .96);
  background: #fff;
  box-shadow: 0 14px 38px rgba(23, 32, 51, .10);
}

.messenger-sidebar {
  background:
    linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
  border-left-color: rgba(219, 226, 236, .9);
}

.messenger-title h1 {
  color: #172033;
}

.messenger-dot {
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(18, 166, 122, .14);
}

.chat-list-item {
  border: 1px solid transparent;
}

.chat-list-item:hover,
.chat-list-item.active {
  border-color: rgba(27, 116, 228, .14);
  background: linear-gradient(135deg, #edf6ff, #f4f9ff);
}

.chat-list-meta b {
  background: linear-gradient(135deg, #1b74e4, #12a67a);
}

.chat-panel {
  grid-template-rows: auto auto auto minmax(0, 1fr) auto auto auto;
  background:
    linear-gradient(180deg, rgba(246, 248, 251, .94), rgba(238, 242, 246, .94)),
    radial-gradient(circle at 18% 14%, rgba(18, 166, 122, .16), transparent 26%),
    radial-gradient(circle at 82% 80%, rgba(27, 116, 228, .14), transparent 34%);
}

.chat-header {
  background: rgba(255, 255, 255, .96);
  border-bottom-color: rgba(219, 226, 236, .95);
  backdrop-filter: blur(14px);
}

.chat-insights {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 9px 14px;
  border-bottom: 1px solid rgba(219, 226, 236, .78);
  background: rgba(255, 255, 255, .70);
  backdrop-filter: blur(10px);
}

.chat-insights span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff;
  color: #475467;
  box-shadow: 0 1px 2px rgba(23, 32, 51, .06);
  font-size: 12px;
  font-weight: 900;
}

.chat-insights .ui-icon {
  width: 15px;
  height: 15px;
  color: var(--primary);
}

.chat-insights b {
  color: #172033;
}

.chat-insights small {
  color: var(--muted);
  font-weight: 800;
}

.chat-insights .has-unread {
  background: #fff3f5;
  color: #b42318;
}

#remoteCallAudio {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.chat-thread {
  gap: 10px;
  padding: 20px 18px;
  scroll-behavior: smooth;
}

.chat-date-separator,
.chat-history-note {
  align-self: center;
  direction: rtl;
  max-width: min(92%, 520px);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  color: #667085;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 1px 2px rgba(23, 32, 51, .06);
}

.chat-history-note {
  border-radius: 12px;
  background: #fff9e8;
  color: #8a5a00;
}

.message-row {
  content-visibility: auto;
  contain-intrinsic-size: 72px;
}

.message-bubble {
  border: 1px solid rgba(219, 226, 236, .72);
  box-shadow: 0 1px 2px rgba(23, 32, 51, .08), 0 8px 22px rgba(23, 32, 51, .06);
}

.message-row.mine .message-bubble {
  border-color: rgba(18, 166, 122, .18);
  background: linear-gradient(135deg, #dff8e8, #d8fdd2);
}

.message-row.theirs .message-bubble {
  background: rgba(255, 255, 255, .98);
}

.message-row.has-payload .message-bubble {
  padding: 9px;
}

.message-author {
  color: var(--primary);
}

.message-bubble time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  justify-self: end;
  margin-top: 2px;
}

.message-status {
  color: #667085;
  font-weight: 1000;
  letter-spacing: 0;
}

.message-status.read {
  color: var(--primary);
}

.chat-media {
  border-radius: 12px;
  overflow: hidden;
}

.chat-media img,
.chat-media video {
  border-radius: 0;
  transition: transform .18s ease, filter .18s ease;
}

.chat-media-open:hover img,
.chat-media-open:hover video {
  transform: scale(1.015);
  filter: saturate(1.05);
}

.voice-note,
.chat-file {
  border: 1px solid rgba(219, 226, 236, .86);
  background: rgba(255, 255, 255, .72);
}

.message-reaction-trigger {
  opacity: 0;
  transform: scale(.92);
  transition: opacity .16s ease, transform .16s ease, background-color .16s ease;
}

.message-row:hover .message-reaction-trigger,
.message-row.show-reactions .message-reaction-trigger {
  opacity: 1;
  transform: scale(1);
}

.message-reactions {
  border-color: rgba(219, 226, 236, .96);
  background: rgba(255, 255, 255, .98);
}

.message-reactions button:hover {
  background: #eaf3ff;
  transform: translateY(-1px);
}

.reaction-summary {
  border: 1px solid rgba(219, 226, 236, .8);
  background: #fff;
}

.chat-composer {
  border-top-color: rgba(219, 226, 236, .9);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(14px);
}

.chat-composer textarea {
  background: #f5f7fb;
}

.chat-attachment-preview,
.chat-upload-status {
  background: rgba(255, 255, 255, .94);
}

.chat-attachment-chip {
  border: 1px solid rgba(219, 226, 236, .92);
  background: #f8fafc;
}

@media (max-width: 820px) {
  .messenger {
    border-radius: 0;
    border-inline: 0;
    box-shadow: none;
  }

  .chat-insights {
    padding: 7px 10px;
  }

  .chat-thread {
    padding: 14px 10px;
  }

  .message-row {
    max-width: 88%;
  }

  .message-reaction-trigger {
    opacity: 1;
    transform: none;
  }
}

/* Focused messenger navigation and reactions */
.pro-chat-list {
  gap: 8px;
  padding-inline-end: 2px;
}

.chat-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 2px 4px;
  color: #667085;
  font-size: 12px;
  font-weight: 1000;
}

.chat-list-heading strong {
  color: #344054;
  font-size: 12px;
}

.chat-list-heading span {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  padding: 0 7px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--primary-dark);
  font-size: 11px;
}

.pro-chat-list .empty {
  margin: 0 0 8px;
  padding: 14px;
  border: 1px dashed rgba(152, 162, 179, .5);
  border-radius: 14px;
  background: rgba(248, 250, 252, .72);
  color: #667085;
}

.message-row {
  margin-bottom: 17px;
}

.message-reaction-trigger {
  inset-inline-start: 12px;
  left: auto;
  right: auto;
  bottom: -20px;
  width: 38px;
  height: 25px;
  border-color: rgba(219, 226, 236, .95);
  background: rgba(255, 255, 255, .98);
  color: #475467;
  box-shadow: 0 8px 20px rgba(23, 32, 51, .14);
}

.message-row.mine .message-reaction-trigger {
  inset-inline-start: auto;
  inset-inline-end: 12px;
  left: auto;
  right: auto;
}

.message-reaction-trigger:hover,
.message-row.show-reactions .message-reaction-trigger {
  color: var(--primary);
  border-color: rgba(24, 119, 242, .22);
  background: #fff;
}

.reaction-plus {
  display: inline-grid;
  width: 13px;
  height: 13px;
  place-items: center;
  margin-inline-end: -1px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
}

.reaction-plus .ui-icon {
  width: 9px;
  height: 9px;
}

.reaction-trigger-symbol {
  width: 17px;
  height: 17px;
  color: #344054;
}

.reaction-trigger-symbol .ui-icon {
  width: 17px;
  height: 17px;
}

.message-reactions {
  bottom: calc(100% + 10px);
}

@media (max-width: 820px) {
  .pro-chat-list {
    gap: 4px;
  }

  .chat-list-heading {
    margin: 10px 6px 5px;
  }

  .message-row {
    margin-bottom: 18px;
  }

  .message-reaction-trigger,
  .message-row.mine .message-reaction-trigger {
    bottom: -19px;
    width: 36px;
    height: 24px;
  }
}

/* Telegram-style messenger refinement */
.telegram-messenger {
  --tg-blue: #2aabee;
  --tg-blue-dark: #1687c2;
  --tg-panel: #ffffff;
  --tg-thread: #e9eff5;
  --tg-out: #e2f7cb;
  --tg-in: #ffffff;
  --tg-muted: #7d8a99;
  grid-template-columns: 392px minmax(0, 1fr);
  min-height: calc(100dvh - 104px);
  border: 1px solid rgba(209, 217, 230, .9);
  border-radius: 0;
  background: var(--tg-panel);
  box-shadow: 0 18px 60px rgba(18, 36, 56, .08);
}

.telegram-messenger .messenger-sidebar {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 14px 12px;
  border-left: 1px solid rgba(209, 217, 230, .9);
  background: #fff;
}

.telegram-messenger .messenger-title {
  min-height: 46px;
  padding: 0 4px;
}

.telegram-messenger .messenger-title h1 {
  font-size: 22px;
  font-weight: 1000;
  color: #17212b;
}

.telegram-messenger .messenger-title p {
  color: var(--tg-muted);
  font-size: 12px;
  font-weight: 800;
}

.telegram-mark {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--tg-blue), #59c6f6);
  color: #fff;
  box-shadow: 0 10px 26px rgba(42, 171, 238, .24);
}

.telegram-mark .ui-icon {
  width: 22px;
  height: 22px;
}

.telegram-messenger .messenger-search {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #f2f5f8;
  color: var(--tg-muted);
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.telegram-messenger .messenger-search:focus-within {
  border-color: rgba(42, 171, 238, .42);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(42, 171, 238, .12);
}

.telegram-search-icon .ui-icon {
  width: 18px;
  height: 18px;
}

.telegram-messenger .chat-list {
  gap: 1px;
  padding: 2px 0;
}

.telegram-messenger .chat-list-heading {
  margin: 12px 8px 6px;
  color: var(--tg-muted);
  font-size: 11px;
  text-transform: none;
}

.telegram-messenger .chat-list-heading strong {
  color: var(--tg-muted);
}

.telegram-messenger .chat-list-heading span {
  background: #edf7ff;
  color: var(--tg-blue-dark);
}

.telegram-messenger .chat-list-item {
  min-height: 68px;
  padding: 8px 10px;
  border-radius: 12px;
  background: transparent;
  transition: background-color .14s ease, transform .14s ease;
}

.telegram-messenger .chat-list-item:hover {
  background: #f4f8fb;
}

.telegram-messenger .chat-list-item.active {
  background: #e5f3ff;
}

.telegram-messenger .chat-list-item.active .chat-list-text strong {
  color: var(--tg-blue-dark);
}

.telegram-messenger .chat-list-item .avatar {
  width: 48px;
  height: 48px;
  box-shadow: 0 6px 18px rgba(22, 36, 50, .08);
}

.telegram-messenger .chat-list-text strong {
  color: #17212b;
  font-size: 14px;
}

.telegram-messenger .chat-list-text small,
.telegram-messenger .chat-list-meta time {
  color: var(--tg-muted);
  font-size: 12px;
}

.telegram-messenger .chat-list-meta b {
  min-width: 21px;
  height: 21px;
  background: var(--tg-blue);
  font-size: 11px;
}

.telegram-messenger .chat-group-form {
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(209, 217, 230, .75);
  border-radius: 16px;
  background: #f7fafc;
}

.telegram-messenger .chat-group-form input,
.telegram-messenger .chat-group-form select {
  min-height: 38px;
  border-radius: 12px;
  background: #fff;
}

.telegram-messenger .chat-group-form select {
  min-height: 76px;
}

.chat-member-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid rgba(209, 217, 230, .95);
  border-radius: 12px;
  background: #fff;
}

.chat-member-search .ui-icon {
  width: 18px;
  height: 18px;
  color: #64748b;
}

.chat-member-search input {
  min-height: 38px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  outline: 0;
}

.chat-member-results {
  display: grid;
  gap: 6px;
  max-height: 176px;
  overflow-y: auto;
  padding-inline-end: 2px;
}

.chat-member-result {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 7px 9px;
  border: 1px solid rgba(209, 217, 230, .78);
  border-radius: 13px;
  background: #fff;
  color: #17212b;
  text-align: start;
  cursor: pointer;
}

.chat-member-result:hover {
  border-color: rgba(42, 171, 238, .42);
  background: #eef8fe;
}

.chat-member-result .avatar {
  width: 34px;
  height: 34px;
  font-size: 12px;
}

.chat-member-result span {
  display: grid;
  min-width: 0;
}

.chat-member-result strong,
.chat-member-result small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-member-result small {
  color: #64748b;
  font-size: 11px;
}

.chat-selected-members {
  display: grid;
  gap: 7px;
  padding-top: 2px;
}

.chat-selected-members > strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #334155;
  font-size: 12px;
}

.chat-selected-members > strong b {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
}

.chat-selected-members > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chat-selected-members em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
}

.chat-selected-member {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 34px;
  padding: 3px 6px 3px 3px;
  border: 1px solid rgba(209, 217, 230, .82);
  border-radius: 999px;
  background: #fff;
}

.chat-selected-member .avatar {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

.chat-selected-member small {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #17212b;
  font-weight: 800;
}

.chat-selected-member button {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  cursor: pointer;
}

.chat-selected-member button:hover {
  background: #fee2e2;
  color: #b91c1c;
}

.chat-selected-member button .ui-icon {
  width: 14px;
  height: 14px;
}

.chat-settings-dock {
  position: relative;
  display: grid;
  justify-items: end;
  padding-top: 2px;
}

.chat-settings-dock summary {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 7px;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 13px;
  border-radius: 999px;
  background: var(--tg-blue);
  color: #fff;
  font-weight: 1000;
  list-style: none;
  box-shadow: 0 12px 24px rgba(42, 171, 238, .26);
  cursor: pointer;
}

.chat-settings-dock summary::-webkit-details-marker {
  display: none;
}

.chat-settings-dock summary .ui-icon {
  width: 20px;
  height: 20px;
}

.chat-settings-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 12;
  width: min(330px, calc(100vw - 24px));
  padding: 10px;
  border: 1px solid rgba(209, 217, 230, .9);
  border-radius: 18px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 18px 46px rgba(23, 32, 51, .16);
  backdrop-filter: blur(14px);
}

.chat-settings-panel .chat-group-form {
  border: 0;
  padding: 0;
  background: transparent;
}

.chat-settings-panel .chat-group-form strong {
  color: #17212b;
  font-size: 14px;
}

.telegram-messenger .chat-panel {
  background:
    linear-gradient(rgba(233, 239, 245, .9), rgba(233, 239, 245, .9)),
    repeating-linear-gradient(135deg, rgba(42, 171, 238, .055) 0 1px, transparent 1px 18px);
}

.telegram-messenger .chat-header {
  min-height: 62px;
  padding: 9px 16px;
  border-bottom: 1px solid rgba(209, 217, 230, .86);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(14px);
}

.telegram-messenger .chat-person .avatar {
  width: 42px;
  height: 42px;
}

.telegram-messenger .chat-person strong {
  color: #17212b;
  font-size: 15px;
}

.telegram-messenger .chat-person span:not(.avatar) {
  color: var(--tg-blue-dark);
  font-size: 12px;
  font-weight: 900;
}

.telegram-icon-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 42px;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--tg-blue-dark);
}

.telegram-icon-action:hover {
  background: #edf7ff;
}

.telegram-icon-action .ui-icon {
  width: 20px;
  height: 20px;
}

.telegram-messenger .chat-insights {
  display: flex;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(209, 217, 230, .62);
  background: rgba(255, 255, 255, .44);
  backdrop-filter: blur(10px);
}

.telegram-messenger .chat-insights span {
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid rgba(209, 217, 230, .72);
  border-radius: 999px;
  background: rgba(255, 255, 255, .68);
}

.telegram-messenger .chat-thread {
  gap: 8px;
  padding: 20px clamp(12px, 4vw, 56px);
  background: transparent;
}

.telegram-messenger .chat-date-separator span,
.telegram-messenger .chat-history-note {
  border: 0;
  background: rgba(102, 128, 153, .24);
  color: #fff;
  box-shadow: none;
}

.telegram-messenger .message-row {
  max-width: min(72%, 620px);
  margin-bottom: 15px;
}

.telegram-messenger .message-row.theirs {
  padding-inline-start: 2px;
}

.telegram-messenger .message-row.theirs > .avatar {
  width: 32px;
  height: 32px;
  margin-bottom: 2px;
}

.telegram-messenger .message-bubble {
  gap: 5px;
  min-width: 96px;
  padding: 8px 11px 6px;
  border: 0;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(23, 32, 51, .08);
}

.telegram-messenger .message-row.mine .message-bubble {
  background: var(--tg-out);
  color: #17212b;
  border-bottom-right-radius: 5px;
}

.telegram-messenger .message-row.theirs .message-bubble {
  background: var(--tg-in);
  border-bottom-left-radius: 5px;
}

.telegram-messenger .message-bubble::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 11px;
  height: 11px;
  background: inherit;
}

.telegram-messenger .message-row.mine .message-bubble::after {
  right: -4px;
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}

.telegram-messenger .message-row.theirs .message-bubble::after {
  left: -4px;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

.telegram-messenger .message-author {
  color: var(--tg-blue-dark);
  font-size: 12px;
  font-weight: 1000;
}

.telegram-messenger .message-bubble p {
  line-height: 1.62;
  font-size: 14px;
}

.telegram-messenger .message-bubble time {
  justify-self: end;
  color: #6f7f8f;
  font-size: 10.5px;
  font-weight: 800;
}

.telegram-messenger .message-status {
  color: #7f8c99;
}

.telegram-messenger .message-status.read {
  color: var(--tg-blue-dark);
}

.telegram-messenger .chat-media {
  border-radius: 13px;
}

.telegram-messenger .chat-file,
.telegram-messenger .voice-note {
  border: 0;
  border-radius: 13px;
  background: rgba(255, 255, 255, .62);
}

.telegram-messenger .message-reaction-trigger {
  bottom: -17px;
  width: 35px;
  height: 23px;
  border: 0;
  background: rgba(255, 255, 255, .96);
  color: var(--tg-blue-dark);
}

.telegram-messenger .message-reactions {
  bottom: calc(100% + 9px);
  border: 0;
  box-shadow: 0 14px 36px rgba(23, 32, 51, .18);
}

.telegram-messenger .reaction-summary {
  justify-self: start;
  background: rgba(255, 255, 255, .86);
}

.telegram-messenger .chat-composer {
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px 14px max(10px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(209, 217, 230, .82);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(14px);
}

.telegram-composer-tool,
.telegram-send-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
}

.telegram-composer-tool {
  background: transparent;
  color: #6f7f8f;
}

.telegram-composer-tool:hover {
  background: #eef4f8;
  color: var(--tg-blue-dark);
}

.telegram-composer-tool > span,
.telegram-send-btn > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.telegram-composer-tool .ui-icon,
.telegram-send-btn .ui-icon {
  width: 21px;
  height: 21px;
}

.telegram-send-btn {
  background: var(--tg-blue);
  color: #fff;
  box-shadow: 0 10px 22px rgba(42, 171, 238, .24);
}

.telegram-send-btn:hover {
  background: var(--tg-blue-dark);
}

.telegram-messenger .chat-composer textarea {
  min-height: 42px;
  max-height: 126px;
  padding: 10px 14px;
  border: 0;
  border-radius: 21px;
  background: #f2f5f8;
  box-shadow: inset 0 0 0 1px rgba(209, 217, 230, .62);
}

.telegram-messenger .chat-composer textarea:focus {
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(42, 171, 238, .48), 0 0 0 4px rgba(42, 171, 238, .10);
}

.telegram-messenger .chat-attachment-preview,
.telegram-messenger .chat-upload-status {
  border-top: 0;
  background: rgba(255, 255, 255, .94);
}

@media (max-width: 820px) {
  .telegram-messenger {
    min-height: calc(100dvh - 92px);
    height: calc(100dvh - 92px);
    border: 0;
    box-shadow: none;
  }

  .telegram-messenger .messenger-sidebar {
    padding: 10px;
  }

  .telegram-messenger .chat-header {
    min-height: 56px;
    padding: 7px 8px;
  }

  .telegram-icon-action span {
    display: none;
  }

  .telegram-icon-action {
    min-width: 38px;
    min-height: 38px;
    padding: 0;
  }

  .telegram-messenger .chat-insights {
    justify-content: flex-start;
    overflow-x: auto;
    padding: 6px 8px;
  }

  .telegram-messenger .chat-thread {
    padding: 14px 9px;
  }

  .telegram-messenger .message-row {
    max-width: 87%;
  }

  .telegram-messenger .message-bubble {
    border-radius: 15px;
  }

  .telegram-messenger .chat-composer {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    gap: 5px;
    padding: 8px 8px max(8px, env(safe-area-inset-bottom));
  }

  .telegram-composer-tool,
  .telegram-send-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
  }

  .telegram-messenger .chat-composer textarea {
    min-height: 38px;
    padding: 8px 12px;
  }
}

/* Full-screen mobile chat mode */
@media (max-width: 820px) {
  body.messages-mobile-full-body,
  body:has(.app-shell.messages-mobile-full) {
    overflow: hidden;
    height: 100dvh;
  }

  .app-shell.messages-mobile-full {
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
    background: #e9eff5;
  }

  .app-shell.messages-mobile-full .topbar,
  .app-shell.messages-mobile-full .mobile-nav-tree,
  .app-shell.messages-mobile-full > .notifications-dropdown {
    display: none !important;
  }

  .app-shell.messages-mobile-full .single-layout {
    width: 100%;
    max-width: none;
    height: 100dvh;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    overflow: hidden;
  }

  .app-shell.messages-mobile-full .telegram-messenger {
    height: 100dvh;
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .app-shell.messages-mobile-full .telegram-messenger.chat-open,
  .app-shell.messages-mobile-full .telegram-messenger.mobile-list-mode {
    grid-template-columns: 1fr;
  }

  .app-shell.messages-mobile-full .telegram-messenger.mobile-list-mode .messenger-sidebar {
    height: 100dvh;
    min-height: 0;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    overflow: hidden;
  }

  .app-shell.messages-mobile-full .telegram-messenger.mobile-list-mode .chat-list {
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 10px;
    overscroll-behavior: contain;
  }

  .app-shell.messages-chat-open .telegram-messenger .chat-panel {
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  .app-shell.messages-chat-open #remoteCallAudio {
    display: none;
  }

  .app-shell.messages-chat-open .telegram-messenger .chat-header {
    position: sticky;
    top: 0;
    z-index: 8;
  }

  .app-shell.messages-chat-open .telegram-messenger .chat-thread {
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 18px;
    overscroll-behavior: contain;
  }

  .app-shell.messages-chat-open .telegram-messenger .chat-composer {
    position: sticky;
    bottom: 0;
    z-index: 10;
    flex: 0 0 auto;
    box-shadow: 0 -10px 24px rgba(23, 32, 51, .08);
  }

  .app-shell.messages-chat-open .telegram-messenger .chat-attachment-preview,
  .app-shell.messages-chat-open .telegram-messenger .chat-upload-status {
    position: fixed;
    right: 0;
    left: 0;
    z-index: 9;
    max-height: 116px;
    overflow-y: auto;
    border-top: 1px solid rgba(209, 217, 230, .78);
    box-shadow: 0 -8px 18px rgba(23, 32, 51, .07);
  }

  .app-shell.messages-chat-open .telegram-messenger .chat-attachment-preview {
    bottom: calc(54px + env(safe-area-inset-bottom));
  }

  .app-shell.messages-chat-open .telegram-messenger .chat-attachment-preview:empty,
  .app-shell.messages-chat-open .telegram-messenger .chat-upload-status {
    display: none !important;
  }

  .app-shell.messages-mobile-full .chat-settings-dock {
    padding: 8px 2px max(10px, env(safe-area-inset-bottom));
  }

  .app-shell.messages-mobile-full .chat-settings-dock summary {
    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;
    padding: 0;
  }

  .app-shell.messages-mobile-full .chat-settings-dock summary span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .app-shell.messages-mobile-full .chat-settings-panel {
    right: 0;
    bottom: calc(100% + 10px);
    width: min(342px, calc(100vw - 24px));
  }
}

/* Polished chat bubbles and reaction system */
.telegram-messenger .message-row {
  isolation: isolate;
}

.telegram-messenger .message-bubble {
  display: grid;
  gap: 7px;
  min-width: min(180px, 76vw);
  max-width: min(100%, 640px);
  padding: 9px 10px 7px;
  overflow: visible;
  cursor: default;
  touch-action: pan-y;
  user-select: text;
}

.telegram-messenger .message-bubble:active {
  filter: saturate(1.03);
}

.telegram-messenger .message-content {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.telegram-messenger .message-content p {
  margin: 0;
}

.telegram-messenger .message-meta-line {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-height: 24px;
  margin-top: -1px;
}

.telegram-messenger .message-meta-line time {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  color: #778492;
  font-size: 10.5px;
  font-weight: 900;
  opacity: 1;
  white-space: nowrap;
}

.telegram-messenger .message-row.mine .message-meta-line {
  justify-content: flex-start;
}

.telegram-messenger .message-row.mine .message-meta-line time {
  order: 2;
}

.telegram-messenger .message-row.mine .reaction-summary {
  order: 1;
}

.telegram-messenger .message-row.mine .message-reaction-trigger {
  order: 0;
}

.telegram-messenger .message-status {
  display: inline-flex;
  align-items: center;
  color: #8b9aaa;
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0;
}

.telegram-messenger .message-status.read {
  color: var(--tg-blue-dark);
}

.telegram-messenger .message-reaction-trigger {
  position: relative;
  inset: auto;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 31px;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(42, 171, 238, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  color: #7d8a99;
  box-shadow: none;
  opacity: .72;
  transform: none;
  transition: opacity .14s ease, background-color .14s ease, color .14s ease, border-color .14s ease;
}

.telegram-messenger .message-row:hover .message-reaction-trigger,
.telegram-messenger .message-row.show-reactions .message-reaction-trigger,
.telegram-messenger .message-reaction-trigger.has-reaction {
  opacity: 1;
}

.telegram-messenger .message-reaction-trigger:hover,
.telegram-messenger .message-row.show-reactions .message-reaction-trigger {
  border-color: rgba(42, 171, 238, .32);
  background: #fff;
  color: var(--tg-blue-dark);
}

.telegram-messenger .message-reaction-trigger.has-reaction {
  border-color: rgba(42, 171, 238, .32);
  background: #edf8ff;
}

.telegram-messenger .reaction-plus {
  position: absolute;
  transform: translate(11px, -7px);
  display: inline-grid;
  width: 13px;
  height: 13px;
  place-items: center;
  margin: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--tg-blue);
  color: #fff;
}

.telegram-messenger .reaction-plus .ui-icon {
  width: 8px;
  height: 8px;
}

.telegram-messenger .reaction-trigger-symbol {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: currentColor;
}

.telegram-messenger .reaction-trigger-symbol > .reaction-emoji,
.telegram-messenger .reaction-trigger-symbol > .ui-icon {
  width: 18px;
  height: 18px;
}

.telegram-messenger .message-reactions.reaction-picker {
  position: absolute;
  right: auto;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 20;
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  width: min(284px, calc(100vw - 34px));
  padding: 8px;
  border: 1px solid rgba(209, 217, 230, .88);
  border-radius: 18px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 18px 46px rgba(23, 32, 51, .18);
  backdrop-filter: blur(16px);
}

.telegram-messenger .message-row.mine .message-reactions.reaction-picker {
  right: 0;
  left: auto;
}

.telegram-messenger .message-row.show-reactions .message-reactions.reaction-picker {
  display: grid;
}

.telegram-messenger .message-reactions.reaction-picker button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  justify-content: start;
  width: 100%;
  height: 42px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: #f5f8fb;
  color: #17212b;
  box-shadow: none;
  font-size: 12px;
  font-weight: 1000;
  text-align: start;
}

.telegram-messenger .message-reactions.reaction-picker button:hover {
  border-color: rgba(42, 171, 238, .28);
  background: #eaf7ff;
  transform: none;
  box-shadow: none;
}

.telegram-messenger .message-reactions.reaction-picker button.active {
  border-color: rgba(42, 171, 238, .4);
  background: #dff3ff;
  color: var(--tg-blue-dark);
}

.telegram-messenger .message-reactions.reaction-picker button > span:not(.reaction-emoji) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.telegram-messenger .reaction-summary {
  flex: 1 1 auto;
  display: inline-flex;
  justify-content: flex-start;
  gap: 3px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.telegram-messenger .reaction-summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 22px;
  padding: 1px 6px 1px 3px;
  border: 1px solid rgba(209, 217, 230, .78);
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  color: #475467;
  font-size: 11px;
  font-weight: 1000;
}

.telegram-messenger .reaction-summary-pill b {
  min-width: 10px;
  color: inherit;
  font-size: 10px;
}

.telegram-messenger .reaction-emoji {
  width: 22px;
  height: 22px;
}

.telegram-messenger .reaction-emoji .ui-icon {
  width: 20px;
  height: 20px;
}

@media (max-width: 820px) {
  .telegram-messenger .message-bubble {
    min-width: min(154px, 78vw);
    padding: 8px 9px 6px;
  }

  .telegram-messenger .message-meta-line {
    min-height: 24px;
  }

  .telegram-messenger .message-reaction-trigger {
    width: 30px;
    height: 24px;
    opacity: 1;
  }

  .telegram-messenger .message-reaction-trigger:not(.has-reaction) {
    opacity: .42;
  }

  .telegram-messenger .message-reactions.reaction-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(260px, calc(100vw - 26px));
  }

  .telegram-messenger .message-reactions.reaction-picker button {
    height: 40px;
    padding: 0 8px;
  }
}

/* Current chat mode without reactions + prominent mobile voice call */
.telegram-messenger .message-row.show-reactions,
.telegram-messenger .message-bubble {
  -webkit-touch-callout: default;
}

.telegram-messenger .message-reaction-trigger,
.telegram-messenger .message-reactions,
.telegram-messenger .reaction-summary {
  display: none !important;
}

.telegram-messenger .message-meta-line {
  justify-content: flex-end;
  min-height: 18px;
}

.telegram-messenger .message-row.mine .message-meta-line {
  justify-content: flex-start;
}

@media (max-width: 820px) {
  .app-shell.messages-chat-open .telegram-messenger .chat-header {
    padding-right: 58px;
  }

  .app-shell.messages-chat-open .telegram-messenger .chat-header-actions {
    position: absolute;
    top: 7px;
    right: 8px;
    z-index: 12;
    display: grid;
    place-items: center;
  }

  .app-shell.messages-chat-open .telegram-messenger .chat-header-actions .telegram-icon-action:not(.call-action) {
    display: none !important;
  }

  .app-shell.messages-chat-open .telegram-messenger .call-action {
    display: inline-grid !important;
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--tg-blue);
    color: #fff;
    box-shadow: 0 10px 24px rgba(42, 171, 238, .32);
  }

  .app-shell.messages-chat-open .telegram-messenger .call-action .ui-icon {
    width: 21px;
    height: 21px;
  }

  .app-shell.messages-chat-open .telegram-messenger .call-action span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
}
