/* clean.css — Linkup's final design layer (loaded last).
   One calm palette, flat surfaces, one radius scale, thin scrollbars, no glows or gradients.
   Applies to the default dark theme; the light and midnight themes keep their own colours. */

/* ---------- tokens ---------- */
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) {
  --bg-0: #1c1d21 !important;      /* server rail */
  --bg-1: #26272c !important;      /* sidebars */
  --bg-2: #2e3036 !important;      /* chat */
  --bg-3: #1f2024 !important;      /* inputs, wells */
  --bg-4: #393b42 !important;      /* selected / hover strong */
  --bg-float: #17181b !important;  /* menus, popovers */
  --chat: #2e3036 !important;
  --rail: #1c1d21 !important;
  --side: #26272c !important;
  --mem: #26272c !important;
  --userbar: #212226 !important;
  --inp: #383a41 !important;
  --ring-c: #26272c !important;
  --code: #1f2024 !important;
  --line: rgba(255,255,255,.06) !important;
  --line-2: rgba(255,255,255,.1) !important;
  --hover: rgba(255,255,255,.04) !important;
  --active: rgba(255,255,255,.07) !important;
  --text: #f0f1f3 !important;
  --text-2: #c9ccd1 !important;
  --muted: #959aa3 !important;
  --faint: #6f747c !important;
  --accent: #5b6cf0 !important;
  --accent-hover: #4b5bd8 !important;
  --accent-ink: #fff !important;
  --green: #2fa866 !important;
  --red: #e5484d !important;
  --yellow: #e5a93a !important;
  --shadow: 0 6px 18px rgba(0,0,0,.28) !important;
  --sh1: none !important;
  --sh2: 0 6px 18px rgba(0,0,0,.28) !important;
  --sh3: 0 10px 28px rgba(0,0,0,.36) !important;
  --r1: 4px !important; --r2: 8px !important; --r3: 10px !important; --r4: 12px !important;
  color-scheme: dark;
}

/* ---------- base ---------- */
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) body { background: var(--bg-0) !important; }
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .app { background: var(--bg-0) !important; }
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .app,
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .modal,
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .settings {
  font-family: "Noto Sans", Inter, system-ui, -apple-system, "Segoe UI", sans-serif !important;
  -webkit-font-smoothing: antialiased;
}
/* calm: no text glows, no decorative gradients on surfaces */
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .app :is(.side, .main, .right, .rail, .top, .side-head, .me-card, .me-bar, .composer, .msgs) { text-shadow: none !important; }

