/* =========================================================
   GLOBAL RESET
   ========================================================= */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  background: #0b0f13;
  color: #e6edf3;
}

input,
button,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

img,
svg {
  max-width: 100%;
}

textarea,
input,
select {
  max-width: 100%;
}


/* =========================================================
   TOAST
   ========================================================= */

#toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;

  max-width: 90vw;
  width: max-content;

  padding: 11px 18px;
  border-radius: 10px;

  background: #161d25;
  border: 1px solid #303b48;
  color: #e6edf3;

  font-size: 13px;
  font-weight: 600;

  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* =========================================================
   AUTH SCREEN
   ========================================================= */

#auth-screen {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 24px;

  background:
    radial-gradient(
      circle at 20% 10%,
      rgba(65, 105, 225, .12),
      transparent 35%
    ),
    radial-gradient(
      circle at 80% 90%,
      rgba(38, 166, 154, .08),
      transparent 35%
    ),
    #0b0f13;
}

.card {
  width: 100%;
  max-width: 420px;

  padding: 40px 34px;

  background: rgba(18, 24, 31, .94);
  border: 1px solid #27313d;
  border-radius: 18px;

  box-shadow:
    0 25px 70px rgba(0, 0, 0, .42),
    inset 0 1px 0 rgba(255, 255, 255, .02);

  backdrop-filter: blur(18px);
}

.logo {
  width: 58px;
  height: 58px;

  margin: 0 auto 18px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 16px;

  background: linear-gradient(
    135deg,
    #4f7cff,
    #6c63ff
  );

  color: white;

  font-size: 25px;
  font-weight: 800;

  box-shadow: 0 10px 30px rgba(79, 124, 255, .25);
}

h1 {
  color: #f3f6fa;
  font-size: 25px;
  line-height: 1.2;
  text-align: center;
}

.sub {
  margin-top: 8px;

  color: #8996a5;

  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.tabs {
  display: flex;
  gap: 4px;

  margin: 28px 0 22px;

  padding: 4px;

  background: #11171e;
  border: 1px solid #252f3a;
  border-radius: 10px;
}

.tab {
  flex: 1;

  padding: 9px 8px;

  border-radius: 7px;

  color: #7f8b99;

  font-size: 13px;
  font-weight: 600;

  transition:
    background .15s,
    color .15s;
}

.tab:hover {
  color: #dbe4ee;
}

.tab.on {
  background: #26364c;
  color: #fff;
}

.lbl {
  display: block;

  margin: 0 0 7px;

  color: #9aa6b4;

  font-size: 12px;
  font-weight: 600;
}

.inp {
  width: 100%;

  padding: 12px 13px;

  background: #0f151b;

  border: 1px solid #2a3541;
  border-radius: 9px;

  outline: none;

  color: #edf2f7;

  font-size: 14px;

  transition:
    border-color .15s,
    box-shadow .15s,
    background .15s;
}

.inp:focus {
  border-color: #4f7cff;

  background: #111820;

  box-shadow:
    0 0 0 3px rgba(79, 124, 255, .10);
}

.inp::placeholder {
  color: #5e6a77;
}

.inp.bad {
  border-color: #e05252;
}

.errtxt {
  min-height: 17px;

  margin-top: 5px;

  color: #f06b6b;

  font-size: 11px;
}

.pw-wrap {
  position: relative;
}

.eye {
  position: absolute;

  top: 50%;
  right: 11px;

  transform: translateY(-50%);

  color: #718092;

  padding: 4px;

  transition: color .15s;
}

.eye:hover {
  color: #c8d2dc;
}

.pw-wrap .inp {
  padding-right: 42px;
}

.forgot {
  display: block;

  margin-top: 7px;

  color: #6f9aff;

  font-size: 11px;

  text-align: right;

  text-decoration: none;
}

.forgot:hover {
  text-decoration: underline;
}

.btn {
  width: 100%;

  margin-top: 14px;

  padding: 12px 15px;

  border-radius: 9px;

  background: linear-gradient(
    135deg,
    #4f7cff,
    #625cf0
  );

  color: white;

  font-size: 14px;
  font-weight: 700;

  transition:
    transform .15s,
    filter .15s,
    opacity .15s;
}

.btn:hover:not([disabled]) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn:active:not([disabled]) {
  transform: translateY(0);
}

.btn[disabled] {
  opacity: .55;
  cursor: not-allowed;
}

.or {
  display: flex;
  align-items: center;
  gap: 10px;

  margin: 20px 0;
}

.or-line {
  flex: 1;
  height: 1px;
  background: #29333e;
}

.or-txt {
  color: #657282;
  font-size: 10px;
  font-weight: 600;
}

.gbtn {
  width: 100%;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;

  padding: 11px 15px;

  background: #111820;

  border: 1px solid #2b3540;
  border-radius: 9px;

  color: #d8e0e8;

  font-size: 13px;
  font-weight: 600;

  transition:
    background .15s,
    border-color .15s;
}

.gbtn:hover {
  background: #151d26;
  border-color: #394653;
}

.footer {
  margin-top: 22px;

  color: #596675;

  font-size: 10px;
  line-height: 1.5;

  text-align: center;
}

.prefix-inp {
  display: flex;
  align-items: center;

  background: #0f151b;

  border: 1px solid #2a3541;
  border-radius: 9px;

  overflow: hidden;

  transition:
    border-color .15s,
    box-shadow .15s;
}

.prefix-inp:focus-within {
  border-color: #4f7cff;

  box-shadow:
    0 0 0 3px rgba(79, 124, 255, .10);
}

.prefix-inp .prefix {
  padding-left: 12px;

  color: #758292;

  font-size: 13px;
}

.prefix-inp .inp {
  flex: 1;

  border: 0;
  background: transparent;

  box-shadow: none;
}

.prefix-inp .inp:focus {
  box-shadow: none;
}


/* =========================================================
   DASHBOARD
   ========================================================= */

#dash {
  position: relative;

  display: flex;

  width: 100%;
  height: 100vh;
  height: 100dvh;

  min-height: 0;

  overflow: hidden;

  background: #0b0f13;
}


/* =========================================================
   SIDEBAR
   ========================================================= */

