/* === Onetab - Element.io Replica CSS === */

:root {
  /* Core palette */
  --bg-primary: #ffffff;
  --bg-secondary: #f7f7f7;
  --bg-tertiary: #f2f2f2;
  --bg-surface: #f5f5f5;
  --bg-hover: #0000000d;
  --bg-active: #e5e5e5;
  --bg-input: #ffffff;

  /* Accent */
  --accent-selected: #276874;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-muted: rgba(37, 99, 235, 0.12);
  --accent-strong: rgba(37, 99, 235, 0.22);

  /* Text */
  --text-primary: #1d1c1d;
  --text-secondary: #1a1a1a;
  --text-muted: #999;
  --text-link: #1264a3;

  /* Semantic */
  --success: #2bac76;
  --warning: #ffb74d;
  --danger: #ea1414;
  --info: #64b5f6;
  --online: #2bac76;
  --offline: #5a6577;
  --busy: #ff5c6b;
  --away: #ffb74d;

  /* Borders */
  --border: #e6e6e6;
  --border-light: #e6e6e6;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
  --shadow-lg: 0 3px 6px -4px rgba(0, 0, 0, .12), 0 6px 16px 0 rgba(0, 0, 0, .08), 0 9px 28px 8px rgba(0, 0, 0, .05);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.2);

  /* Sizes */
  --space-sidebar-width: 64px;
  --room-panel-width: 223px;
  --right-panel-width: 340px;
  --header-height: 56px;
  --composer-min-height: 56px;

  /* Radius */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 26px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.12s ease;
  --transition: 0.2s ease;
  --transition-slow: 0.35s ease;

  /* Font */
  --font: 'DM Sans', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-inter: 'Inter', sans-serif;

  /* gradiants */
  --ot-ai-gradient: linear-gradient(
  95.17deg,
  #2F8B7B -3.92%,
  #3CCE91 28.34%,
  #1E9AA2 58.25%,
  #20999E 79.15%,
  #16BDE7 103.26%
);
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  /* font-family: var(--font-inter), -apple-system, sans-serif; */
  font-family: var(--font);
  background: var(--bg-primary);
  color: #212529;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.46668;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
.network-status-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4000;
  padding: 10px 16px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  border-bottom: 1px solid transparent;
}
.network-status-banner.offline {
  background: #fee2e2;
  color: #b91c1c;
  border-bottom-color: #fca5a5;
}
.network-status-banner.online {
  background: #dcfce7;
  color: #166534;
  border-bottom-color: #86efac;
}

a { color: var(--text-link); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; font-size: inherit; }
input, textarea { font-family: inherit; font-size: inherit; color: var(--text-primary); }
.room-panel {
  overflow-y: auto;
}

/* Hide scrollbar */
.room-panel {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

/* Webkit */
.room-panel::-webkit-scrollbar {
  width: 6px;
}

.room-panel::-webkit-scrollbar-track {
  background: transparent;
}

.room-panel::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 6px;
}

/* Hover effect */
.room-panel:hover {
  scrollbar-color: var(--bg-active) transparent;
}

.room-panel:hover::-webkit-scrollbar-thumb {
  background: var(--bg-active);
}

/* Default (hidden scrollbar) */
* {
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: transparent transparent;
}

/* Webkit (Chrome, Edge, Safari) */
*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 6px;
}

/* Show scrollbar on hover */
*:hover {
  scrollbar-color: var(--bg-active) transparent; /* Firefox */
}

*:hover::-webkit-scrollbar-thumb {
  background: var(--bg-active); /* Chrome */
}

.hidden { display: none !important; }

/* === Screen Management === */
html[data-boot-complete="false"] #auth-screen,
html[data-boot-complete="false"] #app-screen {
  display: none;
}
html[data-boot-complete="false"][data-boot-screen="auth"] #auth-screen,
html[data-boot-complete="false"][data-boot-screen="app"] #app-screen {
  display: flex;
}
.screen { display: none; height: 100vh; width: 100vw; }
.screen.active { display: flex; overflow: auto;}

/* === Auth Screen === */
.auth-container {
  margin: auto;
  width: 100%; 
  display: flex;
  align-items: center;
  justify-content: space-between;
}


.auth-container-left,.auth-container-right{
  width: 100%;
  max-width: 100%;
}
.auth-brand {
  max-width: 460px;
  margin: 0 auto 36px;
  text-align: center;
}
.auth-logo { margin: 0 auto 16px;}
.auth-logo svg { width: 100%; height: 100%; }
.auth-title { 
  font-weight: 700;
  font-size: 24px;
  line-height: normal;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.auth-subtitle { 
  font-weight: 400;
  font-size: 15px;
  line-height: 24px;
  color: #666;
  margin-bottom: 0;
}

.auth-header{
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 25px;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  max-width: 460px;
  margin: 0 auto 28px;
  padding: 4px;
  background: #f3f4f6;
  border-radius: var(--radius-lg);
}
.auth-tab {
  flex: 1;
  text-align: center;
  border-radius: var(--radius-md);
  color: #6b7280;
  transition: var(--transition);
  padding: 10.5px 28px;
  font-weight: 500;
  font-size: 1rem;
}
.auth-tab.active { background: #12246b; color: #ffffff; }
.auth-tab:hover:not(.active) { color: var(--text-primary); background: #e5e7eb; }

.auth-form {
  display: none;
  width: 100%;
}
.auth-form.active {
  display: block;
  max-width: 460px;
  margin: 0 auto;
}
.auth-step { display: none; }
.auth-step.active { display: block; }
.auth-step-hint { margin: 0 0 16px; color: #666; font-size: 14px; }
.auth-step-hint strong{
  color: #12246b;
  font-weight: 600;
}
.auth-step-actions { display: flex; gap: 10px; margin-bottom: 18px; }
.auth-step-actions .btn { flex: 1; }
.auth-step-actions--stack {
  margin-top: 18px;
  margin-bottom: 0;
}

.onboarding-form.active {
  max-width: 100%;
}
.register-step {
  display: none;
}
.register-step.active {
  display: block;
}

.signup-card {
  margin: 0 auto;
  background: #ffffff;
}
.signup-card--narrow {
  max-width: 460px;
}
.signup-card--otp {
  max-width: 540px;
  text-align: center;
}
.signup-header {
  margin-bottom: 26px;
  text-align: center;
}
.signup-header--tight {
  margin-bottom: 32px;
}
.signup-title {
  font-size: 22px;
  font-weight: 700;
  color: #1f2937;
}
.signup-subtitle {
  margin-top: 8px;
  color: #6b7280;
  font-size: 14px;
}
.signup-email {
  margin-top: 4px;
  color: #4b5563;
  font-size: 14px;
  font-weight: 700;
}
.signup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-group { margin-bottom: 24px; }
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: .8125rem;
  font-weight: 600;
  margin-bottom: 5px;
}
.form-group label span{
  color: var(--danger);
}
.muted-label {
  color: #9ca3af;
  font-weight: 500;
}
.form-select.form-select-sm,.form-control.form-control-sm{
  font-size: 12px;
  min-height: 28px;
  border-radius: 6px;
}
.form-select.form-select-md,.form-control.form-control-md{ 
  min-height: 32px;
  border-radius: 6px; 
}
/* .form-select.form-select-lg,.form-control.form-control-lg{
  font-size: 14px;
} */
.form-select{
  background-color: #fff;
  background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLWNoZXZyb24tZG93bi1pY29uIGx1Y2lkZS1jaGV2cm9uLWRvd24iPjxwYXRoIGQ9Im02IDkgNiA2IDYtNiIvPjwvc3ZnPg==') !important;
  background-repeat: no-repeat !important;
  background-position: right 0.45rem center !important;
  appearance: none !important;
  transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
  background-size: 18px !important;
  padding-right: 28px !important;
  cursor: pointer;
}
.form-control,.form-select,.input-with-icon{
  border: .0625rem solid var(--border);
  background-color: #fff;
}

.form-control,.form-select{
  font-size: 14px;
  font-weight: 400;
  min-height: 44px;
  border-radius: 8px;
  padding: 6px 14px; 
  transition: var(--transition);
}
input::placeholder { color: #666 !important; font-weight: 400;}

input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px white inset !important;
  -webkit-text-fill-color: #000 !important;
  transition: background-color 5000s ease-in-out 0s;
}

.input-with-icon {
  font-size: 15px;
  min-height: 3rem;
  font-weight: 400;
  min-height: 44px;
  border-radius: .375rem;
  padding: 4px 14px; 
  position: relative;
  display: flex;
  align-items: center;
  transition: var(--transition);
}
.disabled.input-with-icon {
  cursor: not-allowed;
  opacity: .5;
  background-color: var(--bg-tertiary);
}
.input-with-icon:focus-within {
  border-color: #12246b;
  box-shadow: 0 0 0 3px rgba(18, 36, 107, 0.08);
}
.input-with-icon.is-invalid {
  border-color: rgba(239, 68, 68, 0.55);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08);
}
.input-with-icon i {
  margin-right: 8px;
  color: #9ca3af;
  font-size: 18px;
}
.input-with-icon input {
  flex: 1;
  min-width: 0;
  padding: 7px 14px 7px 0;
  background: none;
  border: none;
  outline: none;
  color: #111827;
}
.input-with-icon input::placeholder { color: #9ca3af; }
.input-with-prefix {
  padding-left: 0;
}
.input-prefix {
  padding: 0 12px 0 14px;
  color: #9ca3af;
  font-weight: 600;
}
.input-with-prefix input {
  padding-left: 0;
}

.form-error {
  margin-top: 12px;
  padding: 12px 14px;
  background: rgba(254, 242, 242, 0.95);
  border: 1px solid rgba(248, 113, 113, 0.28);
  border-radius: 12px;
  color: #dc2626;
  font-size: 13px;
}
.field-error {
  margin-top: 6px;
  color: #dc2626;
  font-size: 12px;
  line-height: 1.3;
}
.field-hint {
  margin-top: 8px;
  color: #0f766e;
  font-size: 12px;
  font-weight: 600;
}
.field-hint.hidden {
  display: none;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 6px 0 18px;
  color: #4b5563;
  font-size: 14px;
}
.checkbox-row span{
  color: rgba(0, 0, 0, 0.88);
  font-size: 14px;
  line-height: 1.5714285714285714;
}
.checkbox-row input {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  accent-color: #12246b;
}
.checkbox-row a,
.auth-inline-link {
  color: #12246b;
  font-weight: 600;
  text-decoration: underline;
}
.auth-inline-link:hover {
  text-decoration: underline;
}
.signup-footer {
  margin-top: 20px;
  font-weight: 500;
  font-size: 14px;
  color: #5e687c;
  text-align: center;
}

.otp-inputs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}
.otp-box {
  width: 62px;
  height: 62px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  outline: none;
  transition: var(--transition);
}
.otp-box:focus {
  border-color: #12246b;
  box-shadow: 0 0 0 3px rgba(18, 36, 107, 0.08);
}
.otp-dash {
  color: #9ca3af;
  font-size: 20px;
  font-weight: 700;
}
.otp-resend {
  margin-top: 18px;
  color: #6b7280;
  font-size: 14px;
  text-align: center;
}
.otp-resend-timer {
  color: #9ca3af;
  font-weight: 600;
}

.onboarding-panel {
  margin: 0 auto;
}
.onboarding-panel--narrow {
  max-width: 700px;
  padding: 6px 6px 0;
}
.onboarding-stepper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.stepper-segment {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: #e5e7eb;
}
.stepper-segment.is-active {
  background: #12246b;
}
.onboarding-step-label {
  margin-bottom: 24px;
  color: #374151;
  font-size: 13px;
  font-weight: 600;
}
.onboarding-title {
  font-size: 48px;
  line-height: 1.08;
  font-weight: 700;
  color: #1f2937;
  letter-spacing: -0.03em;
}
.onboarding-subtitle {
  margin-top: 14px;
  color: #4b5563;
  font-size: 18px;
}
.required-indicator {
  color: #dc2626;
}
.onboarding-actions {
  display: flex;
  gap: 14px;
  margin-top: 30px;
}
.onboarding-actions .btn {
  flex: 1;
  min-height: 52px;
}

.plan-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 720px;
  border: 1px solid #edf0f5;
  border-radius: 28px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.05);
}
.plan-sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 32px 24px 24px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
  border-right: 1px solid #edf0f5;
}
.plan-sidebar-copy {
  max-width: 170px;
}
.plan-sidebar-eyebrow {
  color: #111827;
  font-size: 20px;
  font-weight: 500;
}
.plan-sidebar-copy h2 {
  color: #12246b;
  font-size: 48px;
  line-height: 1;
  letter-spacing: -0.04em;
}
.plan-sidebar-copy p:last-child {
  margin-top: 16px;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
}
.plan-sidebar-visual {
  position: relative;
  min-height: 140px;
}
.plan-avatar-card {
  position: absolute;
  border-radius: 16px;
  background: linear-gradient(135deg, #f59e0b 0%, #f472b6 100%);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}
.plan-avatar-card--one {
  top: 8px;
  left: 10px;
  width: 86px;
  height: 58px;
}
.plan-avatar-card--two {
  top: 44px;
  left: 82px;
  width: 96px;
  height: 64px;
  background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
}
.plan-avatar-card--three {
  top: 82px;
  left: 34px;
  width: 110px;
  height: 70px;
  background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
}
.plan-sidebar-line {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 54px;
  height: 54px;
  border: 2px dashed rgba(18, 36, 107, 0.16);
  border-radius: 16px;
}
.plan-sidebar-brand {
  color: #12246b;
  font-size: 28px;
  font-weight: 700;
}
.plan-main {
  padding: 32px 42px 38px;
}
.plan-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}
.plan-toggle-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}
.plan-toggle-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff7ed;
  color: #374151;
  font-weight: 700;
}
.plan-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.18);
}
.billing-toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 700;
}
.billing-label {
  color: #6b7280;
}
.billing-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  padding: 2px;
  border-radius: 999px;
  background: #d1d5db;
  transition: var(--transition);
}
.billing-toggle.is-yearly {
  background: #4f9c8d;
}
.billing-toggle-knob {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.16);
  transform: translateX(0);
  transition: var(--transition);
}
.billing-toggle.is-yearly .billing-toggle-knob {
  transform: translateX(20px);
}
.billing-save-pill {
  padding: 4px 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: #0f766e;
  font-size: 11px;
  font-weight: 700;
}
.plan-status {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 600;
}
.plan-grid > .plan-status {
  grid-column: 1 / -1;
  margin: 0;
  border-radius: 0;
}
.plan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  overflow: hidden;
}
.plan-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 18px 16px 16px;
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
  transition: var(--transition);
}
.plan-card:last-child {
  border-right: none;
}
.plan-card.is-selected {
  background: #f8fbff;
  box-shadow: inset 0 0 0 2px rgba(18, 36, 107, 0.18);
}
.plan-card.is-current {
  background: #f0fdf4;
}
.plan-card.is-enterprise {
  background: #fcfcfd;
}
.plan-card-head {
  margin-bottom: 12px;
}
.plan-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.plan-name {
  font-size: 17px;
  font-weight: 700;
  color: #1f2937;
}
.plan-badge {
  padding: 4px 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
}
.plan-card-description {
  color: #6b7280;
  font-size: 12px;
  line-height: 1.45;
}
.plan-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 16px;
  color: #1f2937;
}
.plan-price-amount {
  font-size: 38px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.plan-price-cycle {
  color: #6b7280;
  font-size: 13px;
  font-weight: 700;
}
.plan-price-note {
  margin-top: 6px;
  color: #9ca3af;
  font-size: 12px;
}
.plan-meta-card {
  margin-top: 14px;
  padding: 12px;
  border-radius: 12px;
  background: #f3f4f6;
}
.plan-meta-title {
  color: #111827;
  font-size: 12px;
  font-weight: 700;
}
.plan-meta-copy {
  margin-top: 4px;
  color: #6b7280;
  font-size: 11px;
  line-height: 1.45;
}
.plan-card-action {
  margin-top: 12px;
  min-height: 44px;
  border-radius: 12px;
  background: #1f2937;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}
.plan-card-action:hover {
  background: #111827;
}
.plan-card-action.is-selected {
  background: #12246b;
}
.plan-card-action:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
}
.plan-feature-title { border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--bg-input);
  color: var(--text-primary);
  margin-top: 16px;
  margin-bottom: 10px;
  color: #4b5563;
  font-size: 12px;
  font-weight: 700;
}
.plan-feature-list {
  display: grid;
  gap: 8px;
  list-style: none;
}
.plan-feature-item {
  position: relative;
  padding-left: 18px;
  color: #4b5563;
  font-size: 12px;
  line-height: 1.45;
}
.plan-feature-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #4f9c8d;
}
.plan-enterprise-note {
  margin-top: 18px;
  color: #4b5563;
  font-size: 12px;
  line-height: 1.45;
}
.plan-footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 24px;
}
.plan-footer-actions .btn {
  min-width: 220px;
}

