:root {
  font-family: "Segoe UI", Arial, sans-serif;
  color: #1f2937;
  background: #f5f6f8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  display: flex;
  min-width: 320px;
  min-height: 100vh;
  background: #f5f6f8;
}

.side {
  width: 260px;
  flex: 0 0 260px;
  background: #ffffff;
  color: #1f2937;
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  border-right: 1px solid #e5e7eb;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px 16px;
  margin-bottom: 10px;
  border-bottom: 1px solid #eef1f5;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #0f172a;
}

.brand span {
  display: grid;
  gap: 2px;
  font-weight: 700;
}

.brand small {
  color: #6b7280;
  font-size: 12px;
  font-weight: 500;
}

.authBox {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 14px;
  background: #f9fafb;
}

.authBox b {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}

.authBox input {
  width: 100%;
  min-height: 34px;
  margin-bottom: 7px;
  border-color: #d1d5db;
  background: #ffffff;
  color: #1f2937;
}

.authBox button {
  width: 100%;
  min-height: 34px;
  margin-top: 4px;
  cursor: pointer;
}

.authBox button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.authBox .mutedLink {
  display: inline-block;
  margin-top: 8px;
  color: #1d4ed8;
  font-size: 12px;
  cursor: pointer;
}

.authMiniText {
  margin: 4px 0 8px;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.6;
}

.authStatus {
  color: #4b5563;
  font-size: 12px;
  line-height: 1.5;
}

.authMessage {
  margin-top: 8px;
  padding: 7px 8px;
  border: 1px solid #c7d2fe;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.4;
  background: #eef2ff;
  color: #374151;
}

.authMessage.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.authMessage.bad {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.verifyNotice {
  grid-column: 1 / -1;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 12px;
  background: #eff6ff;
  color: #1e3a8a;
}

.verifyNotice p {
  margin: 6px 0 10px;
  color: #334155;
}

.authViewActive {
  background: #f7f7fa;
}

.authViewActive .side,
.authViewActive .top,
.authViewActive .metrics,
.authViewActive .quickActions,
.authViewActive .providerPanel,
.authViewActive .siteFooter {
  display: none;
}

.authViewActive .main {
  padding: 0;
  min-height: 100vh;
}

.authViewActive #authView.active {
  display: block;
  min-height: 100vh;
}

.loginPage {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(520px, 58vw) minmax(420px, 1fr);
  gap: 0;
  background: #f7f7fa;
}

.loginBrandPanel,
.loginCard {
  border: 0;
  border-radius: 0;
  min-width: 0;
}

.loginBrandPanel {
  position: relative;
  min-height: 100vh;
  padding: 42px;
  background:
    linear-gradient(90deg, rgba(4, 17, 57, 0.98), rgba(7, 22, 69, 0.95)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='900' viewBox='0 0 1200 900'%3E%3Crect width='1200' height='900' fill='%2305163f'/%3E%3Cg fill='none' stroke='%23294aa5' stroke-width='4' stroke-opacity='.46'%3E%3Cpath d='M110 900 L275 120' stroke-width='10'/%3E%3Cpath d='M84 900 L250 116' stroke-width='3'/%3E%3Cpath d='M260 160 L1200 350'/%3E%3Cpath d='M248 190 L1200 400'/%3E%3Cpath d='M236 220 L1200 450'/%3E%3Cpath d='M224 250 L1200 500'/%3E%3Cpath d='M212 280 L1200 550'/%3E%3Cpath d='M200 310 L1200 600'/%3E%3Cpath d='M188 340 L1200 650'/%3E%3Cpath d='M176 370 L1200 700'/%3E%3Cpath d='M164 400 L1200 750'/%3E%3Cpath d='M152 430 L1200 800'/%3E%3Cpath d='M140 460 L1200 850'/%3E%3C/g%3E%3Cg fill='none' stroke='%231b347a' stroke-width='2' stroke-opacity='.65'%3E%3Cpath d='M0 740 C210 610 410 640 700 542 C890 480 1010 424 1200 420'/%3E%3Cpath d='M0 790 C230 650 470 660 720 590 C930 532 1060 500 1200 490'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
  color: #ffffff;
  overflow: hidden;
}

.loginBrandPanel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 12, 40, 0.1), rgba(3, 12, 40, 0.45));
}

