:root {
  --fb-bg: #f5f6f8;
  --fb-card: #fff;
  --fb-dark: #070707;
  --fb-text: #101114;
  --fb-muted: #676b75;
  --fb-line: #e3e5ea;
  --fb-orange: #ff5a16;
  --fb-red: #ff2f16;
  --fb-green: #17a85b;
  --fb-yellow: #f3ad00;
  --fb-gray: #b9bec8;
  --fb-shadow: 0 10px 28px rgba(9, 10, 13, .07);
  --fb-bottom-space: 112px;
}

* { box-sizing: border-box; }
html { overflow-x: hidden; }
body.fb-app {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--fb-bg);
  color: var(--fb-text);
  font-family: "Segoe UI", Arial, sans-serif;
  padding-bottom: var(--fb-bottom-space);
}

.fb-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 86px;
  min-height: 86px;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 26px;
  margin: 0;
  background: #090909;
  color: #fff;
  box-shadow: none;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.fb-logo { display: inline-flex; align-items: center; flex: 0 0 auto; min-width: 150px; overflow: hidden; }
.fb-logo img { display: block; width: 244px; max-height: 66px; object-fit: contain; }
.fb-topnav { display: none; align-items: center; gap: 34px; margin-right: auto; font-size: .98rem; font-weight: 800; text-transform: uppercase; }
.fb-topnav a { color: #fff; text-decoration: none; padding: 31px 0 28px; border-bottom: 3px solid transparent; }
.fb-topnav a.active, .fb-topnav a:hover { color: var(--fb-orange); border-bottom-color: var(--fb-orange); }
.fb-top-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; flex: 0 0 auto; white-space: nowrap; }
.fb-icon-btn {
  position: relative;
  width: 34px;
  height: 34px;
  min-width: 34px;
  flex: 0 0 34px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.fb-icon-btn .material-icons { font-size: 25px; line-height: 1; }
.fb-badge-count {
  position: absolute;
  top: 1px;
  right: 0;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--fb-red);
  color: #fff;
  font-size: .68rem;
  font-weight: 950;
}
.fb-user-chip { display: none; align-items: center; gap: 10px; color: #fff; }
.fb-user-chip img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 3px solid rgba(255,255,255,.95); }
.fb-user-chip small { display: block; color: rgba(255,255,255,.7); font-weight: 700; }
.fb-user-chip strong { display: block; font-size: .9rem; }

.fb-page { width: min(100%, 1480px); margin: 0 auto; padding: clamp(18px, 3vw, 30px); }
.fb-page-title { margin: 0 0 6px; font-size: clamp(1.8rem, 4vw, 2.45rem); line-height: 1.05; font-weight: 950; letter-spacing: 0; }
.fb-subtitle { margin: 0; color: var(--fb-muted); font-weight: 750; }
.fb-card {
  background: var(--fb-card);
  border: 1px solid rgba(16,17,20,.06);
  border-radius: 12px;
  box-shadow: var(--fb-shadow);
}
.fb-card .material-icons,
.fb-card .material-symbols-outlined,
.fb-card svg,
.fb-card i {
  color: #000;
}
.fb-card svg {
  fill: none;
  stroke: currentColor;
}