/* === Buttons === */
.btn.btn-sm { padding: 6px 12px; font-size: 13px; font-weight: 400; border-radius: 6px; }
.btn.btn-md { padding: 10px 20px; font-size: 14px; font-weight: 500; border-radius: 8px;}
.btn.btn-lg { padding: 13.5px 28px; font-weight: 600; font-size: 1rem; border-radius: var(--radius-md);}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-sm); font-size: 16px;
  transition: var(--transition); white-space: nowrap;
}
.btn-loader {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-primary { background: #001760; color: #ffffff; }
.btn-primary:hover { background: #000b2d; transform: translateY(-0px); }
.btn-primary:disabled {
  background: #cbd5e1;
  color: #ffffff;
  transform: none;
  cursor: not-allowed;
}
.btn-secondary { background: #f3f4f6; color: #1f2937; border: 0px solid #e5e7eb; }
.btn-secondary:hover { background: #e5e7eb; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: 0.9; }
.btn-ghost { color: #6b7280; }
.btn-ghost:hover { color: var(--text-primary); background: #f3f4f6; }
.btn-outline { border: 1px solid var(--border); }
.btn-outline:hover { background: #e5e7eb; }
.btn-full { width: 100%; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: var(--radius-sm); transition: var(--transition);
  /* color: var(--text-secondary); */
  color: #59636e;
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn-sm { 
  width: 28px;
  height: 28px;
  padding: 7px;
}
.icon-btn-sm svg { 
  width: 100%; 
  height: 100%; 
}
.vertical-divider{
  background-color: var(--border);
  min-height: 100%;
  width: 1px;

}
.spinner {
  display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #ffffff; border-radius: 50%; animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* === Avatar === */
.avatar {
  width: 40px; 
  height: 40px; 
  border-radius: var(--radius-full); 
  overflow: hidden;
  display: flex; 
  align-items: center; 
  justify-content: center;
  font-weight: 600;
  flex-shrink: 0; 
  font-size: 16px;
  background: var(--accent-muted); 
  color: var(--accent);
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0);
  border-radius: 8px;
}
.avatar img {  max-width: 100%; object-fit: cover; }
.avatar-xs { width: 24px; height: 24px; font-size: 11px; }
.avatar-sm { width: 32px; height: 32px; font-size: 13px; }
.avatar-md{ min-width: 36px; width: 36px; height: 36px; line-height: 36px; border-radius: 12px;}
.avatar-lg { width: 56px; height: 56px; font-size: 22px; }
.avatar-xl { width: 80px; height: 80px; font-size: 32px; }

.avatar .presence-dot {
  position: absolute; bottom: 0; right: 0; width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid var(--bg-primary); background: var(--offline);
}
.avatar .presence-dot.offline { background: var(--danger); }
.avatar .presence-dot.online { background: var(--online); }
.avatar .presence-dot.busy { background: var(--busy); }
.avatar .presence-dot.away { background: var(--away); }
.grouped-chat-avatar {
  background: linear-gradient(135deg, #2f7aa5 0%, #8b3fa8 100%);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.grouped-chat-avatar svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

/* === Badge === */
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700; background: var(--danger); color: #000;
}
.badge-accent { background: var(--accent); }
.badge-muted { background: var(--text-muted); }

/* === App Layout === */
.app-layout {    
  display: flex; height: calc(100vh - 54px); width: 100vw; overflow: hidden;
  background-color: #fff;
  position: relative;
  box-shadow: 0 0 2px rgba(0, 0, 0, .12), 0 4px 8px rgba(0, 0, 0, .14);
  border-radius: 8px 8px 0 0;
} 

/* === Space Sidebar === */
.space-sidebar {
  width: var(--space-sidebar-width); 
  background:  #f0f2f5;
   /* border-right: 1px solid var(--border); */
  display: flex; flex-direction: column; align-items: center; padding: 14px 0; gap: 4px;
  flex-shrink: 0;
}
.space-home, .space-item {
  width: 44px; height: 44px; border-radius: 16px; display: flex; align-items: center;
  justify-content: center; cursor: pointer; transition: var(--transition); color: var(--text-secondary);
}
.space-home { color: var(--accent-selected); background: var(--bg-primary); border:1px solid var(--border) }
.space-home:hover, .space-item:hover { background: var(--bg-hover); color: var(--text-primary); border-radius: var(--radius-lg); }
.space-home svg, .space-item svg { width: 22px; height: 22px; }
.space-divider { width: 32px; height: 1px; background: var(--border); margin: 6px 0; }
.spaces-list { display: flex; flex-direction: column; gap: 4px; align-items: center; overflow-y: auto; flex: 1; }

/* === Room Panel === */
.room-panel {
  position: relative;
  padding-top: 5px;
  width: var(--room-panel-width); 
  /* background: var(--bg-secondary); */
   /* border-right: 1px solid var(--border); */
  display: flex; flex-direction: column; flex-shrink: 0;
  box-shadow: 0 0 2px rgba(0, 0, 0, .12), 0 4px 8px rgba(0, 0, 0, .14);
  overflow: auto;
}
.room-panel-resize-handle {
  position: relative;
  top: 0;
  right: 0;
  bottom: 0;
  width: 2px;
  cursor: col-resize;
  z-index: 2;
  background: #fff;
  touch-action: none;
}
.room-panel-resize-handle:hover,
.room-panel-resize-handle:active {
  background: #5b5fc7;
}
.room-panel-resize-handle::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 2px;
  height: 36px;
  border-radius: 999px;
  /* background: rgba(0, 0, 0, 0.18); */
}
@media (max-width: 900px) {
  .room-panel-resize-handle {
    display: none;
  }
}
.room-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  min-height: var(--header-height);
  gap: 10px;
}
.user-info { display: flex; align-items: center; gap: 10px; cursor: pointer; min-width: 0; flex: 1; }
.user-display-name {
  font-weight: 600;
  font-size: 17px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.workspace-switcher {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  max-width: none;
  flex: 1;
}
.workspace-label {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1;
}
.workspace-select {
  width: 100%; 
  outline: none;
}
.workspace-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-muted);
}
.workspace-select:disabled {
  color: var(--text-muted);
  background: var(--bg-surface);
} 
.room-panel-actions { display: flex; gap: 2px; }

/* Search Overlay */
.search-overlay {
  position: absolute; top: 0; left: var(--space-sidebar-width); width: var(--room-panel-width);
  height: 100%; background: var(--bg-secondary); z-index: 50; display: flex; flex-direction: column;
}
.search-input-wrap {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--border);
}
.search-input-wrap svg { width: 18px; height: 18px; color: var(--text-muted); flex-shrink: 0; }
.search-input-wrap input {
  flex: 1; background: none; border: none; outline: none; color: var(--text-primary); font-size: 16px;
}
.search-results { flex: 1; overflow-y: auto; padding: 8px; }

/* Left utility menu */
.left-utility-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 14px 4px;
  border-bottom: 1px solid var(--border-light);
}
.left-utility-btn {
  width: 100%;
  text-align: left;
  padding: 6px 8px;
  border-radius: 0.375rem;
  font-size: 14px;
  font-weight: 500;
  color: #0009;
  background: transparent;
  border: 0;
  transition: var(--transition-fast);
}
.left-utility-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.left-utility-btn.active,
.left-utility-btn.active:hover {
  background: #2f6f7d;
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.left-utility-link {
  display: flex;
  align-items: center;
  gap: 10px;
}
.left-utility-link svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}

/* Room Filter */
.room-filter-tabs {
  display: flex; gap: 4px; padding: 8px 14px; overflow: visible; flex-shrink: 0; position: relative;
}
.room-filter {
  padding: 5px 12px; border-radius: var(--radius-full); font-size: 13px; font-weight: 500;
  color: var(--text-secondary); white-space: nowrap; transition: var(--transition);
}
.room-filter.active { background: var(--accent-muted); color: var(--accent); }
.room-filter:hover:not(.active) { background: var(--bg-hover); color: var(--text-primary); }
.all-filter-group { position: relative; }
.room-filter-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.room-filter-caret {
  width: 14px;
  height: 14px;
  transition: transform var(--transition-fast);
}
.room-filter-all.menu-open .room-filter-caret { transform: rotate(180deg); }
.all-filter-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 25;
  min-width: 160px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.all-filter-option {
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}
.all-filter-option:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.all-filter-option.active {
  background: var(--accent-muted);
  color: var(--accent);
  font-weight: 600;
}

/* Room List */
.room-list {
  flex: 1; 
  /* overflow-y: auto;  */
  padding: 4px 8px;
}
.room-item {
  display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 0.375rem;
  cursor: pointer; transition: var(--transition); position: relative;
}
.room-item:hover { background: var(--bg-hover); }
.room-item.active { background: var(--accent-muted); }
.room-item .avatar { flex-shrink: 0; }
.room-item-info { flex: 1; min-width: 0; }
.room-item-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; min-width: 0; }
.room-item-name { 
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  text-transform: capitalize;
  line-height: normal;
  text-align: left;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: block;
  overflow: hidden;
  flex: 1;
  min-width: 0;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}
.room-item-time { font-size: 11px; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }
.room-item-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; }
.room-item-preview { 
  font-size: 12px;
  color: var(--text-muted); 
  white-space: nowrap; 
  overflow: hidden; 
  text-overflow: ellipsis;
  flex: 1; 
}
.room-item .badge {
  min-width: 26px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  background: #c01343;
  border-radius: 50px;
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
  white-space: nowrap;
  padding: 0px 5px;
  flex-shrink: 0;
}
.room-item-preview.message-body * {
  font-size: inherit;
  line-height: inherit;
}
.room-item-typing {
  color: var(--accent);
  font-style: italic;
  font-weight: 600;
}
.room-item-preview p,
.room-item-preview div,
.room-item-preview blockquote,
.room-item-preview pre,
.room-item-preview ul,
.room-item-preview ol,
.room-item-preview li {
  display: inline;
  margin: 0;
  padding: 0;
}
.room-item-preview br { display: none; }
.room-item-preview code {
  background: transparent;
  padding: 0;
}
.room-preview-sender {
  font-weight: 600;
  color: var(--text-primary);
}

/* Room list loading skeleton */
.room-list.is-loading {
  overflow: hidden;
}
.room-skeleton-item {
  pointer-events: none;
  cursor: default;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  margin-bottom: 4px;
  border-radius: 12px;
}
.room-skeleton-item:hover {
  background: transparent;
}
.room-skeleton-avatar,
.room-skeleton-line {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #eceff5 0%, #e5e7eb 100%);
}
.room-skeleton-avatar::after,
.room-skeleton-line::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.7) 50%, transparent 100%);
  animation: room-skeleton-shimmer 1.2s ease-in-out infinite;
}
.room-skeleton-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}
.room-skeleton-item .room-item-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.room-skeleton-item .room-item-top,
.room-skeleton-item .room-item-bottom {
  margin: 0;
}
.room-skeleton-line {
  display: block;
  height: 10px;
  border-radius: 999px;
}
.room-skeleton-name {
  height: 12px;
}
.room-skeleton-time {
  height: 9px;
}
.room-skeleton-preview {
  max-width: 100%;
}
@keyframes room-skeleton-shimmer {
  100% { transform: translateX(100%); }
}

/* Invites */
.invites-section { padding: 8px; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 10px; font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text-muted);
}
.invite-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm);
}
.invite-actions { display: flex; gap: 4px; margin-left: auto; }

/* === Chat Main === */
.chat-main {
  flex: 1; display: flex; flex-direction: column; min-width: 0; position: relative;
  background: var(--bg-primary);
}

/* Welcome */
.welcome-screen { flex: 1; display: flex; align-items: center; justify-content: center; }
.channel-welcome-card {
  padding: 22px 22px 18px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}
.channel-welcome-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.channel-welcome-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #4ade80;
  color: #111827;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.channel-welcome-icon svg {
  width: 16px;
  height: 16px;
}
.channel-welcome-avatar {
  flex-shrink: 0;
}
.channel-welcome-avatar .message-avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  line-height: 44px;
  border-radius: 14px;
}
.channel-welcome-title-wrap {
  min-width: 0;
}
.channel-welcome-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
}
.channel-welcome-meta {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
}
.channel-welcome-copy {
  font-size: 16px;
  line-height: 1.55;
  color: #111827;
  margin-bottom: 2px;
}
.channel-welcome-copy strong {
  font-weight: 800;
}
.channel-welcome-creator {
  color: #635bff;
  font-weight: 700;
}
.channel-welcome-description {
  font-size: 16px;
  line-height: 1.5;
  color: #111827;
  margin-bottom: 18px;
}
.channel-welcome-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.channel-welcome-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #1f2937;
  font-weight: 700;
  font-size: 14px;
}
.channel-welcome-btn:hover {
  background: #f8fafc;
}
.channel-welcome-btn svg {
  width: 15px;
  height: 15px;
}
.welcome-content { text-align: center; max-width: 400px; }
.welcome-content h2 { font-size: 24px; font-weight: 700; margin: 24px 0 8px; }
.welcome-content p { color: var(--text-secondary); margin-bottom: 24px; }
.welcome-actions { display: flex; gap: 12px; justify-content: center; }

/* Chat View */
.chat-view { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; }

/* Chat Header */
.client-theme-background{
  background: radial-gradient(circle at 50% 50%, #7A2D5E 20%, transparent 80%), conic-gradient(from 45deg at 50% 50%, #7A2D5E 0%, #1E8A70 25%, #7D7D10 50%, #1E6680 75%, #7A2D5E 100%);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}
.chat-header {
  display: flex; align-items: center; gap: 8px; padding: 5px 20px; height: var(--header-height);
  border-bottom: 1px solid var(--border); flex-shrink: 0; background: var(--bg-primary);
}
.chat-header-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; cursor: pointer; }
.chat-header-info .icon-btn{ width: 26px; height: 26px;}
.header-favourite-btn.is-active {
  color: #f4b400;
}
.chat-header-text { min-width: 0; }
.chat-header-text h3 { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-primary);}
.room-topic { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; max-width: 400px; }
.chat-header-actions { display: flex; gap: 2px; flex-shrink: 0; }
.mobile-back { display: none; }

.bookmark-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-primary);
}
.bookmark-bar-scroll {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  padding-bottom: 2px;
}
.bookmark-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 220px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg-primary);
  color: var(--text-primary);
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1;
  text-decoration: none;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.bookmark-chip:hover {
  background: var(--bg-secondary);
  border-color: #d4d7de;
  text-decoration: none;
}
.bookmark-chip.add {
  border-style: dashed;
  color: var(--accent);
  font-weight: 600;
}
.bookmark-chip.add:hover {
  background: var(--accent-muted);
  border-color: var(--accent);
}
.bookmark-chip-icon {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg-secondary);
}
.bookmark-chip-icon img {
  width: 16px;
  height: 16px;
  object-fit: cover;
}
.bookmark-chip-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bookmark-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Call status */
.call-status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  background: #fff3f3;
}
.call-status-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.call-status-pill {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #dc2626;
  color: #ffffff;
  border-radius: var(--radius-full);
  padding: 2px 8px;
}
.call-status-user {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}
.call-status-duration {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}
.call-status-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Pinned bar */
.pinned-bar {
  display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--bg-secondary);
  border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-secondary); cursor: pointer;
}
.pinned-bar:hover { background: var(--bg-hover); }

/* === Timeline === */
.timeline-container {
  flex: 1; overflow-y: auto; position: relative; scroll-behavior: smooth;
}
.timeline-container.is-bootstrap-loading {
  overflow: hidden;
  display: block;
}
.timeline-container.is-bootstrap-loading .timeline-loader {
  display: flex;
  min-height: 100%;
  padding: 0;
}
.timeline-container.is-bootstrap-loading .timeline {
  display: none;
}
.timeline-container.is-locating-target {
  overflow: hidden;
}
.timeline-container.is-locating-target .timeline {
  opacity: 0;
  pointer-events: none;
}
.timeline { 
  /* padding: 16px; */
   display: flex; flex-direction: column; min-height: 100%; justify-content: flex-end; }
