﻿:root {
  --bg-gradient: linear-gradient(135deg, #f8d9d7 0%, #f2a78c 45%, #c59ff4 100%);
  --text: #1f1f1f;
  --muted: #4a4a4a;
  --btn-bg: #2f2f2f;
  --btn-hover: #444;
  --btn-ghost: #b8b8b8;
  --border: #d8d8d8;

  --cc-accent: #c59ff4;
  --cc-accent-2: #f2a78c;
  --cc-dark: #242424;

  --cc-btn-default-bg: #242424;
  --cc-btn-default-hover: #2f2f2f;
  --cc-btn-default-text: #ffffff;
  --cc-btn-secondary-bg: #f0f0f0;
  --cc-btn-secondary-hover: #e7e7e7;
  --cc-btn-secondary-text: #000000;
  --cc-btn-secondary-border: #c9c9c9;
  --cc-btn-ghost-bg: #c6ccd1;
  --cc-btn-ghost-border: #b6bdc3;

  --cc-tile-bg: rgba(255, 255, 255, 0.68);
  --cc-tile-border: rgba(0, 0, 0, 0.06);
  --cc-tile-shadow: 0 10px 26px rgba(0, 0, 0, 0.1);
  --cc-tile-label: #475569;
  --cc-tile-value: var(--text);

  --cc-chart-bg: rgba(255, 255, 255, 0.72);
  --cc-chart-border: rgba(0,0,0,0.06);
  --cc-chart-shadow: 0 10px 22px rgba(0,0,0,0.1);

  --cc-agent-card-bg: rgba(255, 255, 255, 0.32);
  --cc-agent-card-border: rgba(0, 0, 0, 0.03);
  --cc-agent-card-shadow: 0 10px 26px rgba(0, 0, 0, 0.1);
  --cc-table-row-odd: rgba(0,0,0,0.015);
  --cc-table-row-even: rgba(255,255,255,0.45);
}

html[data-cc-brand="LT"] {
  /* Lending Tower inspired: soft gray base with subtle green/charcoal “marbling”. */
  --bg-gradient:
    radial-gradient(1100px 650px at 10% 16%, rgba(134, 176, 79, 0.14) 0%, rgba(134, 176, 79, 0.00) 60%),
    radial-gradient(900px 640px at 88% 18%, rgba(47, 58, 61, 0.26) 0%, rgba(47, 58, 61, 0.00) 62%),
    radial-gradient(980px 560px at 48% 92%, rgba(47, 58, 61, 0.18) 0%, rgba(47, 58, 61, 0.00) 60%),
    radial-gradient(900px 520px at 30% 76%, rgba(184, 215, 124, 0.12) 0%, rgba(184, 215, 124, 0.00) 58%),
    linear-gradient(135deg, #eef0f2 0%, #e3e7e8 55%, #d8dedc 100%);
  --text: #0f172a;
  --muted: #334155;
  --border: rgba(47, 58, 61, 0.18);

  --cc-accent: #86b04f;
  --cc-accent-2: #b8d77c;
  --cc-dark: #2f3a3d;

  --btn-bg: var(--cc-dark);
  --btn-hover: #3b4548;
  --cc-btn-default-bg: var(--cc-dark);
  --cc-btn-default-hover: #3b4548;
  --cc-btn-default-text: #ffffff;
  --cc-btn-secondary-bg: rgba(255,255,255,0.86);
  --cc-btn-secondary-hover: rgba(255,255,255,0.95);
  --cc-btn-secondary-text: #1f2937;
  --cc-btn-secondary-border: rgba(47, 58, 61, 0.22);
  --cc-btn-ghost-bg: rgba(47, 58, 61, 0.28);
  --cc-btn-ghost-border: rgba(47, 58, 61, 0.22);

  --cc-tile-bg: var(--cc-dark);
  --cc-tile-border: rgba(0,0,0,0.08);
  --cc-tile-shadow: 0 12px 26px rgba(0,0,0,0.14);
  --cc-tile-label: rgba(255,255,255,0.92);
  --cc-tile-value: var(--cc-accent-2);

  --cc-chart-bg: rgba(255,255,255,0.84);
  --cc-chart-border: rgba(47, 58, 61, 0.14);
  --cc-chart-shadow: 0 12px 28px rgba(0,0,0,0.12);

  --cc-agent-card-bg: rgba(255, 255, 255, 0.62);
  --cc-agent-card-border: rgba(47, 58, 61, 0.14);
  --cc-agent-card-shadow: 0 12px 30px rgba(0,0,0,0.12);
  --cc-table-row-odd: rgba(0,0,0,0.02);
  --cc-table-row-even: rgba(184, 215, 124, 0.18);
}

html[data-cc-brand="LDR"] {
  /* Liberty Debt Relief inspired (light sky + brand blue + navy) */
  --bg-gradient:
    radial-gradient(1100px 650px at 12% 16%, rgba(47, 146, 209, 0.14) 0%, rgba(47, 146, 209, 0.00) 60%),
    radial-gradient(900px 640px at 88% 18%, rgba(11, 42, 68, 0.20) 0%, rgba(11, 42, 68, 0.00) 62%),
    radial-gradient(980px 560px at 52% 92%, rgba(15, 76, 129, 0.14) 0%, rgba(15, 76, 129, 0.00) 60%),
    linear-gradient(135deg, #eef2f5 0%, #e5ebef 55%, #dde5ea 100%);
  --text: #0f253d;
  --muted: #35516a;
  --border: rgba(15, 37, 61, 0.16);

  --cc-accent: #2f92d1;
  --cc-accent-2: #0f4c81;
  --cc-dark: #0b2a44;

  --btn-bg: var(--cc-accent);
  --btn-hover: #2a82bc;
  --cc-btn-default-bg: var(--cc-accent);
  --cc-btn-default-hover: #2a82bc;
  --cc-btn-default-text: #ffffff;
  --cc-btn-secondary-bg: rgba(255,255,255,0.92);
  --cc-btn-secondary-hover: rgba(255,255,255,0.98);
  --cc-btn-secondary-text: var(--cc-dark);
  --cc-btn-secondary-border: rgba(47, 146, 209, 0.28);
  --cc-btn-ghost-bg: rgba(47, 146, 209, 0.25);
  --cc-btn-ghost-border: rgba(47, 146, 209, 0.22);

  --cc-tile-bg: rgba(255, 255, 255, 0.92);
  --cc-tile-border: rgba(47, 146, 209, 0.18);
  --cc-tile-shadow: 0 12px 26px rgba(15, 37, 61, 0.12);
  --cc-tile-label: rgba(15, 37, 61, 0.72);
  --cc-tile-value: var(--cc-dark);

  --cc-chart-bg: rgba(255, 255, 255, 0.92);
  --cc-chart-border: rgba(47, 146, 209, 0.18);
  --cc-chart-shadow: 0 12px 28px rgba(15, 37, 61, 0.12);

  --cc-agent-card-bg: rgba(255, 255, 255, 0.75);
  --cc-agent-card-border: rgba(47, 146, 209, 0.14);
  --cc-agent-card-shadow: 0 12px 30px rgba(15, 37, 61, 0.12);
  --cc-table-row-odd: rgba(47, 146, 209, 0.06);
  --cc-table-row-even: rgba(255, 255, 255, 0.5);
}

html[data-cc-brand="PLAW"] {
  /* Progress Law inspired (soft seafoam + deep teal) */
  --bg-gradient:
    radial-gradient(1100px 650px at 12% 16%, rgba(63, 119, 118, 0.14) 0%, rgba(63, 119, 118, 0.00) 60%),
    radial-gradient(900px 640px at 88% 18%, rgba(18, 59, 58, 0.18) 0%, rgba(18, 59, 58, 0.00) 62%),
    radial-gradient(980px 560px at 52% 92%, rgba(43, 95, 94, 0.14) 0%, rgba(43, 95, 94, 0.00) 60%),
    linear-gradient(135deg, #eef1f2 0%, #e2e8e7 55%, #d7e0df 100%);
  --text: #0f2433;
  --muted: #425e6d;
  --border: rgba(15, 36, 51, 0.14);

  --cc-accent: #3f7776;
  --cc-accent-2: #2b5f5e;
  --cc-dark: #123b3a;

  --btn-bg: var(--cc-accent);
  --btn-hover: #376b6a;
  --cc-btn-default-bg: var(--cc-accent);
  --cc-btn-default-hover: #376b6a;
  --cc-btn-default-text: #ffffff;
  --cc-btn-secondary-bg: rgba(255,255,255,0.92);
  --cc-btn-secondary-hover: rgba(255,255,255,0.98);
  --cc-btn-secondary-text: var(--cc-dark);
  --cc-btn-secondary-border: rgba(63, 119, 118, 0.28);
  --cc-btn-ghost-bg: rgba(63, 119, 118, 0.22);
  --cc-btn-ghost-border: rgba(63, 119, 118, 0.22);

  --cc-tile-bg: rgba(255, 255, 255, 0.92);
  --cc-tile-border: rgba(63, 119, 118, 0.18);
  --cc-tile-shadow: 0 12px 26px rgba(15, 36, 51, 0.12);
  --cc-tile-label: rgba(15, 36, 51, 0.72);
  --cc-tile-value: var(--cc-dark);

  --cc-chart-bg: rgba(255, 255, 255, 0.92);
  --cc-chart-border: rgba(63, 119, 118, 0.18);
  --cc-chart-shadow: 0 12px 28px rgba(15, 36, 51, 0.12);

  --cc-agent-card-bg: rgba(255, 255, 255, 0.72);
  --cc-agent-card-border: rgba(63, 119, 118, 0.14);
  --cc-agent-card-shadow: 0 12px 30px rgba(15, 36, 51, 0.12);
  --cc-table-row-odd: rgba(63, 119, 118, 0.06);
  --cc-table-row-even: rgba(255, 255, 255, 0.5);
}
* {
  box-sizing: border-box;
}

body, html {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--bg-gradient);
  color: var(--text);
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 80px;
  padding: 60px 40px;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.brand img {
  width: 240px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.18));
  opacity: 0;
  transform: translateY(-3px);
  animation: ccLogoIn 180ms ease-out forwards;
}

/* Prevent flashing the default FF logo before brand swapping runs on authenticated pages. */
html:not(.cc-auth-ready) body.cc-protected .brand img {
  opacity: 0 !important;
  animation: none !important;
}
html.cc-auth-ready body.cc-protected .brand img {
  opacity: 0;
  transform: translateY(-3px);
  animation: ccLogoIn 180ms ease-out forwards;
}
html:not(.cc-auth-ready) body.cc-protected .cc-loader-center-logo {
  opacity: 0 !important;
}

.brand a {
  display: inline-flex;
  text-decoration: none;
}

.brand .title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.4px;
}

html:not(.cc-auth-ready) .button-stack a.btn {
  opacity: 0;
  transform: translateY(10px);
  filter: blur(3px);
  pointer-events: none;
}
html.cc-auth-ready .button-stack a.btn {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
  transition: opacity 420ms ease, transform 420ms ease, filter 420ms ease;
  transition-delay: 90ms;
}

.button-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 230px;
  position: relative;
}

