/* ALTEZIA Mockups - Shared Styles */
/* Theme: Light with violet/cyan accents */

:root {
  --bg-body: #f8f9fc;
  --bg-primary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f3f4f6;
  --bg-input: #f3f4f6;
  --bg-sidebar: #ffffff;
  --border: rgba(0,0,0,0.08);
  --border-light: rgba(0,0,0,0.12);
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  --violet: #7c3aed;
  --violet-light: #8b5cf6;
  --violet-dark: #6d28d9;
  --violet-bg: rgba(124,58,237,0.08);
  --cyan: #0891b2;
  --cyan-light: #06b6d4;
  --cyan-bg: rgba(8,145,178,0.08);
  --green: #16a34a;
  --green-bg: rgba(22,163,74,0.08);
  --red: #dc2626;
  --red-bg: rgba(220,38,38,0.08);
  --amber: #d97706;
  --amber-bg: rgba(217,119,6,0.08);
  --blue: #2563eb;
  --blue-bg: rgba(37,99,235,0.08);
  --gradient: linear-gradient(135deg, #7c3aed, #0891b2);
  --gradient-text: linear-gradient(135deg, #7c3aed, #0891b2);
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 6px rgba(0,0,0,0.07), 0 10px 15px rgba(0,0,0,0.05);
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --sidebar-width: 260px;
  --header-height: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ===================== TYPOGRAPHY ===================== */
h1 { font-size: 1.875rem; font-weight: 700; }
h2 { font-size: 1.5rem; font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.125rem; font-weight: 600; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-violet { color: var(--violet); }
.text-cyan { color: var(--cyan); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-amber { color: var(--amber); }
.text-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ===================== LAYOUT ===================== */
.layout-sidebar {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transition: transform 0.3s ease;
}

.sidebar-brand {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-brand .logo {
  width: 36px;
  height: 36px;
  background: var(--gradient);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
}

.sidebar-brand h2 {
  font-size: 1.25rem;
  font-weight: 700;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-nav a, .sidebar-nav .nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}

.sidebar-nav a:hover, .sidebar-nav .nav-item:hover {
  background: rgba(0,0,0,0.04);
  color: var(--text-primary);
}

.sidebar-nav a.active, .sidebar-nav .nav-item.active {
  background: var(--violet-bg);
  color: var(--violet);
}

.sidebar-nav .nav-icon {
  width: 20px;
  height: 20px;
  opacity: 0.7;
}

.sidebar-nav a.active .nav-icon {
  opacity: 1;
}

.sidebar-nav .nav-badge {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 99px;
  font-weight: 600;
}

.sidebar-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.sidebar-section-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0 16px;
  margin-bottom: 8px;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
}

/* Layout without sidebar (auth, diagnostic wizard) */
.layout-centered {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.layout-full {
  min-height: 100vh;
}

/* ===================== HEADER ===================== */
.header {
  height: var(--header-height);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: var(--bg-primary);
  position: sticky;
  top: 0;
  z-index: 30;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  padding: 4px;
}

/* ===================== CARDS ===================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all 0.2s;
}

.card:hover {
  border-color: var(--border-light);
}

.card-clickable:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.card-value {
  font-size: 2rem;
  font-weight: 700;
  margin-top: 8px;
}

.card-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===================== STAT CARDS ===================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.stat-card .stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.stat-card .stat-icon.violet { background: var(--violet-bg); color: var(--violet); }
.stat-card .stat-icon.cyan { background: var(--cyan-bg); color: var(--cyan); }
.stat-card .stat-icon.green { background: var(--green-bg); color: var(--green); }
.stat-card .stat-icon.amber { background: var(--amber-bg); color: var(--amber); }
.stat-card .stat-icon.red { background: var(--red-bg); color: var(--red); }
.stat-card .stat-icon.blue { background: var(--blue-bg); color: var(--blue); }

.stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.stat-card .stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.stat-card .stat-trend {
  font-size: 0.75rem;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-trend.up { color: var(--green); }
.stat-trend.down { color: var(--red); }

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: rgba(0,0,0,0.04);
  color: var(--text-primary);
}

.btn-danger {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid rgba(220,38,38,0.2);
}

.btn-danger:hover {
  background: rgba(220,38,38,0.15);
}

.btn-success {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid rgba(22,163,74,0.2);
}

.btn-success:hover {
  background: rgba(22,163,74,0.15);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn-icon {
  padding: 8px;
  border-radius: var(--radius);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  background: rgba(0,0,0,0.04);
  color: var(--text-primary);
}

/* ===================== FORMS ===================== */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: border-color 0.2s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
}

.form-input::placeholder { color: var(--text-muted); }

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

.form-select {
  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='%239ca3af' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--violet);
}

/* ===================== BADGES ===================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-violet { background: var(--violet-bg); color: var(--violet); }
.badge-cyan { background: var(--cyan-bg); color: var(--cyan); }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-blue { background: var(--blue-bg); color: var(--blue); }
.badge-gray { background: rgba(156,163,175,0.1); color: var(--text-muted); }

/* ===================== TABLE ===================== */
.table-container {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  text-align: left;
  padding: 12px 16px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
}

tbody td {
  padding: 12px 16px;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

tbody tr:hover {
  background: rgba(0,0,0,0.02);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* ===================== TABS ===================== */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.tab {
  padding: 12px 20px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.tab:hover {
  color: var(--text-primary);
}

.tab.active {
  color: var(--violet);
  border-bottom-color: var(--violet);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ===================== MODAL ===================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-primary);
}

/* ===================== WIZARD ===================== */
.wizard-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px;
}

.wizard-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 48px;
}

.wizard-step {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wizard-step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  border: 2px solid var(--border);
  color: var(--text-muted);
  background: var(--bg-card);
  transition: all 0.3s;
}

.wizard-step.active .wizard-step-circle {
  background: var(--gradient);
  border-color: transparent;
  color: #fff;
}

.wizard-step.completed .wizard-step-circle {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.wizard-step-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.wizard-step.active .wizard-step-label {
  color: var(--text-primary);
}

.wizard-step.completed .wizard-step-label {
  color: var(--green);
}

.wizard-connector {
  width: 60px;
  height: 2px;
  background: var(--border);
  margin: 0 8px;
}

.wizard-connector.completed {
  background: var(--green);
}

.wizard-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ===================== KANBAN ===================== */
.kanban {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.kanban-column {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 300px);
}

.kanban-column-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kanban-column-header .column-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
}

.kanban-column-header .column-count {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(0,0,0,0.04);
  color: var(--text-muted);
}

.kanban-column-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kanban-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.kanban-card:hover {
  border-color: var(--border-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

/* ===================== AVATAR ===================== */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  color: #fff;
}

.avatar-sm { width: 28px; height: 28px; font-size: 0.7rem; }
.avatar-lg { width: 48px; height: 48px; font-size: 1.1rem; }

/* ===================== PROGRESS BAR ===================== */
.progress-bar {
  height: 8px;
  background: rgba(0,0,0,0.06);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--gradient);
  transition: width 0.5s ease;
}

/* ===================== SCORE CIRCLE ===================== */
.score-circle {
  width: 120px;
  height: 120px;
  position: relative;
}

.score-circle svg {
  transform: rotate(-90deg);
}

.score-circle .score-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
  font-weight: 700;
}

/* ===================== SEARCH & FILTER BAR ===================== */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.search-input input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.875rem;
}

.search-input input:focus {
  outline: none;
  border-color: var(--violet);
}

.search-input::before {
  content: "\1F50D";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  opacity: 0.5;
}

/* ===================== EMPTY STATE ===================== */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.3;
}

.empty-state h3 {
  margin-bottom: 8px;
  color: var(--text-secondary);
}

/* ===================== PAGE CONTAINER ===================== */
.page {
  padding: 24px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 1.5rem;
}

/* ===================== GRID HELPERS ===================== */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.p-16 { padding: 16px; }
.p-24 { padding: 24px; }
.w-full { width: 100%; }

/* ===================== NOTIFICATION DOT ===================== */
.notification-bell {
  position: relative;
}

.notification-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
}