.timeline-virtual-spacer,
.timeline-virtual-block {
  width: 100%;
  flex: 0 0 auto;
}
.timeline-loader {
  display: flex;
  width: 100%;
  min-height: 100%;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  color: var(--text-muted);
  background:
    radial-gradient(circle at top left, rgba(50, 99, 233, 0.05), transparent 30%),
    linear-gradient(180deg, #fbfcff 0%, #ffffff 28%);
}
.timeline-loader-shell {
  width: min(100%, 1080px);
  min-height: 100%;
  margin: 0;
  padding: 20px 22px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
}
.timeline-loader-main {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  gap: 20px;
}
.timeline-loader-heading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-left: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}
.timeline-loader-thread {
  display: flex;
  flex-direction: column;
  width: min(100%, 900px);
  gap: 18px;
  padding-left: 12px;
}
.timeline-skeleton-day-separator {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(100%, 520px);
  margin: 4px 0 2px 52px;
}
.timeline-skeleton-day-separator::before,
.timeline-skeleton-day-separator::after {
  content: '';
  height: 1px;
  flex: 1 1 auto;
  background: #ecf0f6;
}
.timeline-skeleton-avatar,
.timeline-skeleton-line {
  position: relative;
  overflow: hidden;
  background: #e8ebf3;
}
.timeline-skeleton-avatar::after,
.timeline-skeleton-line::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.78), transparent);
  animation: room-skeleton-shimmer 1.2s ease-in-out infinite;
}
.timeline-skeleton-message {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: min(100%, 760px);
}
.timeline-skeleton-message.is-grouped {
  margin-top: -8px;
}
.timeline-skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex: 0 0 auto;
  margin-top: 2px;
}
.timeline-skeleton-avatar-spacer {
  visibility: hidden;
}
.timeline-skeleton-stack {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  gap: 10px;
}
.timeline-skeleton-meta,
.timeline-skeleton-lines {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.timeline-skeleton-lines {
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
}
.timeline-skeleton-line {
  display: block;
  height: 11px;
  border-radius: 999px;
}
.timeline-skeleton-line.w-day-pill {
  width: 104px;
  height: 26px;
}
.timeline-skeleton-line.w-name-lg { width: 156px; }
.timeline-skeleton-line.w-name-md { width: 124px; }
.timeline-skeleton-line.w-name-sm { width: 108px; }
.timeline-skeleton-line.w-time-sm { width: 58px; }
.timeline-skeleton-line.w-time-xs { width: 46px; }
.timeline-skeleton-line.w-status-xs { width: 50px; }
.timeline-skeleton-line.w-body-xl { width: min(100%, 520px); }
.timeline-skeleton-line.w-body-lg { width: min(82%, 420px); }
.timeline-skeleton-line.w-body-md { width: min(68%, 360px); }
.timeline-skeleton-line.w-body-sm { width: min(54%, 290px); }
.timeline-skeleton-line.w-body-xs { width: min(36%, 190px); }
@media (max-width: 900px) {
  .timeline-loader-shell {
    padding: 16px 14px 12px;
  }
  .timeline-loader-heading,
  .timeline-loader-thread {
    padding-left: 0;
    margin-left: 0;
  }
  .timeline-loader-thread {
    width: 100%;
  }
  .timeline-skeleton-day-separator {
    width: 100%;
    max-width: 420px;
    margin-left: 0;
  }
}
@media (max-width: 640px) {
  .timeline-skeleton-avatar {
    width: 34px;
    height: 34px;
  }
  .timeline-skeleton-message {
    gap: 10px;
  }
  .timeline-loader-thread {
    gap: 16px;
  }
  .timeline-skeleton-line.w-body-xl { width: min(100%, 360px); }
  .timeline-skeleton-line.w-body-lg { width: min(86%, 300px); }
  .timeline-skeleton-line.w-body-md { width: min(70%, 240px); }
}
.timeline-locate-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(246, 248, 251, 0.96);
  color: var(--text-muted);
}
.timeline-locate-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-primary);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}
.timeline.timeline-page-mode {
  display: block;
  min-height: 0;
  padding: 12px;
}
.timeline.timeline-page-mode .all-threads-list,
.timeline.timeline-page-mode .files-page,
.timeline.timeline-page-mode .saved-page {
  padding: 0;
}
.message-jump-dropdown {
  position: absolute;
  top: 14px;
  left: 50%;
  z-index: 16;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateX(-50%);
  pointer-events: none;
}
.message-jump-trigger,
.message-jump-menu {
  pointer-events: auto;
}
.message-jump-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid #dadde3;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #2b2f38;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}
/* .message-jump-trigger:hover {
  background: #ffffff;
  border-color: #cfd5de;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
} */
.message-jump-trigger:disabled {
  cursor: wait;
  opacity: 0.72;
}
.message-jump-caret {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}
.message-jump-trigger[aria-expanded="true"] .message-jump-caret {
  transform: rotate(180deg);
}
.message-jump-menu {
  margin-top: 8px;
  min-width: 122px;
  padding: 10px;
  /* border: 1px solid #e5e7eb; */
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
}
.message-jump-dropdown.is-anchored .message-jump-trigger {
  display: none;
}
.message-jump-dropdown.is-anchored .message-jump-menu {
  margin-top: 0;
}
.message-jump-option {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  color: #1f2937;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.message-jump-option:hover,
.message-jump-option.is-active {
  background: var(--bg-hover);
}
.message-jump-option:disabled {
  cursor: wait;
  opacity: 0.7;
}
.timeline-container.is-bootstrap-loading .message-jump-dropdown,
.timeline-container.is-locating-target .message-jump-dropdown {
  display: none;
}

/* Date separator */
.date-separator {
  display: flex; align-items: center; gap: 0px; margin: 16px 0; font-size: 12px; font-weight: 500; color: var(--text-muted);
}
.date-separator::before, .date-separator::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.chat-date-time{
  position: relative;
}
.btn-chat-date-time-picker{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 1px solid #e6e6e6;
  color: #333;
  text-decoration: none;
  background: #fff;
  padding: 0 1rem;
  border-radius: 1.5rem;
  font-size: .8125rem;
  line-height: 1.75rem;
  min-height: 1.75rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  z-index: 1;
}
.btn-chat-date-time-caret {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  color: #6b7280;
}
.new-messages-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  color: #dc2626;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}
.new-messages-divider::before,
.new-messages-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #fca5a5;
}
.new-messages-divider span {
  padding: 2px 8px;
  border: 1px solid #fca5a5;
  border-radius: var(--radius-full);
  background: #fef2f2;
}
.new-messages-block {
  position: relative;
  margin: 10px 0 6px;
  padding: 0;
}
.new-messages-block::before {
  content: none;
}

/* Message */
.message-group { margin-bottom: 2px; }
.message {
  display: flex; gap: 10px; padding: 8px 20px; 
  /* border-radius: var(--radius-sm); */
  position: relative; transition: background var(--transition-fast);
}
.message:hover { background: #f8f8f8; }
.message.is-saved {
  background-color: #e8f5fa;
  border-left: 0px solid #f59e0b;
  border-radius: 0 0px 0px 0;
  /* padding-left: 8px; */
  /* margin-left: -11px; */
  transition: background-color 0.2s ease;
}
.message.message-unread {
  background: rgba(37, 99, 235, 0.08);
  box-shadow: inset 3px 0 0 var(--accent);
}
.message.message-unread:hover {
  background: rgba(37, 99, 235, 0.12);
}
.message.message-own.is-editing {
  background-color: #fcf4da;
}
.message.message-fresh-incoming {
  border: none;
  margin-left: 0;
  margin-right: 0;
}

.message.last-read-target {
  background: rgba(37, 99, 235, 0.14);
  transition: background 0.25s ease;
}
.message:hover .message-actions { opacity: 1; pointer-events: auto; }
.message .avatar { margin-top: 2px; flex-shrink: 0; }
.message-content { 
  flex: 1; 
  min-width: 0; }
.message-header { 
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  line-height: normal; 
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-user-select: text;
  user-select: text;
}
.message-sender { font-weight: 600; font-size: 15px; cursor: pointer;    color: var(--text-primary); }
.message-sender:hover { text-decoration: underline; }
.message-sender-fixed { color: var(--text-primary); }
.message-sender-link {
  color: var(--text-link);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.message-sender-link:hover {
  color: var(--accent);
}
.message-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 999px;
  background: #f3f4f6;
  color: #111827;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  vertical-align: middle;
  min-width: 0;
  cursor: default;
}
.message-status-badge-emoji {
  flex-shrink: 0;
  line-height: 1;
}
.message-status-badge-text {
  display: none;
}
.message-time { 
  font-size: 12px;
  font-weight: 400;
  color: #666;
 }
 .message-time:hover{
  text-decoration: underline;
 }
.message-presence {
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}
.message-presence.online { color: var(--online); }
.message-presence.away { color: var(--away); }
.message-presence.offline { color: var(--text-muted); }
.message-edited { font-size: 11px; color: var(--text-muted); font-style: italic; }
.message-delivery-state {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.message-delivery-state-queued {
  background: #fef3c7;
  color: #92400e;
}
.message-delivery-state-sending {
  background: #dbeafe;
  color: #1d4ed8;
}
.message-delivery-state-failed {
  background: #fee2e2;
  color: #b91c1c;
}
.message-body { margin-top: 2px; word-wrap: break-word; overflow-wrap: break-word; line-height: 1.55; }
.message-body-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  min-width: 0;
  width: 100%;
}
.message-body-row .message-body {
  flex: 1 1 auto;
  min-width: 0;
}
.message-body-row .message-read-receipts {
  margin-top: 0;
  margin-left: auto;
  justify-content: flex-end;
  flex-shrink: 0;
  width: auto;
  align-self: flex-end;
}
.message-body p { margin-bottom: 4px; }
.message-body p:last-child { margin-bottom: 0; }
.message-body code { background: var(--bg-surface); padding: 1px 5px; border-radius: 3px; font-family: var(--font-mono); font-size: 13px; }
.message-body pre { background: var(--bg-surface); padding: 12px; border-radius: var(--radius-sm); overflow-x: auto; margin: 6px 0; }
.message-body pre code { padding: 0; background: none; }
.message-body blockquote { border-left: 3px solid var(--accent); padding-left: 12px; color: var(--text-secondary); margin: 6px 0; }
.message-body a { color: var(--text-link); }
.message-body .mention-user,
.mention-user {
  color: #6752d8;
  padding: 0;
  border-radius: 0;
  background: transparent;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.message-body .mention,
.mention,
.mention *,
.mention .ql-mention-denotation-char,
.mention .ql-mention-value {
  cursor: pointer !important;
}
.message-body .mention,
.message-body .mention *,
.message-body .mention .ql-mention-denotation-char,
.message-body .mention .ql-mention-value {
  background: transparent !important;
  border-radius: 0 !important;
  padding: 0 !important;
}
.message-body .mention-user.mention-user-other,
.mention-user.mention-user-other,
.message-body .mention.mention-other,
.mention.mention-other {
  color: #6752d8;
}
.message-body .mention-user.mention-user-alert,
.mention-user.mention-user-alert,
.message-body .mention.mention-alert,
.mention.mention-alert {
  color: #da3b01;
}
.message-body .mention-user:hover,
.mention-user:hover,
.message-body .mention:hover,
.mention:hover {
  text-decoration: none;
}
.message-body .mention-user.mention-user-alert:hover,
.mention-user.mention-user-alert:hover,
.message-body .mention.mention-alert:hover,
.mention.mention-alert:hover {
  text-decoration: none;
}
.message-body ul, .message-body ol { padding-left: 20px; margin: 4px 0; }
.message-body img { max-width: 400px; max-height: 300px; border-radius: var(--radius-sm); cursor: pointer; margin-top: 4px; }
.message-read-receipts {
  margin-top: 4px;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
}
.message-read-receipts-trigger {
  border: 0;
  padding: 0;
  background: transparent;
  appearance: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.message-read-receipts-trigger:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  outline-offset: 3px;
  border-radius: 8px;
}
.message.message-own .message-read-receipts {
  width: auto;
  max-width: fit-content;
  margin-left: auto;
  justify-content: flex-end;
}
.message-read-count {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 500;
  color: #666;
  white-space: nowrap;
  line-height: 1;
}

/* Continuation message (no avatar) */
.message.continuation { padding-left: 66px;}
.message.continuation .avatar { display: none; }
.message.continuation .message-header { display: none; }
.message.continuation:hover .hover-time { display: block; }
.hover-time { 
  display: none;
  position: absolute;
  left: 10px;
  top: 14px;
  font-size: 12px;
  font-weight: 400;
  line-height: normal;
  color: #666;
  min-width: 48px;
  cursor: pointer;
  -webkit-user-select: text;
  user-select: text;
 }

/* Message actions */
.message-actions {
  position: absolute; top: -14px; right: 12px; display: flex; gap: 2px;
  background: var(--bg-primary); 
  /* border: 1px solid var(--border);  */
  border-radius: 8px;
  padding: 4px; opacity: 0; pointer-events: none; transition: opacity var(--transition-fast);
  box-shadow: var(--shadow-sm); z-index: 5;
  box-shadow: 0 0 2px rgba(0, 0, 0, .12), 0 8px 16px rgba(0, 0, 0, .14);
}
.message-action-btn {
  width: 28px; height: 28px; border-radius: var(--radius-xs); display: flex;
  align-items: center; justify-content: center; color: #606060;
  transition: var(--transition-fast);
}
.message-action-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.message-action-btn svg { width: 18px; height: 18px; }
/* .message-action-btn[data-action="edit"] {
  background: #eef1f5;
  border: 1px solid #eef1f5;
  color: #1f2937;
}*/
.message-action-btn[data-action="edit"]:hover {
  background: #e3e8ef;
  color: #111827;
}
.message-action-btn.is-active,
.message-action-btn[data-action="edit"].is-active {
  background: #dbe7ff;
  border-color: #8fb0f5;
  color: #1d4ed8;
}
/* Reply thread reference */
.message-reply-ref {
  display: flex; align-items: center; gap: 6px; padding: 4px 8px; margin-bottom: 4px;
  background: var(--bg-surface); border-radius: var(--radius-xs); font-size: 12px;
  border-left: 2px solid var(--accent); cursor: pointer; color: var(--text-secondary);
}
.message-reply-ref:hover { background: var(--bg-hover); }
.reply-ref-author { font-weight: 600; color: var(--text-primary); }

/* Reactions */
.reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.reaction-chip {
  vertical-align: top;
  color: #276874;
  background-color: #e3f8ff;
  border: 1px solid #276874;
  border-radius: 12px;
  align-items: center;
  margin-bottom: 4px;
  margin-right: 4px;
  padding: 4px 6px;
  font-size: 12px;
  line-height: 1;
  display: inline-flex;
  transition: all .15s ease;
}

.reaction-chip:hover { border-color: #276874; background-color: #276874;}
.reaction-chip.active { background: var(--accent-muted); border-color: var(--accent); }
.reaction-count { 
  font-size: 12px;
  font-weight: 700;
  line-height: normal;
  padding: 0 4px;
  text-align: center;
}
.reaction-chip:hover .reaction-count {
  color: #fff;
}
.reaction-popover {
  position: absolute;
  z-index: 9999;
  pointer-events: auto;
}
.reaction-popover.hidden {
  display: none;
}
.read-receipt-popover {
  position: absolute;
  z-index: 9999;
  pointer-events: auto;
}
.read-receipt-popover.hidden {
  display: none;
}
.read-receipt-popover-card {
  min-width: 220px;
  max-width: 280px;
  max-height: 280px;
  overflow-y: auto;
  background: #fff;
  /* color: #fff; */
  border-radius: 12px;
  /* padding: 8px; */
  box-shadow: 0 3px 6px -4px rgba(0, 0, 0, .12), 0 6px 16px 0 rgba(0, 0, 0, .08), 0 9px 28px 8px rgba(0, 0, 0, .05);
  padding: 6px;
}
.read-receipt-popover-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.read-receipt-popover-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 4px 8px;
  border-radius: var(--radius-md);
  cursor: pointer;
}
.read-receipt-popover-item:hover {
  background: var(--bg-hover);
}
.read-receipt-popover-person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.read-receipt-popover-avatar {
  position: relative;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2a2a2a;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.read-receipt-popover-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.read-receipt-popover-name {
  min-width: 0;
  /* color: #fff; */
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.read-receipt-popover-status {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #d1d5db;
}
.read-receipt-popover-status.online {
  background: var(--online);
}
.read-receipt-popover-status.away {
  background: var(--away);
}
.read-receipt-popover-status.offline {
  background: #d1d5db;
}
.reaction-popover-card {
  min-width: 210px;
  max-width: 210px;
  background: #060606;
  color: #fff;
  border-radius: 12px;
  padding: 20px 20px 8px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.38);
}
.reaction-popover-emoji-wrap {
  width: 40px;
  height: 40px;
  margin: 0 auto 6px;
  border-radius: 10px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.reaction-popover-emoji {
  font-size: 24px;
  line-height: 1;
}
.reaction-popover-text {
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  margin-bottom: 8px;
}
.reaction-popover-list {
  display: flex;
  justify-content: center;
  gap: 6px;
}
.reaction-popover-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #85bdd4;
  background: #a9d5e5;
  color: #073447;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
}
.reaction-popover-chip.active {
  background: #f1cd6b;
  border-color: #d8b351;
}

/* Threads */
.thread-chip {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(100%, 550px);
  padding: 2px 3px 3px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  /* transition: background 140ms ease,
  border-color 140ms ease,
  padding 140ms ease,
  box-shadow 140ms ease; */
  font-weight: 500;
  line-height: normal;
}
.thread-chip:hover,
.thread-chip:focus-visible {
  border-color: var(--border);
  background: #fff;

  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.thread-chip:focus-visible {
  outline: none;
}
.thread-chip-preview {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.thread-chip-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.thread-chip-avatar .avatar {
  border-radius: 7px;
  border-color: rgba(148, 163, 184, 0.22);
}
.thread-chip-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}
.thread-chip-count {
  font-weight: 700;
  color: #666;
}
.thread-chip-time {
  color: #666;
   font-weight: 400;
  white-space: nowrap;
}
.thread-chip-time :hover {
 color: var(--text-muted);
}
.thread-chip-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #111827;
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  /* transform: translateX(-6px); */
  /* transition: opacity 140ms ease, transform 140ms ease; */
  pointer-events: none;
  white-space: nowrap;
}
.thread-chip-action svg {
  width: 16px;
  height: 16px;
}
.thread-chip:hover .thread-chip-action,
.thread-chip:focus-visible .thread-chip-action {
  opacity: 1;
  /* transform: translateX(0); */
}
.thread-chip:hover .thread-chip-time,
.thread-chip:focus-visible .thread-chip-time {
  color: #6b7280;
}

/* People tab */
.person-item-name {
  color: var(--text-primary);
  font-weight: 600;
}
.people-avatar {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}
.people-avatar-fallback {
  background: #e8e8e8;
  color: #111;
  font-weight: 700;
}
.person-item-status {
  font-size: 12px;
  font-weight: 600;
  cursor: default;
}
.person-item-status.online { color: var(--success); }
.person-item-status.away { color: var(--away); }
.person-item-status.offline { color: var(--text-muted); }
.person-item-userid {
  margin-left: 8px;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* File/Image messages */
.message-file {
  display: flex; align-items: center; gap: 10px; padding: 12px; background: hsla(0, 0%, 100%, .8);
  border-radius: var(--radius-md); margin-top: 4px; min-width: 200px; max-width: 426px;cursor: pointer;
  border: 1px solid var(--border); transition: var(--transition);
  backdrop-filter: blur(10px);
}
.message-file:hover { 
  /* border-color: var(--accent);  */
  text-decoration: none;
}
.message-file-icon { width: 36px; height: 36px; border-radius: var(--radius-sm); background: #1283c9cc; display: flex; align-items: center; justify-content: center; color: var(--bg-primary); }
.message-file-info { flex: 1; min-width: 0; }
.message-file-name { color: #1d1c1d;
    font-size: .875rem;
    font-weight: 600;
    line-height: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 5px;}
.message-file-size {     color: #666;
    font-size: 12px;
    line-height: normal;
    font-weight: 500;
    text-transform: uppercase;
  }

.message-image { max-width: 320px; min-width: 64px; min-height: 64px; margin-top: 4px; }
.message-image img { width: 100%; border-radius: var(--radius-sm); cursor: pointer; display: block; }
.message-avatar {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}
.message-avatar-fallback {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  /* font-weight: 700; */
}

/* State events */
.state-event {
  text-align: center; padding: 8px 16px; font-size: 13px; color: var(--text-muted);
}
.state-event svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.state-event-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 20px;
  margin: 4px 0;
}
.state-event-avatar {
  width: 36px;
  height: 36px;
  /* border-radius: 50%; */
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-tertiary);
  color: var(--text-primary);
}
.state-event-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.state-event-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* font-size: 13px;
  font-weight: 700; */
  /* background: #e8e8e8; */
  /* color: #111; */
}
.state-event-content {
  min-width: 0;
}
.state-event-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.state-event-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.state-event-time {
  font-size: 11px;
  color: var(--text-muted);
}
.state-event-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.3;
}

/* Read receipts */
.read-receipts {
  display: inline-flex;
  align-items: center;
}
.read-receipt-avatar {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  margin-left: -5px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  color: #ffffff;
  font-size: 8px;
  line-height: normal;
  font-weight: 700;
  box-shadow: 0 0 0 1px #fff;
} 
.read-receipts .read-receipt-avatar:first-child {
  margin-left: 0;
}
.read-receipt-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.read-receipt-more {
  margin-left: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: var(--text-muted);
  font-weight: 700;
  background: #f3f4f6;
  line-height: 1;
}

/* Typing indicator */
.typing-indicator {
  display: flex; align-items: center; gap: 8px; padding: 6px 16px; font-size: 13px; color: var(--text-muted);
}
.typing-dots { display: flex; gap: 3px; }
.typing-dots span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted);
  animation: typing 1.2s infinite ease-in-out;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* Jump to bottom */
