/* ISC Recrutare module styles */

.recrutare-view { max-width: 1400px; margin: 0 auto; padding: 16px; box-sizing: border-box; width: 100%; overflow-x: hidden; }

/* View header */
.view-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.view-header h1 { font-size: 24px; margin: 0; color: #fff; }

/* Page cards */
.page-list { display: flex; flex-direction: column; gap: 8px; }
.page-card { padding: 16px; }
.page-card-header { display: flex; align-items: center; gap: 12px; }
.page-position {
  width: 32px; height: 32px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-weight: 700; font-size: 14px;
  background: rgba(16, 185, 129, 0.15); color: #10b981; flex-shrink: 0;
}
.page-card-info { flex: 1; min-width: 0; }
.page-card-info strong { display: block; color: #fff; font-size: 15px; }
.page-card-info .text-secondary { font-size: 13px; color: rgba(255,255,255,.4); }
.page-card-actions { display: flex; gap: 6px; }

/* Buttons */
.btn-sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.btn-danger { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.2); }
.btn-danger:hover { background: rgba(239, 68, 68, 0.25); }

/* Stats */
.stats-row { display: flex; gap: 16px; flex-wrap: wrap; }
.stat { text-align: center; flex: 1; min-width: 80px; }
.stat-value { display: block; font-size: 28px; font-weight: 700; color: #fff; }
.stat-label { display: block; font-size: 12px; color: rgba(255,255,255,.4); margin-top: 4px; text-transform: uppercase; letter-spacing: .5px; }

/* KPI cards row */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi-card { padding: 16px; text-align: center; }
.kpi-value { font-size: 32px; font-weight: 700; color: #10b981; }
.kpi-label { font-size: 12px; color: rgba(255,255,255,.5); margin-top: 4px; text-transform: uppercase; }

/* Form fields */
.recrutare-form-group { margin-bottom: 16px; }
.recrutare-form-group label { display: block; font-size: 13px; color: rgba(255,255,255,.5); margin-bottom: 6px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.recrutare-form-group input,
.recrutare-form-group textarea,
.recrutare-form-group select {
  width: 100%; padding: 10px 14px; border-radius: 10px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  color: #fff; font-size: 14px; transition: border-color .15s;
}
.recrutare-form-group input:focus,
.recrutare-form-group textarea:focus,
.recrutare-form-group select:focus {
  border-color: #10b981; outline: none;
}
.recrutare-form-group textarea { min-height: 100px; resize: vertical; }

/* Section editor */
.section-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: rgba(255,255,255,.03); border-radius: 10px; margin-bottom: 6px;
}
.section-item-label { flex: 1; font-size: 14px; color: #fff; }
.section-toggle { cursor: pointer; }

/* Benefits editor */
.benefit-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.benefit-row input { flex: 1; }

/* Preview iframe */
.funnel-preview { border-radius: 12px; border: 1px solid rgba(255,255,255,.08); overflow: hidden; }
.funnel-preview iframe { width: 100%; height: 600px; border: none; background: #fff; }

/* Leads table */
.leads-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.leads-table th {
  text-align: left; padding: 10px 12px; font-size: 11px;
  text-transform: uppercase; letter-spacing: .5px;
  color: rgba(255,255,255,.4); border-bottom: 1px solid rgba(255,255,255,.08);
}
.leads-table td { padding: 10px 12px; color: rgba(255,255,255,.7); border-bottom: 1px solid rgba(255,255,255,.04); }
.leads-table tr:hover td { background: rgba(255,255,255,.02); }

/* Period selector */
.period-selector { display: flex; gap: 6px; margin-bottom: 16px; }
.period-btn {
  padding: 6px 14px; border-radius: 20px; border: 1px solid rgba(255,255,255,.1);
  background: transparent; color: rgba(255,255,255,.5); font-size: 13px; cursor: pointer;
}
.period-btn.active { background: rgba(16, 185, 129, 0.15); color: #10b981; border-color: rgba(16, 185, 129, 0.3); }

/* Email step cards */
.email-step-card {
  padding: 16px; margin-bottom: 12px; border-left: 3px solid #10b981;
}
.email-step-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.email-step-number {
  width: 28px; height: 28px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
  background: rgba(16, 185, 129, 0.15); color: #10b981;
}

/* Color picker */
.color-swatch-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.color-swatch {
  width: 36px; height: 36px; border-radius: 8px; cursor: pointer;
  border: 2px solid transparent; transition: border-color .15s;
}
.color-swatch.active, .color-swatch:hover { border-color: #fff; }

/* Domain status */
.domain-status { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; font-size: 14px; }
.domain-status.pending { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.domain-status.verified { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.domain-status.error { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

/* Two-column layout for desktop funnel editor */
@media (min-width: 1024px) {
  .funnel-editor-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .funnel-editor-form { max-height: calc(100vh - 120px); overflow-y: auto; }
  .funnel-preview { position: sticky; top: 20px; }
}

/* Module pills */
.module-pills { display: flex; gap: 8px; margin: 16px 0; flex-wrap: wrap; }
.module-pill {
  padding: 8px 16px; border-radius: 20px; border: 1.5px solid var(--pill-color, #6366f1);
  background: transparent; color: rgba(255,255,255,.8); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .2s; display: flex; align-items: center; gap: 6px;
}
.module-pill:hover { background: color-mix(in srgb, var(--pill-color) 15%, transparent); }
.module-pill.active {
  background: color-mix(in srgb, var(--pill-color) 20%, transparent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--pill-color) 30%, transparent);
}
.module-pill.locked { opacity: .45; cursor: default; border-style: dashed; }

/* Design view - two column layout */
.design-layout { display: grid; grid-template-columns: 1fr 380px; gap: 24px; align-items: start; }
.design-controls { display: flex; flex-direction: column; gap: 16px; }
.design-preview-wrap { position: sticky; top: 80px; }
.design-preview-frame {
  background: #111;
  border: 2px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  padding: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.design-preview-frame iframe {
  width: 100%;
  height: 600px;
  border: 0;
  border-radius: 16px;
  background: #000;
}
.design-preview-actions {
  display: flex; justify-content: center; gap: 8px; margin-top: 12px;
}
.design-preview-actions button {
  padding: 6px 16px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.6);
  font-size: 12px; cursor: pointer; transition: all 0.15s;
}
.design-preview-actions button:hover { background: rgba(255,255,255,0.08); color: #fff; }

/* Theme grid */
.theme-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.theme-card {
  cursor: pointer; border-radius: 10px; padding: 10px 6px; text-align: center;
  border: 2px solid transparent; transition: all 0.15s; position: relative;
}
.theme-card:hover { border-color: rgba(255,255,255,0.15); }
.theme-card.active { border-color: var(--theme-primary, #6366f1); box-shadow: 0 0 12px var(--theme-primary, rgba(99,102,241,0.3)); }
.theme-card-dots { display: flex; justify-content: center; gap: 4px; margin-bottom: 6px; }
.theme-card-dot { width: 10px; height: 10px; border-radius: 50%; }
.theme-card-label { font-size: 10px; font-weight: 600; line-height: 1.2; }

/* Color row */
.color-control { display: flex; align-items: center; gap: 8px; }
.color-swatches { display: flex; gap: 6px; }
.color-dot {
  width: 24px; height: 24px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; transition: all 0.15s; flex-shrink: 0;
}
.color-dot:hover { transform: scale(1.15); }
.color-dot.active { border-color: #fff; box-shadow: 0 0 8px rgba(255,255,255,0.3); }
.color-hex-input {
  width: 90px; padding: 6px 10px; border-radius: 8px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
  color: #fff; font-size: 12px; font-family: 'JetBrains Mono', monospace;
}

/* Font selectors */
.font-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.font-select {
  padding: 8px 12px; border-radius: 8px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
  color: #fff; font-size: 13px; width: 100%; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}

/* Profile fields in design */
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.profile-grid .full { grid-column: 1 / -1; }
.profile-input {
  padding: 8px 12px; border-radius: 8px; width: 100%; box-sizing: border-box;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
  color: #fff; font-size: 13px;
}

/* Section labels */
.design-section-title {
  font-size: 13px; font-weight: 700; color: rgba(240,240,255,0.85); margin: 0 0 4px;
}
.design-section-desc {
  font-size: 11px; color: rgba(240,240,255,0.35); margin: 0 0 12px;
}

@media (max-width: 1100px) {
  .design-layout { grid-template-columns: 1fr; }
  .design-preview-wrap { position: relative; top: 0; }
}

/* ── Mobile responsive ─────────────────────────────────── */
@media (max-width: 768px) {
  .recrutare-view { max-width: 100%; padding: 12px; }
  .view-header h1 { font-size: 20px; }
  .view-header { flex-wrap: wrap; gap: 8px; }

  /* Force all inline 2-col grids to stack */
  .recrutare-view [style*="grid-template-columns:1fr 1fr"],
  .recrutare-view [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Force inline flex row layouts to stack on mobile */
  .recrutare-view [style*="justify-content:space-between"] {
    flex-wrap: wrap;
    gap: 8px;
  }

  /* Fix hardcoded label widths */
  .recrutare-view [style*="width:120px"] {
    width: auto !important;
  }

  /* Design layout */
  .design-layout { grid-template-columns: 1fr !important; }
  .design-preview-wrap { position: relative !important; top: 0 !important; }
  .design-preview-frame iframe { height: 400px; }

  /* Theme grid: 2 columns on mobile instead of 4 */
  .theme-grid { grid-template-columns: repeat(2, 1fr); }

  /* Font row stack */
  .font-row { grid-template-columns: 1fr; }

  /* Profile grid stack */
  .profile-grid { grid-template-columns: 1fr; }

  /* Leads table */
  .leads-table { font-size: 12px; }
  .leads-table th, .leads-table td { padding: 8px 6px; }

  /* Stats */
  .stat-value { font-size: 22px; }
  .kpi-value { font-size: 26px; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }

  /* Email step cards */
  .email-step-card { padding: 12px; }

  /* Period selector wrap */
  .period-selector { flex-wrap: wrap; }

  /* Module pills */
  .module-pills { gap: 6px; }
  .module-pill { padding: 6px 12px; font-size: 13px; }

  /* Page card actions */
  .page-card-actions { flex-wrap: wrap; }
  .page-card-actions .btn-sm { padding: 5px 8px; font-size: 12px; }

  /* Buttons inside glass cards */
  .recrutare-view .glass-card .btn,
  .recrutare-view .glass-card button { font-size: 13px; }

  /* Section items */
  .section-item { flex-wrap: wrap; gap: 6px; padding: 8px 10px; }

  /* Color controls */
  .color-control { flex-wrap: wrap; }
  .color-hex-input { width: 80px; }

  /* Benefit rows */
  .benefit-row { flex-wrap: wrap; }

  /* Domain status */
  .domain-status { font-size: 13px; flex-wrap: wrap; }

  /* Funnel preview iframe smaller */
  .funnel-preview iframe { height: 400px; }

  /* Design preview actions */
  .design-preview-actions { flex-wrap: wrap; }
  .design-preview-actions button { padding: 6px 12px; font-size: 11px; }
}

@media (max-width: 480px) {
  .recrutare-view { padding: 8px; }
  .view-header h1 { font-size: 18px; }

  .theme-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .theme-card { padding: 6px 4px; }
  .theme-card-label { font-size: 9px; }

  .stat-value { font-size: 20px; }
  .kpi-value { font-size: 22px; }
  .kpi-row { grid-template-columns: 1fr 1fr; }

  .module-pill { padding: 5px 10px; font-size: 12px; }

  .funnel-preview iframe, .design-preview-frame iframe { height: 320px; }

  .leads-table { font-size: 11px; }
  .leads-table th, .leads-table td { padding: 6px 4px; }

  .color-swatch { width: 28px; height: 28px; }
  .color-dot { width: 20px; height: 20px; }
}

/* ═══ RECRUTARE LIGHT MODE ═══ */
[data-theme="light"] .view-header h1 { color: #1a1a2e; }
[data-theme="light"] .page-card-info strong { color: #1a1a2e; }
[data-theme="light"] .page-card-info .text-secondary { color: rgba(26, 26, 46, 0.55); }
[data-theme="light"] .stat-value { color: #1a1a2e; }
[data-theme="light"] .stat-label { color: rgba(26, 26, 46, 0.5); }
[data-theme="light"] .kpi-value { color: #1a1a2e; }
[data-theme="light"] .leads-table { color: #1a1a2e; }
[data-theme="light"] .leads-table th { color: rgba(26, 26, 46, 0.6); border-bottom-color: rgba(0, 0, 0, 0.08); }
[data-theme="light"] .leads-table td { border-bottom-color: rgba(0, 0, 0, 0.05); }
[data-theme="light"] .theme-card { background: rgba(0, 0, 0, 0.02); border-color: rgba(0, 0, 0, 0.08); }
[data-theme="light"] .theme-card:hover { border-color: rgba(0, 0, 0, 0.15); }
[data-theme="light"] .theme-card-label { color: rgba(26, 26, 46, 0.6); }
[data-theme="light"] .module-pill { color: rgba(26, 26, 46, 0.6); }

/* ═══════════════════════════════════════════════ */
/* ═══ COMPREHENSIVE LIGHT MODE — RECRUTARE  ═══ */
/* ═══════════════════════════════════════════════ */

[data-theme="light"] .kpi-label {
  color: rgba(26, 26, 46, 0.5) !important;
}

[data-theme="light"] .recrutare-form-group label {
  color: rgba(26, 26, 46, 0.6) !important;
}

[data-theme="light"] .recrutare-form-group input,
[data-theme="light"] .recrutare-form-group textarea,
[data-theme="light"] .recrutare-form-group select {
  background: rgba(0, 0, 0, 0.03) !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  color: #1a1a2e !important;
}

[data-theme="light"] .recrutare-form-group input:focus,
[data-theme="light"] .recrutare-form-group textarea:focus,
[data-theme="light"] .recrutare-form-group select:focus {
  border-color: #6366f1 !important;
  background: rgba(99, 102, 241, 0.04) !important;
}

[data-theme="light"] .section-item {
  background: rgba(0, 0, 0, 0.02) !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
}

[data-theme="light"] .section-item-label {
  color: #1a1a2e !important;
}

[data-theme="light"] .period-btn {
  border-color: rgba(0, 0, 0, 0.1) !important;
  color: rgba(26, 26, 46, 0.6) !important;
}

[data-theme="light"] .period-btn:hover {
  background: rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .period-btn.active {
  color: #4f46e5 !important;
  border-color: #6366f1 !important;
}

[data-theme="light"] .design-preview-frame {
  background: #f5f5fa !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .design-preview-actions button {
  border-color: rgba(0, 0, 0, 0.1) !important;
  background: rgba(0, 0, 0, 0.03) !important;
  color: rgba(26, 26, 46, 0.6) !important;
}

[data-theme="light"] .design-preview-actions button:hover {
  background: rgba(0, 0, 0, 0.06) !important;
  color: rgba(26, 26, 46, 0.85) !important;
}

[data-theme="light"] .color-hex-input {
  background: rgba(0, 0, 0, 0.03) !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  color: #1a1a2e !important;
}

[data-theme="light"] .font-select {
  background: rgba(0, 0, 0, 0.03) !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  color: #1a1a2e !important;
}

[data-theme="light"] .profile-input {
  background: rgba(0, 0, 0, 0.03) !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  color: #1a1a2e !important;
}

[data-theme="light"] .design-section-title {
  color: rgba(26, 26, 46, 0.85) !important;
}

[data-theme="light"] .design-section-desc {
  color: rgba(26, 26, 46, 0.45) !important;
}