/* ===================== USER MENU ===================== */
.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: background 0.2s;
}

.user-menu:hover {
  background: rgba(0,0,0,0.04);
}

.user-menu .user-name {
  font-size: 0.85rem;
  font-weight: 500;
}

.user-menu .user-role {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ===================== CHART PLACEHOLDER ===================== */
.chart-placeholder {
  background: var(--bg-primary);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Fake chart bars */
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 180px;
  padding: 16px;
}

.chart-bar {
  flex: 1;
  background: var(--gradient);
  border-radius: 4px 4px 0 0;
  min-width: 20px;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.chart-bar:hover { opacity: 1; }

/* ===================== TIMELINE / ACTIVITY ===================== */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.activity-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.activity-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.activity-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ===================== AUTH LAYOUT ===================== */
.auth-container {
  width: 100%;
  max-width: 440px;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo .logo {
  width: 56px;
  height: 56px;
  background: var(--gradient);
  border-radius: var(--radius-lg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 16px;
}

.auth-logo h1 {
  font-size: 1.5rem;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-logo p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 8px;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.auth-footer a {
  color: var(--violet);
  font-weight: 500;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* ===================== ZONE CARDS (diagnostic) ===================== */
.zone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.zone-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.zone-card:hover {
  border-color: var(--violet);
  background: var(--violet-bg);
}

.zone-card.selected {
  border-color: var(--violet);
  background: var(--violet-bg);
}

.zone-card .zone-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.zone-card .zone-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.zone-card .zone-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===================== PHOTO UPLOAD ===================== */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.upload-zone:hover {
  border-color: var(--violet);
  background: var(--violet-bg);
}

.upload-zone .upload-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.4;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.photo-thumb {
  aspect-ratio: 1;
  background: var(--bg-card-hover);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.5rem;
  position: relative;
  overflow: hidden;
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-thumb .remove-photo {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 0.7rem;
  cursor: pointer;
  display: none;
}

.photo-thumb:hover .remove-photo {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===================== DROPDOWN ===================== */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  z-index: 50;
  display: none;
}

.dropdown-menu.active {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.2s;
}

.dropdown-item:hover {
  background: rgba(0,0,0,0.04);
  color: var(--text-primary);
}

/* ===================== LIST ===================== */
.list-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

.list-item:hover {
  background: rgba(0,0,0,0.02);
}

.list-item:last-child {
  border-bottom: none;
}

/* ===================== PAGINATION ===================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.pagination button {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
}

.pagination button.active {
  background: var(--violet-bg);
  color: var(--violet);
  border-color: var(--violet);
}

.pagination button:hover:not(.active) {
  background: var(--bg-card-hover);
}

/* ===================== MAP PLACEHOLDER ===================== */
.map-placeholder {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  position: relative;
  overflow: hidden;
}

.map-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 40%, rgba(124,58,237,0.05) 0%, transparent 60%),
              radial-gradient(circle at 70% 60%, rgba(8,145,178,0.05) 0%, transparent 60%);
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .hamburger {
    display: block;
  }

  .stats-grid { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .kanban { grid-template-columns: 1fr; }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .page-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .auth-card {
    padding: 24px;
  }

  .wizard-step-label {
    display: none;
  }

  .wizard-connector {
    width: 30px;
  }

  .header {
    padding: 0 16px;
  }

  .page {
    padding: 16px;
  }
}

/* ===================== CLIENT HEADER LAYOUT ===================== */
.layout-full .header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.header-logo .logo {
  width: 36px;
  height: 36px;
  background: var(--gradient);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
}

.header-logo .logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.5px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.header-nav a {
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.header-nav a:hover {
  color: var(--text-primary);
  background: rgba(0,0,0,0.04);
}

.header-nav a.active {
  color: var(--violet);
  background: var(--violet-bg);
}

.notification-bell {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s;
  color: var(--text-secondary);
  position: relative;
}

.notification-bell:hover {
  border-color: var(--violet);
  background: var(--violet-bg);
}

/* ===================== EQUIPMENT CARDS (diagnostic detail) ===================== */
.equip-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  padding-left: 24px;
  border-left: 4px solid transparent;
  margin-bottom: 10px;
  transition: all 0.2s;
}

.equip-card:hover {
  border-color: var(--border-light);
  border-left-width: 4px;
}

.equip-card.critical { border-left-color: var(--red); }
.equip-card.warning { border-left-color: var(--amber); }
.equip-card.ok { border-left-color: var(--green); }

.equip-name { font-weight: 600; font-size: 0.95rem; margin-bottom: 4px; }
.equip-meta { font-size: 0.8rem; color: var(--text-muted); display: flex; gap: 12px; flex-wrap: wrap; }
.equip-note { font-size: 0.8rem; margin-top: 6px; font-style: italic; }
.equip-card.critical .equip-note { color: var(--red); }
.equip-card.warning .equip-note { color: var(--amber); }
.equip-card.ok .equip-note { color: var(--green); }

/* ===================== SCORE PANEL (detail page) ===================== */
.detail-top {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  margin-bottom: 32px;
}

.score-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.score-ring {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.score-ring.amber { background: conic-gradient(var(--amber) 0deg 259deg, rgba(217,119,6,0.1) 259deg 360deg); }
.score-ring.green { background: conic-gradient(var(--green) 0deg 306deg, rgba(22,163,74,0.1) 306deg 360deg); }
.score-ring.red { background: conic-gradient(var(--red) 0deg 162deg, rgba(220,38,38,0.1) 162deg 360deg); }

.score-ring-inner {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.score-ring .score-num {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
}

.score-ring.amber .score-num { color: var(--amber); }
.score-ring.green .score-num { color: var(--green); }
.score-ring.red .score-num { color: var(--red); }

.score-ring .score-pct {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
}

.summary-item {
  text-align: center;
  padding: 10px;
  background: var(--bg-body);
  border-radius: var(--radius);
}

.summary-item .s-num {
  font-size: 1.25rem;
  font-weight: 700;
}

.summary-item .s-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ===================== RECOMMENDATION CARDS ===================== */
.reco-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 10px;
}

.reco-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.reco-title { font-weight: 600; font-size: 0.95rem; }
.reco-desc { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; margin-bottom: 8px; }
.reco-cost { font-size: 0.9rem; font-weight: 600; color: var(--violet); }

/* ===================== PARTNER CARDS (client) ===================== */
.partner-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  transition: all 0.2s;
}

.partner-card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow);
}

.partner-avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  flex-shrink: 0;
}

.partner-avatar.bg-violet { background: var(--violet-bg); color: var(--violet); }
.partner-avatar.bg-cyan { background: var(--cyan-bg); color: var(--cyan); }
.partner-avatar.bg-blue { background: var(--blue-bg); color: var(--blue); }
.partner-avatar.bg-green { background: var(--green-bg); color: var(--green); }

.partner-info { flex: 1; }
.partner-info h3 { font-size: 1rem; font-weight: 700; margin-bottom: 2px; }
.partner-meta { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 4px; }
.partner-detail { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 2px; }
.partner-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* ===================== DEMAND ITEM ===================== */
.demand-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.demand-info h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 4px; }
.demand-info p { font-size: 0.8rem; color: var(--text-muted); }
.demand-actions { display: flex; gap: 8px; flex-shrink: 0; align-items: center; }

/* ===================== QUOTE MODAL LINES ===================== */
.quote-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.quote-line:last-child { border-bottom: none; }
.quote-line .ql-desc { color: var(--text-primary); }
.quote-line .ql-qty { color: var(--text-muted); font-size: 0.8rem; }
.quote-line .ql-amount { font-weight: 600; }

.quote-total {
  display: flex;
  justify-content: space-between;
  padding-top: 16px;
  margin-top: 8px;
  border-top: 2px solid var(--border-light);
  font-size: 1rem;
  font-weight: 700;
}

/* ===================== BACK LINK ===================== */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  transition: color 0.2s;
}

.back-link:hover { color: var(--violet); }

/* ===================== SECTION TITLE ===================== */
.section { margin-bottom: 32px; }
.section-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 16px; }