.jump-bottom {
  position: absolute; bottom: 90px; right: 24px; width: 40px; height: 40px;
  border-radius: var(--radius-full); background: var(--bg-surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md);
  color: var(--text-secondary); transition: var(--transition); z-index: 5;
}
.jump-bottom:hover { background: var(--bg-hover); color: var(--text-primary); }
.jump-bottom svg { width: 18px; height: 18px; }
.jump-bottom .badge { position: absolute; top: -6px; right: -6px; }

/* Reply / Edit preview */
.reply-preview {
  display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--bg-secondary);
  border-left: 3px solid var(--accent); margin: 0 12px; border-radius: var(--radius-xs);
}
.reply-preview-content { flex: 1; min-width: 0; font-size: 13px; }
.reply-preview-author { font-weight: 600; margin-right: 6px; }
.reply-preview-text { color: var(--text-secondary); }

/* === Composer === */
.composer {
  padding: 8px 20px 12px; flex-shrink: 0; background: var(--bg-primary);
}
.composer-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  /* border-bottom: 0; */
  border-radius: 10px 10px 0 0;
  /* background: linear-gradient(180deg, #f7f8fb 0%, #eff2f7 100%); */
  opacity: 0.6;
}
.composer-toolbar.ql-toolbar.is-focused{
  opacity: 1;
}
.composer-toolbar.hidden-toolbar {
  display: none;
}
.composer-toolbar .ql-formats {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding-right: 8px;
  border-right: 1px solid #d7dce6;
}
.composer-toolbar .ql-formats:last-child {
  border-right: 0;
  padding-right: 0;
}
.composer-tool-btn {
  height: 26px;
  min-width: 26px;
  border: 1px solid transparent;
  background: transparent;
  color: #59636e;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  font-size: 13px;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.composer-tool-btn:hover,
.composer-toolbar .ql-picker-label:hover {
  /* background: #e9edf5;
  border-color: #ccd3df; */

  background: var(--bg-hover);
  /* border-color: var(--border); */
}
.composer-tool-btn.ql-active,
.composer-tool-btn:focus-visible {
  background: #dbe7ff;
  border-color: #8fb0f5;
  color: #1d4ed8;
  outline: 0;
}
.composer-tool-btn strong,
.composer-tool-btn em,
.composer-tool-btn s {
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  color: inherit;
  pointer-events: none;
}
.composer-tool-btn svg {
  width: auto;
  height: 16px;
  pointer-events: none;
  stroke-width: 2.4px;
}
.composer-input-row {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  min-width: 0;
}
.composer-input-wrap {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  max-height: 320px;
  overflow: visible;
  background: #ffffff;
  border: 1px solid var(--border);
  border-top: 0;
  border-bottom: 0;
  border-radius: 0;
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  transition: var(--transition);
}
.composer-input-wrap:focus-within {
  border-color: var(--border);
  box-shadow: none;
}
.message-input {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  outline: none;
  padding: 10px 0 8px;
  line-height: 1.5;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
  min-height: 22px;
}
.composer-attachments {
  display: flex;
  gap: 10px;
  padding: 10px 0 0;
  overflow-x: auto;
  flex-wrap: nowrap;
}
.composer-attachment-card {
  position: relative;
  width: 86px;
  flex: 0 0 86px;
  border-radius: 14px;
  overflow: hidden;
  background: #eef2f7;
  border: 1px solid #d8dee8;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}
.composer-attachment-thumb {
  width: 100%;
  height: 82px;
  display: block;
  object-fit: cover;
  background: #dde5f0;
}
.composer-attachment-file {
  width: 100%;
  height: 82px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  background: linear-gradient(180deg, #eff4fb 0%, #e3ebf5 100%);
  color: #334155;
}
.composer-attachment-file-video {
  background: linear-gradient(180deg, #eef2ff 0%, #dfe8ff 100%);
}
.composer-attachment-file-audio {
  background: linear-gradient(180deg, #effcf6 0%, #d7f5e6 100%);
}
.composer-attachment-file-pdf {
  background: linear-gradient(180deg, #fff1f2 0%, #ffe0e5 100%);
  color: #be123c;
}
.composer-attachment-file-archive {
  background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
  color: #c2410c;
}
.composer-attachment-file-document {
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  color: #1d4ed8;
}
.composer-attachment-file-icon {
  width: 24px;
  height: 24px;
}
.composer-attachment-ext {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.composer-attachment-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}
.composer-attachment-remove:hover {
  background: rgba(15, 23, 42, 0.92);
}
.composer-attachment-remove:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.composer-attachment-remove svg {
  width: 12px;
  height: 12px;
}
.composer-attachment-meta {
  padding: 6px 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.composer-attachment-name,
.composer-attachment-type,
.composer-attachment-status {
  font-size: 10px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.composer-attachment-name {
  color: #1f2937;
  font-weight: 600;
}
.composer-attachment-type {
  color: #64748b;
  font-weight: 700;
}
.composer-attachment-status {
  color: #64748b;
}
.composer-attachment-card.is-uploading .composer-attachment-thumb {
  filter: saturate(0.55);
}
.composer-attachment-card.is-uploading .composer-attachment-file {
  opacity: 0.72;
}
.composer-attachment-card.is-error {
  border-color: rgba(239, 68, 68, 0.45);
  background: #fff1f2;
}
.composer-attachment-card.is-error .composer-attachment-status,
.composer-attachment-card.is-error .composer-attachment-type {
  color: #be123c;
}
.message-input:empty::before {
  content: attr(data-placeholder);
  color: #6b7280;
  pointer-events: none;
}
.composer-input-wrap .ql-container {
  border: 0;
  font-family: inherit;
  font-size: 15px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.composer-input-wrap .ql-editor {
  padding: 0px;
  min-width: 0;
  max-width: 100%;
  min-height: 25px;
  max-height: 170px;
  overflow-y: auto;
  overflow-x: hidden;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.composer-input-wrap .ql-editor.ql-blank::before {
  left: 0;
  right: 0;
  color: #6b7280;
  font-style: normal;
}
.composer-input-wrap .ql-editor p {
  margin: 0;
}
.composer-input-wrap .ql-editor h1,
.composer-input-wrap .ql-editor h2,
.composer-input-wrap .ql-editor h3,
.composer-input-wrap .ql-editor blockquote,
.composer-input-wrap .ql-editor pre {
  margin: 0;
}
.composer-input-wrap .ql-editor blockquote {
  border-left: 3px solid #cbd5e1;
  padding-left: 12px;
  color: #475569;
}
.composer-input-wrap .ql-editor pre.ql-syntax {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  font-family: "JetBrains Mono", monospace;
}
.composer-input-wrap .ql-editor .mention {
  background: transparent;
  color: #6752d8;
  border-radius: 0;
  padding: 0;
}
.ql-mention-list-container {
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.14);
  overflow: hidden;
  max-height: 320px;
  background: #fff;
  z-index: 20000;
}
.ql-mention-list {
  padding: 0px;
  max-height: 312px;
  overflow-y: auto;
}
.ql-mention-list-item {
  border-radius: 0px;
  padding: 0;
  font-size: 14px;
}
.ql-mention-list-item.selected {
  background: #5962d1;
  color: #fff;
}
.mention-option-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0px 10px;
  min-height: 44px;
}
.mention-option-avatar {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  background: #dbeafe;
}
.mention-option-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mention-option-avatar-fallback {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: #14b8a6;
}
.mention-option-name {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ql-mention-list-item.selected .mention-option-name {
  color: #fff;
}
.mention-option-status {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex-shrink: 0;
}
.mention-option-status.online {
  background: #27b376;
}
.mention-option-status.offline {
  background: #e5e7eb;
}
.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  /* background: #f2f3f5; */
}
.composer-footer-left {
  display: flex;
  align-items: center;
  gap: 3px;
}
.composer-footer-btn {
  height: 26px;
  min-width: 26px;
  border: 0;
  background: transparent;
  color: #59636e;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  font-size: 18px;
  cursor: pointer;
}
.composer-footer-btn:hover {
  background: var(--bg-hover);
}
.composer-footer-btn.is-active {
  background: #dbe7ff;
  color: #1d4ed8;
}
.composer-footer-btn svg {
  width: 18px;
  height: 18px;
}
.btn-send {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: #007a5a;
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 138, 104, 0.18);
}
.btn-send-icon,
.btn-send-loader {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-send-loader {
  position: absolute;
  inset: 0;
}
.btn-send-spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: #4f7dcf;
  border-right-color: #4f7dcf;
  animation: spin 0.8s linear infinite;
}
.btn-send:hover {
  background: #0b7558;
  color: #fff;
  transform: none;
}
.btn-send.is-loading,
.btn-send.is-loading:hover,
.btn-send.is-disabled-state,
.btn-send.is-disabled-state:hover,
.btn-send:disabled,
.btn-send[disabled] {
  background: transparent;
  color: #7b818b;
  box-shadow: none;
}
.btn-send.is-loading,
.btn-send.is-loading:hover {
  color: #7b818b;
}

/* === Right Panel === */
.right-panel {
  width: var(--right-panel-width); background: var(--bg-primary); 
  /* border-left: 1px solid var(--border); */
  display: flex; flex-direction: column; flex-shrink: 0;
  position: relative;
  z-index: 99;
  box-shadow: 0 0 2px rgba(0, 0, 0, .12), 0 4px 8px rgba(0, 0, 0, .14);
}
.right-panel.thread-mode {
  width: min(100vw, 360px);
  border-left: 1px solid #e5e7eb;
}
.right-panel-header {
  display: flex; align-items: center; justify-content: space-between; padding: 0 16px;
  height: var(--header-height); 
  /* border-bottom: 1px solid var(--border); */
  box-shadow: 0 0 0px rgba(0, 0, 0, .12), 0 0px 4px rgba(0, 0, 0, .14);
}
.right-panel.thread-mode .right-panel-header {
  box-shadow: none;
  border-bottom: 1px solid #ebeef2;
}
.right-panel-header h3 { 
  font-weight: 600;
  font-size: 16px;
  line-height: 21px;
 }
.right-panel-content { flex: 1; overflow-y: auto; min-height: 0; }
.right-panel-content.thread-scroll-lock {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Right panel sections */
.panel-section { padding: 16px; border-bottom: 1px solid var(--border); }
.panel-section-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 12px; }
.panel-room-avatar { display: flex; flex-direction: column; align-items: flex-start; gap: 0px; text-align: center; }
.panel-room-avatar .avatar{
  min-width: 256px;
  width: 256px;
  height: 256px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #e5e5e5;
  -webkit-user-select: none;
  user-select: none;
  overflow: hidden;
  margin: 0 auto 16px;
}
.panel-room-name { font-weight: 600;font-size: 22px;line-height: 22px;color: var(--text-primary);margin-bottom: 2px;}
.panel-room-topic {font-size: 14px;font-weight: 400; max-height: 80px; overflow-y: auto;color: #666; }

.member-item {
  display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer;
  border-radius: 0px; transition: var(--transition);
}
.member-item:hover { background: var(--bg-hover); padding: 6px; margin: 0 -6px; }
.member-name { font-size: 14px; font-weight: 500; }
.member-role { font-size: 12px; color: var(--text-muted); }
.member-power { font-size: 10px; padding: 1px 6px; border-radius: var(--radius-full); background: var(--accent-muted); color: var(--accent); }
.invite-search-results {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  max-height: 240px;
  overflow-y: auto;
}
.invite-search-results.hidden {
  display: none;
}
.invite-search-item {
  width: 100%;
  padding: 10px 12px;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--border-light);
  background: transparent;
  text-align: left;
}
.invite-search-item:last-child {
  border-bottom: 0;
}
.invite-search-item:hover {
  padding: 10px 12px;
  margin: 0;
}
.invite-search-state {
  padding: 14px 12px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

.panel-action-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 0;
  color: var(--text-secondary); cursor: pointer; transition: var(--transition);
  font-size: 14px;font-weight: 500;
}
.panel-action-item:hover { color: #0009; }
.panel-action-item svg { width: 18px; height: 18px; }
.panel-action-item-label { flex: 1; min-width: 0; }
.panel-action-item-meta {
  margin-left: auto;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.panel-action-item-meta.is-on {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}
.panel-action-item-meta.is-off {
  background: rgba(107, 114, 128, 0.12);
  color: #4b5563;
}
.panel-action-item.danger { color: var(--danger); }

.profile-card-section {
  border-bottom: 0;
}
.profile-card {
  display: flex;
  flex-direction: column;
  gap:12px;
}
.profile-card-avatar-wrap .avatar-xl {
  min-width: 256px;
  width: 256px;
  height: 256px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #e5e5e5;
  -webkit-user-select: none;
  user-select: none;
  overflow: hidden;
  margin: 0 auto;
}
.profile-card-name {
  font-weight: 600;
  font-size: 22px;
  line-height: 22px;
  color: var(--text-primary);
}
.profile-card-role {
  display: flex;
  align-items: center;
  font-weight: 500;
  font-size: 14px;
  line-height: normal;
  margin-bottom: 0;
  color: var(--text-secondary); 
}
.profile-card-time {
  font-weight: 500;
  font-size: 14px;
  color: var(--text-primary);
}
.profile-card-contact-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.profile-card-contact-row svg {
  width: 17px;
  height: 17px;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.profile-card-email {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
  font-size: 14px; 
  color: var(--text-primary);
}
.profile-copy-btn {
  border: 1px solid var(--border);
  border-radius: 7px;
}
.profile-card-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 14px;
  color: var(--text-primary);
}
.profile-card-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #9ca3af;
}
.profile-card-status.online .profile-card-status-dot { background: #10b981; }
.profile-card-status.away .profile-card-status-dot { background: #f59e0b; }
.profile-card-status.offline .profile-card-status-dot { background: #9ca3af; }
.profile-card-status-message {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f8fafc;
  color: #111827;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
  word-break: break-word;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.profile-card-status-emoji {
  flex-shrink: 0;
  line-height: 1.2;
}
.profile-send-btn {
  width: 100%;
  margin-top: 10px;
}

/* === Modal === */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.65); z-index: 1000;
  display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px);
}
.modal-container {
  background: var(--bg-primary); border-radius: var(--radius-lg); max-width: 480px; width: 90%;
  max-height: 80vh; overflow: hidden; box-shadow: var(--shadow-xl); animation: modalIn 0.2s ease;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(10px); } }
.modal-header {
  display: flex; align-items: center; justify-content: space-between; padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 18px; font-weight: 600; }
.modal-body { padding: 20px; overflow-y: auto; max-height: 60vh; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); }
.channel-create-modal {
  width: min(520px, calc(100vw - 20px));
  max-width: 520px;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.24);
}
.channel-create-modal .modal-header {
  padding: 20px 24px 8px;
  border-bottom: 0;
}
.channel-create-modal .modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}
.channel-create-modal .modal-body {
  padding: 0 24px 18px;
  max-height: none;
  overflow: visible;
}
.channel-create-modal .modal-footer {
  gap: 12px;
  padding: 0 24px 24px;
  border-top: 0;
}
.channel-create-modal .icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #374151;
}
.channel-create-modal .icon-btn:hover {
  background: #f3f4f6;
  color: #111827;
}
.channel-create-modal-copy {
  margin: 0 0 24px;
  color: #374151;
  font-size: 16px;
  line-height: 1.55;
}
.channel-create-modal-field {
  margin-bottom: 0;
}
.channel-create-modal-field label {
  margin-bottom: 8px;
  color: #111827;
  font-size: 15px;
  font-weight: 700;
}
.channel-create-modal-input {
  min-height: 44px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0 14px;
  box-shadow: none;
}
.channel-create-modal-input:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.channel-create-modal-input input {
  padding: 10px 0;
  font-size: 15px;
  color: #111827;
}
.channel-create-modal-input input::placeholder {
  color: #64748b;
}
.channel-create-modal-help {
  margin: 8px 0 0;
  color: #374151;
  font-size: 14px;
  line-height: 1.45;
}
.channel-create-modal .btn {
  min-width: 80px;
  min-height: 46px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
}
.channel-create-modal-cancel {
  background: #f3f4f6;
  color: #111827;
}
.channel-create-modal-cancel:hover {
  background: #e5e7eb;
}
.channel-create-modal-submit {
  background: #0b7a5a;
  color: #ffffff;
}
.channel-create-modal-submit:hover {
  background: #086347;
}
.channel-create-modal-submit:disabled,
.channel-create-modal-cancel:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.workspace-sheet-modal-container,
.workspace-invitations-modal-container {
  width: min(560px, calc(100vw - 24px));
  max-width: 560px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.22);
}
.workspace-sheet-modal-container .modal-header,
.workspace-invitations-modal-container .modal-header {
  padding: 18px 28px 14px;
  border-bottom: 1px solid #e5e7eb;
}
.workspace-sheet-modal-container .modal-header h3,
.workspace-invitations-modal-container .modal-header h3 {
  color: #111827;
  font-size: 18px;
  font-weight: 700;
}
.workspace-sheet-modal-container .modal-body,
.workspace-invitations-modal-container .modal-body {
  padding: 16px 28px 24px;
  max-height: 72vh;
}
.ws-invite-modal {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ws-invite-top-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}
.ws-invite-email-wrap {
  flex: 1;
  min-width: 0;
}
.ws-invite-search-wrap input,
.ws-invite-email-wrap input {
  padding: 12px 14px;
}
.ws-invite-send-btn {  
  min-width: 112px; 
  min-height: 48px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
} 
.ws-invite-send-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.ws-invite-list {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  max-height: 360px;
  overflow-y: auto;
  background: #ffffff;
}
.ws-invite-member-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  border-bottom: 1px solid #eef2f7;
}
.ws-invite-member-row:last-child {
  border-bottom: 0;
}
.ws-invite-member-avatar {
  flex-shrink: 0;
}
.ws-invite-member-meta {
  min-width: 0;
  flex: 1;
}
.ws-invite-member-name {
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ws-invite-member-role {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
}
.ws-invite-member-email {
  font-size: 13px;
  color: #64748b;
  line-height: 1.35;
}
.ws-invite-member-status {
  font-size: 14px;
  font-weight: 700;
  text-transform: capitalize;
  margin-left: auto;
}
.ws-invite-member-status.active {
  color: #2563eb;
}
.ws-invite-member-status.pending {
  color: #e11d48;
}
.ws-invite-member-actions {
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: 10px;
  flex-shrink: 0;
}
.ws-invite-action-btn {
  border: 1px solid #d7deea;
  background: #ffffff;
  color: #0f172a;
  border-radius: 999px;
  min-width: 88px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.ws-invite-action-btn:hover {
  background: #f8fafc;
  border-color: #c3cddd;
}
.ws-invite-action-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.ws-invite-action-btn.danger {
  color: #b42318;
  border-color: #f1c0b7;
  background: #fff7f5;
}
.ws-invite-action-btn.danger:hover {
  background: #ffe9e5;
  border-color: #e8a698;
}
.ws-invite-state {
  padding: 24px 14px;
  color: var(--text-muted);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.workspace-invitations-modal {
  display: flex;
  flex-direction: column;
}
.workspace-invitations-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 240px;
}
.workspace-invitations-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
}
.workspace-invitations-avatar {
  flex-shrink: 0;
}
.workspace-invitations-copy {
  min-width: 0;
  flex: 1;
}
.workspace-invitations-name {
  color: #111827;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.workspace-invitations-subtitle {
  margin-top: 4px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.35;
}
.workspace-invitations-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex-shrink: 0;
}
.workspace-invitations-action {
  border: 0;
  background: transparent;
  color: #e11d48;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}
.workspace-invitations-action:hover,
.workspace-invitations-action:focus-visible {
  color: #be123c;
}
.workspace-invitations-action:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.workspace-invitations-state {
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #6b7280;
  font-size: 14px;
  text-align: center;
}
.link-modal-container {
  max-width: 520px;
  width: min(520px, calc(100vw - 32px));
  background: #fff;
  border-radius: 12px;
}
.link-modal-container .modal-header {
  padding: 16px 28px 10px;
  border-bottom: 0;
}
.link-modal-container .modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}
.link-modal-container .modal-body {
  padding: 8px 28px 20px;
  max-height: none;
  overflow: visible;
}
.link-modal-container .modal-footer {
  padding: 8px 28px 22px;
  border-top: 0;
  gap: 14px;
}
.link-modal-form .form-group {
  margin-bottom: 22px;
}
.link-modal-form .form-group:last-child {
  margin-bottom: 0;
}
.link-modal-form label {
  margin-bottom: 10px;
  color: #111827;
  font-size: 14px;
  font-weight: 600;
}
.link-modal-input-wrap {
  min-height: 44px;
  border-radius: 8px;
  border-color: #d8dee8;
  background: #fff;
  box-shadow: none;
}
.link-modal-input-wrap:focus-within {
  border-color: #b7c7df;
  box-shadow: 0 0 0 3px rgba(15, 98, 254, 0.08);
}
.link-modal-input-wrap input {
  padding: 12px 14px;
  color: #44536b;
}
.link-modal-input-wrap input::placeholder {
  color: #71829c;
}
.link-modal-input-wrap-icon {
  gap: 0;
}
.link-modal-input-icon {
  width: 40px;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  border-right: 1px solid #e5e7eb;
  flex-shrink: 0;
}
.link-modal-input-icon svg {
  width: 14px;
  height: 14px;
}
.link-modal-cancel {
  min-width: 80px;
  background: #eef1f5;
  border: 1px solid #eef1f5;
  color: #1f2937;
  font-weight: 700;
}
.link-modal-cancel:hover {
  background: #e3e8ef;
  transform: none;
}
.link-modal-save {
  min-width: 82px;
  background: #0f8a68;
  color: #fff;
  font-weight: 700;
}
.link-modal-save:hover {
  background: #0b7558;
  transform: none;
}
.status-modal-container {
  max-width: 540px;
  width: min(540px, calc(100vw - 24px));
  background: #fff;
  border-radius: 12px;
}
.status-modal-container .modal-header {
  padding: 18px 28px 10px;
  border-bottom: 0;
}
.status-modal-container .modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}
.status-modal-container .modal-body {
  padding: 8px 28px 18px;
  max-height: none;
  overflow: visible;
}
.status-modal-container .modal-footer {
  gap: 12px;
  padding: 0 28px 24px;
  border-top: 0;
}
.status-modal-clear-btn {
  margin-right: auto;
  background: #e91e63;
  color: #ffffff;
  border: 0;
}
.status-modal-clear-btn:hover {
  background: #d61b5b;
}
.status-modal-clear-btn:disabled,
.status-modal-clear-btn:disabled:hover {
  background: #f3a7c4;
  color: #ffffff;
}
.status-modal {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.status-modal-field {
  margin: 0;
}
.status-modal-field label {
  display: block;
  margin-bottom: 10px;
  color: #111827;
  font-size: 14px;
  font-weight: 700;
}
.status-modal-input-wrap,
.status-modal-select-wrap {
  min-height: 44px;
  border-radius: 10px;
  border-color: #d8dee8;
  background: #fff;
  box-shadow: none;
}
.status-modal-input-wrap:focus-within,
.status-modal-select-wrap:focus-within {
  border-color: #b7c7df;
  box-shadow: 0 0 0 3px rgba(15, 98, 254, 0.08);
}
.status-modal-input-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-left: 2px;
}
.status-modal-input-emoji-btn {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #6b7280;
  flex-shrink: 0;
  cursor: pointer;
}
.status-modal-input-emoji-btn:hover {
  background: #f3f4f6;
}
.status-modal-input-wrap input {
  padding: 12px 0;
  color: #44536b;
}
.status-modal-empty-state {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.status-modal-suggestions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.status-modal-suggestions-title {
  color: #111827;
  font-size: 14px;
  font-weight: 700;
}
.status-modal-suggestions-empty {
  color: #6b7280;
  font-size: 14px;
}
.status-modal-suggestion-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.status-modal-suggestion {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  border-radius: 10px;
  padding: 6px 8px;
  transition: background 0.18s ease;
}
.status-modal-suggestion:hover {
  background: #f8fafc;
}
.status-modal-suggestion-emoji {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}
.status-modal-suggestion-copy {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.status-modal-suggestion-text {
  color: #111827;
  font-size: 16px;
  font-weight: 600;
}
.status-modal-suggestion-time {
  color: #6b7280;
  font-size: 14px;
}
.status-modal-suggestion-delete {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  flex-shrink: 0;
}
.status-modal-suggestion-delete:hover {
  background: #eef2f7;
  color: #111827;
}
.status-modal-suggestion-delete svg {
  width: 14px;
  height: 14px;
}
.status-modal-select-wrap {
  position: relative;
}
.status-modal-select-wrap select {
  width: 100%;
  border: 0;
  background: transparent;
  color: #111827;
  font-size: 15px;
  padding: 12px 36px 12px 14px;
  outline: none;
  appearance: none;
}
.status-modal-input-clear {
  border: 0;
  background: transparent;
  color: #9ca3af;
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.status-modal-input-clear:hover {
  color: #4b5563;
}
.status-modal-input-clear svg {
  width: 16px;
  height: 16px;
}
.status-modal-select-wrap::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #6b7280;
  border-bottom: 2px solid #6b7280;
  transform: translateY(-60%) rotate(45deg);
  pointer-events: none;
}

.thread-modal-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}
.thread-panel-wrap {
  height: 100%;
  padding: 0;
  overflow: hidden;
  background: #fff;
}
.thread-panel-actions {
  padding: 10px 20px 0;
}
.thread-panel-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #4b5563;
  font-size: 13px;
  font-weight: 700;
  border-radius: 999px;
  padding: 6px 10px;
}
.thread-panel-back:hover {
  background: #f3f4f6;
}
.thread-modal-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  border-radius: 0;
  background: var(--bg-primary);
  padding: 12px 20px 0;
}
.thread-modal-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-radius: 12px;
  padding: 0;
  margin-bottom: 16px;
}
.thread-modal-item.last-read-target {
  background: rgba(37, 99, 235, 0.08);
  padding: 8px;
  margin-left: -8px;
  margin-right: -8px;
}
.thread-modal-item:last-child { margin-bottom: 0; }
.thread-modal-avatar {
  flex-shrink: 0;
}
.thread-modal-avatar .avatar {
  border-radius: 10px;
  border-color: rgba(148, 163, 184, 0.2);
}
.thread-modal-main {
  min-width: 0;
  flex: 1;
}
.thread-modal-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-bottom: 2px;
}
.thread-modal-sender {
  font-weight: 700;
  font-size: 16px;
  color: #1f2937;
}
.thread-modal-time {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
}
.thread-root-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  background: var(--accent-strong);
  color: var(--text-primary);
}
.thread-modal-body {
  font-size: 14px;
  line-height: 1.55;
  color: #1f2937;
  overflow-wrap: break-word;
}
.thread-modal-body .message-body {
  margin-top: 0;
}
.thread-modal-body .message-image{
  min-width: 64px;
  min-height: 64px;
  max-width: 320px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #e6e6e6;
  max-width: 100%; 
  object-fit: contain;
  display: block;
  cursor: zoom-in;
  border-radius: var(--radius-sm);
}
.thread-modal-body .message-image .screenshot {
  max-width: 100%;
  min-width: 5px;
  min-height: 5px;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
  border-radius: var(--radius-sm);
}
.thread-modal-compose {
  display: block;
  flex-shrink: 0;
  padding: 0 20px 20px;
}
.thread-editor-shell {
  width: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid #d9dee7;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.thread-composer-toolbar {
  border: 0;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 0;
}
.thread-composer-input-wrap {
    min-height: 44px;
    max-height: 44px;
  flex: 1;
  border: 0;
  border-radius: 0;
  border-bottom: 0;
  padding: 0 12px;
  background: #fff;
}
.thread-composer-input-wrap .ql-editor {
  min-height: 44px;
  max-height: 44px;
}
.thread-composer-footer {
  margin-top: 0;
  border: 0;
  border-top: 0px solid #e5e7eb;
  border-radius: 0;
}
.composer-footer .btn-send{
  padding: 8px;
}
.thread-compose-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 0;
}
.thread-modal-send {
  flex-shrink: 0;
}
.thread-panel-wrap .thread-modal-list { flex: 1; max-height: none; }
.thread-panel-wrap .thread-modal-compose { margin-top: auto; }