/* ---------- layout surfaces ---------- */
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .rail { background: var(--bg-0) !important; border: 0 !important; box-shadow: none !important; }
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .side { background: var(--bg-1) !important; border: 0 !important; box-shadow: none !important; }
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .app > .main,
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .main { background: var(--bg-2) !important; }
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .right { background: var(--bg-1) !important; border: 0 !important; }
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .top,
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .side-head {
  background: transparent !important; box-shadow: 0 1px 0 rgba(0,0,0,.22) !important; border-bottom: 0 !important;
}
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .me-card, :root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .me-bar { background: #232428 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }

/* ---------- channel list ---------- */
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .side .ch {
  border-radius: 6px !important; color: var(--muted) !important; background: transparent !important; box-shadow: none !important;
}
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .side .ch:hover { background: rgba(255,255,255,.045) !important; color: var(--text-2) !important; }
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .side .ch.on { background: rgba(255,255,255,.08) !important; color: var(--text) !important; }
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .side .ch.unread { color: var(--text) !important; }
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .side .cat { color: var(--faint) !important; letter-spacing: .02em !important; }

/* ---------- server rail ---------- */
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .rail .ri .icon,
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .rail :is(.si, .srv, .server-icon) {
  box-shadow: none !important; transition: border-radius .15s ease, background-color .15s ease !important;
}

/* ---------- messages ---------- */
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .msg:hover { background: rgba(0,0,0,.08) !important; }
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .msg .acts { background: var(--bg-1) !important; border: 1px solid var(--line) !important; box-shadow: none !important; border-radius: 6px !important; }
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .msg code,
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .msg pre { background: var(--bg-3) !important; border: 0 !important; }

/* ---------- composer ---------- */
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .composer .box,
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .composer form,
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .composer > div:first-child {
  background: #383a41 !important; border: 0 !important; box-shadow: none !important; border-radius: 8px !important;
}

/* ---------- buttons ---------- */
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .btn {
  border-radius: 6px !important; box-shadow: none !important; background-image: none !important; font-weight: 600 !important; text-shadow: none !important;
  transition: background-color .12s ease, color .12s ease !important;
}
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .btn:not(.ghost):not(.soft):not(.danger):not(.green):not(.wide):not(.google-btn) { background-color: var(--accent) !important; color: #fff !important; }
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .btn:not(.ghost):not(.soft):not(.danger):not(.green):not(.wide):not(.google-btn):hover { background-color: var(--accent-hover) !important; }
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .btn.soft { background: #43454c !important; color: var(--text) !important; }
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .btn.soft:hover { background: #4e5058 !important; }
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .btn.ghost { background: transparent !important; color: var(--text) !important; }
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .btn.ghost:hover { text-decoration: underline; }
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .btn.danger { background: var(--red) !important; color: #fff !important; }
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .btn.green { background: var(--green) !important; color: #fff !important; }

/* ---------- inputs ---------- */
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .input,
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) input.input,
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) textarea.input,
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) select.input {
  background: var(--bg-3) !important; border: 1px solid transparent !important; border-radius: 6px !important; box-shadow: none !important; color: var(--text) !important;
}
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .input:focus { border-color: var(--accent) !important; outline: none !important; }
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .field > span:first-child { color: var(--text-2) !important; }

/* ---------- modals, menus, popovers ---------- */
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .modal {
  background: var(--bg-2) !important; border: 0 !important; border-radius: 10px !important; box-shadow: var(--sh3) !important; background-image: none !important;
}
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .modal .mf,
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .modal footer { background: var(--bg-1) !important; border-top: 0 !important; }
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) :is(.menu-pop, .popover, .pop, .ctx-menu) {
  background: var(--bg-float) !important; border: 1px solid rgba(255,255,255,.05) !important; border-radius: 8px !important; box-shadow: var(--sh2) !important; background-image: none !important;
}
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .menu-pop .it { border-radius: 4px !important; }
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .menu-pop .it:hover { background: var(--accent) !important; color: #fff !important; }
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .layer, :root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .overlay { backdrop-filter: none !important; }

/* ---------- inbox, cards, lobby ---------- */
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .inbox { background: var(--bg-float) !important; border-radius: 8px !important; }
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) :is(.card-box, .lb-card, .lb-sec, .dcard, .f7-embed) { box-shadow: none !important; background-image: none !important; }
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) :is(.card-box, .lb-card, .lb-sec, .dcard) { background: var(--bg-1) !important; border: 0 !important; border-radius: 8px !important; }
/* lobby banner: a calmer, shorter colour band */
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .lb-banner, :root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .lobby-banner { filter: saturate(.7) brightness(.85); }

/* ---------- scrollbars: thin everywhere ---------- */
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) * { scrollbar-width: thin; scrollbar-color: #1a1b1e transparent; }
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) ::-webkit-scrollbar { width: 8px; height: 8px; }
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) ::-webkit-scrollbar-track { background: transparent; }
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) ::-webkit-scrollbar-thumb { background: #1a1b1e; border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
/* channel list: scrollbar only while hovering */
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .side .scroll { scrollbar-color: transparent transparent; }
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .side .scroll:hover { scrollbar-color: #1a1b1e transparent; }

/* ---------- bot dropdowns: slim visible scrollbar ---------- */
.f7-ddlist { scrollbar-width: thin; scrollbar-color: #4e5058 transparent; overscroll-behavior: contain; }
.f7-ddlist::-webkit-scrollbar { width: 6px; }
.f7-ddlist::-webkit-scrollbar-track { background: transparent; margin: 4px 0; }
.f7-ddlist::-webkit-scrollbar-thumb { background: #4e5058; border-radius: 6px; border: 0; }
.f7-ddlist::-webkit-scrollbar-thumb:hover { background: #5c5f68; }

/* ---------- motion: quick and subtle ---------- */
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- settings ---------- */
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .settings,
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .settings > :not(nav) { background: var(--bg-2) !important; background-image: none !important; }
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .settings nav,
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .settings > nav { background: var(--bg-1) !important; border: 0 !important; box-shadow: none !important; }
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .settings .card-box { background: var(--bg-1) !important; }
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .settings :is(.sx-row.on, .sx-row.active, [aria-current="page"]) { background: rgba(255,255,255,.08) !important; color: var(--text) !important; }
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .settings .sx-title { background: var(--bg-2) !important; }
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .settings nav input,
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .top input,
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .find,
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .hs-find { background: var(--bg-3) !important; border: 0 !important; border-radius: 6px !important; color: var(--text-2) !important; }
:root:not(.cl-a):not(.cl-b):not(.cl-c):not(.cl-d) .f7-ddlist { scrollbar-width: thin !important; scrollbar-color: #5c5f68 transparent !important; }

/* ---------- profile cards ---------- */
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .pcard {
  background: #232428 !important; border: 0 !important; border-radius: 12px !important; box-shadow: 0 12px 32px rgba(0,0,0,.45) !important; overflow: hidden;
}
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .pcard .pb { background: transparent !important; }
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .pcard .chip { background: #2e3036 !important; border: 0 !important; border-radius: 6px !important; }
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .pcard .btn { border-radius: 8px !important; }
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .pcard .btn.soft { background: #383a41 !important; }
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .pcard .btn.soft:hover { background: #43454c !important; }
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .pcard .av { box-shadow: 0 0 0 6px #232428 !important; }
:root:not([data-theme="light"]):not([data-theme="midnight"]):not(.cl-a):not(.cl-b):not(.cl-c) .pcard::before { background: #232428 !important; }
