:root {
  --primary:      #4f46e5;
  --primary-dark: #4338ca;
  --gray-200:     #e5e7eb;
  --gray-300:     #d1d5db;
  --gray-600:     #4b5563;
  --radius-lg:    12px;
  --spacing:      16px;
  --transition:   0.2s ease;
}

/* ── Form Card Container ───────────────────────────────────────────── */
.cpn-form-card,
.form-card
{
  background: rgba(255,255,255,0.02) !important;
  border: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(6px);
  border-radius: var(--radius-lg);
  box-shadow: none;
  padding: calc(var(--spacing) * 1.5);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  grid-gap: var(--spacing);
  margin-top: var(--spacing);
}

/* ── Form Groups ─────────────────────────────────────────────────── */
.cpn-form-card .form-group {
  display: flex;
  flex-direction: column;
}
.cpn-form-card .form-group.full {
  grid-column: 1 / -1;
}
.cpn-form-card .form-group label {
  font-size: 0.85rem;
  color: var(--gray-600);
  margin-bottom: 4px;
}

/* ── Inputs & Selects ─────────────────────────────────────────────── */
.cpn-form-card input,
.cpn-form-card select {
  padding: 10px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  background: transparent;
  color: inherit;
  transition: border-color var(--transition);
}
.cpn-form-card input:focus,
.cpn-form-card select:focus {
  outline: none;
  border-color: var(--primary);
}

/* Transparent input surfaces across tools */
input,
select,
textarea {
  background: transparent;
  color: inherit;
}

input::placeholder,
textarea::placeholder {
  color: inherit;
  opacity: 0.7;
}

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-lg);
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* full‑width within grid */
.btn.full {
  width: 100%;
}

/* smaller “verify” style */
.btn.verify {
  background: var(--gray-200);
  color: var(--gray-600);
  padding: 8px 12px;
  margin-left: 8px;
}
.btn.verify:hover {
  background: var(--gray-300);
}

/* pairing controls on one row */
.row {
  display: flex;
  align-items: center;
}
.row > .btn {
  margin-right: 12px;
}

/* ── Tool Description ─────────────────────────────────────────────── */
.tool-description {
  grid-column: 1 / -1;
  margin: var(--spacing) 0;
  color: var(--gray-600);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
}
/* ── Add Now Button (consistent size across app) ─────────────────── */
.add-now-btn{
  background:#1e40af !important;
  color:#ffffff !important;
  border:none;
  padding:10px 16px;
  border-radius:8px;
  font-weight:700;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  line-height:1;
}
.add-now-btn:visited,
.add-now-btn:active,
.add-now-btn:focus{
  background:#1e40af !important;
  color:#ffffff !important;
  outline:none;
}
.add-now-btn:hover{
  background:#1d4ed8;
}
/* ── App Description Cards ────────────────────────────────────────── */
.app-description{
  background:rgba(15, 23, 42, 0.6);
  border:1px solid rgba(148, 163, 184, 0.8);
  outline:1px solid rgba(148, 163, 184, 0.35);
  outline-offset:0;
  border-radius:14px;
  box-shadow:0 6px 16px rgba(15, 23, 42, 0.25);
  padding:24px;
  color:#e5e7eb;
}
.app-description h3,
.app-description h4{
  color:#f8fafc;
}
.app-description p,
.app-description li,
.app-description span{
  color:#e5e7eb;
}
.app-description strong{
  color:#f8fafc;
}
.app-description a{
  color:#93c5fd;
  text-decoration:none;
}
/* ── Engine Card (shared tool description container) ──────────────── */
.engine-card
{
  background: rgba(255,255,255,0.02) !important;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.05);
  color: #ffffff;
  border-radius:14px;
  box-shadow:0 6px 16px rgba(15, 23, 42, 0.25);
  padding:24px;
  margin-bottom:18px;
}
.engine-card-header
{
  color: #ffffff !important;
  font-size: 18px;
  font-weight: 600;
  background: transparent !important;
  opacity: 1 !important;
  visibility: visible !important;
  margin:0 0 10px 0;
}
.engine-card-body{
  color:#e5e7eb;
  line-height:1.6;
}
.engine-card-body p,
.engine-card-body li,
.engine-card-body b,
.engine-card-body i{
  color:#e5e7eb;
}

/* ── Tools Hub Status Cards ──────────────────────────────────────── */
.engine-card
{
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.12);
  color: #ffffff !important;
}

.engine-card.credit-box
{
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-width: 260px;
}

.engine-card,
.credit-box,
[data-credit-box]
{
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.12);
  color: #ffffff !important;
}

.engine-card p,
.engine-card h3,
.credit-box p,
.credit-box h3,
[data-credit-box] p,
[data-credit-box] h3,
#remaining-plan-value
{
  color: #ffffff !important;
}
/* ── Tool Panels: remove light card fills for dark theme consistency ── */
#toolPanel [style*="background:#fff"],
#toolPanel [style*="background:#ffffff"],
#toolPanel [style*="background:#f8fafc"],
#toolPanel [style*="background:#f9fafb"],
#toolPanel [style*="background: #fff"],
#toolPanel [style*="background: #ffffff"],
#toolPanel [style*="background: #f8fafc"],
#toolPanel [style*="background: #f9fafb"],
#toolPanel [style*="background-color:#fff"],
#toolPanel [style*="background-color:#ffffff"],
#toolPanel [style*="background-color:#f8fafc"],
#toolPanel [style*="background-color:#f9fafb"]{
  background: transparent !important;
  color: inherit !important;
}
/* ── Active Glow Input Enhancement ───────────────────────────────── */
.active-glow {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.4) !important;
  transition: box-shadow 0.3s ease;
}
#ghostLabel.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  z-index: -9999 !important;
  pointer-events: none !important;
}
/* ✅ FORCE visibility for all platform selector checkboxes */
input[type="checkbox"].platform-check {
  appearance: auto !important;
  -webkit-appearance: checkbox !important;
  visibility: visible !important;
  opacity: 1 !important;
  display: inline-block !important;
  width: 18px !important;
  height: 18px !important;
  background: #fff !important;
  border: 1px solid #000 !important;
}
/* 🔄 Spinner Style */
.cpn-spinner {
  border: 6px solid #f3f4f6;
  border-top: 6px solid #3b82f6;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}
@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