.cc-skeleton-stack {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  opacity: 1;
  transition: opacity 220ms ease;
}
html.cc-auth-ready .cc-skeleton-stack {
  opacity: 0;
}
.cc-skeleton-item {
  height: 42px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(0, 0, 0, 0.08);
  overflow: hidden;
  position: relative;
}
.cc-skeleton-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: translateX(-100%);
  animation: ccShimmer 1.1s ease-in-out infinite;
}
@keyframes ccShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes ccLogoIn {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand img {
    animation: none;
    opacity: 1;
    transform: none;
  }
  html.cc-auth-ready .button-stack a.btn { transition: none; }
  .cc-skeleton-item::after { animation: none; }
}

.cc-toast-container {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  z-index: 2000;
  padding: 0 14px;
}
.cc-toast {
  pointer-events: auto;
  width: min(680px, 100%);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-radius: 10px;
  padding: 12px 12px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 220ms ease, transform 220ms ease;
}
.cc-toast.show {
  opacity: 1;
  transform: translateY(0);
}
.cc-toast.hide {
  opacity: 0;
  transform: translateY(10px);
}
.cc-toast.success {
  background: rgba(20, 120, 55, 0.92);
  color: #fff;
}
.cc-toast.error {
  background: rgba(165, 20, 20, 0.92);
  color: #fff;
}
.cc-toast .cc-toast-msg {
  flex: 1;
  font-weight: 650;
  line-height: 1.25;
  white-space: pre-wrap;
}
.cc-toast .cc-toast-close {
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 18px;
  line-height: 18px;
  padding: 2px 6px;
  border-radius: 8px;
}
.cc-toast .cc-toast-close:hover {
  background: rgba(255, 255, 255, 0.16);
}