/* ===================== COLLAPSE ===================== */
.collapse-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
  background: none;
  border: none;
  font-family: inherit;
  padding: 0;
}

.collapse-trigger .arrow {
  transition: transform 0.2s;
  font-size: 0.7rem;
}

.collapse-trigger.open .arrow {
  transform: rotate(90deg);
}

.collapse-content { display: none; }
.collapse-content.show { display: block; }

/* ===================== DIAG CARD (for diagnostics list) ===================== */
.diag-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all 0.2s;
  display: block;
  color: inherit;
  text-decoration: none;
}

.diag-card:hover {
  transform: translateY(-2px);
  border-color: var(--violet);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
}

.diag-card .diag-title { font-weight: 600; font-size: 0.95rem; margin-bottom: 4px; }
.diag-card .diag-date { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 12px; }
.diag-card .diag-stats { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 12px; }
.diag-card .diag-bottom { display: flex; align-items: center; justify-content: space-between; }

/* ===================== SCROLLBAR ===================== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.1);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,0.2);
}

/* ===================== ANIMATIONS ===================== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-fade { animation: fadeIn 0.3s ease; }
.animate-pulse { animation: pulse 2s infinite; }
.animate-spin { animation: spin 1s linear infinite; }

/* Loading spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--violet);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ===================== DIVIDER ===================== */
.divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