.passkey-prompt-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(8, 9, 12, .46);
}
.passkey-prompt-card {
  width: min(420px, 100%);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.5);
  background: #fff;
  box-shadow: 0 26px 80px rgba(0,0,0,.28);
  padding: 24px;
  color: #000;
  text-align: center;
}
.passkey-prompt-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff1ec;
  color: #000;
  font-size: 34px;
}
.passkey-prompt-card h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 950;
}
.passkey-prompt-card p {
  margin: 0;
  color: var(--fb-muted);
  line-height: 1.45;
  font-weight: 650;
}
.passkey-prompt-note {
  min-height: 20px;
  margin-top: 10px !important;
  color: var(--fb-red) !important;
  font-weight: 850 !important;
}
.passkey-prompt-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}
@media (max-width: 520px) {
  .passkey-prompt-actions { grid-template-columns: 1fr; }
}
.fb-section { padding: clamp(16px, 2.4vw, 24px); }
.fb-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
  font-size: 1.12rem;
  font-weight: 950;
  text-transform: uppercase;
}
.fb-link { color: var(--fb-orange); font-weight: 900; text-decoration: none; background: transparent; border: 0; cursor: pointer; }
.fb-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.fb-two-col { display: grid; grid-template-columns: 1fr; gap: 18px; }
.fb-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fb-summary-card { min-height: 112px; padding: 16px; display: flex; align-items: center; gap: 14px; }
.fb-summary-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  background: #fff1ec;
  color: var(--fb-orange);
  border: 1px solid #ffd4c5;
}
.fb-summary-icon.green { background: #eaf8f0; color: var(--fb-green); border-color: #bfe9d0; }
.fb-summary-icon.yellow { background: #fff7df; color: var(--fb-yellow); border-color: #ffe4a0; }
.fb-summary-icon.blue { background: #edf4ff; color: #3578e5; border-color: #cfe0ff; }
.fb-kpi { display: block; font-size: 1.45rem; font-weight: 950; line-height: 1; }
.fb-label { display: block; color: var(--fb-muted); font-weight: 750; margin-top: 5px; }
.fb-btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid #cfd3dc;
  border-radius: 8px;
  background: #fff;
  color: var(--fb-text);
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}
.fb-btn.dark { background: var(--fb-dark); border-color: var(--fb-dark); color: #fff; }
.fb-btn.orange { background: linear-gradient(135deg, var(--fb-orange), var(--fb-red)); border-color: var(--fb-orange); color: #fff; }
.fb-btn.green { background: var(--fb-green); border-color: var(--fb-green); color: #fff; }
.fb-btn.icon { width: 44px; padding: 0; }
.fb-field {
  width: 100%;
  min-height: 46px;
  border: 1px solid #dce0e7;
  border-radius: 8px;
  background: #fff;
  color: var(--fb-text);
  padding: 10px 12px;
  outline: 0;
}
.fb-filter-card { padding: 18px; display: grid; gap: 14px; }
.fb-filter-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.fb-chip-row { display: flex; gap: 10px; flex-wrap: wrap; }
.fb-chip {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #eef0f4;
  color: var(--fb-text);
  padding: 8px 14px;
  font-weight: 850;
}
.fb-chip.active, .fb-chip.dark { background: var(--fb-dark); color: #fff; }
.fb-chip.green { background: #eaf8f0; color: var(--fb-green); }
.fb-chip.yellow { background: #fff4d7; color: #c77d00; }
.fb-chip.gray { background: #eceff4; color: #555b66; }
.fb-progress { height: 12px; display: flex; overflow: hidden; border-radius: 999px; background: #e7e9ee; }
.fb-progress .green { background: var(--fb-green); }
.fb-progress .yellow { background: var(--fb-yellow); }
.fb-progress .gray { background: #d6d9e0; }

.fb-bottom-menu {
  position: fixed;
  left: 50%;
  bottom: 14px;
  z-index: 60;
  width: calc(100% - 28px);
  max-width: 1440px;
  min-height: 80px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  gap: 4px;
  padding: 10px 10px 12px;
  border-radius: 15px;
  background: #050505;
  box-shadow: 0 -8px 30px rgba(0,0,0,.32);
}
.fb-bottom-menu a { min-width: 0; color: inherit; text-decoration: none; }
.fb-bottom-menu button {
  width: 100%;
  min-height: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255,255,255,.66);
  font-size: .74rem;
  font-weight: 850;
  text-transform: uppercase;
  cursor: pointer;
  padding: 8px 4px;
}
.fb-bottom-menu a.active button, .fb-bottom-menu button:hover { color: var(--fb-orange); background: rgba(255,255,255,.05); }
.fb-bottom-menu .register button { position: relative; color: #fff; padding-top: 28px; }
.fb-bottom-menu .plus {
  position: absolute;
  top: -26px;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 5px solid var(--fb-dark);
  background: var(--fb-orange);
  color: #fff;
  box-shadow: 0 8px 20px rgba(255,90,22,.35);
}
.fb-bottom-menu .material-icons { font-size: 24px; }
.fb-bottom-menu .plus .material-icons { font-size: 36px; }

.fb-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  place-items: end center;
  background: rgba(0,0,0,.55);
}
.fb-modal.open { display: grid; }
.fb-modal-panel {
  width: min(100%, 560px);
  max-height: 92dvh;
  overflow: auto;
  background: #fff;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -18px 48px rgba(0,0,0,.26);
}
.fb-modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; background: var(--fb-dark); color: #fff; }
.fb-modal-head h2 { margin: 0; font-size: 1rem; text-transform: uppercase; }
.fb-modal-body { padding: 18px; display: grid; gap: 14px; }
.fb-empty { padding: 22px; border: 1px dashed #cfd3dc; border-radius: 10px; color: var(--fb-muted); text-align: center; font-weight: 800; }

@media (min-width: 780px) {
  .fb-topnav { display: flex; }
  .fb-user-chip { display: flex; }
  .fb-summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .fb-filter-grid { grid-template-columns: minmax(220px, 1fr) minmax(180px, .8fr) minmax(220px, 1fr); }
}
@media (min-width: 1080px) {
  .fb-two-col { grid-template-columns: minmax(0, 2.1fr) minmax(300px, .8fr); align-items: start; }
  .fb-summary-grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .fb-modal { place-items: center; padding: 24px; }
  .fb-modal-panel { border-radius: 16px; }
}
@media (max-width: 560px) {
  .fb-topbar {
    height: 106px;
    min-height: 106px;
    align-items: end;
    gap: 8px;
    padding: 0 16px 14px;
  }
  .fb-logo { min-width: 0; flex: 1 1 auto; }
  .fb-logo img { width: clamp(138px, 46vw, 178px); max-height: 58px; }
  .fb-top-actions { gap: 6px; margin-left: 6px; }
  .fb-icon-btn { width: 34px; height: 34px; min-width: 34px; flex-basis: 34px; }
  .fb-icon-btn .material-icons { font-size: 24px; }
  .fb-user-chip { display: none !important; }
  .fb-top-actions .hide-mobile { display: none; }
  .fb-page { padding: 16px 14px 22px; }
  .fb-bottom-menu { bottom: 0; width: 100%; max-width: none; border-radius: 18px 18px 0 0; padding: 8px 7px calc(9px + env(safe-area-inset-bottom)); min-height: calc(86px + env(safe-area-inset-bottom)); }
  .fb-bottom-menu button { min-height: 72px; font-size: .68rem; }
  .fb-bottom-menu .plus { top: -24px; width: 58px; height: 58px; }
}

@media (max-width: 380px) {
  .fb-topbar { padding-inline: 12px; }
  .fb-logo img { width: clamp(124px, 42vw, 150px); }
  .fb-icon-btn { width: 32px; height: 32px; min-width: 32px; flex-basis: 32px; }
  .fb-icon-btn .material-icons { font-size: 23px; }
  .fb-social-badge { top: -6px; right: -5px; }
}