.loginBrandCopy {
  display: none;
}

.loginLogoRow {
  display: flex;
  align-items: center;
  gap: 12px;
}

.loginLogoRow img {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: #ffffff;
}

.loginLogoRow span {
  display: grid;
  gap: 2px;
}

.loginLogoRow b {
  font-size: 20px;
}

.loginLogoRow small {
  color: #bfdbfe;
  font-size: 12px;
}

.loginBrandPanel h2 {
  max-width: 760px;
  margin: 18px 0 8px;
  font-size: 30px;
  line-height: 1.25;
}

.loginBrandPanel p {
  max-width: 720px;
  margin: 0;
  color: #dbeafe;
  font-size: 15px;
  line-height: 1.9;
}

.loginHighlights {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.loginHighlights span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 11px;
  background: rgba(255, 255, 255, 0.1);
  color: #e0f2fe;
  font-size: 12px;
  font-weight: 700;
}

.loginCard {
  min-height: 100vh;
  padding: 48px 72px;
  align-self: stretch;
  display: grid;
  align-content: center;
  justify-items: center;
  background: #f7f7fa;
  box-shadow: none;
}

.loginCard > * {
  width: min(100%, 464px);
}

.loginEyebrow {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
}

.loginCard h2 {
  margin: 18px 0 10px;
  text-align: center;
  font-size: 22px;
}

.loginCard p {
  color: #64748b;
  line-height: 1.7;
}

.loginCenterLogo {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin-bottom: 18px;
}

.loginCenterLogo img {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
}

.loginCenterLogo strong {
  color: #f97316;
  font-size: 16px;
}

.loginTabs {
  display: grid;
  grid-template-columns: 1fr;
  margin: 2px 0 22px;
  border-bottom: 1px solid #e3e8f2;
}

.loginTabs button {
  min-height: 42px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #172033;
  cursor: default;
  font-size: 14px;
}

.loginTabs button.active {
  color: #4f46e5;
  border-bottom: 2px solid #5b5cff;
  font-weight: 700;
}

.loginForm {
  display: grid;
  gap: 14px;
  margin-top: 0;
}

.loginForm label {
  display: grid;
  gap: 7px;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.loginForm input {
  width: 100%;
  min-height: 42px;
  font-size: 14px;
  background: #eaf2ff;
  border-color: #c8d4e8;
  border-radius: 4px;
}

.loginForm button,
.loginActions button {
  min-height: 36px;
  justify-content: center;
  border-radius: 4px;
}

.forgotLine {
  display: flex;
  justify-content: space-between;
  min-height: 22px;
  margin-top: -4px;
}

.forgotLine a,
.forgotLine button {
  color: #4f46e5;
  font-size: 12px;
  text-decoration: none;
  border: 0;
  background: transparent;
  padding: 0;
  min-height: 0;
  cursor: pointer;
}

.plainSwitch {
  width: 100%;
  margin-top: 34px;
  background: transparent;
  color: #1d4ed8;
  border: 0;
}

.loginAccountBox {
  display: grid;
  gap: 8px;
  margin: 18px 0;
}

.loginAccountBox p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #e5eaf2;
  border-radius: 8px;
  background: #f8fafc;
}

.loginAccountBox b {
  color: #475569;
}

.loginActions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.navGroup {
  margin: 10px 0 14px;
}

.navGroup[hidden],
.adminOnly[hidden] {
  display: none !important;
}

.navGroup > span {
  display: block;
  color: #9ca3af;
  font-size: 12px;
  padding: 0 12px 6px;
}

.side button {
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #4b5563;
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 14px;
}

.side button:hover,
.side button.active {
  background: #eef6ff;
  color: #0b63ce;
  font-weight: 700;
}

.main {
  flex: 1;
  min-width: 0;
  padding: 22px 26px 34px;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px 16px;
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(8px);
}

.top h1 {
  margin: 3px 0 0;
  font-size: 28px;
}

#eyebrow {
  color: #64748b;
  font-size: 13px;
}

.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

select,
input,
button {
  min-height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
  background: white;
  font: inherit;
}

#refreshBtn {
  background: #0b63ce;
  color: white;
  border-color: #0b63ce;
  cursor: pointer;
}

.loginForm button,
.loginActions button:not(.secondaryButton),
.authBox button:not(.secondaryButton) {
  background: #5b5cff;
  color: white;
  border-color: #5b5cff;
  cursor: pointer;
}