@media (prefers-reduced-motion: reduce) {
  .cc-toast {
    transition: none;
    opacity: 1;
    transform: none;
  }
}

.view-as-panel {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  padding: 12px 12px;
  margin-bottom: 14px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
}
.view-as-header {
  font-weight: 700;
  margin-bottom: 8px;
}
.view-as-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 18px 18px;
  margin: 16px 0;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
}
.section-title {
  margin: 0 0 10px;
  font-size: 18px;
}
.muted {
  color: var(--muted);
  margin: 6px 0 0;
}
.error {
  color: #a00000;
  font-weight: 600;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.form-grid-2 {
  grid-template-columns: 1fr 1fr;
}
.form-row {
  display: grid;
  gap: 6px;
}
.input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 4px;
  border: 1px solid #c9c9c9;
  font-size: 14px;
}
.input:disabled {
  background: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.55);
  cursor: not-allowed;
}
select.input[multiple] {
  height: auto;
  min-height: 140px;
}

.cc-multidrop {
  position: relative;
}

.cc-multidrop-btn {
  width: 100%;
  text-align: left;
  cursor: pointer;
  user-select: none;
}

.cc-multidrop.open .cc-multidrop-btn {
  outline: 2px solid rgba(0, 0, 0, 0.12);
}

.cc-multidrop-menu {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  max-height: 240px;
  overflow: auto;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
}

