/* 365available Analytics - styles */
:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --border: #e3e8ef;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #1f6feb;
  --primary-600: #1858bd;
  --danger: #dc2626;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.error { color: var(--danger); margin: 8px 0 0; font-size: 14px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; gap: 12px; align-items: center; }
.logo {
  width: 40px; height: 40px;
  background: var(--primary); color: white;
  border-radius: 10px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 14px; letter-spacing: 0.5px;
}
.brand-title { font-weight: 700; font-size: 16px; }
.brand-sub { font-size: 12.5px; color: var(--muted); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.who { font-size: 13px; color: var(--muted); }

.btn {
  border: 0; cursor: pointer;
  padding: 10px 16px; border-radius: 10px;
  font-weight: 600; font-size: 14px;
  transition: background 0.2s ease;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-600); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); }

.login-wrap { flex: 1; display: grid; place-items: center; padding: 40px 16px; }
.login-card {
  width: 100%; max-width: 380px;
  background: var(--surface);
  padding: 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.login-card h1 { margin: 0 0 6px; font-size: 22px; }
.login-card label {
  display: block; font-size: 13px; font-weight: 600; margin: 14px 0 6px;
}
.login-card input[type="text"], .login-card input[type="password"] {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px; font-size: 14px;
  background: #fafbfd;
}
.login-card input:focus {
  outline: 2px solid #c9defc;
  border-color: var(--primary);
  background: white;
}
.login-card .btn-primary { width: 100%; padding: 12px; margin-top: 8px; }

.dashboard {
  flex: 1; padding: 24px 28px 40px;
  display: flex; flex-direction: column; gap: 22px;
  max-width: 1280px; width: 100%; margin: 0 auto;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.kpi-label {
  font-size: 12px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.6px; font-weight: 600;
}
.kpi-value { font-size: 30px; font-weight: 700; margin-top: 6px; word-break: break-word; }
.kpi-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; gap: 12px; flex-wrap: wrap;
}
.panel-head h2 { margin: 0; font-size: 16px; }
.head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.platform-card {
  background: #fbfcfe;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.platform-card:hover { border-color: var(--primary); }
.platform-name {
  font-size: 13px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.platform-count { font-size: 26px; font-weight: 700; margin-top: 4px; }
.platform-action { margin-top: 4px; }

/* Filters - multi-select dropdowns */
.filters {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 14px;
  align-items: flex-start;
}
.filter-multi {
  position: relative;
}
.filter-multi > .filter-toggle {
  cursor: pointer;
  list-style: none;
  padding: 8px 28px 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fafbfd;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
}
.filter-multi > .filter-toggle::-webkit-details-marker { display: none; }
.filter-multi > .filter-toggle::after {
  content: "";
  position: absolute;
  right: 10px; top: 50%;
  width: 8px; height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-75%) rotate(45deg);
}
.filter-multi[open] > .filter-toggle::after { transform: translateY(-25%) rotate(225deg); }
.filter-multi[open] > .filter-toggle {
  border-color: var(--primary);
  background: white;
}
.filter-options {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 50;
  min-width: 220px;
  max-width: 320px;
  max-height: 320px;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 6px 0;
}
.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.filter-option:hover { background: #f1f5fb; }
.filter-option input[type="checkbox"] { cursor: pointer; }
.filter-option-all { font-weight: 600; }
.filter-option-empty { opacity: 0.45; }
.filter-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}
.filter-actions {
  display: flex; gap: 6px;
  margin-left: auto;
}
.filter-apply, .filter-clear {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 10px;
}

.search {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px; font-size: 14px;
  background: #fafbfd;
  min-width: 200px;
}

.table-wrap {
  overflow-x: auto; overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  max-height: 540px;
}
#dataTable { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); }
#dataTable thead th {
  background: #f1f5fb; color: var(--text);
  text-align: left; padding: 10px 12px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0;
  white-space: nowrap;
}
#dataTable tbody td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
#dataTable tbody tr:last-child td { border-bottom: 0; }
#dataTable tbody tr:hover { background: #f8fafc; }

.foot {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 12px 28px;
  display: flex; justify-content: space-between;
  font-size: 12.5px; color: var(--muted);
  margin-top: auto;
}

@media (max-width: 640px) {
  .topbar, .foot, .dashboard { padding-left: 16px; padding-right: 16px; }
  .kpi-value, .platform-count { font-size: 22px; }
}

/* Sign-up CTA on the login card */
.signup-cta {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}
.signup-cta .btn-signup {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

/* ---- Landing hero (signup as primary CTA) ---- */
.landing {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.hero {
  max-width: 640px;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px 44px;
  text-align: center;
  box-shadow: var(--shadow);
}
.hero-pill {
  display: inline-block;
  padding: 6px 14px;
  background: #e6f1fb;
  color: #1858bd;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}
.hero-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 14px;
  color: var(--text);
}
.hero-sub {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 32px;
}
.btn-mega {
  display: inline-block;
  padding: 18px 40px;
  font-size: 18px;
  font-weight: 700;
  background: #1f6feb;
  color: #fff;
  border: none;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(31, 111, 235, 0.3);
  transition: transform 0.1s, box-shadow 0.1s;
}
.btn-mega:hover {
  background: #1858bd;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(31, 111, 235, 0.4);
}
.btn-mega:active { transform: translateY(0); }
.hero-benefits {
  list-style: none;
  padding: 0;
  margin: 32px 0 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  font-size: 14px;
  color: var(--muted);
}
.hero-benefits li {
  position: relative;
  padding-left: 22px;
}
.hero-benefits li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 16px;
  height: 16px;
  background: #2da44e;
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 5px #2da44e;
}
.hero-signin {
  margin: 24px 0 0;
  font-size: 14px;
  color: var(--muted);
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.hero-signin a {
  color: #1f6feb;
  text-decoration: none;
  font-weight: 600;
  margin-left: 4px;
}
.hero-signin a:hover { text-decoration: underline; }

.link-back {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  padding: 0 0 12px;
  text-align: left;
  display: block;
}
.link-back:hover { color: var(--text); }

@media (max-width: 600px) {
  .hero { padding: 32px 24px; border-radius: 16px; }
  .hero-title { font-size: 24px; }
  .hero-sub { font-size: 15px; }
  .btn-mega { padding: 16px 32px; font-size: 16px; }
}

/* Compact landing -- just the CTA, no marketing copy */
.hero-compact {
  padding: 80px 44px;
}
.hero-compact .btn-mega {
  display: block;
  margin: 0 auto;
  width: fit-content;
}

/* Floating WhatsApp + Email contact bubbles */
.contact-floating {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
}
.contact-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s, box-shadow 0.15s;
}
.contact-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
}
.contact-whatsapp { background: #25D366; }
.contact-email    { background: #1f6feb; }

/* Informational disclaimer banner inside the dashboard */
.banner-info {
  margin: 0 0 16px;
  padding: 14px 18px;
  background: #ddf4ff;
  border: 1px solid #54aeff;
  border-radius: 10px;
  color: #0950b1;
  font-size: 14px;
  line-height: 1.5;
}
.banner-info strong { font-weight: 700; }

/* Two-card landing layout: Sign up (left) + Sign in (right) */
.landing { padding: 40px 20px; }
.hero-title {
  text-align: center;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.3;
  max-width: 800px;
  margin: 0 auto 36px;
  color: var(--text);
}
.landing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  max-width: 980px;
  margin: 0 auto;
}
.landing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px 30px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}
.card-pill {
  display: inline-block;
  padding: 5px 13px;
  background: #e6f1fb;
  color: #1858bd;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  align-self: flex-start;
  margin-bottom: 14px;
}
.card-pill-alt {
  background: #ecfdf3;
  color: #027a48;
}
.card-h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text);
}
.card-sub {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 22px;
  line-height: 1.5;
}
.btn-mega-alt {
  background: #ffffff;
  color: #1f6feb;
  border: 2px solid #1f6feb;
  box-shadow: none;
}
.btn-mega-alt:hover {
  background: #1f6feb;
  color: #ffffff;
}
.card-benefits {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.card-benefits li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 7px;
  line-height: 1.4;
}
.card-benefits li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 14px;
  height: 14px;
  background: #2da44e;
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 4px #2da44e;
}

@media (max-width: 720px) {
  .landing-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 22px; }
  .landing-card { padding: 26px 22px; border-radius: 14px; }
}

/* Wallet chip in dashboard topbar */
.wallet-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #ecfdf3;
  color: #027a48;
  border: 1px solid #abefc6;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