.loginActions .secondaryButton {
  background: #f8fafc;
  color: #172033;
  border-color: #cbd5e1;
}

#refreshBtn:disabled,
select:disabled,
button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.softLoading {
  cursor: progress;
}

body.isLoading .top {
  box-shadow: inset 0 -2px 0 #93c5fd;
}

.loadingBlock {
  min-height: 92px;
  display: grid;
  place-items: center;
  color: #64748b;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric {
  min-height: 86px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px;
  display: grid;
  align-content: center;
  gap: 6px;
}

.metric span {
  color: #64748b;
  font-size: 13px;
}

.metric b {
  font-size: 19px;
  overflow-wrap: anywhere;
}

.cashFlowNotice {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  line-height: 1.55;
}

.cashFlowNotice b {
  font-size: 15px;
}

.cashFlowNotice span {
  font-weight: 700;
}

.cashFlowNotice small {
  color: #64748b;
}

.cashFlowNotice.danger {
  border-color: #fecaca;
  background: #fff1f2;
  color: #991b1b;
}

.cashFlowNotice.danger b {
  color: #b91c1c;
}

.cashFlowNotice.info {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
}

.quickActions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: -4px 0 18px;
  padding: 10px;
  background: #ffffff;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
}

.quickActions .summary {
  color: #334155;
  font-size: 13px;
  margin-right: auto;
}

.quickActions a,
.quickActions button {
  min-height: 34px;
  border-radius: 8px;
  padding: 7px 10px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #172033;
  text-decoration: none;
  cursor: pointer;
  font-size: 13px;
}

.good b {
  color: #15803d;
}

.bad b {
  color: #b91c1c;
}

.warn b {
  color: #b45309;
}

.healthBadge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  vertical-align: middle;
  background: #f1f5f9;
  color: #334155;
}

.healthBadge.ok {
  background: #dcfce7;
  color: #166534;
}

.healthBadge.warn {
  background: #fef3c7;
  color: #92400e;
}

.healthBadge.bad {
  background: #fee2e2;
  color: #991b1b;
}

.view {
  display: none;
  gap: 18px;
}

.view.active {
  display: grid;
}

.grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.panel {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  min-width: 0;
}

.compactPanel {
  padding: 12px;
}

.panel h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.clientIntro p,
.steps p {
  margin: 6px 0;
  color: #475569;
  line-height: 1.7;
}

.brandHero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brandHero img {
  width: 96px;
  height: 96px;
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
}

.brandHero h2 {
  font-size: 24px;
  margin-bottom: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
}

.noticePanel {
  border-left: 4px solid #f59e0b;
  background: #fffbeb;
}

.contactList {
  display: grid;
  gap: 10px;
}

.contactList p {
  display: grid;
  gap: 4px;
  margin: 0;
  color: #475569;
}

.contactList b {
  color: #172033;
}

.sectionNote {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
}

.providerPanel {
  margin: -4px 0 18px;
}

.providerPanel:empty {
  display: none;
}

.providerCard {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
}

.providerCard span {
  color: #64748b;
  font-size: 12px;
}

.providerCard h2 {
  margin: 2px 0 4px;
  font-size: 18px;
}

.providerCard p {
  margin: 0;
  color: #475569;
  line-height: 1.6;
}

.providerContacts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
  font-size: 12px;
}

.providerContacts p {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.providerContacts a,
.providerContacts span {
  overflow-wrap: anywhere;
  color: #1d4ed8;
}

.communityHero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.75fr);
  gap: 18px;
  align-items: stretch;
  padding: 22px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.communityHeroCopy {
  display: grid;
  align-content: center;
  gap: 12px;
}

.communityEyebrow {
  color: #0b63ce;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.communityHero h2 {
  margin: 0;
  max-width: 760px;
  color: #111827;
  font-size: 30px;
  line-height: 1.25;
}

.communityHero p {
  max-width: 720px;
  margin: 0;
  color: #4b5563;
  line-height: 1.8;
}

.communityActions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.communityActions button {
  border-color: #0b63ce;
  background: #0b63ce;
  color: #ffffff;
  cursor: pointer;
}

.communityActions .secondaryButton {
  border-color: #d1d5db;
  background: #ffffff;
  color: #1f2937;
}