.cc-multidrop.open .cc-multidrop-menu {
  display: block;
}

.cc-multidrop-search {
  position: sticky;
  top: 0;
  background: #fff;
  padding: 4px 4px 8px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  z-index: 1;
}

.cc-multidrop-list {
  display: grid;
  gap: 2px;
}

.cc-multidrop-no-results {
  padding: 6px 8px;
  font-size: 12px;
  color: var(--muted);
}

.cc-multidrop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 8px;
}

.cc-multidrop-item:hover {
  background: rgba(0, 0, 0, 0.04);
}

.cc-multidrop-item input[type='checkbox'] {
  width: 16px;
  height: 16px;
}

.cc-multidrop-item.disabled {
  opacity: 0.6;
}

.cc-multidrop-note {
  margin-left: auto;
  opacity: 0.75;
  font-size: 12px;
  white-space: nowrap;
}

.cc-multidrop-unassign {
  margin-left: 8px;
  border: 0;
  background: none;
  color: #1f2937;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.cc-multidrop-unassign:hover {
  text-decoration: underline;
}

.cc-members-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.12);
  font-weight: 700;
  font-size: 12px;
  cursor: default;
  user-select: none;
}

.cc-members-count:hover,
.cc-members-count:focus-visible {
  background: rgba(0, 0, 0, 0.09);
  outline: none;
}

.cc-hovercard {
  position: fixed;
  z-index: 2500;
  max-width: 380px;
  max-height: 320px;
  overflow: auto;
  display: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 120ms ease, transform 120ms ease;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 12px;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.18);
  padding: 10px 12px;
  font-size: 13px;
  white-space: pre-line;
}