/* ===================== TOOLTIP ===================== */
[data-tooltip] {
  position: relative;
}

[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 12px;
  background: var(--bg-card-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.75rem;
  color: var(--text-primary);
  white-space: nowrap;
  margin-bottom: 8px;
  z-index: 100;
}

/* =====================================================================
   FUTURISTIC WIZARD V2 - Premium Diagnostic
   ===================================================================== */

/* Animated background */
.wizard-v2-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: radial-gradient(ellipse at 20% 50%, rgba(124,58,237,0.06) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 20%, rgba(8,145,178,0.05) 0%, transparent 50%),
              radial-gradient(ellipse at 50% 80%, rgba(124,58,237,0.04) 0%, transparent 50%),
              var(--bg-body);
}

.wizard-v2-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 25% 25%, rgba(124,58,237,0.04) 1px, transparent 1px),
    radial-gradient(circle at 75% 75%, rgba(8,145,178,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridFloat 20s ease-in-out infinite;
}

@keyframes gridFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-10px, -10px); }
}

/* Floating orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: orbFloat 15s ease-in-out infinite;
}

.orb-1 { width: 300px; height: 300px; background: rgba(124,58,237,0.12); top: 10%; left: 10%; animation-delay: 0s; }
.orb-2 { width: 250px; height: 250px; background: rgba(8,145,178,0.1); top: 60%; right: 10%; animation-delay: -5s; }
.orb-3 { width: 200px; height: 200px; background: rgba(124,58,237,0.08); bottom: 10%; left: 40%; animation-delay: -10s; }

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

/* V2 Wizard container */
.wizard-v2 {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 24px;
  min-height: 100vh;
}