.communityStats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.communityStats div,
.marketHighlights div {
  display: grid;
  gap: 6px;
  min-height: 88px;
  align-content: center;
  border: 1px solid #eef1f5;
  border-radius: 8px;
  padding: 14px;
  background: #f9fafb;
}

.communityStats span,
.marketHighlights span {
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
}

.communityStats b {
  color: #111827;
  font-size: 25px;
}

.marketHighlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.marketHighlights b,
.marketHighlights em {
  overflow-wrap: anywhere;
}

.marketHighlights b {
  color: #111827;
  font-size: 15px;
}

.marketHighlights em {
  color: #0b63ce;
  font-size: 14px;
  font-style: normal;
  font-weight: 800;
}

.providerAvatar,
.profileAvatar {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #dbe4f0;
  background: #eef6ff;
  color: #1d4ed8;
  font-weight: 800;
}

.profileAvatar {
  width: 96px;
  height: 96px;
  font-size: 28px;
}

.providerAvatar img,
.profileAvatar img,
.rankingAvatar.image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profileEditor {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.profilePreview {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 16px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #f8fafc;
  text-align: center;
}

.profilePreview h3,
.profilePreview p {
  margin: 0;
}

.profilePreview p,
.profilePreview small {
  color: #64748b;
}

.profileForm {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.profileForm label {
  display: grid;
  gap: 5px;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.profileForm input,
.profileForm textarea {
  width: 100%;
  resize: vertical;
}

.fullLine {
  grid-column: 1 / -1;
}

.fileButton {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid #1d4ed8;
  border-radius: 8px;
  padding: 7px 12px;
  background: #1d4ed8;
  color: white;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.fileButton input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.rankingOwner {
  margin: -4px 0 7px !important;
  color: #475569 !important;
  font-size: 12px !important;
}

.siteFooter {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 22px;
  padding: 16px;
  color: #64748b;
  font-size: 12px;
}

.advancedBlock {
  display: grid;
  gap: 18px;
}

.advancedBlock summary {
  cursor: pointer;
  color: #1d4ed8;
  font-weight: 700;
  margin: 6px 0;
}

code {
  background: #eef2ff;
  color: #1e3a8a;
  border-radius: 6px;
  padding: 2px 6px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.smtpStatus {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
}

.smtpStatus.ok {
  background: #dcfce7;
  color: #166534;
}

.smtpStatus.bad {
  background: #fef2f2;
  color: #991b1b;
}

.panelHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panelHead h2 {
  margin: 0;
}

.miniSelect {
  min-height: 32px;
  padding: 4px 8px;
  font-size: 13px;
}

.riskGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.riskItem {
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fafc;
}

.riskItem span {
  display: block;
  color: #64748b;
  font-size: 12px;
  margin-bottom: 4px;
}

.riskItem b {
  font-size: 14px;
}

.riskItem.ok b {
  color: #15803d;
}

.riskItem.warn b {
  color: #b45309;
}

.riskItem.bad b {
  color: #b91c1c;
}

.kvGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.kvItem {
  min-height: 72px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fafc;
}

.kvItem span {
  display: block;
  color: #64748b;
  font-size: 12px;
  margin-bottom: 5px;
}

.kvItem b {
  display: block;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.kvItem.good b {
  color: #15803d;
}

.kvItem.bad b {
  color: #b91c1c;
}

.filterBar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.filterBar label {
  display: grid;
  gap: 6px;
  color: #475569;
  font-size: 12px;
}

.filterBar select,
.filterBar input {
  width: 100%;
}

.buttonRow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.buttonRow button {
  background: #1d4ed8;
  color: white;
  border-color: #1d4ed8;
  cursor: pointer;
}

.buttonRow .secondaryButton,
.secondaryButton {
  background: #f8fafc;
  color: #172033;
  border-color: #cbd5e1;
}

.linkButton {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid #1d4ed8;
  background: #1d4ed8;
  color: white;
  padding: 8px 12px;
  text-decoration: none;
  font-size: 14px;
}

.downloadCards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.downloadCards.compact {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin: 0 0 12px;
}

.downloadCard {
  display: grid;
  gap: 4px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #172033;
  padding: 12px;
  text-decoration: none;
}

.downloadCard b {
  color: #1d4ed8;
}

.downloadCard span {
  color: #475569;
  font-size: 12px;
  word-break: break-all;
}

.downloadCard:hover {
  border-color: #1d4ed8;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.12);
}

.setupResult {
  display: grid;
  gap: 8px;
}

.setupResult p {
  margin: 0;
}

.checkGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin: 10px 0 14px;
}

.checkLine {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-size: 13px;
}

.checkLine input {
  min-height: auto;
}

.fieldLine {
  display: grid;
  gap: 6px;
  color: #475569;
  font-size: 12px;
  margin: 12px 0;
}

textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px;
  font: inherit;
  resize: vertical;
}

.mailGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.hintText {
  margin-top: 10px;
  color: #64748b;
  font-size: 13px;
}

.chart {
  width: 100%;
  height: 310px;
}

.tableWrap {
  overflow: auto;
}

.tableMeta {
  color: #64748b;
  font-size: 12px;
  margin-bottom: 8px;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
  color: #475569;
  font-size: 13px;
}

.pager button {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
}

.pager button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.rankingToolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
}

.rankingToolbar b {
  display: block;
  margin-bottom: 3px;
  font-size: 15px;
}

.rankingToolbar span {
  color: #64748b;
  font-size: 12px;
}

.rankingFilters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rankingFilters button {
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #ffffff;
  cursor: pointer;
  font-size: 13px;
}

.rankingFilters button.active {
  border-color: #0b63ce;
  background: #0b63ce;
  color: white;
}

.rankingList {
  display: grid;
  gap: 14px;
}

.rankingList.compact {
  gap: 10px;
}

.rankingCard {
  display: grid;
  grid-template-columns: 92px minmax(230px, 1fr) minmax(420px, 1.45fr) 120px;
  align-items: center;
  gap: 18px;
  min-height: 116px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.rankingCard:hover {
  border-color: #b9d8ff;
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.08);
  transform: translateY(-1px);
}

.rankingIdentity {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.rankingAvatar {
  width: 64px;
  height: 64px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 20px;
}

.rankingScore {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 25px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef6ff;
  color: #0b63ce;
  font-size: 11px;
  font-weight: 800;
}

.rankingScore b {
  font-size: 15px;
}

.rankingInfo {
  min-width: 0;
}

.rankingTitleRow {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rankingInfo h3 {
  margin: 0;
  font-size: 17px;
  color: #111827;
}

.rankingTitleRow button {
  min-height: 30px;
  margin-left: auto;
  padding: 5px 10px;
  border-color: #0b63ce;
  background: #0b63ce;
  color: #ffffff;
  cursor: pointer;
  font-size: 12px;
}

.rankingInfo p {
  margin: 7px 0 0;
  color: #64748b;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.rankingAccountLine {
  color: #6b7280 !important;
}

.rankingTags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.rankingTag {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #334155;
  font-size: 11px;
  font-weight: 700;
}

.rankingTag.live {
  border-color: #86efac;
  background: #dcfce7;
  color: #166534;
}

.rankingTag.demo {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.rankingTag.ok {
  border-color: #86efac;
  background: #dcfce7;
  color: #166534;
}

.rankingTag.warn {
  border-color: #fcd34d;
  background: #fef3c7;
  color: #92400e;
}

.rankingTag.bad {
  border-color: #fecaca;
  background: #fee2e2;
  color: #991b1b;
}

.linkedLiveNote {
  display: inline-grid;
  gap: 3px;
  margin-top: 9px;
  padding: 7px 9px;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  background: #f0fdf4;
  color: #166534;
  cursor: pointer;
}

.linkedLiveNote b {
  font-size: 12px;
}

.linkedLiveNote span {
  font-size: 11px;
  font-weight: 700;
}

.linkedLivePanel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(360px, 1.4fr);
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: linear-gradient(90deg, #f0fdf4, #ffffff);
}

.linkedLivePanel span {
  color: #15803d;
  font-size: 12px;
  font-weight: 800;
}

.linkedLivePanel h3 {
  margin: 6px 0;
  font-size: 18px;
}

.linkedLivePanel p {
  margin: 0;
  color: #64748b;
}

.linkedLiveMetrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(76px, 1fr));
  gap: 10px;
}

.linkedLiveMeta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.liveLinkControl {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 6px;
  align-items: center;
  min-width: 300px;
}

.liveLinkControl select {
  min-height: 34px;
  font-size: 12px;
}

.liveLinkControl button {
  min-height: 34px;
  padding: 5px 10px;
  font-size: 12px;
}

.liveLinkControl small {
  grid-column: 1 / -1;
  color: #64748b;
}

.rankingMetrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(92px, 1fr));
  gap: 12px;
}

.rankingMetric {
  display: grid;
  justify-items: center;
  gap: 7px;
  min-width: 0;
}

.rankingMetric span {
  color: #4b5563;
  font-size: 13px;
  font-weight: 800;
}

.rankingMetric b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 25px;
  max-width: 100%;
  border-radius: 999px;
  padding: 4px 10px;
  color: white;
  font-size: 13px;
  line-height: 17px;
  overflow-wrap: anywhere;
}

.rankingMetric b.profit {
  background: #14a05f;
}

.rankingMetric b.loss {
  background: #e11d48;
}

.rankingMetric b.gain {
  background: #e83b57;
}

.rankingMetric b.win {
  background: #ffbf00;
  color: #111827;
}

.rankingMetric b.dd {
  background: #0b7bea;
}

.rankingRisk {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.rankingRisk span {
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
}

.rankingRisk b {
  font-size: 13px;
}

.rankingRisk b.ok {
  color: #15803d;
}

.rankingRisk b.warn {
  color: #b45309;
}

.rankingRisk b.bad {
  color: #b91c1c;
}

.riskBar {
  height: 7px;
  border-radius: 999px;
  background: #eef1f5;
  overflow: hidden;
}

.riskBar i {
  display: block;
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
}

.riskBar i.ok {
  background: #22c55e;
}

.riskBar i.warn {
  background: #f59e0b;
}

.riskBar i.bad {
  background: #ef4444;
}

.emptyState {
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 22px;
  color: #64748b;
  text-align: center;
  background: #f8fafc;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 3px 9px;
  font-size: 12px;
  line-height: 18px;
  font-weight: 700;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid #e5eaf2;
  padding: 10px 9px;
  text-align: left;
  white-space: nowrap;
  font-size: 13px;
}

th {
  background: #f8fafc;
  color: #475569;
}

tr:hover td {
  background: #fbfdff;
}

@media (max-width: 1100px) {
  .metrics {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
  }

  .grid2,
  .grid3 {
    grid-template-columns: 1fr;
  }

  .providerCard,
  .profileEditor,
  .communityHero,
  .marketHighlights {
    grid-template-columns: 1fr;
  }

  .rankingCard {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .rankingMetrics,
  .rankingRisk {
    grid-column: 1 / -1;
  }

  .linkedLivePanel {
    grid-template-columns: 1fr;
  }

  .loginPage {
    grid-template-columns: 1fr;
  }

  .loginCard {
    align-self: stretch;
  }
}

@media (max-width: 760px) {
  body {
    display: block;
  }

  .side {
    width: 100%;
    height: auto;
    position: relative;
  }

  .main {
    padding: 16px;
  }

  .top {
    display: grid;
  }

  .toolbar,
  .toolbar select,
  .toolbar button {
    width: 100%;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quickActions {
    display: grid;
  }

  .quickActions .summary {
    margin-right: 0;
    line-height: 1.7;
  }

  .chart {
    min-height: 280px;
  }

  .brandHero {
    display: grid;
  }

  .brandHero img {
    width: 72px;
    height: 72px;
  }

  .communityHero {
    padding: 18px;
  }

  .communityHero h2 {
    font-size: 24px;
  }

  .communityStats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rankingToolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .rankingCard {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .rankingIdentity {
    justify-items: start;
    grid-template-columns: 64px auto;
  }

  .rankingTitleRow {
    width: 100%;
  }

  .rankingMetrics {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rankingRisk {
    width: 100%;
  }

  .linkedLiveMetrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .liveLinkControl {
    grid-template-columns: 1fr;
    min-width: 220px;
  }

  .providerContacts,
  .profileForm {
    grid-template-columns: 1fr;
  }

  .rankingMetric {
    justify-items: start;
  }

  .loginBrandPanel,
  .loginCard {
    padding: 20px;
  }

  .loginBrandPanel h2 {
    font-size: 25px;
  }

  .loginAccountBox p {
    display: grid;
  }
}