.cc-hovercard.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.cc-admin-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: 280px;
  background: rgba(255, 255, 255, 0.92);
  border-right: 1px solid rgba(0, 0, 0, 0.12);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  padding: 10px 10px;
  transition: width 0.18s ease;
}
.cc-admin-sidebar.collapsed {
  width: 0;
  padding: 0;
  background: transparent;
  border-right: 0;
  box-shadow: none;
}
.cc-admin-sidebar .cc-sidebar-top {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
}
.cc-admin-sidebar.collapsed .cc-sidebar-top {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 1001;
}
.cc-admin-sidebar .cc-sidebar-title {
  font-weight: 800;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cc-admin-sidebar.collapsed .cc-sidebar-title {
  display: none;
}
.cc-admin-sidebar .cc-sidebar-toggle {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.cc-admin-sidebar .cc-hamburger {
  width: 18px;
  display: grid;
  gap: 4px;
}
.cc-admin-sidebar .cc-hamburger span {
  height: 2px;
  background: #1f1f1f;
  border-radius: 2px;
  display: block;
}
.cc-admin-sidebar .cc-sidebar-content {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}
.cc-admin-sidebar.collapsed .cc-sidebar-content {
  display: none;
}
.cc-admin-sidebar .cc-sidebar-card {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  padding: 10px 10px;
}
.cc-admin-sidebar .cc-sidebar-kv {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}
.cc-admin-sidebar .cc-sidebar-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}
.cc-admin-sidebar .cc-sidebar-check input {
  margin: 0;
}

body.cc-has-admin-sidebar {
  padding-left: 280px;
  transition: padding-left 0.18s ease;
}
body.cc-has-admin-sidebar.cc-admin-sidebar-collapsed {
  padding-left: 0;
}

@media (max-width: 900px) {
  body.cc-has-admin-sidebar,
  body.cc-has-admin-sidebar.cc-admin-sidebar-collapsed {
    padding-left: 0;
  }
  .cc-admin-sidebar {
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.14);
  }
}
.table-wrap {
  width: 100%;
  overflow: auto;
  margin-top: 12px;
}
.table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.55);
}
.table th,
.table td {
  padding: 10px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  text-align: left;
  vertical-align: top;
}
.actions-cell {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  display: block;
  width: 100%;
  background: var(--cc-btn-default-bg);
  color: var(--cc-btn-default-text);
  text-decoration: none;
  padding: 11px 18px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  touch-action: manipulation;
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.1px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.16);
  transition: background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.btn:hover {
  background: var(--cc-btn-default-hover);
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

.btn:active {
  transform: translateY(0);
}

.btn:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.btn.primary {
  background: var(--btn-bg);
}

.btn.secondary {
  background: var(--cc-btn-secondary-bg);
  color: var(--cc-btn-secondary-text);
  border: 1px solid var(--cc-btn-secondary-border);
}
.btn.secondary:hover { background: var(--cc-btn-secondary-hover); }
.btn.compact {
  padding: 6px 10px;
  font-size: 13px;
  min-width: auto;
  width: auto;
}

.btn.ghost {
  background: var(--cc-btn-ghost-bg);
  color: #fff;
  border: 1px solid var(--cc-btn-ghost-border);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.btn.ghost.is-ready {
  background: var(--btn-bg);
  border-color: var(--btn-bg);
  color: #fff;
}

.btn.ghost.is-ready:hover {
  filter: brightness(1.05);
}

.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.tool-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 60px;
  width: 100%;
  position: relative;
}

.tool-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.tool-header .brand {
  grid-column: 1;
  justify-self: start;
}

.tool-header .brand img {
  width: 140px;
}

.tool-header .tool-title {
  grid-column: 2;
  justify-self: center;
  text-align: center;
}

/* POA Generator */
.poa-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 60px;
  width: 100%;
}

.poa-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 36px;
  align-items: start;
}

.poa-title {
  margin: 0 0 14px;
  font-size: 32px;
  text-align: center;
}

.poa-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 8px 6px 10px;
}

.poa-card h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.poa-card label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  text-align: center;
}

.poa-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #a4a4a4;
  font-size: 15px;
  text-align: center;
}

.poa-subtitle {
  text-align: center;
  margin: 16px 0 12px;
  font-weight: 600;
}

.poa-status {
  text-align: center;
  margin: 12px 0 14px;
  font-weight: 600;
  color: var(--muted);
}

.poa-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.poa-actions .btn {
  border-radius: 0;
  box-shadow: none;
}

.poa-download {
  background: #b8b8b8;
  color: #fff;
}

.poa-footer-row {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.poa-footer-row input {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid #ccc;
  background: #f7f7f7;
}

.poa-bulk-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 8px 6px 10px;
  text-align: center;
}

.poa-bulk-card h3 {
  margin: 0 0 16px;
  font-size: 26px;
  text-align: center;
}

.poa-bulk-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.poa-bulk-actions .btn {
  width: 180px;
  border-radius: 0;
  box-shadow: none;
}

.poa-notes {
  margin: 16px auto 0;
  font-size: 13px;
  line-height: 1.55;
  text-align: left;
  max-width: 260px;
  align-self: center;
}

.poa-notes ul {
  margin: 8px 0 0 18px;
}

