/* ═══════════ Vänner (/friends, "Vänner online" på /home, vän-toasts) ═══════════ */
.fr-page { max-width: 1100px; margin: 0 auto; padding: 8px 4px 40px; color: #e6edf3; }
.fr-hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: radial-gradient(120% 140% at 0% 0%, #1f6feb26 0%, transparent 55%), linear-gradient(135deg, #0d1117, #161b22);
  border: 1px solid #30363d; border-radius: 16px; padding: 18px 20px; margin-bottom: 14px; }
.fr-hero-title { display: flex; align-items: center; gap: 14px; }
.fr-hero-icon { font-size: 34px; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 14px;
  background: #1f6feb22; border: 1px solid #1f6feb55; }
.fr-hero h1 { margin: 0; font-family: Oswald, sans-serif; font-size: 26px; letter-spacing: 2px; text-transform: uppercase; color: #58a6ff; }
.fr-hero-sub { color: #8b949e; font-size: 13px; }
.fr-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.fr-stat { background: #0d1117; border: 1px solid #30363d; border-radius: 999px; padding: 6px 12px; font-size: 12px; color: #8b949e; display: flex; align-items: center; gap: 6px; }
.fr-stat b { color: #e6edf3; font-size: 14px; }
.fr-stat.hot { border-color: #f8514980; color: #ffa198; }
.fr-stat.hot b { color: #fff; }

.fr-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: none; }
.fr-tabs::-webkit-scrollbar { display: none; }
.fr-tab { flex: 0 0 auto; background: #161b22; border: 1px solid #30363d; color: #8b949e; border-radius: 10px; padding: 9px 14px;
  font-weight: 700; font-size: 13px; cursor: pointer; display: flex; align-items: center; gap: 6px; transition: all .15s; }
.fr-tab:hover { color: #e6edf3; border-color: #484f58; }
.fr-tab.active { background: #1f6feb22; border-color: #1f6feb; color: #58a6ff; }
.fr-count { background: #30363d; color: #c9d1d9; border-radius: 999px; font-size: 11px; padding: 0 7px; }
.fr-badge { background: #f85149; color: #fff; border-radius: 999px; font-size: 11px; font-weight: 900; padding: 0 7px; min-width: 18px; text-align: center; }

.fr-flash { border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; font-weight: 700; font-size: 13px; animation: fr-in .2s ease-out; }
.fr-flash.ok { background: #2386361f; border: 1px solid #23863666; color: #3fb950; }
.fr-flash.err { background: #f851491a; border: 1px solid #f8514966; color: #ff7b72; }

.fr-section-title { font-family: Oswald, sans-serif; letter-spacing: 1.5px; text-transform: uppercase; font-size: 14px; color: #c9d1d9;
  margin: 18px 2px 8px; display: flex; align-items: center; gap: 8px; }
.fr-section-title:first-child { margin-top: 4px; }
.fr-toolbar { margin: 4px 0 10px; }
.fr-input { width: 100%; background: #0d1117; border: 1px solid #30363d; border-radius: 10px; color: #e6edf3; padding: 10px 12px; font-size: 14px; outline: none; }
.fr-input:focus { border-color: #1f6feb; box-shadow: 0 0 0 3px #1f6feb33; }
.fr-input.big { font-size: 16px; padding: 13px 14px; }
.fr-hint { color: #6e7681; font-size: 12px; margin-top: 6px; }
.fr-search { margin-bottom: 12px; }

.fr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fr-card { display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, #0d1117, #161b22); border: 1px solid #30363d;
  border-radius: 14px; padding: 12px; min-width: 0; animation: fr-in .2s ease-out; }
.fr-card.online { border-color: #2386364d; box-shadow: inset 3px 0 0 #3fb950; }
.fr-card.incoming { border-color: #1f6feb80; box-shadow: inset 3px 0 0 #58a6ff; }
.fr-avatar { position: relative; flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; background: #21262d; border: 2px solid #30363d;
  display: grid; place-items: center; font-size: 22px; }
.fr-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.fr-avatar.sm { width: 34px; height: 34px; font-size: 16px; }
.fr-avatar .fr-dot { position: absolute; right: -1px; bottom: -1px; border: 2px solid #0d1117; }
.fr-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: #484f58; flex: 0 0 auto; }
.fr-dot.on { background: #3fb950; box-shadow: 0 0 8px #3fb950aa; }
.fr-dot.pulse { animation: fr-pulse 1.8s infinite; }
.fr-info { flex: 1 1 auto; min-width: 0; }
.fr-name { display: block; color: #e6edf3; font-weight: 800; font-size: 15px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.fr-name:hover { color: #58a6ff; }
.fr-tag { color: #d29922; font-weight: 700; font-size: 12px; margin-left: 5px; }
.fr-meta { color: #8b949e; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr-status { color: #6e7681; font-size: 12px; margin-top: 2px; }
.fr-status.on { color: #3fb950; font-weight: 700; }
.fr-actions { display: flex; gap: 6px; flex: 0 0 auto; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

.fr-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; border-radius: 9px; border: 1px solid transparent;
  padding: 9px 14px; font-weight: 800; font-size: 13px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: filter .15s, background .15s; }
.fr-btn.sm { padding: 6px 10px; font-size: 12px; }
.fr-btn.icon { padding: 6px 8px; min-width: 32px; }
.fr-btn:disabled { opacity: .5; cursor: default; }
.fr-btn.primary { background: #1f6feb; color: #fff; }
.fr-btn.success { background: #238636; color: #fff; }
.fr-btn.danger { background: #da3633; color: #fff; }
.fr-btn.ghost { background: #21262d; border-color: #30363d; color: #c9d1d9; }
.fr-btn:hover:not(:disabled) { filter: brightness(1.15); }
.fr-pill { border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; background: #30363d; color: #c9d1d9; }
.fr-pill.ok { background: #2386362b; color: #3fb950; }

.fr-empty { color: #6e7681; font-size: 13px; padding: 14px; text-align: center; background: #0d1117; border: 1px dashed #30363d; border-radius: 12px; }
.fr-empty.big { padding: 34px 16px; display: flex; flex-direction: column; align-items: center; gap: 12px; font-size: 14px; }
.fr-empty-icon { font-size: 40px; }
.fr-invite { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: #2386361a; border: 1px solid #23863655; border-radius: 12px; padding: 14px; color: #c9d1d9; font-size: 13px; }
.fr-invite span { color: #8b949e; }

/* ── /home-kort ── */
.fr-home-card { background: linear-gradient(135deg, #0d1117, #161b22); border: 1px solid #30363d; border-radius: 14px; overflow: hidden; margin-bottom: 12px; }
.fr-home-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px 10px; border-bottom: 1px solid #21262d; }
.fr-home-title { display: flex; align-items: center; gap: 8px; color: #3fb950; font-weight: 800; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; }
.fr-home-count { background: #2386362b; color: #3fb950; border-radius: 999px; padding: 0 8px; font-size: 11px; letter-spacing: 0; }
.fr-home-req { background: #f851491f; border: 1px solid #f8514966; color: #ffa198; border-radius: 8px; padding: 3px 8px; font-size: 11px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.fr-home-body { padding: 6px 8px; max-height: 320px; overflow-y: auto; }
.fr-home-empty { color: #6e7681; font-size: 12px; padding: 12px 6px; text-align: center; }
.fr-home-row { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 10px; }
.fr-home-row:hover { background: #ffffff08; }
.fr-home-who { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-decoration: none; color: #e6edf3; }
.fr-home-name { min-width: 0; font-size: 13px; font-weight: 700; }
.fr-home-name > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr-home-name small { color: #8b949e; font-weight: 500; font-size: 11px; }
.fr-home-foot { display: flex; justify-content: space-between; padding: 8px 14px 10px; border-top: 1px solid #21262d; font-size: 12px; }
.fr-home-foot a { color: #8b949e; text-decoration: none; font-weight: 700; }
.fr-home-foot a.strong { color: #58a6ff; }

/* ── Toasts ── */
.fr-toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 9997; display: flex; flex-direction: column-reverse; gap: 10px; max-width: min(360px, calc(100vw - 40px)); }
.fr-toast { background: linear-gradient(135deg, #0d1117, #161b22); border: 1px solid #1f6feb; border-radius: 12px; padding: 12px 14px; box-shadow: 0 10px 30px #000a; animation: fr-in .25s ease-out; }
.fr-toast-title { display: flex; justify-content: space-between; align-items: center; color: #58a6ff; font-weight: 800; font-size: 13px; }
.fr-toast-close { background: none; border: none; color: #8b949e; font-size: 18px; cursor: pointer; line-height: 1; }
.fr-toast-msg { color: #e6edf3; font-size: 13px; margin: 4px 0 8px; }
.fr-toast-link { color: #3fb950; font-weight: 800; font-size: 12px; text-decoration: none; }

@keyframes fr-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes fr-pulse { 0%, 100% { box-shadow: 0 0 0 0 #3fb95099; } 50% { box-shadow: 0 0 0 5px #3fb95000; } }

@media (max-width: 760px) {
  .fr-grid { grid-template-columns: 1fr; }
  .fr-hero { padding: 14px; }
  .fr-hero h1 { font-size: 22px; }
  .fr-hero-icon { width: 46px; height: 46px; font-size: 26px; }
  .fr-card { flex-wrap: wrap; }
  .fr-card .fr-actions { width: 100%; justify-content: flex-start; padding-left: 58px; }
  .fr-hide-xs { display: none; }
  .fr-toast-stack { right: 12px; left: 12px; bottom: 84px; max-width: none; }
}
