/* Syntechii theme. Change these few values to restyle the whole app. Loaded LAST so it wins. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/inter-Regular.woff") format("woff"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/inter-Medium.woff") format("woff"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/inter-SemiBold.woff") format("woff"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/inter-Bold.woff") format("woff"); }

:root {
  --c-darkest: #1e1f22;   /* server rail, top bar, inputs */
  --c-side: #2b2d31;      /* channel list, member list, settings nav */
  --c-chat: #313338;      /* chat area, settings content */
  --c-accent: #5865f2;    /* buttons, selected server */
  --c-accent-hi: #4752c4; /* button hover */
  --c-green: #23a559;
  --c-red: #da373c;
  --font: "Inter", "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
html:root { --d-font: var(--font); }
body, button, input, textarea, select, #pane-messaging, .fs, .cmodal, .sf-box { font-family: var(--font); }

/* ---------- Create / Join server flow + invite modal ---------- */
.sf-bg { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .7); animation: fade-in .14s ease; }
.sf-box { width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow-y: auto; border-radius: 8px; background: var(--c-chat); color: #dbdee1; box-shadow: 0 8px 32px rgba(0, 0, 0, .5); position: relative; }
.sf-box.wide { max-width: 520px; }
.sf-x { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%; color: #b5bac1; display: grid; place-items: center; font-size: 18px; }
.sf-x:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.sf-head { padding: 24px 24px 0; text-align: center; }
.sf-head h2 { margin: 0 0 8px; font-size: 24px; font-weight: 700; color: #f2f3f5; }
.sf-head p { margin: 0 0 16px; color: #b5bac1; font-size: 15px; line-height: 1.4; }
.sf-body { padding: 0 16px 16px; display: grid; gap: 8px; }
.sf-body.pad { padding: 8px 24px 24px; }
.sf-opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1px solid #3f4147; border-radius: 8px; background: transparent; color: #f2f3f5; font-size: 16px; font-weight: 600; text-align: left; }
.sf-opt:hover { background: #35373c; }
.sf-opt .ic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--c-accent); font-size: 20px; }
.sf-opt .chev { margin-left: auto; color: #b5bac1; }
.sf-label { margin: 8px 0 0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: #b5bac1; }
.sf-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 24px; background: var(--c-side); border-radius: 0 0 8px 8px; }
.sf-foot.col { flex-direction: column; text-align: center; }
.sf-foot h3 { margin: 0; font-size: 18px; color: #f2f3f5; }
.sf-link { color: #00a8fc; font-size: 14px; }
.sf-link:hover { text-decoration: underline; }
.sf-btn { padding: 9px 18px; min-height: 38px; border-radius: 3px; background: var(--c-accent); color: #fff; font-size: 14px; font-weight: 500; }
.sf-btn:hover { background: var(--c-accent-hi); }
.sf-btn.grey { background: #4e5058; }
.sf-btn.grey:hover { background: #6d6f78; }
.sf-btn.block { width: 100%; }
.sf-btn:disabled { opacity: .5; cursor: not-allowed; }
.sf-back { color: #f2f3f5; font-size: 14px; font-weight: 500; padding: 8px 4px; }
.sf-back:hover { text-decoration: underline; }
.sf-field { display: grid; gap: 8px; text-align: left; }
.sf-field span { font-size: 12px; font-weight: 700; text-transform: uppercase; color: #b5bac1; }
.sf-field input { padding: 10px; border: 0; border-radius: 3px; background: var(--c-darkest); color: #dbdee1; font-size: 16px; outline: 2px solid transparent; }
.sf-field input:focus { outline-color: var(--c-accent); }
.sf-err { margin: 0; min-height: 18px; color: #fa777c; font-size: 14px; }
.sf-upload { justify-self: center; position: relative; width: 80px; height: 80px; border-radius: 50%; border: 2px dashed #b5bac1; color: #b5bac1; display: grid; place-items: center; font-size: 12px; font-weight: 700; text-transform: uppercase; overflow: hidden; }
.sf-upload img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sf-upload .plus { position: absolute; top: -2px; right: -2px; width: 24px; height: 24px; border-radius: 50%; background: var(--c-accent); color: #fff; font-size: 16px; line-height: 24px; text-align: center; }
.sf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sf-chip { padding: 6px 10px; border-radius: 4px; background: var(--c-side); color: #dbdee1; font-size: 13px; }
.sf-preview { display: grid; justify-items: center; gap: 6px; padding: 8px 0 8px; }
.sf-icon { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; background: var(--c-accent); color: #fff; font-size: 26px; font-weight: 700; }
.sf-preview h3 { margin: 4px 0 0; font-size: 22px; color: #f2f3f5; }
.sf-preview small { color: #b5bac1; }
.sf-search { margin: 0 16px 8px; padding: 10px 12px; border: 0; border-radius: 4px; background: var(--c-darkest); color: #dbdee1; font-size: 15px; width: calc(100% - 32px); box-sizing: border-box; }
.sf-list { display: grid; gap: 2px; padding: 0 8px; max-height: 300px; overflow-y: auto; }
.sf-row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 4px; }
.sf-row:hover { background: #35373c; }
.sf-row .nm { flex: 1; min-width: 0; font-weight: 600; color: #f2f3f5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-row .sf-btn { padding: 5px 16px; min-height: 30px; background: transparent; border: 1px solid var(--c-green); color: #fff; }
.sf-row .sf-btn:hover { background: var(--c-green); }
.sf-row .sf-btn.sent { border-color: #4e5058; color: #b5bac1; background: transparent; }
.sf-copy { display: flex; gap: 8px; padding: 4px; border-radius: 4px; background: var(--c-darkest); }
.sf-copy input { flex: 1; min-width: 0; padding: 8px; border: 0; background: transparent; color: #dbdee1; font-size: 15px; }
.sf-note { margin: 8px 0 0; color: #949ba4; font-size: 12px; }
@media (max-width: 520px) { .sf-bg { padding: 0; align-items: end; } .sf-box { max-width: none; border-radius: 12px 12px 0 0; } }