.file-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 220px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  background: #f9f9f9;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.07);
  margin: 0 auto;
}

.file-picker input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-picker .label {
  font-weight: 600;
  color: #4a4a4a;
}

.file-picker .plus {
  font-size: 20px;
  font-weight: 700;
  color: #4a4a4a;
}

.upload-form .btn {
  width: auto;
  min-width: 180px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.actions-row .btn {
  width: auto;
  min-width: 160px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.status-display {
  display: block;
  text-align: center;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 10px;
  white-space: pre-line;
}

.progress-shell {
  width: min(620px, 100%);
  height: 10px;
  border-radius: 999px;
  background: #e6e6e6;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--btn-bg);
  transition: width 0.25s ease;
}

.progress-bar.is-indeterminate {
  width: 100%;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(255, 255, 255, 0.35) 40%,
    rgba(0, 0, 0, 0) 80%
  ), var(--btn-bg);
  background-size: 200% 100%;
  animation: progress-sheen 1.2s linear infinite;
}

@keyframes progress-sheen {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Payroll */
.payroll-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.payroll-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 14px 0 10px;
}

.payroll-downloads {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.payroll-downloads .btn {
  width: auto;
  min-width: 220px;
  max-width: 280px;
}

.payroll-total {
  text-align: right;
  padding: 10px 6px 0;
  font-weight: 700;
  font-size: 14px;
}

/* CSV Cleaner */
.cleaner-layout {
  max-width: 920px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.cleaner-card {
  margin-top: 16px;
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.12);
  padding: 20px 20px 24px;
  text-align: center;
}

.cleaner-card h3 {
  margin: 0 0 6px;
}

.cleaner-card p {
  margin: 0 0 14px;
  color: var(--muted);
}

.cleaner-upload {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.cleaner-upload .file-picker {
  min-width: 220px;
  margin: 0;
}

/* Dashboards (iframe shells) */
.dashboard-layout {
  width: 85vw;
  max-width: 1600px;
  margin: 0 auto;
  padding: 20px 12px 40px;
}

.tiles-row {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 12px;
  align-items: stretch;
  margin-bottom: 18px;
}

.dashboard-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.dashboard-top .brand {
  margin-right: 10px;
}

.dashboard-top .brand img {
  width: 90px; /* smaller logo on non-nav pages */
}

.dashboard-top .tool-title {
  text-align: center;
}

.dash-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-bottom: 14px;
  /* Keep key navigation controls visually above the loader "logo rain" while still allowing the loader behind. */
  position: relative;
  z-index: 5100;
}

.dash-toolbar .btn {
  width: auto;
  padding: 6px 12px;
  min-width: auto;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.dash-toolbar .timestamp {
  color: var(--muted);
  font-size: 14px;
}

.dashboard-frame {
  width: 100%;
  min-height: 1200px;
  border: none;
  border-radius: 18px;
  box-shadow: none;
  overflow: visible;
  background: transparent;
  position: relative;
}

.dashboard-data {
  width: 100%;
  height: 100%;
  padding: 12px;
  overflow: auto;
}

.dashboard-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(248, 217, 215, 0.6), rgba(197, 159, 244, 0.35));
  color: #333;
  text-align: center;
  padding: 16px;
}

/* LDR dashboard data rendering */
.dash-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-bottom: 14px;
  position: relative;
  z-index: 5100;
}

.dash-toolbar .btn {
  width: auto;
  padding: 6px 12px;
  min-width: auto;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 6px;
  width: 100%;
  height: 100%;
  align-content: stretch;
}

.tile-card {
  background: var(--cc-tile-bg);
  border: 1px solid var(--cc-tile-border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--cc-tile-shadow);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tile-label {
  font-size: 13px;
  color: var(--cc-tile-label);
}

.tile-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--cc-tile-value);
}

.status-panel {
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.1);
  max-width: 320px;
  width: 100%;
  min-height: 234px; /* ~10% shorter */
  max-height: 378px; /* ~10% shorter */
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.status-panel h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

#ldr-status {
  overflow-y: auto;
  padding-right: 4px;
  flex: 1;
}

.status-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 4px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 13px;
}

.status-row:last-child {
  border-bottom: none;
}

