/* devLumiira - Custom Styles */

:root {
  --bg-base:    #0f0f13;
  --bg-card:    #1a1a24;
  --bg-card2:   #22222f;
  --accent:     #6366f1;
  --accent-h:   #818cf8;
  --accent-d:   #4f46e5;
  --text:       #e2e8f0;
  --text-muted: #94a3b8;
  --border:     #2d2d3d;
  --green:      #22c55e;
  --orange:     #f97316;
  --red:        #ef4444;
  --radius:     12px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg-base);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── Scrollbars ─────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ─── Navbar ─────────────────────────────────────────────────────────────────── */
.navbar {
  background: rgba(15, 15, 19, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.logo-text { line-height: 1.1; }
.logo-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  letter-spacing: -0.3px;
}
.logo-sub {
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-h); transform: translateY(-1px); }
.btn-secondary {
  background: var(--bg-card2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--border); }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
}
.btn-ghost:hover { background: var(--bg-card2); color: var(--text); }
.btn-danger {
  background: rgba(239,68,68,0.15);
  color: var(--red);
  border: 1px solid rgba(239,68,68,0.2);
}
.btn-danger:hover { background: rgba(239,68,68,0.25); }
.btn-sm { padding: 5px 10px; font-size: 0.78rem; border-radius: 6px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.btn-icon { padding: 8px; }

/* ─── Kanban Layout ──────────────────────────────────────────────────────────── */
.kanban-wrapper {
  display: grid;
  grid-template-columns: 260px 1fr 1fr 280px;
  gap: 1px;
  height: calc(100vh - 60px);
  background: var(--border);
  overflow: hidden;
}

.kanban-col {
  background: var(--bg-base);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.col-header {
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--bg-card);
  flex-shrink: 0;
}
.col-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.col-badge {
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 0.7rem;
  font-weight: 600;
}
.col-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ─── Cards ──────────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.875rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}
.card:hover {
  border-color: var(--accent);
  background: var(--bg-card2);
  transform: translateY(-1px);
}
.card.active {
  border-color: var(--accent);
  background: rgba(99,102,241,0.08);
  box-shadow: 0 0 0 1px var(--accent);
}
.card-title {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
  color: var(--text);
}
.card-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ─── Avatar card ────────────────────────────────────────────────────────────── */
.avatar-card {
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar-initials {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  flex-shrink: 0;
}
.avatar-info { flex: 1; min-width: 0; }
.avatar-name {
  font-weight: 600;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.avatar-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ─── Angle card ─────────────────────────────────────────────────────────────── */
.angle-number {
  width: 24px;
  height: 24px;
  background: var(--accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.angle-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.sous-angle-tag {
  display: inline-block;
  background: rgba(99,102,241,0.12);
  color: var(--accent-h);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.72rem;
  margin: 2px;
}

/* ─── Script panel ───────────────────────────────────────────────────────────── */
.script-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 8px;
}
.script-section-header {
  padding: 0.625rem 0.875rem;
  background: var(--bg-card2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.script-section-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-h);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.script-section-body {
  padding: 0.75rem 0.875rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text);
}
.hook-text {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  border-left: 3px solid var(--accent);
  padding-left: 10px;
}

/* ─── Stats ──────────────────────────────────────────────────────────────────── */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.875rem;
  cursor: default;
}
.stat-card:hover { transform: none; border-color: var(--border); }

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
.stat-item {
  background: var(--bg-card2);
  border-radius: 8px;
  padding: 8px 10px;
  text-align: center;
}
.stat-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.stat-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

/* Status badges */
.badge-good   { color: var(--green); }
.badge-medium { color: var(--orange); }
.badge-bad    { color: var(--red); }

.platform-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.dot-meta     { background: #1877f2; }
.dot-tiktok   { background: #010101; border: 1px solid var(--border); }
.dot-snapchat { background: #fffc00; }

.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: capitalize;
}

/* ─── Modal ──────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(16px);
  transition: transform 0.2s ease;
  box-shadow: 0 25px 60px rgba(0,0,0,0.5);
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title {
  font-weight: 700;
  font-size: 1.1rem;
}
.modal-body { padding: 1.5rem; }
.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* ─── Form ───────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 5px;
}
.form-label .required { color: var(--accent); }
.form-control {
  width: 100%;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}
.form-control:focus { border-color: var(--accent); }
.form-control::placeholder { color: var(--text-muted); opacity: 0.6; }
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control { cursor: pointer; }
select.form-control option { background: var(--bg-card); }

/* Checkboxes */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.82rem;
  transition: all 0.15s;
  user-select: none;
}
.checkbox-label:hover { border-color: var(--accent); }
.checkbox-label input[type="checkbox"] { accent-color: var(--accent); }
.checkbox-label:has(input:checked) {
  border-color: var(--accent);
  background: rgba(99,102,241,0.1);
  color: var(--accent-h);
}

/* ─── Toast notifications ────────────────────────────────────────────────────── */
#toastContainer {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 0.875rem;
  max-width: 320px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  transform: translateX(120%);
  transition: transform 0.3s ease;
  pointer-events: auto;
}
.toast.show { transform: translateX(0); }
.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--red); }
.toast.info    { border-left: 3px solid var(--accent); }

/* ─── Loading spinner ────────────────────────────────────────────────────────── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ─── Empty state ────────────────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  text-align: center;
  opacity: 0.7;
}
.empty-icon {
  font-size: 2rem;
  opacity: 0.4;
  margin-bottom: 4px;
}

/* ─── Settings page ──────────────────────────────────────────────────────────── */
.settings-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}
.settings-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.settings-section-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.settings-section-title {
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.settings-section-body { padding: 1.5rem; }

.platform-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
}
.platform-block-header {
  padding: 0.875rem 1.25rem;
  background: var(--bg-card2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}
.platform-block-header:hover { background: var(--border); }
.platform-block-body {
  padding: 1.25rem;
  display: none;
  border-top: 1px solid var(--border);
}
.platform-block-body.open { display: block; }
.platform-name {
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
}
.status-dot.connected { background: var(--green); }
.status-text { font-size: 0.75rem; }

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .kanban-wrapper {
    grid-template-columns: 240px 1fr 1fr 240px;
  }
}
@media (max-width: 768px) {
  .kanban-wrapper {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }
  .kanban-col { min-height: 300px; }
}

/* ─── Animations ─────────────────────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.3s ease forwards; }

/* Generating pulse */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}
.generating { animation: pulse 1.5s ease infinite; }

/* ─── Tooltip ────────────────────────────────────────────────────────────────── */
[data-tooltip] {
  position: relative;
}
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.72rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  color: var(--text-muted);
  z-index: 50;
}
[data-tooltip]:hover::after { opacity: 1; }

/* ─── Guide modal ────────────────────────────────────────────────────────────── */
.guide-step {
  display: flex;
  gap: 12px;
  margin-bottom: 1rem;
}
.guide-step-num {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
  color: #fff;
}
.guide-step-content { flex: 1; }
.guide-step-title {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 2px;
}
.guide-step-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}