.message-edit-shell {
  margin-top: 10px;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background-color: #fff;
  /* background: linear-gradient(180deg, #fff8df 0%, #fffdf6 100%); */
  /* box-shadow: var(--shadow-md) */
}
.message-edit-toolbar,.message-edit-footer {
  border-left: 0px;
  border-right: 0px;
}
.message-edit-input-wrap {
  min-height: 4px;
  max-height: 320px;
  border: 0;
  border-radius: 0;
  padding: 0 12px;
  background: transparent;
}
.message-edit-input-wrap .ql-editor {
  min-height: 44px;
  max-height: 320px;
}
/* .message-edit-footer {
  border: 0;
  border-top: 1px solid #eadfb0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.46);
} */
.message-edit-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
#message-edit-save{
  color: #fff;
  background-color: #007a5a;
  border-color: #007a5a;
}
/* .message-edit-actions .btn {
  min-width: 72px;
} */

.all-threads-list {
  padding: 14px;
  max-height: none;
  overflow-y: auto;
  /* font-size: 16px; */
  display: flex;
  flex-direction: column;
  gap: 14px;
  /* background: #f6f8fb; */
}
.all-thread-item {
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 0;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
  cursor: pointer;
  /* box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03); */
}
.all-thread-item:last-child { margin-bottom: 0; }
.all-thread-item:hover {
  /* border-color: #b9c6d6; */
  /* box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06); */
  background: var(--bg-hover);
}
.all-thread-item:focus-visible {
  outline: 2px solid #7b8ca4;
  outline-offset: 2px;
}
.all-thread-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.all-thread-room-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.all-thread-room-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 28px;
  /* padding: 0 10px; */
  border-radius: 8px;
  /* background: #eef3f8; */
  /* color: #415164; */
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: capitalize;
}
.all-thread-count {
  font-size: 12px;
  color: #3866e6;
  font-weight: 600;
}
.all-thread-count:hover{
  opacity: 0.8;
}
.all-thread-time {
  color: #666;
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
  flex-shrink: 0;
}
.all-thread-body {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.all-thread-avatar .avatar {
  width: 38px;
  height: 38px;
  border: 1px solid #e5eaf1;
  box-shadow: none;
}
.all-thread-copy {
  min-width: 0;
  flex: 1;
}
.all-thread-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 8px;
}
/* .all-thread-starter {
  font-size: 14px;
  font-weight: 700;
  color: #1f2937;
} */
.all-thread-started,
.all-thread-start-time {
  font-size: 12px;
  font-weight: 400;
  color: #666;
}
.all-thread-preview {
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  max-height: none;
  overflow: hidden;
  /* background: #f8fafc; */
  /* border: 1px solid var(--border);
  border-radius: var(--radius-md); */
  /* padding: 10px 12px; */
  white-space: pre-wrap;
  word-break: break-word;
}
.all-thread-media-trigger {
  min-width: 0;
  cursor: zoom-in;
}
.all-thread-media-trigger.is-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.all-thread-media-trigger.is-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  border-radius: 999px;
  padding: 2px 0;
}
.all-thread-media-trigger:focus-visible {
  outline: 2px solid #7b8ca4;
  outline-offset: 2px;
}
.all-thread-media-visual,
.all-thread-inline-media-thumb {
  position: relative;
  overflow: hidden;
  background: #dde7f2;
}
.all-thread-media-visual {
  width: min(320px, 100%);
  min-height: 96px;
  border-radius: 10px;
  border: 1px solid #d9e3f0;
}
.all-thread-media-visual img,
.all-thread-inline-media-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.all-thread-inline-media-thumb {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex-shrink: 0;
  border: 1px solid #d9e3f0;
}
.all-thread-media-visual.is-video::after,
.all-thread-inline-media-thumb.is-video::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.08) 0%, rgba(15, 23, 42, 0.28) 100%);
  pointer-events: none;
}
.all-thread-media-play {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
}
.all-thread-inline-media-thumb .all-thread-media-play {
  width: 18px;
  height: 18px;
  font-size: 9px;
}
.all-thread-media-fallback {
  width: 100%;
  min-height: 96px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: #526173;
}
.all-thread-media-fallback.is-inline {
  min-height: 100%;
  font-size: 12px;
}
.all-thread-inline-media-copy,
.all-thread-media-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.all-thread-media-type,
.all-thread-inline-media-type {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #526173;
  text-transform: uppercase;
}
.all-thread-media-name,
.all-thread-inline-media-name {
  min-width: 0;
  color: #1f2937;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.all-thread-footer {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 10px;
  min-width: 0;
  /* font-size: 14px;
  font-weight: 600;
    color: #415164; */
}
.all-thread-latest-label {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 14px;
}
.all-thread-latest-text {
  /* display: flex;
  align-items: flex-start; */
  /* flex-wrap: wrap; */
  gap: 6px;
  min-width: 0;
  /* font-size: 12px; */
  /* color: #212529; */
}
.all-thread-sender{
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  white-space: nowrap;
  font-weight: 600;
}
.all-thread-latest-sender {
  color: #667085;
  font-weight: 500;
}
.all-thread-latest-separator {
  color: #98a2b3;
}
.all-thread-latest-copy-text {
  min-width: 0;
  /* white-space: nowrap; */
  overflow: hidden;
  text-overflow: ellipsis;
}
/* .all-thread-latest-text span{
  font-size: 14px; 
  font-weight: 400;
  color: var(--text-primary);
} */
@media (max-width: 720px) {
  .all-thread-item {
    padding: 12px;
  }
  .all-thread-body {
    gap: 10px;
  }
  .all-thread-head,
  .all-thread-topline,
  .all-thread-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .all-thread-time {
    align-self: flex-start;
  }
  .all-thread-latest-text {
    align-items: flex-start;
  }
  .all-thread-latest-copy-text,
  .all-thread-inline-media-name {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }
  .all-thread-media-visual {
    width: 100%;
  }
}