.status-row:nth-child(odd) {
  background: rgba(0,0,0,0.02);
}
.status-row:nth-child(even) {
  background: rgba(255,255,255,0.35);
}

.historical-block {
  display: none;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

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

.hist-tile {
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}

.hist-tile .label {
  font-size: 13px;
  color: #475569;
}

.hist-tile .value {
  font-size: 26px;
  font-weight: 700;
  margin-top: 4px;
}

.chart-card {
  background: var(--cc-chart-bg);
  border: 1px solid var(--cc-chart-border);
  border-radius: 14px;
  box-shadow: var(--cc-chart-shadow);
  padding: 12px 12px 16px;
}

.chart-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.chart-select label,
.chart-type label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}

.chart-type input,
.chart-select input {
  cursor: pointer;
}

.chart-title {
  margin: 4px 0 8px;
  font-size: 16px;
}

.chart-canvas-wrap {
  width: 100%;
  overflow-x: auto;
}

.chart-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
  font-size: 12px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: inline-block;
}

.agent-card {
  margin-top: 4px;
  background: var(--cc-agent-card-bg);
  border: 1px solid var(--cc-agent-card-border);
  border-radius: 14px;
  box-shadow: var(--cc-agent-card-shadow);
  padding: 14px;
}

.agent-card h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.agent-card tbody tr:nth-child(odd) {
  background: var(--cc-table-row-odd);
}
.agent-card tbody tr:nth-child(even) {
  background: var(--cc-table-row-even);
}

.historical-mode #ldr-live-row {
  display: none;
}

.historical-mode .status-panel {
  display: none;
}

.historical-mode .tiles-row {
  margin-bottom: 0;
}

.historical-mode #ldr-historical {
  display: grid;
}

.loader-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: radial-gradient(800px 500px at 50% 0%, rgba(255,255,255,0.7), rgba(255,255,255,0.4));
  color: #1f1f1f;
  justify-content: center;
  align-items: flex-start;
  z-index: 5000;
  overflow: hidden;
}

.loader-overlay.active {
  display: flex;
}

.cc-page-loader {
  position: fixed;
  inset: 0;
  z-index: 5000;
}

.cc-page-loader.active {
  align-items: flex-start;
  justify-content: center;
}

.cc-loader-center-logo {
  position: absolute;
  left: 50%;
  top: 42vh;
  transform: translate(-50%, -50%);
  width: 180px;
  height: auto;
  opacity: 0.18;
  z-index: 2;
  pointer-events: none;
}

.cc-loader-text {
  margin-top: 25vh;
  position: relative;
  z-index: 3;
  font-weight: 800;
  letter-spacing: 0.2px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.14);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
}

.logo-drop {
  position: absolute;
  top: -40px;
  width: 26px;
  height: auto;
  animation: logoFall linear infinite;
  opacity: 0.8;
  z-index: 1;
  pointer-events: none;
}

@keyframes logoFall {
  to {
    transform: translateY(120vh);
    opacity: 0.1;
  }
}
.error-banner {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #ffecec;
  color: #b91c1c;
  border: 1px solid #fecaca;
  display: none;
}

.error-banner.active {
  display: block;
}

/* Trigger tables */
.trigger-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.trigger-section {
  margin-top: 28px;
}

.trigger-section h2 {
  margin: 0 0 2px;
  font-size: 22px;
  text-align: center;
}

.trigger-section .subdued {
  text-align: center;
  margin: 0 0 6px;
}

.section-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 6px;
}
.section-head .section-text {
  grid-column: 2;
  text-align: center;
}
.section-head h2,
.section-head .subdued {
  text-align: center;
}
.section-toolbar {
  display: flex;
  justify-content: flex-end;
  grid-column: 3;
  margin: 0;
}

.data-card {
  margin-top: 14px;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  position: relative;
}
.glass-card {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
  padding-top: 10px;
}
.glass-card table {
  background: transparent;
}
.glass-card .soft-table th {
  background: #fdf4ed;
  color: #1f1f1f;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.glass-card .soft-table tbody tr:nth-child(odd) {
  background: transparent;
}
.glass-card .soft-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.45);
}
.glass-card .soft-table td {
  color: #1f1f1f;
}
.card-toolbar {
  display: flex;
  justify-content: flex-end;
  position: absolute;
  top: -14px;
  right: 10px;
  padding: 0;
  z-index: 2;
}
.section-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-top: -2px;
  margin-bottom: 4px;
}
.glass-card .table-wrap {
  margin-top: 8px;
}