.sidebar {
  position: relative;

  width: 280px;
  min-width: 280px;
  height: 100%;

  display: flex;
  flex-direction: column;

  background: #10161d;

  border-right: 1px solid #27313b;

  flex-shrink: 0;

  overflow: hidden;
}

.wk-hdr {
  padding: 16px 14px 12px;

  border-bottom: 1px solid #252e38;
}

.wk-row {
  display: flex;
  align-items: center;
  gap: 10px;

  min-width: 0;
}

.wk-logo {
  width: 36px;
  height: 36px;

  flex: 0 0 36px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 9px;

  background: #26344a;

  color: #8caeff;

  font-size: 16px;
  font-weight: 800;
}

.wk-name {
  min-width: 0;

  color: #edf2f7;

  font-size: 13px;
  font-weight: 700;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wk-plan {
  margin-top: 2px;

  color: #697687;

  font-size: 10px;
}

.dot {
  width: 7px;
  height: 7px;

  flex: 0 0 7px;

  border-radius: 50%;

  background: #40c987;

  box-shadow: 0 0 8px rgba(64, 201, 135, .35);
}

.ibtn {
  width: 30px;
  height: 30px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 7px;

  color: #748191;

  transition:
    background .15s,
    color .15s;
}

.ibtn:hover {
  background: #1c2630;
  color: #dce4ed;
}

.s-search {
  position: relative;

  margin: 11px 12px;
}

.s-sb {
  width: 100%;

  padding: 9px 10px 9px 31px;

  background: #0d1319;

  border: 1px solid #252f39;
  border-radius: 8px;

  outline: none;

  color: #dbe3eb;

  font-size: 12px;
}

.s-sb::placeholder {
  color: #5d6976;
}

.s-sb:focus {
  border-color: #3c526d;
}

.s-search svg {
  position: absolute;

  left: 10px;
  top: 50%;

  transform: translateY(-50%);

  color: #657282;

  pointer-events: none;
}

.scroller {
  flex: 1;

  min-height: 0;

  overflow-y: auto;
  overflow-x: hidden;
}

.sect {
  padding: 4px 8px 8px;
}

.sect-hdr {
  display: flex;
  align-items: center;
  gap: 7px;

  padding: 8px 7px;

  cursor: pointer;

  user-select: none;
}

.chev {
  width: 14px;

  color: #687585;

  font-size: 10px;

  transition: transform .15s;
}

.sect.collapsed .chev {
  transform: rotate(-90deg);
}

.sect-title {
  flex: 1;

  color: #697686;

  font-size: 10px;
  font-weight: 800;

  letter-spacing: .7px;

  text-transform: uppercase;
}

.add-btn {
  width: 22px;
  height: 22px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 5px;

  color: #697687;

  transition:
    background .15s,
    color .15s;
}

.add-btn:hover {
  background: #1d2731;
  color: #dce4ed;
}

.sect-body {
  display: block;
}

.sect.collapsed .sect-body {
  display: none;
}

.row {
  display: flex;
  align-items: center;
  gap: 9px;

  min-width: 0;

  padding: 8px 9px;

  border-radius: 8px;

  cursor: pointer;

  color: #8a96a4;

  transition:
    background .15s,
    color .15s;
}

.row:hover {
  background: #171f28;
  color: #dce4ed;
}

.row.on {
  background: #1d2b3c;
  color: #f0f5fa;
}

.hash {
  color: #586675;

  font-size: 16px;
  line-height: 1;
}

.row.on .hash {
  color: #789cff;
}

.rname {
  flex: 1;

  min-width: 0;

  font-size: 12px;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dm-av {
  width: 25px;
  height: 25px;

  flex: 0 0 25px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 7px;

  background: #263444;

  color: #a8bdd8;

  font-size: 10px;
  font-weight: 700;
}

.me-footer {
  padding: 10px;

  border-top: 1px solid #252e38;

  flex-shrink: 0;
}

.me-card {
  display: flex;
  align-items: center;
  gap: 9px;

  padding: 8px;

  border-radius: 8px;

  transition: background .15s;
}

.me-card:hover {
  background: #171f27;
}

.av {
  width: 31px;
  height: 31px;

  flex: 0 0 31px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: linear-gradient(
    135deg,
    #4f7cff,
    #6c63ff
  );

  color: white;

  font-size: 11px;
  font-weight: 700;
}

.s-name {
  flex: 1;

  min-width: 0;

  color: #dce4ec;

  font-size: 11px;
  font-weight: 700;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.s-stat {
  color: #687585;

  font-size: 9px;
}


/* =========================================================
   CHAT AREA
   ========================================================= */

.chat-area {
  position: relative;

  display: flex;
  flex-direction: column;

  flex: 1;

  min-width: 0;
  min-height: 0;

  overflow: hidden;

  background: #0b0f13;
}

.no-chat {
  flex: 1;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 30px;

  overflow-y: auto;
}

.empty-card {
  width: 100%;
  max-width: 560px;

  padding: 25px;

  text-align: center;
}

.empty-emoji {
  width: 56px;
  height: 56px;

  margin: 0 auto 15px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 16px;

  background: #172131;

  font-size: 25px;
}

.empty-card h2 {
  color: #eaf0f5;

  font-size: 20px;
}

.empty-card p {
  max-width: 460px;

  margin: 8px auto 0;

  color: #758292;

  font-size: 12px;
  line-height: 1.6;
}

.empty-tips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;

  margin-top: 22px;
}

.tip {
  min-width: 0;

  padding: 12px 10px;

  border: 1px solid #232e39;
  border-radius: 9px;

  background: #11171e;

  color: #7d8a99;

  font-size: 10px;
  line-height: 1.5;

  cursor: pointer;

  transition:
    background .15s,
    border-color .15s,
    color .15s;
}

.tip:hover {
  background: #161f29;
  border-color: #354453;
  color: #cfd8e2;
}

.tip:active {
  transform: translateY(1px);
}

.tip b {
  display: block;

  margin-bottom: 4px;

  color: #9aa9ba;

  font-size: 11px;
}

.tip:hover b {
  color: #dce6f0;
}


/* =========================================================
   CHAT HEADER
   ========================================================= */

.c-hdr {
  min-height: 64px;

  display: flex;
  align-items: center;
  gap: 11px;

  padding: 10px 18px;

  border-bottom: 1px solid #252e38;

  background: rgba(11, 15, 19, .96);

  flex-shrink: 0;
}

.ch-icon {
  width: 35px;
  height: 35px;

  flex: 0 0 35px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 9px;

  background: #26344a;

  color: #8eaaff;

  font-size: 15px;
  font-weight: 800;
}

.c-hname {
  min-width: 0;

  color: #e8edf3;

  font-size: 13px;
  font-weight: 700;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.c-hstat {
  color: #647181;

  font-size: 10px;
}

.ch-topic {
  flex: 1;

  min-width: 0;

  margin-left: 8px;

  color: #6f7c8b;

  font-size: 10px;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aipill {
  display: flex;
  align-items: center;
  gap: 5px;

  padding: 5px 8px;

  border: 1px solid #273445;
  border-radius: 20px;

  color: #8198bb;

  font-size: 9px;

  white-space: nowrap;

  transition:
    background .15s,
    border-color .15s;
}

.aipill:hover {
  background: #172131;
  border-color: #38506e;
}


/* =========================================================
   MESSAGES
   ========================================================= */

.msgs-wrap {
  flex: 1;

  min-height: 0;

  overflow-y: auto;
  overflow-x: hidden;

  scroll-behavior: smooth;
}

.msgs {
  width: 100%;
  max-width: 900px;

  margin: 0 auto;

  padding: 18px 22px 25px;
}

.dpill {
  width: max-content;
  max-width: 100%;

  margin: 0 auto 18px;

  padding: 5px 10px;

  border-radius: 20px;

  background: #131a21;

  border: 1px solid #222d37;

  color: #677484;

  font-size: 9px;

  text-align: center;
}

.ch-intro {
  padding: 20px 10px 25px;

  text-align: center;
}

.ch-intro-icon {
  width: 45px;
  height: 45px;

  margin: 0 auto 10px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 12px;

  background: #182332;

  color: #89a5d3;

  font-size: 18px;
}

.ch-intro h2 {
  color: #e1e8ef;

  font-size: 17px;
}

.ch-intro-desc {
  max-width: 520px;

  margin: 7px auto 0;

  color: #697686;

  font-size: 11px;
  line-height: 1.6;
}

.ch-intro-meta {
  margin-top: 10px;

  color: #53606e;

  font-size: 9px;
}

.mrow {
  display: flex;
  gap: 9px;

  margin-bottom: 13px;

  min-width: 0;
}

.mrow.me {
  justify-content: flex-end;
}

.mrow.them {
  justify-content: flex-start;
}

.mrow.hasav {
  padding-left: 0;
}

.lav {
  width: 29px;
  height: 29px;

  flex: 0 0 29px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 8px;

  background: #263444;

  color: #a9bbd2;

  font-size: 9px;
  font-weight: 700;
}

.bbl {
  max-width: 65%;

  min-width: 0;

  padding: 9px 12px;

  border-radius: 12px;

  color: #dce3ea;

  font-size: 12px;
  line-height: 1.55;

  overflow-wrap: anywhere;
  word-break: break-word;
}

.bbl.me {
  background: #24416b;

  border-bottom-right-radius: 4px;

  color: #edf4fc;
}

.bbl.them {
  background: #151d25;

  border: 1px solid #242f3a;

  border-bottom-left-radius: 4px;
}

.bt {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.bt code {
  display: inline-block;

  padding: 1px 4px;

  border-radius: 4px;

  background: rgba(0, 0, 0, .25);

  color: #b6c9e4;

  font-family: Consolas, Monaco, monospace;

  font-size: .9em;
}

.btime {
  margin-top: 4px;

  color: #566372;

  font-size: 8px;
}

.mrow.me .btime {
  text-align: right;
}

.ailbl {
  display: inline-flex;
  align-items: center;
  gap: 4px;

  margin-bottom: 4px;

  color: #7994bb;

  font-size: 8px;
  font-weight: 700;
}

.typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;

  padding: 8px 12px;

  border-radius: 10px;

  background: #151d25;
  border: 1px solid #242f3a;
}

.typing span {
  width: 4px;
  height: 4px;

  border-radius: 50%;

  background: #718196;

  animation: typingDot 1.2s infinite ease-in-out;
}

.typing span:nth-child(2) {
  animation-delay: .15s;
}

.typing span:nth-child(3) {
  animation-delay: .3s;
}

@keyframes typingDot {
  0%,
  60%,
  100% {
    opacity: .35;
    transform: translateY(0);
  }

  30% {
    opacity: 1;
    transform: translateY(-2px);
  }
}


/* =========================================================
   COMPOSER
   ========================================================= */

.composer {
  flex-shrink: 0;

  padding: 10px 18px 13px;

  border-top: 1px solid #252e38;

  background: #0b0f13;
}

.cmp-box {
  width: 100%;
  max-width: 900px;

  margin: 0 auto;

  background: #11171e;

  border: 1px solid #28333e;
  border-radius: 11px;

  overflow: hidden;

  transition:
    border-color .15s,
    box-shadow .15s;
}

.cmp-box:focus-within {
  border-color: #3a4f68;

  box-shadow:
    0 0 0 2px rgba(58, 79, 104, .12);
}

.cmp-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 7px 10px 0;
}

.cmp-hint {
  color: #566474;

  font-size: 9px;
}

.cmp-tools {
  display: flex;
  align-items: center;
  gap: 2px;
}

.ttip {
  width: 27px;
  height: 27px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 6px;

  color: #697787;

  transition:
    background .15s,
    color .15s;
}

.ttip:hover {
  background: #1c2630;
  color: #d1dbe5;
}

.cmp-inp {
  display: block;

  width: 100%;

  min-height: 48px;
  max-height: 180px;

  padding: 8px 11px;

  background: transparent;

  border: 0;
  outline: none;

  resize: none;

  color: #dfe6ed;

  font-size: 12px;
  line-height: 1.55;

  overflow-y: auto;
}

.cmp-inp::placeholder {
  color: #566474;
}

.cmp-ftr {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 5px 9px 8px;
}

.cmp-short {
  color: #566474;

  font-size: 8px;
}

.cmp-short b {
  padding: 2px 4px;

  border: 1px solid #2a3540;
  border-radius: 4px;

  color: #788696;

  font-weight: 600;
}

.sbtn {
  min-width: 32px;
  height: 30px;

  padding: 0 10px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 7px;

  background: #4f7cff;

  color: white;

  transition:
    filter .15s,
    transform .15s,
    opacity .15s;
}

.sbtn:hover:not(.off) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.sbtn.off {
  opacity: .35;
  cursor: not-allowed;
}

.sbtn.off svg {
  opacity: .8;
}


/* =========================================================
   MODAL
   ========================================================= */

.modal-mask {
  position: fixed;

  inset: 0;

  z-index: 9999;

  display: flex;
  align-items: flex-start;
  justify-content: center;

  padding: 10vh 20px 30px;

  background: rgba(3, 6, 9, .72);

  backdrop-filter: blur(5px);

  overflow-y: auto;
}

.modal-card {
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  max-height: 80dvh;

  margin: auto;

  background: #121920;

  border: 1px solid #2a3540;
  border-radius: 15px;

  box-shadow:
    0 25px 80px rgba(0, 0, 0, .55);

  overflow-y: auto;

  animation: pop .18s ease-out;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 15px 17px;

  border-bottom: 1px solid #27313b;

  position: sticky;
  top: 0;

  background: #121920;

  z-index: 2;
}

.modal-title {
  color: #e4ebf2;

  font-size: 14px;
  font-weight: 700;
}

.modal-body {
  padding: 18px;
}

.modal-sub {
  margin-bottom: 15px;

  color: #6c7988;

  font-size: 10px;
  line-height: 1.5;
}


/* =========================================================
   SCROLLBARS
   ========================================================= */

::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

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

::-webkit-scrollbar-thumb {
  background: #293440;

  border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
  background: #384655;
}


/* =========================================================
   GROUP COMPATIBILITY
   ========================================================= */

.group-row {
  display: flex;
  align-items: center;
  gap: 9px;

  min-width: 0;

  padding: 8px 9px;

  border-radius: 8px;

  cursor: pointer;

  color: #8a96a4;

  transition:
    background .15s,
    color .15s;
}

.gpill {
  width: 27px;
  height: 27px;

  flex: 0 0 27px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 7px;

  background: #29394d;

  color: #a9bce0;

  font-size: 10px;
  font-weight: 700;
}

.group-av {
  width: 28px;
  height: 28px;

  flex: 0 0 28px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 8px;

  background: #263444;

  color: #a9bbd2;

  font-size: 9px;
  font-weight: 700;
}

.gcaption {
  flex: 1;

  min-width: 0;

  color: #7f8b99;

  font-size: 10px;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crow {
  display: flex;
  align-items: center;
  gap: 9px;

  min-width: 0;

  padding: 8px 9px;

  border-radius: 8px;

  cursor: pointer;

  color: #8a96a4;

  transition:
    background .15s,
    color .15s;
}

.crow:hover,
.crow.on {
  background: #171f28;
  color: #e0e7ee;
}

.ci {
  width: 27px;
  height: 27px;

  flex: 0 0 27px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 7px;

  background: #29394d;

  color: #a9bce0;

  font-size: 10px;
}

.ct {
  flex: 1;

  min-width: 0;

  font-size: 11px;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cn {
  color: #657383;

  font-size: 9px;
}

.cp {
  color: #4f7cff;

  font-size: 10px;
}


/* =========================================================
   FEED / COMPANY FEED
   ========================================================= */

.feed-area {
  flex: 1;

  min-width: 0;
  min-height: 0;

  display: flex;
  flex-direction: column;

  overflow: hidden;

  background: #0b0f13;
}

.feed-top {
  flex-shrink: 0;

  padding: 22px 24px 17px;

  border-bottom: 1px solid #252e38;
}

.feed-hero {
  width: 100%;
  max-width: 1000px;

  margin: 0 auto;
}

.feed-h1 {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.hero-emoji {
  width: 42px;
  height: 42px;

  flex: 0 0 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 11px;

  background: #192638;

  font-size: 18px;
}

.feed-h1 h1 {
  color: #e8eef4;

  font-size: 22px;
  line-height: 1.2;

  text-align: left;
}

.feed-sub {
  max-width: 650px;

  margin-top: 6px;

  color: #6c7988;

  font-size: 11px;
  line-height: 1.6;
}

.feed-scroll {
  flex: 1;

  min-height: 0;

  overflow-y: auto;
  overflow-x: hidden;
}

.feed-wrap {
  width: 100%;
  max-width: 1000px;

  margin: 0 auto;

  padding: 18px 24px 35px;
}


/* =========================================================
   FEED STATS
   ========================================================= */

.stat-card {
  padding: 13px;

  background: #11171e;

  border: 1px solid #252f39;
  border-radius: 10px;
}

.stat-num {
  color: #e2e9f0;

  font-size: 18px;
  font-weight: 700;
}

.stat-lbl {
  margin-top: 3px;

  color: #657281;

  font-size: 9px;
}

.danger-btn {
  padding: 8px 11px;

  border: 1px solid #5a3034;
  border-radius: 7px;

  background: #27181a;

  color: #df7d7d;

  font-size: 10px;
  font-weight: 600;

  transition:
    background .15s,
    border-color .15s;
}

.danger-btn:hover {
  background: #331c1f;
  border-color: #764047;
}


/* =========================================================
   POST COMPOSER
   ========================================================= */

.post-cmp {
  margin-bottom: 17px;

  padding: 14px;

  background: #11171e;

  border: 1px solid #27313c;
  border-radius: 12px;
}

.pch-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.pch-av {
  width: 34px;
  height: 34px;

  flex: 0 0 34px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: linear-gradient(
    135deg,
    #4f7cff,
    #6c63ff
  );

  color: white;

  font-size: 10px;
  font-weight: 700;
}

.pc-inp {
  flex: 1;

  min-width: 0;

  min-height: 42px;

  padding: 10px 11px;

  background: #0d1319;

  border: 1px solid #26313b;
  border-radius: 8px;

  outline: none;

  resize: vertical;

  color: #dce4eb;

  font-size: 11px;
}

.pc-inp::placeholder {
  color: #566473;
}

.pc-inp:focus {
  border-color: #3b5067;
}

.pc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  margin-top: 9px;
}

.pc-tools {
  display: flex;
  align-items: center;
  gap: 4px;

  min-width: 0;
}

.pc-tools .ttip {
  width: 28px;
  height: 28px;
}

.emoji-picker {
  position: absolute;

  z-index: 20;

  width: 270px;
  max-width: calc(100vw - 30px);

  padding: 10px;

  background: #151d25;

  border: 1px solid #2d3945;
  border-radius: 10px;

  box-shadow: 0 18px 45px rgba(0, 0, 0, .45);

  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
}

.emoji-picker .ebtn {
  width: 34px;
  height: 34px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 6px;

  font-size: 17px;

  transition: background .12s;
}

.emoji-picker .ebtn:hover {
  background: #202c37;
}

.ep-hint {
  grid-column: 1 / -1;

  padding-top: 5px;

  color: #5e6b79;

  font-size: 8px;

  text-align: center;
}

.tag-sel {
  max-width: 170px;

  padding: 7px 9px;

  background: #0d1319;

  border: 1px solid #29343f;
  border-radius: 7px;

  outline: none;

  color: #8492a1;

  font-size: 9px;
}

.tag-sel:hover {
  border-color: #3a4857;
}

.tag-sel option {
  background: #11171e;
  color: #dce4eb;
}

.pub-btn {
  padding: 8px 13px;

  border-radius: 7px;

  background: #4f7cff;

  color: white;

  font-size: 10px;
  font-weight: 700;

  transition:
    filter .15s,
    transform .15s,
    opacity .15s;
}

.pub-btn:hover {
  filter: brightness(1.08);
}

.pub-btn:active {
  transform: translateY(1px);
}

.pub-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}


/* =========================================================
   FEED LIST
   ========================================================= */

.feed-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.empty-posts {
  padding: 40px 20px;

  border: 1px dashed #2a3540;
  border-radius: 11px;

  color: #667483;

  font-size: 11px;

  text-align: center;
}


/* =========================================================
   POST CARDS
   ========================================================= */

.post-card {
  padding: 15px;

  background: #11171e;

  border: 1px solid #27313c;
  border-radius: 12px;

  transition:
    background .15s,
    border-color .15s;
}

.post-card:hover {
  background: #131a22;
  border-color: #303c48;
}

.pc-head {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.pc-av {
  width: 34px;
  height: 34px;

  flex: 0 0 34px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: #29394d;

  color: #a8bbd7;

  font-size: 10px;
  font-weight: 700;
}

.pc-name-row {
  display: flex;
  align-items: center;
  gap: 6px;

  min-width: 0;
}

.pc-name {
  color: #dce4eb;

  font-size: 11px;
  font-weight: 700;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tbadge {
  display: inline-flex;
  align-items: center;
  gap: 3px;

  padding: 2px 5px;

  border-radius: 4px;

  background: #19283a;

  color: #7f9bc4;

  font-size: 7px;
  font-weight: 700;

  white-space: nowrap;
}

.tbadge > span:first-child {
  font-size: 8px;
}

.pc-meta {
  margin-top: 2px;

  color: #5d6a78;

  font-size: 8px;
}

.pc-text {
  margin: 12px 0 10px;

  color: #cbd4dd;

  font-size: 11px;
  line-height: 1.65;

  overflow-wrap: anywhere;
}

.pc-text b {
  color: #e6edf3;
}

.pc-text i {
  color: #b8c4d0;
}

.pc-text code {
  padding: 1px 4px;

  border-radius: 4px;

  background: #0c1218;

  color: #9db8dd;

  font-family: Consolas, Monaco, monospace;

  font-size: .9em;
}

.pc-stats {
  display: flex;
  align-items: center;
  gap: 12px;

  padding-bottom: 8px;

  border-bottom: 1px solid #222c35;
}

.pstat {
  color: #667483;

  font-size: 8px;
}

.pemoji {
  margin-right: 2px;

  font-size: 9px;
}

.pc-actions {
  display: flex;
  align-items: center;
  gap: 4px;

  padding-top: 7px;
}

.pa-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;

  padding: 5px 7px;

  border-radius: 6px;

  color: #6c7987;

  font-size: 8px;

  transition:
    background .15s,
    color .15s;
}

.pa-btn:hover {
  background: #1a232d;
  color: #cbd5df;
}

.pa-btn.on {
  background: #19283a;
  color: #7fa0d1;
}

.pa-btn.on:hover {
  background: #203249;
  color: #a0b9de;
}


/* =========================================================
   COMMENTS
   ========================================================= */

.cmt-box {
  margin-top: 11px;

  padding-top: 10px;

  border-top: 1px solid #222c35;
}

.cmt-list {
  display: flex;
  flex-direction: column;
  gap: 9px;

  margin-bottom: 9px;
}

.cmt-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;

  min-width: 0;
}

.cmt-av {
  width: 24px;
  height: 24px;

  flex: 0 0 24px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 7px;

  background: #263444;

  color: #9eb3cf;

  font-size: 7px;
  font-weight: 700;
}

.cmt-body {
  min-width: 0;
  flex: 1;
}

.cmt-head {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cmt-name {
  color: #cbd5df;

  font-size: 9px;
  font-weight: 700;
}

.cmt-time {
  color: #586674;

  font-size: 7px;
}

.cmt-text {
  margin-top: 2px;

  color: #9da9b5;

  font-size: 9px;
  line-height: 1.5;

  overflow-wrap: anywhere;
}

.cmt-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cmt-inp {
  flex: 1;

  min-width: 0;

  padding: 8px 9px;

  background: #0d1319;

  border: 1px solid #28333e;
  border-radius: 7px;

  outline: none;

  color: #d8e0e8;

  font-size: 9px;
}

.cmt-inp::placeholder {
  color: #566473;
}

.cmt-inp:focus {
  border-color: #3a4e65;
}


/* =========================================================
   PROFILE MODAL
   ========================================================= */

.profile-card {
  width: 100%;
  max-width: 480px;

  padding: 20px;
}

.pav-wrap {
  position: relative;

  width: 74px;
  height: 74px;

  margin: 0 auto 15px;

  cursor: pointer;
}

.pav-wrap:hover .pav-preview {
  opacity: 1;
}

.pav-preview {
  position: absolute;

  inset: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: rgba(0, 0, 0, .48);

  color: white;

  font-size: 9px;

  opacity: 0;

  transition: opacity .15s;
}

.pf-row {
  margin-bottom: 13px;
}

.pf-row .lbl {
  margin-bottom: 6px;
}

.pf-row:last-of-type {
  margin-bottom: 0;
}


/* =========================================================
   GENERAL RESPONSIVE FLEX SAFETY
   ========================================================= */

.sidebar,
.chat-area,
.feed-area,
.msgs-wrap,
.feed-scroll,
.scroller,
.composer,
.feed-wrap,
.feed-hero {
  min-width: 0;
}

.row,
.group-row,
.crow,
.mrow,
.pc-head,
.pch-row,
.cmt-item {
  min-width: 0;
}


/* =========================================================
   TABLET / SMALL LAPTOP
   1024px AND BELOW
   ========================================================= */

@media (max-width: 1024px) {

  .sidebar {
    width: 245px;
    min-width: 245px;
  }

  .msgs {
    max-width: 100%;
    padding-left: 17px;
    padding-right: 17px;
  }

  .composer {
    padding-left: 14px;
    padding-right: 14px;
  }

  .feed-top {
    padding-left: 18px;
    padding-right: 18px;
  }

  .feed-wrap {
    padding-left: 18px;
    padding-right: 18px;
  }

  .bbl {
    max-width: 72%;
  }

  .empty-tips {
    gap: 7px;
  }
}


/* =========================================================
   TABLET / LARGE PHONE
   768px AND BELOW
   ========================================================= */

@media (max-width: 768px) {

  /* -------------------------
     Dashboard
     ------------------------- */

  #dash {
    position: relative;

    display: flex;

    height: 100vh;
    height: 100dvh;

    overflow: hidden;
  }

  /*
    Keep the sidebar usable on smaller screens.
    It becomes a narrower fixed panel instead of
    taking the entire screen beside the chat.
  */

  .sidebar {
    width: 220px;
    min-width: 220px;
  }

  .wk-hdr {
    padding: 13px 11px 10px;
  }

  .s-search {
    margin: 9px 9px;
  }

  .sect {
    padding-left: 5px;
    padding-right: 5px;
  }

  .row,
  .group-row,
  .crow {
    padding-left: 7px;
    padding-right: 7px;
  }

  .me-footer {
    padding: 7px;
  }


  /* -------------------------
     Chat header
     ------------------------- */

  .c-hdr {
    min-height: 58px;

    padding: 8px 12px;

    gap: 8px;
  }

  .ch-icon {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .c-hname {
    font-size: 12px;
  }

  .ch-topic {
    display: none;
  }

  .aipill {
    padding: 4px 6px;

    font-size: 8px;
  }


  /* -------------------------
     Messages
     ------------------------- */

  .msgs {
    padding: 14px 13px 20px;
  }

  .bbl {
    max-width: 78%;
  }

  .ch-intro {
    padding-top: 15px;
  }


  /* -------------------------
     Composer
     ------------------------- */

  .composer {
    padding: 8px 10px 10px;
  }

  .cmp-inp {
    min-height: 43px;
    max-height: 140px;
  }

  .cmp-short {
    display: none;
  }


  /* -------------------------
     Empty chat
     ------------------------- */

  .no-chat {
    padding: 20px 12px;
  }

  .empty-card {
    padding: 15px;
  }

  .empty-card h2 {
    font-size: 18px;
  }

  .empty-tips {
    grid-template-columns: repeat(2, 1fr);
  }


  /* -------------------------
     Feed
     ------------------------- */

  .feed-top {
    padding: 15px 13px 13px;
  }

  .feed-wrap {
    padding: 13px 13px 25px;
  }

  .feed-h1 h1 {
    font-size: 19px;
  }

  .feed-sub {
    font-size: 10px;
  }

  .post-cmp,
  .post-card {
    padding: 12px;
  }

  .pc-text {
    font-size: 11px;
  }

  .emoji-picker {
    max-width: calc(100vw - 25px);
  }
}


/* =========================================================
   PHONE
   600px AND BELOW
   ========================================================= */

@media (max-width: 600px) {

  /* -------------------------
     Global
     ------------------------- */

  body {
    font-size: 14px;
  }


  /* -------------------------
     Auth
     ------------------------- */

  #auth-screen {
    align-items: flex-start;

    min-height: 100vh;
    min-height: 100dvh;

    padding: 18px 12px 25px;

    overflow-y: auto;
  }

  .card {
    width: 100%;

    margin: auto 0;

    padding: 28px 20px;

    border-radius: 15px;
  }

  .logo {
    width: 52px;
    height: 52px;

    margin-bottom: 15px;

    border-radius: 14px;

    font-size: 22px;
  }

  h1 {
    font-size: 22px;
  }

  .sub {
    font-size: 12px;
  }

  .tabs {
    margin-top: 21px;
    margin-bottom: 18px;
  }

  .tab {
    padding: 8px 6px;

    font-size: 12px;
  }

  .inp {
    min-height: 44px;

    font-size: 16px;
  }

  .btn,
  .gbtn {
    min-height: 44px;
  }


  /* -------------------------
     Dashboard
     ------------------------- */

  #dash {
    height: 100vh;
    height: 100dvh;
  }

  /*
    On phones the sidebar becomes a top-level panel.
    This keeps the chat from becoming unusably narrow.
  */

  .sidebar {
    position: absolute;

    left: 0;
    top: 0;
    bottom: 0;

    z-index: 100;

    width: min(82vw, 300px);
    min-width: 0;

    box-shadow: 15px 0 35px rgba(0, 0, 0, .35);

    transform: translateX(0);

    transition: transform .2s ease;
  }

  /*
    If your JavaScript adds .mobile-hidden,
    the sidebar slides completely away.
  */

  .sidebar.mobile-hidden {
    transform: translateX(-105%);
  }

  .chat-area,
  .feed-area {
    width: 100%;
    min-width: 100%;
  }


  /* -------------------------
     Sidebar
     ------------------------- */

  .wk-hdr {
    padding: 12px 11px 10px;
  }

  .s-search {
    margin: 9px 9px;
  }

  .scroller {
    padding-bottom: 4px;
  }


  /* -------------------------
     Chat header
     ------------------------- */

  .c-hdr {
    min-height: 55px;

    padding: 7px 10px;
  }

  .ch-icon {
    width: 31px;
    height: 31px;
    flex-basis: 31px;
  }

  .c-hstat {
    display: none;
  }

  .aipill {
    display: none;
  }


  /* -------------------------
     Messages
     ------------------------- */

  .msgs {
    padding: 11px 9px 17px;
  }

  .dpill {
    margin-bottom: 13px;

    padding: 4px 8px;

    font-size: 8px;
  }

  .ch-intro {
    padding: 12px 5px 18px;
  }

  .ch-intro-icon {
    width: 40px;
    height: 40px;

    margin-bottom: 8px;
  }

  .ch-intro h2 {
    font-size: 15px;
  }

  .ch-intro-desc {
    font-size: 10px;
  }

  .mrow {
    gap: 6px;

    margin-bottom: 10px;
  }

  .lav {
    width: 26px;
    height: 26px;

    flex-basis: 26px;
  }

  .bbl {
    max-width: 87%;

    padding: 8px 10px;

    font-size: 11px;

    border-radius: 10px;
  }

  .btime {
    font-size: 7px;
  }


  /* -------------------------
     Composer
     ------------------------- */

  .composer {
    padding: 6px 7px 8px;
  }

  .cmp-box {
    border-radius: 9px;
  }

  .cmp-bar {
    padding: 5px 7px 0;
  }

  .cmp-hint {
    font-size: 8px;
  }

  .cmp-inp {
    min-height: 42px;
    max-height: 125px;

    padding: 7px 9px;

    font-size: 16px;
  }

  .cmp-ftr {
    padding: 4px 6px 6px;
  }

  .ttip {
    width: 26px;
    height: 26px;
  }

  .sbtn {
    min-width: 31px;
    height: 29px;
  }


  /* -------------------------
     Empty chat
     ------------------------- */

  .no-chat {
    padding: 15px 9px;
  }

  .empty-card {
    padding: 10px 4px;
  }

  .empty-emoji {
    width: 48px;
    height: 48px;

    margin-bottom: 12px;
  }

  .empty-card h2 {
    font-size: 17px;
  }

  .empty-card p {
    font-size: 10px;
  }

  .empty-tips {
    grid-template-columns: 1fr;

    margin-top: 16px;
  }

  .tip {
    padding: 10px;
  }


  /* -------------------------
     Feed
     ------------------------- */

  .feed-top {
    padding: 12px 10px;
  }

  .feed-wrap {
    padding: 11px 9px 22px;
  }

  .feed-h1 {
    gap: 9px;
  }

  .hero-emoji {
    width: 36px;
    height: 36px;

    flex-basis: 36px;

    border-radius: 9px;
  }

  .feed-h1 h1 {
    font-size: 17px;
  }

  .feed-sub {
    margin-top: 4px;

    font-size: 9px;
  }

  .post-cmp {
    padding: 10px;

    margin-bottom: 11px;
  }

  .pch-row {
    gap: 7px;
  }

  .pch-av {
    width: 30px;
    height: 30px;

    flex-basis: 30px;
  }

  .pc-inp {
    min-height: 40px;

    font-size: 16px;
  }

  .pc-row {
    align-items: flex-end;
  }

  .pc-tools {
    flex-wrap: wrap;
  }

  .tag-sel {
    max-width: 125px;
  }

  .pub-btn {
    padding: 8px 10px;
  }

  .feed-list {
    gap: 9px;
  }

  .post-card {
    padding: 10px;
  }

  .pc-av {
    width: 30px;
    height: 30px;

    flex-basis: 30px;
  }

  .pc-name {
    font-size: 10px;
  }

  .pc-text {
    margin-top: 9px;

    font-size: 10px;
    line-height: 1.6;
  }

  .pc-stats {
    gap: 9px;
  }

  .pc-actions {
    flex-wrap: wrap;
  }

  .pa-btn {
    padding: 5px 6px;
  }


  /* -------------------------
     Comments
     ------------------------- */

  .cmt-inp {
    min-height: 35px;

    font-size: 16px;
  }


  /* -------------------------
     Modal
     ------------------------- */

  .modal-mask {
    align-items: flex-start;

    padding: 5vh 9px 15px;
  }

  .modal-card {
    width: 100%;
    max-width: 100%;

    max-height: 90vh;
    max-height: 90dvh;

    border-radius: 12px;
  }

  .modal-hdr {
    padding: 13px 14px;
  }

  .modal-body {
    padding: 14px;
  }

  .profile-card {
    padding: 15px;
  }
}


/* =========================================================
   VERY NARROW PHONES
   380px AND BELOW
   ========================================================= */

@media (max-width: 380px) {

  #auth-screen {
    padding: 10px 8px 18px;
  }

  .card {
    padding: 23px 15px;
  }

  .logo {
    width: 47px;
    height: 47px;

    margin-bottom: 12px;
  }

  h1 {
    font-size: 20px;
  }

  .sub {
    font-size: 11px;
  }

  .tabs {
    margin-top: 18px;
    margin-bottom: 15px;
  }

  .tab {
    font-size: 11px;
  }


  /* Dashboard */

  .sidebar {
    width: min(88vw, 285px);
  }

  .c-hdr {
    padding-left: 8px;
    padding-right: 8px;
  }

  .c-hname {
    font-size: 11px;
  }

  .msgs {
    padding-left: 7px;
    padding-right: 7px;
  }

  .bbl {
    max-width: 91%;

    font-size: 10px;
  }

  .cmp-tools {
    gap: 0;
  }

  .ttip {
    width: 24px;
    height: 24px;
  }

  .cmp-inp {
    font-size: 16px;
  }


  /* Feed */

  .feed-wrap {
    padding-left: 7px;
    padding-right: 7px;
  }

  .feed-h1 h1 {
    font-size: 16px;
  }

  .hero-emoji {
    width: 32px;
    height: 32px;

    flex-basis: 32px;
  }

  .post-cmp,
  .post-card {
    padding: 9px;
  }

  .pc-tools .ttip {
    width: 25px;
    height: 25px;
  }

  .tag-sel {
    max-width: 105px;
  }

  .pub-btn {
    padding-left: 8px;
    padding-right: 8px;
  }
}


/* =========================================================
   SHORT SCREENS
   IMPORTANT FOR LAPTOPS WITH LOW HEIGHT
   ========================================================= */

@media (max-height: 700px) {

  /* -------------------------
     Auth
     ------------------------- */

  #auth-screen {
    align-items: flex-start;

    padding-top: 15px;
    padding-bottom: 15px;
  }

  .card {
    padding-top: 25px;
    padding-bottom: 25px;
  }

  .logo {
    width: 48px;
    height: 48px;

    margin-bottom: 12px;
  }

  .tabs {
    margin-top: 17px;
    margin-bottom: 15px;
  }

  .sub {
    margin-top: 5px;
  }

  .footer {
    margin-top: 14px;
  }


  /* -------------------------
     Dashboard
     ------------------------- */

  .wk-hdr {
    padding-top: 9px;
    padding-bottom: 8px;
  }

  .s-search {
    margin-top: 7px;
    margin-bottom: 7px;
  }

  .sect-hdr {
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .row,
  .group-row,
  .crow {
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .me-footer {
    padding-top: 5px;
    padding-bottom: 5px;
  }


  /* -------------------------
     Chat
     ------------------------- */

  .c-hdr {
    min-height: 50px;

    padding-top: 6px;
    padding-bottom: 6px;
  }

  .msgs {
    padding-top: 9px;
    padding-bottom: 13px;
  }

  .dpill {
    margin-bottom: 10px;
  }

  .ch-intro {
    padding-top: 7px;
    padding-bottom: 13px;
  }

  .ch-intro-icon {
    width: 36px;
    height: 36px;
  }

  .ch-intro-desc {
    margin-top: 4px;
  }

  .mrow {
    margin-bottom: 8px;
  }

  .composer {
    padding-top: 5px;
    padding-bottom: 6px;
  }

  .cmp-inp {
    min-height: 36px;
    max-height: 105px;
  }

  .cmp-ftr {
    padding-top: 3px;
    padding-bottom: 4px;
  }


  /* -------------------------
     Feed
     ------------------------- */

  .feed-top {
    padding-top: 10px;
    padding-bottom: 9px;
  }

  .feed-wrap {
    padding-top: 10px;
    padding-bottom: 18px;
  }

  .post-cmp {
    margin-bottom: 9px;
  }

  .pc-text {
    margin-top: 8px;
    margin-bottom: 7px;
  }
}


/* =========================================================
   EXTRA-SHORT SCREENS
   550px HEIGHT AND BELOW
   ========================================================= */

@media (max-height: 550px) {

  #auth-screen {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .card {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .logo {
    width: 40px;
    height: 40px;

    margin-bottom: 8px;

    border-radius: 10px;

    font-size: 18px;
  }

  h1 {
    font-size: 19px;
  }

  .sub {
    font-size: 10px;
  }

  .tabs {
    margin-top: 12px;
    margin-bottom: 11px;
  }

  .lbl {
    margin-bottom: 4px;
  }

  .inp {
    padding-top: 9px;
    padding-bottom: 9px;

    min-height: 38px;
  }

  .btn,
  .gbtn {
    min-height: 38px;

    padding-top: 8px;
    padding-bottom: 8px;
  }

  .or {
    margin: 12px 0;
  }

  .footer {
    margin-top: 9px;
  }


  /* Dashboard */

  .sidebar {
    overflow-y: auto;
  }

  .c-hdr {
    min-height: 45px;
  }

  .ch-icon {
    width: 27px;
    height: 27px;

    flex-basis: 27px;
  }

  .msgs {
    padding-top: 6px;
    padding-bottom: 8px;
  }

  .ch-intro {
    padding-top: 4px;
    padding-bottom: 8px;
  }

  .ch-intro-icon {
    display: none;
  }

  .ch-intro-desc {
    display: none;
  }

  .mrow {
    margin-bottom: 6px;
  }

  .bbl {
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .composer {
    padding-top: 4px;
    padding-bottom: 4px;
  }

  .cmp-inp {
    min-height: 32px;
    max-height: 80px;
  }

  .cmp-hint {
    display: none;
  }

  .cmp-ftr {
    padding-top: 2px;
    padding-bottom: 3px;
  }
}


/* =========================================================
   LANDSCAPE PHONES
   ========================================================= */

@media (max-width: 768px) and (orientation: landscape) {

  #auth-screen {
    align-items: flex-start;

    padding-top: 10px;
    padding-bottom: 10px;
  }

  .card {
    max-width: 430px;

    padding-top: 18px;
    padding-bottom: 18px;
  }

  .logo {
    width: 42px;
    height: 42px;

    margin-bottom: 8px;
  }

  h1 {
    font-size: 19px;
  }

  .tabs {
    margin-top: 12px;
    margin-bottom: 11px;
  }

  .inp {
    min-height: 38px;
  }

  .btn,
  .gbtn {
    min-height: 38px;
  }

  .footer {
    margin-top: 10px;
  }

  .empty-tips {
    grid-template-columns: repeat(3, 1fr);
  }

  .empty-card {
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .empty-emoji {
    width: 40px;
    height: 40px;

    margin-bottom: 8px;
  }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;

    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;

    transition-duration: .01ms !important;
  }
}


/* =========================================================
   TOUCH DEVICES
   ========================================================= */

@media (hover: none) and (pointer: coarse) {

  .ibtn,
  .add-btn,
  .ttip,
  .sbtn,
  .pub-btn,
  .pa-btn,
  .tab,
  .gbtn,
  .btn {
    min-height: 38px;
  }

  .row,
  .group-row,
  .crow {
    min-height: 40px;
  }
}


/* =========================================================
   FINAL OVERFLOW PROTECTION
   ========================================================= */

#auth-screen,
#dash,
.sidebar,
.chat-area,
.feed-area,
.modal-mask {
  max-width: 100vw;
}

.c-hname,
.c-hstat,
.ch-topic,
.wk-name,
.wk-plan,
.rname,
.s-name,
.gcaption,
.ct,
.cn,
.pc-name,
.pc-meta,
.cmt-text,
.feed-sub {
  overflow-wrap: anywhere;
}

pre {
  max-width: 100%;
  overflow-x: auto;
}

table {
  max-width: 100%;
  display: block;
  overflow-x: auto;
}

iframe,
video,
canvas {
  max-width: 100%;
}