/* V2 Top bar */
.wizard-v2-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  margin-bottom: 32px;
}

.wizard-v2-topbar .logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wizard-v2-topbar .logo-link .logo-square {
  width: 40px;
  height: 40px;
  background: var(--gradient);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  color: #fff;
  box-shadow: 0 0 20px rgba(124,58,237,0.25);
}

.wizard-v2-topbar .logo-link .logo-name {
  font-size: 1.2rem;
  font-weight: 700;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* V2 Progress bar */
.wizard-v2-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 40px;
}

.wv2-step {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wv2-step-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  border: 2px solid rgba(0,0,0,0.1);
  color: var(--text-muted);
  background: rgba(0,0,0,0.02);
  position: relative;
  transition: all 0.4s ease;
}

.wv2-step.active .wv2-step-circle {
  background: var(--gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 24px rgba(124,58,237,0.3), 0 0 48px rgba(124,58,237,0.1);
  animation: glowPulse 2s ease-in-out infinite;
}

.wv2-step.completed .wv2-step-circle {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  box-shadow: 0 0 12px rgba(22,163,74,0.25);
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 24px rgba(124,58,237,0.3), 0 0 48px rgba(124,58,237,0.1); }
  50% { box-shadow: 0 0 32px rgba(124,58,237,0.4), 0 0 64px rgba(124,58,237,0.15); }
}

.wv2-step-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  max-width: 100px;
}

.wv2-step.active .wv2-step-label { color: var(--text-primary); font-weight: 600; }
.wv2-step.completed .wv2-step-label { color: var(--green); }

.wv2-connector {
  width: 80px;
  height: 2px;
  background: rgba(0,0,0,0.08);
  margin: 0 6px;
  position: relative;
  overflow: hidden;
}

.wv2-connector.completed {
  background: var(--green);
}

.wv2-connector.completed::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(22,163,74,0.4), transparent);
  animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* V2 Glass card */
.glass-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
}

.glass-card:hover {
  border-color: rgba(0,0,0,0.12);
  box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

/* V2 Section titles */
.wv2-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 8px;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.wv2-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.5;
}

/* V2 Project type cards */
.project-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}

.project-type-card {
  background: rgba(0,0,0,0.02);
  border: 2px solid rgba(0,0,0,0.06);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.project-type-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 0.3s;
}