/* Files / Saved pages */
.files-page,
.saved-page {
  padding: 12px;
  font-size: 16px;
}
.files-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.files-search-row {
  margin-bottom: 2px;
}
.files-search-wrap {
  width: 100%;
  min-height: 44px;
  padding-left: 4px;
  border-radius: 8px;
}
.files-search-wrap input {
  font-size: 14px;
}
.files-search-clear-btn {
  border: 0;
  background: transparent;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.files-search-clear-btn:hover {
  background: #f1f5f9;
  color: #1e293b;
}
.files-search-clear-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}
.files-search-clear-btn:disabled {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}
.files-search-wrap input::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

.files-search-wrap input::-webkit-input-placeholder {
  color: var(--text-muted);
}

.files-search-wrap input::-moz-placeholder {
  color: var(--text-muted);
}

.files-search-wrap input:-ms-input-placeholder {
  color: var(--text-muted);
}
.files-search-icon {
  color: #7f8796;
  font-size: 17px;
  background-color: transparent;
  margin-right: 4px;
}
.files-search-icon:hover{
  background-color: transparent;
}
.files-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
  margin-bottom: 12px;
}
.files-filter-row-modern {
  margin-bottom: 0;
}
.files-filter-dropdown {
  position: relative;
}
.files-filter-chip {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
  color: #1f2937;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.files-filter-chip:hover {
  background: #f8fafc;
}
.files-filter-chip:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}
.files-filter-chip.is-active,
.files-filter-dropdown.is-open .files-filter-chip {
  background: #122b84;
  border-color: #122b84;
  color: #ffffff;
}
.files-filter-chip-caret {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform 0.18s ease;
}
.files-filter-dropdown.is-open .files-filter-chip-caret {
  transform: rotate(180deg);
}
.files-filter-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 25;
  background: #ffffff;
  color: #111827;
  border-radius: var(--radius-lg);
  /* border: 1px solid rgba(226, 232, 240, 0.9); */
  box-shadow: 0 3px 6px -4px rgba(0, 0, 0, .12), 0 6px 16px 0 rgba(0, 0, 0, .08), 0 9px 28px 8px rgba(0, 0, 0, .05);
  overflow: hidden;
}
.files-filter-menu-searchable {
  width: min(290px, calc(100vw - 64px));
  padding: 10px;
}
.files-filter-menu-date {
  width: min(330px, calc(100vw - 64px));
  padding: 8px;
}
.files-filter-search {
  display: flex;
  align-items: center;
  min-height: 34px;
  margin-bottom: 10px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #ffffff;
}
.files-filter-search input {
  width: 100%;
  border: 0;
  background: transparent;
  color: #334155;
  font-size: 14px;
  outline: none;
}
.files-filter-search input::placeholder {
  color: #9aa4b2;
}
.files-filter-options-list {
  max-height: 225px;
  overflow-y: auto;
  padding-right: 4px;
}
.files-filter-checkbox-option {
  width: 100%;
  min-height: 38px;
  padding: 6px 10px;
  border: 0;
  border-radius:var(--radius-md);
  background: transparent; 
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.16s ease;
}
.files-filter-checkbox-option:hover,
.files-filter-checkbox-option:focus-visible {
  background: var(--bg-hover);
  outline: none;
}
.files-filter-checkbox-box {
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}
.files-filter-checkbox-option.is-selected .files-filter-checkbox-box {
  border-color: #122b84;
  background: #122b84;
}
.files-filter-checkbox-box svg {
  width: 16px;
  height: 16px;
  display: block;
}
.files-filter-checkbox-label {
  min-width: 0;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: capitalize;
}
.files-filter-empty {
  padding: 18px 12px;
  color: #7b8191;
  font-size: 14px;
}
.files-filter-date-list {
  display: flex;
  flex-direction: column;
}
.files-filter-date-option {
  width: 100%;
  min-height: 38px;
  padding: 6px 16px;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: #111827;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: background-color 0.16s ease;
}
.files-filter-date-option:hover,
.files-filter-date-option:focus-visible {
  background: var(--bg-hover);
  outline: none;
}
.files-filter-date-check {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.files-filter-select,
.files-sort-select {
  min-width: 90px;
  height: 32px;
  border-radius: 7px;
  background: #ffffff;
  color: var(--text-primary);
  padding: 0 10px;
  font-weight: 500;
}
.files-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
}
.files-results-count {
  font-size: 14px;
  color: var(--text-primary);
}
.files-sort-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.files-sort-label {
  font-size: 12px;
  color: #7b8191;
}
.files-filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 16px;
  color: var(--text-secondary);
}
.files-filter-group input {
  height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 9px;
  background: var(--bg-input);
}
.files-list,
.saved-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.files-list-modern {
  gap: 10px;
}
.file-item,
.saved-item {
  border: 1px solid var(--border);
  /* background: var(--bg-surface); */
  border-radius: var(--radius-md);
  /* padding: 10px 12px; */
  overflow: hidden;
}
.saved-item:hover{
  background-color: #f8f8f8;
}
.files-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #ffffff;
  padding: 10px 12px;
}
.files-row:hover{
  background-color: var(--bg-hover);
}
.files-row-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.files-thumb {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #f5f7fb;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.files-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.files-thumb-icon {
  font-size: 14px;
  color: #2d3442;
  font-weight: 700;
}
.files-copy {
  min-width: 0;
}
.files-name {
  font-size: 14px;
  font-weight: 500;
  color: #202636;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.files-meta-line {
  margin-top: 3px;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.files-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 10px 0 2px;
}
.files-page-btn {
  min-width: 28px;
  height: 28px;
  border: 1px solid #d5dbe7;
  border-radius: 6px;
  background: #ffffff;
  color: #293042;
  font-size: 13px;
  cursor: pointer;
}
.files-page-btn.active {
  background: #1f6c7a;
  border-color: #1f6c7a;
  color: #ffffff;
}
.files-page-next {
  font-size: 18px;
  line-height: 1;
}
.files-empty-state {
  text-align: center;
  padding: 28px 16px;
  color: var(--text-muted);
  border: 1px dashed #dbe1eb;
  border-radius: 10px;
  background: #fbfcff;
}
.file-item-top,
.saved-item-top {
  justify-content: space-between;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 15px 20px 8px 20px;
  width: 100%;
  border-radius: 5px 5px 0 0;
  background-color: #fff;
}
.saved-item-body{
  padding:10px 20px;
}
.file-name,
.saved-room {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
}
.file-meta,
.saved-meta {
  /* margin-top: 3px; */
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
}
.saved-meta-link{
  color: var(--text-primary);
}
.saved-meta-link:hover{
  text-decoration: underline;
  cursor: pointer;
}
.saved-meta span:hover{
  text-decoration: underline;
  cursor: pointer;
}
.saved-meta span{
  font-size: 13px;
  color: #666;
  font-weight: 300;
}
.saved-text {
  /* margin-top: 6px; */
  font-size: 15px;
  font-weight: 400;
  color: var(--text-primary);
  white-space: pre-wrap;
  overflow-wrap: break-word;
}
.saved-item-actions{
  margin-top: 18px !important;
}
.file-item-actions,
.saved-item-actions {
  margin-top: 8px;
  display: flex;
  gap: 6px;
}
.files-row .file-item-actions {
  margin-top: 0;
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .files-toolbar,
  .files-row {
    flex-direction: column;
    align-items: stretch;
  }
  .files-sort-wrap {
    justify-content: space-between;
  }
  .files-row .file-item-actions {
    width: 100%;
  }
}