.data-card table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

.data-card th {
  background: #111;
  color: #fff;
  padding: 12px 12px;
  font-size: 14px;
  font-weight: 700;
  border-bottom: 1px solid #e6e6e6;
  text-align: left;
}

.data-card td {
  padding: 11px 12px;
  font-size: 14px;
  border-bottom: 1px solid #f1f1f1;
}

.data-card tbody tr:nth-child(odd) {
  background: #fafafa;
}

.data-card tbody tr:nth-child(even) {
  background: #ffffff;
}

.data-card .table-empty {
  padding: 14px;
  text-align: center;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
}

@media (max-width: 900px) {
  .poa-grid {
    grid-template-columns: 1fr;
  }
}

.tool-header h1 {
  margin: 0;
  font-size: 36px;
}

.tool-header p {
  margin: 4px 0 0;
  color: var(--muted);
}

.integration-banner {
  margin-bottom: 6px;
}

.integration-banner-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.integration-banner-buttons .btn {
  width: auto;
  min-width: 180px;
}

.integration-banner-buttons .btn.is-active {
  background: var(--cc-btn-default-bg);
  color: var(--cc-btn-default-text);
  border-color: var(--cc-btn-default-bg);
}

.integration-panel[hidden] {
  display: none !important;
}

.cdp-table-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.cdp-table-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(63, 119, 118, 0.24);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
}

.cdp-table-panel--full {
  grid-column: 1 / -1;
}

.cdp-table-panel .table-wrap {
  margin-top: 8px;
  overflow-x: hidden;
}

.cdp-table {
  table-layout: fixed;
}

.cdp-table th,
.cdp-table td {
  overflow-wrap: anywhere;
}

.cdp-table th:first-child,
.cdp-table td:first-child {
  width: 38%;
  max-width: 220px;
}

@media (max-width: 1100px) {
  .cdp-table-grid {
    grid-template-columns: 1fr;
  }
}

.upload-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 16px 0 24px;
}

.actions-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.table-wrapper {
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow-x: auto;
}

.table-wrapper.scrubs-preview {
  max-height: 70vh;
  overflow: auto;
}

.table-wrapper.scrubs-preview th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.table-wrapper.scrubs-preview tbody tr:nth-child(odd) {
  background: var(--cc-table-row-odd);
}

.table-wrapper.scrubs-preview tbody tr:nth-child(even) {
  background: var(--cc-table-row-even);
}

.status-card table tbody tr:nth-child(odd) {
  background: var(--cc-table-row-odd);
}

.status-card table tbody tr:nth-child(even) {
  background: var(--cc-table-row-even);
}

.table-placeholder {
  text-align: center;
  color: var(--muted);
  padding: 12px;
}

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

th,
td {
  padding: 10px 8px;
  font-size: 14px;
  border-bottom: 1px solid #e6e6e6;
  text-align: left;
}

th {
  background: #efefef;
  font-weight: 700;
}

#agent-head th {
  cursor: pointer;
}

.table-empty {
  text-align: center;
  padding: 14px;
  color: var(--muted);
  font-size: 13px;
}

.status-card {
  margin: 46px auto 0;
  text-align: center;
  max-width: 1100px;
  width: 100%;
  padding-bottom: 24px;
}

.status-card .table-wrapper {
  max-height: 70vh;
  overflow: auto;
}

.status-card h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

.status-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.subdued {
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 900px) {
  .main-hero {
    flex-direction: column;
    gap: 32px;
    text-align: center;
  }

  .tool-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .tool-header .brand {
    align-items: flex-start;
  }
}

/* Responsive tiles for smaller viewports */
@media (max-width: 1200px) {
  .tile-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
  }
  .tile-card {
    padding: 12px;
  }
  .tile-value {
    font-size: 24px;
  }
}

@media (max-width: 900px) {
  .dashboard-layout {
    width: 100%;
    padding: 16px 10px 30px;
  }
  .tiles-row {
    grid-template-columns: 1fr;
  }
  .tile-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
  .tile-value {
    font-size: 22px;
  }
  .tile-label {
    font-size: 12px;
  }
}