.project-type-card:hover {
  border-color: rgba(124,58,237,0.3);
  transform: translateY(-2px);
}

.project-type-card.selected {
  border-color: var(--violet);
  background: rgba(124,58,237,0.06);
  box-shadow: 0 0 24px rgba(124,58,237,0.1), inset 0 0 24px rgba(124,58,237,0.03);
}

.project-type-card .pt-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.project-type-card .pt-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}

.project-type-card .pt-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}

.project-type-card.selected .pt-title {
  color: var(--violet);
}

/* V2 Metier cards */
.metier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.metier-card {
  background: rgba(0,0,0,0.02);
  border: 2px solid rgba(0,0,0,0.06);
  border-radius: var(--radius-lg);
  padding: 20px 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.metier-card:hover {
  border-color: rgba(124,58,237,0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.metier-card.selected {
  border-color: var(--violet);
  background: rgba(124,58,237,0.06);
  box-shadow: 0 0 20px rgba(124,58,237,0.1);
}

.metier-card .mc-icon {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.metier-card .mc-name {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
}

.metier-card.selected .mc-name {
  color: var(--violet);
}

.metier-card .mc-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--violet);
  color: #fff;
  font-size: 0.65rem;
  display: none;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.metier-card.selected .mc-check {
  display: flex;
}

/* V2 Zone accordion */
.zone-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.zone-item {
  background: rgba(0,0,0,0.02);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
}

.zone-item:hover {
  border-color: rgba(0,0,0,0.12);
}

.zone-item.open {
  border-color: rgba(124,58,237,0.2);
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.zone-item-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  cursor: pointer;
  transition: background 0.2s;
}

.zone-item-header:hover {
  background: rgba(0,0,0,0.02);
}

.zone-item-order {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.zone-item-name {
  font-weight: 700;
  font-size: 1rem;
  flex: 1;
}

.zone-item-badges {
  display: flex;
  gap: 8px;
  align-items: center;
}

.zone-item-chevron {
  color: var(--text-muted);
  transition: transform 0.3s;
  font-size: 0.8rem;
}

.zone-item.open .zone-item-chevron {
  transform: rotate(180deg);
}

.zone-item-body {
  display: none;
  padding: 0 20px 20px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.zone-item.open .zone-item-body {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* V2 Chat IA */
.chat-container {
  background: rgba(0,0,0,0.02);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--radius-lg);
  margin-top: 16px;
  overflow: hidden;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(124,58,237,0.06);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.chat-header .chat-ai-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}

.chat-header .chat-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--violet);
}

.chat-messages {
  padding: 16px;
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-msg {
  display: flex;
  gap: 10px;
  max-width: 85%;
  animation: fadeIn 0.3s ease;
}

.chat-msg.ai {
  align-self: flex-start;
}

.chat-msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  flex-shrink: 0;
}

.chat-msg.ai .chat-msg-avatar {
  background: var(--gradient);
  color: #fff;
  font-weight: 800;
}

.chat-msg.user .chat-msg-avatar {
  background: var(--cyan-bg);
  color: var(--cyan);
  font-weight: 700;
}

.chat-msg-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.5;
}

.chat-msg.ai .chat-msg-bubble {
  background: rgba(124,58,237,0.08);
  border: 1px solid rgba(124,58,237,0.12);
  color: var(--text-primary);
  border-top-left-radius: 4px;
}

.chat-msg.user .chat-msg-bubble {
  background: rgba(8,145,178,0.08);
  border: 1px solid rgba(8,145,178,0.12);
  color: var(--text-primary);
  border-top-right-radius: 4px;
}

.chat-typing {
  display: flex;
  gap: 4px;
  padding: 8px 14px;
  align-self: flex-start;
}

.chat-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--violet);
  animation: typingDot 1.4s ease-in-out infinite;
}

.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}

.chat-input-bar {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(0,0,0,0.06);
  background: rgba(0,0,0,0.02);
}

.chat-input-bar input {
  flex: 1;
  padding: 10px 14px;
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 99px;
  color: var(--text-primary);
  font-size: 0.85rem;
}

.chat-input-bar input:focus {
  outline: none;
  border-color: var(--violet);
}

.chat-input-bar button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient);
  border: none;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.chat-input-bar button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 16px rgba(124,58,237,0.3);
}

/* V2 Photo section in zone */
.zone-photos {
  margin-top: 16px;
}