/* === Context Menu === */
.context-menu {
  position: fixed; background: var(--bg-primary); border: 0px solid var(--border);
  border-radius: var(--radius-lg); padding: 4px; box-shadow: var(--shadow-lg); z-index: 2000;
  min-width: 180px; animation: menuIn 0.12s ease;
}
@keyframes menuIn { from { opacity: 0; transform: scale(0.95); } }
.context-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  color: var(--text-primary);
  width: 100%;
}
.context-menu-item:hover { background: var(--bg-hover); }
.context-menu-item.danger { color: var(--danger); }
.context-menu-item svg { width: 18px; height: 18px; color: #59636e; }
.context-menu-item.danger svg { color: var(--danger); }
.context-menu-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* === Emoji Picker === */
.emoji-picker {
  position: fixed; top: 80px; right: 80px; width: min(350px, calc(100vw - 24px)); height: min(400px, calc(100vh - 24px));
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); z-index: 1500; display: flex; flex-direction: column;
  animation: menuIn 0.15s ease;
}
.emoji-search { padding: 10px; border-bottom: 1px solid var(--border); }
.emoji-search input {
  width: 100%; padding: 8px 10px; background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); outline: none; color: var(--text-primary);
}
.emoji-search input:focus { border-color: var(--accent); }
.emoji-categories { display: flex; gap: 2px; padding: 6px 10px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.emoji-cat-btn { padding: 4px 8px; font-size: 18px; border-radius: var(--radius-xs); cursor: pointer; transition: var(--transition-fast); }
.emoji-cat-btn:hover { background: var(--bg-hover); }
.emoji-cat-btn.active { background: var(--accent-muted); }
.emoji-grid { flex: 1; overflow-y: auto; padding: 8px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; align-content: start; }
.emoji-item {
  width: 100%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: 22px; border-radius: var(--radius-xs); cursor: pointer; transition: var(--transition-fast);
}
.emoji-item:hover { background: var(--bg-hover); transform: scale(1.2); }
.emoji-section-label { grid-column: 1 / -1; font-size: 12px; font-weight: 600; color: var(--text-muted); padding: 8px 4px 4px; text-transform: uppercase; letter-spacing: 0.5px; }

/* === Image Viewer === */
.image-viewer {
  position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 2000;
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px;
  box-sizing: border-box;
}
.image-viewer-stage {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.image-viewer-stage img,
.image-viewer-stage video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--radius-sm); }
.image-viewer img { transform-origin: center center; transition: transform 0.08s ease-out; user-select: none; -webkit-user-drag: none; }
.image-viewer img.is-draggable { cursor: grab; }
.image-viewer img.is-dragging { cursor: grabbing; }
.image-viewer-top-bar {
  width: min(1100px, 100%);
  margin: 0 auto;
  display: flex;
  justify-content: flex-end;
}
.image-viewer-close { color: white; }
.image-viewer-bottom-bar {
  width: min(1100px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.image-viewer-bottom-left {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.image-viewer-download { color: white; }
.image-viewer-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
}
.image-viewer-toolbar-left {
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  padding: 8px 10px;
  backdrop-filter: blur(8px);
}
.image-viewer-sender {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.26);
}
.image-viewer-sender.hidden {
  display: none;
}
.image-viewer-sender-avatar .avatar {
  width: 30px;
  height: 30px;
  font-size: 12px;
}
.image-viewer-sender-name {
  font-size: 13px;
  line-height: 1;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(255, 255, 255, 0.95);
}
.image-viewer-zoom-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.image-viewer-zoom-btn {
  width: 30px;
  height: 30px;
  color: #fff;
}
.image-viewer-reset-btn {
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  height: 30px;
  padding: 0 10px;
  font-size: 13px;
  cursor: pointer;
}
.image-viewer-reset-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}
.image-viewer-info {
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  max-width: min(70vw, 680px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 720px) {
  .image-viewer {
    padding: 10px;
    gap: 8px;
  }
  .image-viewer-bottom-bar {
    align-items: center;
    gap: 8px;
  }
  .image-viewer-top-bar {
    width: 100%;
  }
  .image-viewer-toolbar-left {
    gap: 8px;
    padding: 8px;
  }
  .image-viewer-sender-name { max-width: 120px; }
  .image-viewer-info { max-width: calc(100vw - 90px); }
}

/* === Toast === */
.toast-container { position: fixed; top: 16px; right: 16px; z-index: 3000; display: flex; flex-direction: column; gap: 8px; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--bg-surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease; min-width: 280px; max-width: 400px;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } }
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--info); }
.toast-text { flex: 1; font-size: 13px; }

/* Notification permission banner */
.notif-banner {
  padding: 12px 16px; background: var(--accent-muted); border-bottom: 1px solid var(--accent);
  display: flex; align-items: center; justify-content: space-between; font-size: 13px;
}

/* === Onetab UI Refresh === */
#app-screen {
  flex-direction: column;
  background: #f3f4f8;
}
.account-settings-page {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  /* padding: 24px; */
  background: #fff;
  position: relative;
  display: flex;
  flex-direction: column;
}
.account-settings-shell {
  /* width: min(920px, 100%); */
  margin: 0 auto;
  /* background: #ffffff;
  border: 1px solid #e3e8f2;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  padding: 18px 20px 22px; */
}
.account-settings-header {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #e6e6e6;
  display: flex;
  min-height: 50px;
  padding: 4px 1rem;
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 20;
  gap: 4px;
}
.account-settings-header .icon-btn {
  flex-shrink: 0;
}
.account-settings-header .vertical-divider{
  min-height: 21px;
      margin-right: 6px;
}
.account-settings-header-text h2 {
  color: #1a1f36;
  font-size: 14px;
  font-weight: 600;
  line-height: normal;
  margin: 0px;
}
.account-settings-header-text p {
  margin: 2px 0 0;
  font-size: 13px;
  color: #6b7280;
}
.account-settings-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 550px;
  margin: auto;
  padding: 24px 0;
}
.account-settings-avatar-section {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid #e4e8f2;
  border-radius: 12px;
  background: #f8f9fc;
}
.account-settings-avatar-preview .avatar {
  width: 88px;
  height: 88px;
  font-size: 30px;
}
.account-settings-avatar-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}
.account-settings-help {
  margin: 0;
  font-size: 12px;
  color: #6b7280;
}
.account-settings-help.is-error {
  color: #dc2626;
}
.account-settings-help.is-success {
  color: #15803d;
}
.account-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
}
.account-settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 8px;
}
@media (min-width: 1025px) {
    .client-top-nav-switcher {
        width: 74px;
    }
}

.client-top-nav-switcher {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  flex: none;
  height: 50px;
  margin-right: auto;
}
.client-top-nav-switcher-button{
  display: flex;
  align-items: center;
  justify-content: center;
}
.app-topbar {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  /* background: linear-gradient(90deg, #2b7d79 0%, #6c2f73 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18); */
  color: #ffffff;
  position: relative;
}

.app-topbar-left {
  display: flex;
  align-items: center;
}
.app-topbar-logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  overflow: hidden;
}
.app-topbar-brand {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.app-topbar-brand strong {
  font-size: 28px;
  font-weight: 700;
}
.app-topbar-brand span {
  font-size: 11px;
  letter-spacing: 0.12em;
  opacity: 0.82;
  font-weight: 600;
}
.app-topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}
.app-topbar-actions .btn {
  letter-spacing: normal;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  min-height: 32px;
  font-weight: 600;
  font-size: 13px;
  padding: 0 12px;
  white-space: nowrap;
}
.app-topbar-actions .btn[hidden],
.workspace-create-btn[hidden] {
  display: none !important;
}
.app-topbar-actions .btn-secondary {
  background: #ffffff;
  color: #111827;
}
.app-topbar-actions .btn-invite{
  background-color: #fff;
  border-color: #fff;
  color: #001529; 
}
.app-topbar-actions .oneask-btn {
  background: var(--ot-ai-gradient);
  color: #ffffff;
}
.oneask-btn svg{
  width: 19px;
  height: 19px;
}
.app-topbar-actions .icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid transparent;
}
.app-topbar-actions .icon-btn svg{
  width: 20px;
  height: 20px;
}
.app-topbar-actions .icon-btn:hover{
  background-color: hsla(0, 0%, 100%, .1) !important;
  border-color: hsla(0, 0%, 100%, .1) !important;
  border-radius: 6px;
}
.app-topbar-actions .icon-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}
.topbar-bell {
  flex-shrink: 0;
  overflow: visible;
  line-height: 0;
}
.topbar-bell svg {
  display: block;
}
.app-topbar-actions .user-info {
  flex: 0 1 auto;
  min-width: auto;
  max-width: none;
  gap: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.app-topbar-actions .user-info:hover {
  background: transparent;
}
.app-topbar-actions .user-display-name {
  display: none;
}
.app-topbar-actions #user-avatar {
  flex-shrink: 0;
}
.profile-dropdown {
  position: absolute;
  top: calc(100% + 0px);
  right: 0;
  background: #f6f6f8;
  color: #111827;
  background-color: #fff;
  background-clip: padding-box;
  border-radius: 12px;
  outline: none;
  width: 310px;
  box-shadow: 0 3px 6px -4px rgba(0, 0, 0, .12), 0 6px 16px 0 rgba(0, 0, 0, .08), 0 9px 28px 8px rgba(0, 0, 0, .05);
  z-index: 1000;
  padding: 8px 12px;
  margin-top: 4px;
}
.activity-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 92px;
  width: min(280px, calc(100vw - 24px));
  z-index: 1000;
}
.notification-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 44px;
  width: min(360px, calc(100vw - 24px));
  z-index: 1000;
}
.activity-card {
  background: #ffffff;
  color: #111827;
  border-radius: 14px;
  border-radius: var(--radius-lg);
  box-shadow: 0 3px 6px -4px rgba(0, 0, 0, .12), 0 6px 16px 0 rgba(0, 0, 0, .08), 0 9px 28px 8px rgba(0, 0, 0, .05);
  overflow: hidden;
}
.activity-card-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid #e5e7eb;
}
.activity-card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}
.activity-card-subtitle {
  margin-top: 4px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 500;
}
.activity-card-state,
.activity-card-empty {
  padding: 18px 16px;
  font-size: 13px;
  color: #6b7280;
}
.activity-card-state-error {
  color: #b91c1c;
}

.notification-card {
  background: #ffffff;
  color: #111827;
  border-radius: 14px;
  /* border: 1px solid rgba(226, 232, 240, 0.9); */
  box-shadow: 0 3px 6px -4px rgba(0, 0, 0, .12), 0 6px 16px 0 rgba(0, 0, 0, .08), 0 9px 28px 8px rgba(0, 0, 0, .05);
  overflow: hidden;
}
.notification-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
}
.notification-card-title {
  font-weight: 700;
  font-size: 15px;
  line-height: normal;
  color: #1d1c1d;
}
.notification-card-subtitle {
  margin-top: 2px;
  color: #666;
  font-size: 12px;
}
.notification-clear-btn {
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 8px;
  color: #374151;
  font-size: 12px;
  font-weight: 600;
  transition: var(--transition);
}
.notification-clear-btn:hover:not(:disabled) {
  /* background: #e5e7eb; */
  color: #3866e6;
}
.notification-clear-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.notification-card-state,
.notification-card-empty {
  padding: 18px 16px;
  font-size: 13px;
  color: #6b7280;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.notification-card-state-error {
  color: #b91c1c;
}
.notification-list {
  max-height: min(420px, calc(100vh - 170px));
  overflow-y: auto;
}
.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-fast);
  cursor: pointer;
}
.notification-item:last-child {
  border-bottom: 0;
}
.notification-item:hover {
  background: var(--bg-hover);
}
.notification-item.is-unread {
  background: #f8fbff;
}
.notification-item-avatar {
  flex-shrink: 0;
}
.notification-item-avatar  .avatar {
  font-size: 13px;
  font-weight: 600;
  background: rgba(0, 0, 0, .25);
  border: 1px solid rgba(0, 0, 0, 0);
}
.notification-item-body {
  min-width: 0;
  flex: 1;
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.notification-item-top {
  /* display: flex; */
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.notification-item-title {
  font-weight: 600;
  font-size: 14px;
  line-height: normal;
  color: #1d1c1d;
}
.notification-item-time {
  font-size: 12px;
  font-weight: 400;
  line-height: normal;
  color: #616061;
  text-align: right;
  flex-shrink: 0;
  white-space: nowrap;
}
.notification-item-message {
  margin-top: 1px;
  font-size: 12px;
  color: #4b5563;
  line-height: 1.5;
  word-break: break-word;
}
.notification-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 11px;
  color: #6b7280;
}
.notification-item-module {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 9999px;
  background: #eef2ff;
  color: #4338ca;
  font-weight: 700;
  text-transform: capitalize;
}
.notification-item-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: #2563eb;
  flex-shrink: 0;
  margin-top: 6px;
}
.notifications-blank-state-title{
  font-weight: 600;
  font-size: 15px;
  line-height: normal;
  color: #616061;
}
.notifications-blank-state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 132px;
  height: 132px;
}
.notification-card-empty{
  padding: 50px 20px;
}
.notification-card-empty>img {
    max-width: 100%;
}
.activity-card-table {
  display: flex;
  flex-direction: column;
}
.activity-card-table-head,
.activity-card-table-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 10px 16px;
}
.activity-card-table-head {
  border-bottom: 1px solid #e5e7eb;
  color: #6b7280;
  font-size: 13px;
  font-weight: 500;
}
.activity-card-table-row {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}
.profile-dropdown-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 2px 10px;
  border-bottom: 1px solid #e5e5e5;
  margin-bottom: 8px;
}
.profile-dropdown-identity {
  min-width: 0;
}
.profile-dropdown-name {
  font-size: .8125rem;
  line-height: 1rem;
  letter-spacing: 0px;
  font-weight: 600;
  margin: 0px;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px; 
}
.profile-dropdown-email {
  font-size: .8125rem;
  line-height: 1rem;
  letter-spacing: 0px;
  font-weight: 400;
  margin: 0px;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 14px;
  min-height: 30px;
  color: #333;
  font-weight: 500;
  margin-bottom: 6px;
} 