.zone-photos-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.zone-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
}

.zone-photo-thumb {
  aspect-ratio: 1;
  background: rgba(0,0,0,0.02);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.2s;
}

.zone-photo-thumb:hover {
  border-color: var(--violet);
  box-shadow: 0 0 12px rgba(124,58,237,0.12);
}

.zone-photo-thumb .photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.zone-photo-thumb:hover .photo-overlay {
  display: flex;
}

/* V2 Document upload */
.doc-upload-zone {
  border: 2px dashed rgba(124,58,237,0.2);
  border-radius: var(--radius-xl);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: rgba(124,58,237,0.02);
  position: relative;
  overflow: hidden;
}

.doc-upload-zone:hover {
  border-color: var(--violet);
  background: rgba(124,58,237,0.05);
  box-shadow: 0 0 32px rgba(124,58,237,0.08);
}

.doc-upload-zone .upload-icon-lg {
  font-size: 3.5rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.doc-upload-zone h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.doc-upload-zone p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* V2 Document card (uploaded) */
.doc-card {
  background: rgba(0,0,0,0.02);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
  transition: all 0.2s;
}

.doc-card:hover {
  border-color: rgba(0,0,0,0.12);
  background: rgba(0,0,0,0.03);
}

.doc-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.doc-card-icon.pdf { background: var(--red-bg); color: var(--red); }
.doc-card-icon.img { background: var(--blue-bg); color: var(--blue); }

.doc-card-info { flex: 1; }
.doc-card-info .doc-name { font-weight: 600; font-size: 0.9rem; margin-bottom: 2px; }
.doc-card-info .doc-meta { font-size: 0.75rem; color: var(--text-muted); }

.doc-card-actions {
  display: flex;
  gap: 6px;
}

/* V2 OCR preview */
.ocr-preview {
  background: rgba(8,145,178,0.05);
  border: 1px solid rgba(8,145,178,0.12);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 12px;
}

.ocr-preview-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cyan);
}

.ocr-preview-header .ocr-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  animation: pulse 2s infinite;
}

.ocr-field {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  font-size: 0.85rem;
}

.ocr-field:last-child { border-bottom: none; }
.ocr-field .ocr-label { color: var(--text-muted); }
.ocr-field .ocr-value { font-weight: 600; color: var(--text-primary); }

/* V2 Wizard footer */
.wizard-v2-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.wizard-v2-footer .btn-next {
  background: var(--gradient);
  color: #fff;
  padding: 12px 32px;
  border-radius: 99px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 16px rgba(124,58,237,0.25);
}

.wizard-v2-footer .btn-next:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(124,58,237,0.35);
}

.wizard-v2-footer .btn-back {
  background: transparent;
  color: var(--text-secondary);
  padding: 12px 24px;
  border-radius: 99px;
  font-weight: 500;
  font-size: 0.9rem;
  border: 1px solid rgba(0,0,0,0.1);
  cursor: pointer;
  transition: all 0.2s;
}

.wizard-v2-footer .btn-back:hover {
  border-color: rgba(0,0,0,0.2);
  color: var(--text-primary);
}

/* V2 Selection counter */
.selection-counter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(124,58,237,0.08);
  border: 1px solid rgba(124,58,237,0.15);
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--violet);
  margin-bottom: 16px;
}

/* V2 Add zone button */
.add-zone-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px;
  border: 2px dashed rgba(124,58,237,0.2);
  border-radius: var(--radius-lg);
  background: transparent;
  color: var(--violet);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.add-zone-btn:hover {
  border-color: var(--violet);
  background: rgba(124,58,237,0.04);
  box-shadow: 0 0 24px rgba(124,58,237,0.08);
}

/* V2 Quick zone buttons */
.quick-zones {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.quick-zone-btn {
  padding: 12px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: var(--radius);
  background: rgba(0,0,0,0.02);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.quick-zone-btn:hover {
  border-color: var(--violet);
  background: rgba(124,58,237,0.06);
}

/* V2 Responsive */
@media (max-width: 768px) {
  .wizard-v2 { padding: 16px; }
  .glass-card { padding: 20px; }
  .project-type-grid { grid-template-columns: 1fr; }
  .metier-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .wv2-step-label { display: none; }
  .wv2-connector { width: 40px; }
  .chat-messages { max-height: 220px; }
}