.profile-dropdown-item svg {
  width: 16px;
  height: 16px;
  color: #4b5563;
  flex-shrink: 0;
}
.profile-dropdown-item:hover {
  background: #f2f2f2;
}
#btn-profile-status {
  border: 1px solid #e6e6e6;
  margin-bottom: 4px;
}
/* #btn-profile-status:hover {
  background: #f2f2f2;
} */
.profile-dropdown-item.danger {
  color: #111827;
}
.profile-dropdown-item.danger svg {
  color: #4b5563;
}
.profile-dropdown-divider {
  height: 1px;
  background: #dadde5;
  margin: 8px 0;
}
.user-menu-divider{
  width: 100%;
  height: 1px;
  background-color: #e5e5e5;
  margin: 6px 0;
}
.topbar-bell {
  position: relative;
}
.topbar-badge {
  position: absolute;
  top: -5px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9999px;
  background: #ea1414;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: initial;
}
.topbar-bell.has-unread {
  color: #ffffff;
}
.topbar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #22c55e, #14b8a6);
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* .space-sidebar {
  display: none;
} */
.room-panel {
  /* width: 330px; */
  background: #fff;
  /* border-right: 1px solid #e4e7ef; */
}
/* .room-panel-header {
  height: auto;
  padding: 12px 20px 10px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  background: #ffffff;
  border-bottom: 1px solid #e6e8f0;
} */
.workspace-switcher {
  min-width: 0;
  max-width: none;
}
.workspace-label {
  color: rgba(0, 0, 0, .6);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  text-align: left;
  margin-bottom: 4px;
}
.workspace-dropdown {
  position: relative;
}
.workspace-dropdown-trigger {
  width: auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  background: transparent !important;
  border: 0;
  box-shadow: none !important;
  gap: 10px;
  color: #fff;
}
.workspace-dropdown-trigger:focus-visible,
.workspace-dropdown.is-open .workspace-dropdown-trigger {
  /* box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18) !important; */
  border-radius: 12px;
}
.workspace-dropdown-trigger:disabled {
  cursor: default;
  color: rgba(255, 255, 255, 0.6);
}
.workspace-dropdown-trigger-main {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.workspace-dropdown-trigger-avatar {
  display: flex;
  flex-shrink: 0;
}
.workspace-dropdown-trigger-avatar .avatar-sm {
  /* width: 38px;
  height: 38px; */
  font-size: 15px;
}
.workspace-dropdown-trigger-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}
.workspace-dropdown-trigger-text {
  display: block;
  max-width: 160px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 1px;
}
.workspace-dropdown-trigger-subtext {
  display: block;
  max-width: 160px;
  margin-top: 2px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgb(223, 223, 223);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.workspace-dropdown-caret {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #fff;
  transition: transform 0.2s ease;
}
.workspace-dropdown.is-open .workspace-dropdown-caret {
  transform: rotate(180deg);
}
.workspace-dropdown-menu {
  position: absolute;
  top: calc(100% + 0px);
  left: 11px;
  width: min(290px, calc(100vw - 24px));
  overflow: hidden;
  background: #fff;
  border-radius: 12px;
  outline: none; 
  z-index: 25;
  padding: 0;  
  box-shadow: 0 3px 6px -4px rgba(0, 0, 0, .12), 0 6px 16px 0 rgba(0, 0, 0, .08), 0 9px 28px 8px rgba(0, 0, 0, .05);
}
.workspace-dropdown-panel {
  display: flex;
  flex-direction: column;
  padding: 12px 0 10px;
}
.workspace-dropdown-title {
  font-size: 13px;
  line-height: normal;
  color: #666;
  padding: 0 18px;
  margin-bottom: 8px;
}
.workspace-dropdown-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 16px 12px;
  padding: 0 8px;
  min-height: 32px;
  border-radius: 6px;
  background-color: #f0f0f0;
  color: #8b949e;
  border: 1px solid #e6e6e6;
}
.workspace-dropdown-search svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.workspace-dropdown-search input {
  width: 100%;
  border: 0;
  background: transparent;
  color: #475569;
  font-size: 13px;
  font-weight: 400;
  outline: none;
}
.workspace-dropdown-search input::placeholder {
  color: #64748b;
}
.workspace-dropdown-list {
  max-height: 246px;
  overflow-y: auto;
  padding: 0 8px 4px;
}
.workspace-dropdown-option,
.workspace-dropdown-status,
.workspace-dropdown-action {
  width: 100%;
  text-align: left;
}
.workspace-dropdown-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 42px;
  padding: 5px 6px;
  color: #111827;
  background: transparent;
  transition: background-color 0.16s ease, color 0.16s ease;
  border-radius: var(--radius-sm);
}
.workspace-dropdown-option:hover,
.workspace-dropdown-option:focus-visible {
  background: var(--bg-hover);
}
/* .workspace-dropdown-option.is-selected {
background: #206e7b;
}
.workspace-dropdown-option.is-selected .workspace-dropdown-option-name{
  color: #fff;
  font-weight: 700;
} */
.workspace-dropdown-option-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.workspace-dropdown-option-avatar {
  display: flex;
  flex-shrink: 0;
}
/* .workspace-dropdown-option-avatar .avatar-sm {
  width: 34px;
  height: 34px;
  font-size: 13px;
  border-radius: 10px;
} */
.workspace-dropdown-option-name {
  min-width: 0;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.workspace-dropdown-option-check {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
.workspace-dropdown-option-check svg {
  display: block;
  width: 20px;
  height: 20px;
}
.workspace-dropdown-status {
  padding: 18px 12px 20px;
  color: #6b7280;
  font-size: 14px;
  cursor: default;
}
.workspace-dropdown-footer {
  margin-top: 6px;
  border-top: 1px solid var(--border);
  padding: 8px 10px 0px 10px;
}
.workspace-dropdown-action {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  background: transparent;
  border: 0;
  border-radius: var(--radius-md);
  color: #111827;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.16s ease, color 0.16s ease;
}
.workspace-dropdown-action:hover,
.workspace-dropdown-action:focus-visible {
  background: var(--bg-hover);
}
.workspace-dropdown-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.workspace-dropdown-action svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #6b7280;
}
.workspace-select {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  border: 0;
  opacity: 0;
  pointer-events: none;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  overflow: hidden;
}
.user-info {
  background: #f4f6fb;
  border: 1px solid #e3e8f3;
  border-radius: 10px;
  padding: 8px 10px;
}
.user-display-name {
  font-size: 16px;
}
.sidebar-sections {
  flex: 1;
  min-height: 0;
  /* overflow: hidden; */
  /* display: flex; */
  flex-direction: column;
  gap: 1px;
  padding: 7px 0 12px;
}
 
.sidebar-section {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
  padding: 0 10px 0px;
  margin-bottom: 8px;
  /* border-bottom: 1px solid #e3e7f1; */
}
.sidebar-section-static .avatar{
  width: 24px;
  height: 24px;
  font-size: 11px;
}
.sidebar-section-static {
  flex: 0 0 auto;
}
.sidebar-section-static .sidebar-section-body {
  flex: 0 0 auto;
  overflow: visible;
}
.sidebar-section-static .grouped-room-list {
  flex: 0 0 auto;
  overflow-y: auto;
}
.sidebar-section[data-collapsed="true"] {
  flex: 0 0 auto;
}

.sidebar-section:last-child {
  border-bottom: 0;
}
.sidebar-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 0px 8px 10px;
}
.sidebar-section-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex: 1;
  gap: 6px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.sidebar-section-title {
  color: #00000099;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 500;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  border-radius: var(--radius-sm);
  padding: 0;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden; 
}
.sidebar-section-toggle:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}
.sidebar-section-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  border-radius: 6px;
  /* margin-right: 5px; */
  /* padding: 5px; */
  transition: transform 0.2s ease;
}
.sidebar-section-toggle-icon svg {
  width: 100%;
  height: 100%;
  color: rgba(0, 0, 0, .6);
}
.sidebar-section[data-collapsed="true"] .sidebar-section-toggle-icon {
  transform: rotate(-90deg);
}
.sidebar-section-head:hover .sidebar-section-actions{
  visibility: visible;
}
.sidebar-section.search-open .sidebar-section-actions {
  visibility: visible;
}
.sidebar-section-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  visibility: hidden;
}
.sidebar-section-body[hidden] {
  display: none !important;
}
.sidebar-search-wrap {
  padding: 0 0 10px 12px;
  position: relative;
}
.sidebar-search-wrap .icon-btn{
  position: absolute;
  transform: translate(3%, -64%);
  top: 50%;
  right: 0;
  height: auto;
  padding: 9px;
  color: #666;
}
.sidebar-search-wrap input::placeholder { font-size: 13px; font-weight: 400;}
.sidebar-search-wrap input {
  width: 100%; 
  outline: none;
  font-size: 13px !important;
  padding: 6px 35px 6px 8px;
}
.sidebar-section-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  gap: 2px;
  overflow: hidden;
}
.sidebar-search-wrap input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}
.grouped-room-list {
  flex: 1 1 auto;
  min-height: 0;
  /* overflow-y: auto; */
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: #c8cfda transparent;
}
.grouped-room-list::-webkit-scrollbar {
  width: 4px;
}
.grouped-room-list::-webkit-scrollbar-thumb {
  background: #c8cfda;
  border-radius: 999px;
}
#channel-list {
  max-height: none;
}
#favorite-list {
  max-height: 220px;
}
#direct-list {
  max-height: none;
}
/* .sidebar-room-item {
  border-radius: 10px;
  padding: 7px 10px;
} */
.sidebar-room-item {
  width: 100%;
  align-items: center;
  gap: 6px;
  /* min-height: 58px; */
  padding: 5px 8px;
  /* margin-bottom: 4px; */
  border-radius: 0.375rem;
}

.sidebar-room-item:last-child {
  margin-bottom: 0;
}
.sidebar-room-item .avatar,
.sidebar-room-item .sidebar-avatar-wrap {
  flex-shrink: 0;
  margin-top: 1px;
}
.sidebar-room-item .room-item-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.sidebar-room-item .room-item-top {
  align-items: flex-start;
  gap: 8px;
}
.sidebar-room-item .room-item-name {
  font-size: 14px;
  line-height: 1.25;
  /* font-weight: 600; */
}
.sidebar-room-item .room-item-time {
  font-size: 11px;
  line-height: 1.2;
  padding-top: 1px;
}
.sidebar-room-item .room-item-bottom {
  min-width: 0;
  gap: 8px;
  margin-top: 0;
}
.sidebar-room-item .room-item-preview {
  min-width: 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-muted);
}
.sidebar-room-item.active {
  background: #2f6f7d;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.sidebar-room-item.active .room-item-name,
.sidebar-room-item.active .room-item-preview,
.sidebar-room-item.active .room-item-time,
.sidebar-room-item.active .room-preview-sender {
  color: #ffffff;
}
.room-lock-icon {
  display: inline-flex;
  vertical-align: middle;
  margin-left: 6px;
  opacity: 0.7;
}
.room-lock-icon svg {
  width: 13px;
  height: 13px;
}
.sidebar-add-btn {
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  color: rgba(0, 0, 0, .6);
  width: calc(100% - 4px);
  margin: 0px 2px 0;
  padding: 9px 5px;
  flex-shrink: 0;
}
.sidebar-add-btn:hover {  
  color: var(--text-primary);
}
.sidebar-empty {
  padding: 10px 12px;
  font-size: 13px;
  color: #6b7280;
}
.sidebar-avatar-wrap {
  position: relative;
  display: inline-flex;
}
.sidebar-presence-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid #f6f7fb;
  position: absolute;
  right: -1px;
  bottom: -1px;
  background: #9ca3af;
}
.sidebar-presence-dot.online { background: var(--online); }
.sidebar-presence-dot.away { background: #f59e0b; }
.sidebar-presence-dot.offline { background: #d1d5db; }
.sidebar-direct-latest {
  display: block;
  /* color: #999; */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-direct-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-width: 0;
}
.sidebar-direct-latest {
  display: block;
  min-width: 0;
  flex: 1;
}
.sidebar-direct-status-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 999px;
  background: #f3f4f6;
  color: #111827;
  font-size: 12px;
  line-height: 1;
}
.sidebar-room-item.active .sidebar-direct-status-line {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}
.status-tooltip {
  position: fixed;
  z-index: 1800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(280px, calc(100vw - 24px));
  padding: 8px 12px;
  border-radius: 10px;
  background: #171717;
  color: #ffffff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  pointer-events: none;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}
.status-tooltip.hidden {
  display: none;
}
.status-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 10px;
  height: 10px;
  background: #171717;
  transform: translateX(-50%) rotate(45deg);
}
.status-tooltip[data-placement="top"]::after {
  bottom: -4px;
}
.status-tooltip[data-placement="bottom"]::after {
  top: -4px;
}
.status-tooltip-emoji {
  flex-shrink: 0;
  font-size: 16px;
  line-height: 1;
}
.status-tooltip-text {
  min-width: 0;
  word-break: break-word;
}
/* .sidebar-direct-latest strong {
  color: #374151;
} */
.sidebar-utility {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 10px 8px;
  /* border-bottom: 1px solid var(--border-light); */
  background: #ffffff;
}
.chat-main {
  background: #ffffff;
  /* box-shadow: 0 0 2px rgba(0, 0, 0, .12), 0 4px 8px rgba(0, 0, 0, .14); */
  box-shadow: 0 0 2px rgba(0, 0, 0, .12), 0 4px 8px rgba(0, 0, 0, .14);
}
.chat-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}
.timeline-container {
  background: #ffffff;
}

/* === Responsive === */
@media (max-width: 1024px) {
  .right-panel { position: fixed; right: 0; top: 0; height: 100vh; z-index: 100; box-shadow: var(--shadow-xl); }
  .plan-shell {
    grid-template-columns: 1fr;
  }
  .plan-sidebar {
    border-right: none;
    border-bottom: 1px solid #edf0f5;
  }
  .plan-main {
    padding: 28px 24px 32px;
  }
  .plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .plan-card:nth-child(2n) {
    border-right: none;
  }
}
@media (max-width: 992px) {
  .auth-container {
    flex-direction: column;
    gap: 30px;
  }
  .auth-container-right{
    padding: 20px;
  }
}
@media (max-width: 768px) {
  
  .auth-brand,
  .auth-tabs,
  .auth-form.active {
    max-width: 100%;
  }
  .signup-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .otp-inputs {
    gap: 6px;
  }
  .otp-box {
    width: 54px;
    height: 54px;
    font-size: 20px;
  }
  .onboarding-panel--narrow {
    padding: 0;
  }
  .onboarding-title {
    font-size: 34px;
  }
  .onboarding-subtitle {
    font-size: 16px;
  }
  .onboarding-actions,
  .plan-footer-actions,
  .plan-header {
    flex-direction: column;
    align-items: stretch;
  }
  .plan-toggle-panel {
    align-items: flex-start;
  }
  .plan-grid {
    grid-template-columns: 1fr;
  }
  .plan-card {
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
  }
  .plan-card:last-child {
    border-bottom: none;
  }
  .plan-sidebar {
    padding: 24px 16px;
  }
  .plan-sidebar-copy {
    max-width: none;
  }
  .plan-sidebar-copy h2 {
    font-size: 36px;
  }
  .plan-main {
    padding: 22px 16px 28px;
  }
  .plan-footer-actions .btn {
    min-width: 0;
    width: 100%;
  }
  .workspace-dropdown-menu {
    left: -8px;
    width: min(320px, calc(100vw - 16px));
  }
  .workspace-sheet-modal-container,
  .workspace-invitations-modal-container {
    width: min(560px, calc(100vw - 16px));
  }
  .workspace-sheet-modal-container .modal-header,
  .workspace-invitations-modal-container .modal-header {
    padding: 16px 18px 12px;
  }
  .workspace-sheet-modal-container .modal-body,
  .workspace-invitations-modal-container .modal-body {
    padding: 14px 18px 18px;
  }
  .ws-invite-top-row {
    flex-direction: column;
    align-items: stretch;
  }
  .ws-invite-send-btn {
    width: 100%;
    min-width: 0;
  }
  .ws-invite-member-actions {
    margin-left: 0;
  }
  .ws-invite-action-btn,
  .ws-invite-member-status {
    font-size: 12px;
  }
  .workspace-invitations-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .workspace-invitations-actions {
    width: 100%;
    justify-content: flex-end;
    margin-left: 0;
  }
  .account-settings-page {
    padding: 12px;
  }
  .account-settings-shell {
    padding: 14px 12px 16px;
    border-radius: 12px;
  }
  .account-settings-grid {
    grid-template-columns: 1fr;
  }
  .account-settings-avatar-section {
    flex-direction: column;
    align-items: flex-start;
  }
  .account-settings-actions {
    justify-content: stretch;
  }
  .account-settings-actions .btn {
    flex: 1;
  }
  .app-topbar {
    height: 50px;
    padding: 0 8px;
  }
  .app-topbar-brand strong {
    font-size: 20px;
  }
  .app-topbar-actions .btn {
    display: none;
  }
  .app-topbar-actions .user-display-name {
    display: none;
  }
  .app-topbar-actions .user-info {
    padding: 2px;
    border: 0;
    background: transparent;
  }
  .profile-dropdown {
    right: 4px;
    width: min(300px, calc(100vw - 12px));
  }
  .activity-dropdown {
    right: 48px;
    width: min(280px, calc(100vw - 12px));
  }
  .notification-dropdown {
    right: 42px;
    width: min(340px, calc(100vw - 12px));
  }
  .app-layout {
    height: calc(100vh - 50px);
  }
  .space-sidebar { display: none; }
  .room-panel { width: 100%; position: fixed; left: 0; top: 50px; height: calc(100vh - 50px); z-index: 50; }
  .room-panel.hidden-mobile { display: none; }
  .mobile-back { display: flex; }
  .chat-header-actions { gap: 0; }
  .chat-header-actions .icon-btn:nth-child(-n+2) { display: none; }
  .bookmark-bar {
    padding: 8px 10px;
  }
  .bookmark-chip {
    max-width: 180px;
  }
}


/*login slider */

.slider-section {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-repeat: no-repeat;
  backdrop-filter: blur(20px);
background:
  radial-gradient(ellipse at 20% 80%, rgba(94, 234, 212, 0.45) 0%, transparent 50%),
radial-gradient(ellipse at 80% 20%, rgba(129, 140, 248, 0.45) 0%, transparent 50%),
radial-gradient(ellipse at 50% 50%, rgba(56, 189, 248, 0.2) 0%, transparent 60%),
linear-gradient(135deg, #f0fafa 0%, #eff0fc 100%);
/* background:
  radial-gradient(ellipse at 0% 0%, rgba(26,45,110,0.25) 0%, transparent 55%),
radial-gradient(ellipse at 100% 100%, rgba(67,212,160,0.35) 0%, transparent 50%),
radial-gradient(ellipse at 100% 0%, rgba(0,188,212,0.2) 0%, transparent 40%),
linear-gradient(160deg, #e8ecf8 0%, #e0f5ef 100%); */
}

.swiper {
  width: 100%;
  max-width: 550px;
  margin: auto;
}

.swiper-slide {
  display: flex !important;
  justify-content: center;
}

.card {
  /* background: rgba(255, 255, 255, 0.6);
  padding: 20px;
  border-radius: 24px; */ 
  /* box-shadow: 0 20px 40px rgba(0,0,0,0.08); */
}

/* 🔥 radius ratio applied */
/* .inner-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  text-align: left;
} */
.inner-card img{
  max-width: 100%;
}

.inner-card h4 {
  font-size: 14px;
  color: #555;
  margin-bottom: 10px;
}

.inner-card h2 {
  font-size: 28px;
  margin-bottom: 15px;
}

.chart-placeholder {
  height: 120px;
  border-radius: 8px;
  background: linear-gradient(180deg, #cfe9ff, #ffffff);
}
.inner-card{
  padding: 0px 20px;
}
.bottom-text {
  text-align: center;
  font-size: 20px;
  font-weight: 500;
  /* color: var(--text-primary); */
  color: #171717;
  max-width: 560px;
  margin: 20px auto 30px;
  padding: 0 20px;
}
.bottom-text strong {
  margin-bottom: 12px;
  display: block;
  font-weight: 600;
}
