/* ============================================================
   ÉCHELLE VENTURES — Dashboard Styles
   ============================================================ */

/* ---------- Login Page ---------- */
.login-page {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 40px 20px;
  position: relative; z-index: 2;
}

.login-card {
  width: 100%; max-width: 440px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 24px;
  padding: 44px;
  backdrop-filter: blur(20px);
}

.login-tabs {
  display: flex; gap: 6px;
  padding: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 100px;
  margin-bottom: 28px;
}

.login-tab {
  flex: 1; padding: 10px;
  border-radius: 100px;
  font-size: 14px; font-weight: 500;
  color: var(--text-dim);
  transition: all 0.2s ease;
}
.login-tab.active {
  background: var(--metallic); color: #000;
  font-weight: 600;
}

/* ---------- Dashboard Shell ---------- */
.dash-nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 30px;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.dash-nav-right {
  display: flex; align-items: center; gap: 16px;
}

.dash-user {
  font-size: 14px; color: var(--text-dim);
}

.dash-layout {
  display: flex;
  min-height: calc(100vh - 65px);
}

/* ---------- Sidebar ---------- */
.dash-sidebar {
  width: 240px; flex-shrink: 0;
  background: rgba(255,255,255,0.02);
  border-right: 1px solid rgba(255,255,255,0.07);
  padding: 24px 12px;
  position: sticky; top: 65px;
  height: calc(100vh - 65px);
  overflow-y: auto;
}

.dash-menu { display: flex; flex-direction: column; gap: 4px; }

.dash-menu-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 12px;
  font-size: 14px; color: var(--text-dim);
  text-align: left; width: 100%;
  transition: all 0.2s ease;
}
.dash-menu-item:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.dash-menu-item.active {
  background: rgba(255,255,255,0.08);
  color: var(--text);
  font-weight: 500;
}
.dash-menu-item.active .dash-icon {
  background: var(--metallic);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.dash-icon { font-size: 16px; width: 20px; text-align: center; }

/* ---------- Main Content ---------- */
.dash-main {
  flex: 1; padding: 40px;
  overflow-y: auto;
}

.dash-panel { display: none; }
.dash-panel.active { display: block; }

.dash-panel h1 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 400; letter-spacing: -0.02em;
  margin-bottom: 6px;
}

/* ---------- Stat Cards ---------- */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px; margin-bottom: 24px;
}

.dash-stat-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 24px 20px;
  display: flex; flex-direction: column; gap: 6px;
}

.dash-stat-num {
  font-family: var(--font-serif);
  font-size: 36px; font-weight: 400;
  background: var(--metallic);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  line-height: 1;
}

.dash-stat-label {
  font-size: 12px; color: var(--text-mute);
  text-transform: uppercase; letter-spacing: 0.08em;
}

/* ---------- Dashboard Cards ---------- */
.dash-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 28px;
  margin-bottom: 0;
}

.dash-card h3 {
  font-family: var(--font-sans);
  font-size: 16px; font-weight: 600;
  margin-bottom: 18px; letter-spacing: 0;
}

.dash-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px; margin-bottom: 20px;
}

/* ---------- Timeline ---------- */
.dash-timeline { display: flex; flex-direction: column; gap: 0; }
.dash-timeline.full { max-width: 700px; }

.dash-tl-item {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.dash-tl-item:last-child { border-bottom: none; }

.dash-tl-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--grey); flex-shrink: 0;
  margin-top: 5px;
  border: 2px solid var(--grey-light);
}
.dash-tl-dot.active {
  background: #e0e0e0;
  box-shadow: 0 0 10px rgba(220,220,220,0.5);
  border-color: #fff;
}

.dash-tl-item strong { display: block; font-size: 14px; }
.dash-tl-item span { font-size: 12px; color: var(--text-mute); }
.dash-tl-item p { font-size: 13px; color: var(--text-dim); margin: 4px 0; }

/* ---------- Consultant / Profile Row ---------- */
.dash-consultant {
  display: flex; gap: 20px; align-items: center;
  margin-bottom: 24px;
}
.dash-consultant strong { font-size: 20px; display: block; }

/* ---------- Chat ---------- */
.chat-box {
  display: flex; flex-direction: column;
  height: calc(100vh - 260px); min-height: 480px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  overflow: hidden;
}

.chat-messages {
  flex: 1; overflow-y: auto;
  padding: 24px; display: flex; flex-direction: column; gap: 20px;
}

.chat-msg { display: flex; gap: 12px; align-items: flex-end; }
.chat-msg.you { flex-direction: row-reverse; }

.chat-avatar {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: var(--metallic); color: #000;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
  font-family: var(--font-serif);
}

.chat-bubble {
  max-width: 480px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px; padding: 12px 16px;
}
.chat-msg.you .chat-bubble {
  background: rgba(200,200,200,0.12);
  border-color: rgba(255,255,255,0.18);
}
.chat-bubble p { font-size: 14px; color: var(--text); margin: 0 0 4px; }
.chat-time { font-size: 11px; color: var(--text-mute); }

.chat-input {
  display: flex; gap: 10px; padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.chat-input input {
  flex: 1; background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 100px; padding: 12px 20px;
  font: inherit; font-size: 14px; color: var(--text);
  outline: none; transition: border-color 0.2s;
}
.chat-input input:focus { border-color: var(--grey-light); }

/* ---------- Implementation Tracker ---------- */
.dash-tracker { display: flex; flex-direction: column; gap: 16px; }

.tracker-row {
  display: grid;
  grid-template-columns: 1fr 3fr 80px;
  align-items: center; gap: 20px;
  padding: 16px 24px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
}

.tracker-info strong { display: block; font-size: 14px; }
.tracker-info span { font-size: 12px; color: var(--text-mute); }

.tracker-bar {
  height: 6px; background: rgba(255,255,255,0.08);
  border-radius: 100px; overflow: hidden;
}
.tracker-fill {
  height: 100%; border-radius: 100px;
  background: var(--metallic);
  transition: width 0.8s ease;
}

.tracker-pct { font-size: 13px; font-weight: 600; color: var(--text-dim); text-align: right; }
.tracker-pct.done { color: #4ade80; }

/* ---------- Checklist ---------- */
.dash-checklist { display: flex; flex-direction: column; gap: 10px; }

.dash-checklist li {
  padding-left: 28px; position: relative;
  font-size: 14px; color: var(--text-dim);
}
.dash-checklist li::before {
  content: '○';
  position: absolute; left: 0;
  color: var(--grey-mid);
}
.dash-checklist li.checked { color: var(--text); }
.dash-checklist li.checked::before {
  content: '✓';
  color: #4ade80;
}

/* ---------- Recommendations ---------- */
.dash-reco-list { display: flex; flex-direction: column; gap: 16px; }

.reco { position: relative; padding-top: 44px; }

.reco-priority {
  position: absolute; top: 20px; right: 20px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 100px;
}
.reco-priority.high { background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
.reco-priority.medium { background: rgba(234,179,8,0.12); color: #fbbf24; border: 1px solid rgba(234,179,8,0.25); }
.reco-priority.low { background: rgba(255,255,255,0.06); color: var(--text-dim); border: 1px solid rgba(255,255,255,0.1); }

.reco h3 { font-family: var(--font-sans); font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.reco p { font-size: 14px; color: var(--text-dim); line-height: 1.6; }

/* ---------- Next Steps Phase Plan ---------- */
.plan-phases {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px; margin-top: 8px;
}
.plan-phase {
  padding: 20px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
}
.plan-week {
  display: inline-block; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--grey-light); margin-bottom: 8px;
}
.plan-phase strong { display: block; font-size: 15px; margin-bottom: 6px; }
.plan-phase p { font-size: 13px; color: var(--text-dim); }

/* ---------- Roadmap ---------- */
.roadmap { display: flex; flex-direction: column; gap: 0; margin-top: 8px; }

.roadmap-phase {
  display: flex; gap: 20px; align-items: flex-start;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.roadmap-phase:last-child { border-bottom: none; }

.roadmap-marker {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--metallic); color: #000;
  font-size: 14px; font-weight: 700;
}

.roadmap-phase strong { display: block; font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.roadmap-phase p { font-size: 14px; color: var(--text-dim); margin-bottom: 10px; }

/* ---------- Files ---------- */
.dash-files { display: flex; flex-direction: column; gap: 12px; }

.dash-file {
  display: flex; align-items: center; gap: 20px;
  padding: 20px 24px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  transition: border-color 0.2s;
}
.dash-file:hover { border-color: rgba(255,255,255,0.18); }
.dash-file .file-icon { font-size: 28px; flex-shrink: 0; }
.dash-file > div { flex: 1; }
.dash-file strong { display: block; font-size: 15px; margin-bottom: 2px; }
.dash-file p { font-size: 13px; color: var(--text-dim); margin: 0; }
.dash-file span { font-size: 12px; color: var(--text-mute); }

/* ---------- Client Details ---------- */
.client-details {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0; margin-top: 8px;
}
.client-detail {
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.client-detail span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-mute); margin-bottom: 4px; }
.client-detail strong { font-size: 15px; font-weight: 500; }

/* ---------- Work Log Form / Table ---------- */
.worklog-form .form-grid { grid-template-columns: 1fr 1fr; }
.worklog-form .full { grid-column: 1/-1; }
.worklog-form .field input, .worklog-form .field textarea {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px; padding: 12px 14px;
  color: var(--text); font: inherit; font-size: 14px;
  outline: none; width: 100%; transition: border-color 0.2s;
}
.worklog-form .field input:focus, .worklog-form .field textarea:focus {
  border-color: var(--grey-light);
}
.worklog-form .field label { font-size: 13px; color: var(--text-dim); margin-bottom: 6px; display: block; }

.dash-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.dash-table th {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-mute); text-align: left;
  padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.dash-table td {
  padding: 12px 14px; font-size: 14px; color: var(--text-dim);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.dash-table tr:last-child td { border-bottom: none; }

/* ---------- Meetings ---------- */
.meeting-list { display: flex; flex-direction: column; gap: 12px; }

.meeting-item {
  display: flex; gap: 20px; align-items: flex-start;
  padding: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
}
.meeting-item.upcoming { border-color: rgba(200,200,200,0.2); }

.meeting-date {
  display: flex; flex-direction: column; align-items: center;
  background: var(--metallic); color: #000;
  border-radius: 12px; padding: 10px 14px; flex-shrink: 0;
  min-width: 54px;
}
.meeting-day { font-size: 24px; font-weight: 700; font-family: var(--font-serif); line-height: 1; }
.meeting-month { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; margin-top: 2px; }

.meeting-item strong { display: block; font-size: 15px; margin-bottom: 4px; }
.meeting-item p { font-size: 13px; color: var(--text-dim); margin: 0 0 8px; }

/* ---------- Scrollbar ---------- */
.dash-sidebar::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar { width: 4px; }
.dash-sidebar::-webkit-scrollbar-track,
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.dash-sidebar::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* ---------- Nesta Dashboard Specifics ---------- */
.nesta-metric-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.nesta-metric-row:last-child { border-bottom: none; }
.nesta-metric-row span { font-size: 14px; color: var(--text-dim); }
.nesta-metric-row strong { font-size: 15px; color: var(--text); }

.status-pill {
  display: inline-block; padding: 4px 12px; border-radius: 100px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.05em;
}
.status-active { background: rgba(59,130,246,0.12); color: #60a5fa; border: 1px solid rgba(59,130,246,0.25); }
.status-warm { background: rgba(234,179,8,0.12); color: #fbbf24; border: 1px solid rgba(234,179,8,0.25); }
.status-new { background: rgba(74,222,128,0.12); color: #4ade80; border: 1px solid rgba(74,222,128,0.25); }
.status-cold { background: rgba(255,255,255,0.06); color: var(--text-mute); border: 1px solid rgba(255,255,255,0.1); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .dash-sidebar { width: 200px; }
  .dash-main { padding: 24px 20px; }
}
@media (max-width: 640px) {
  .dash-layout { flex-direction: column; }
  .dash-sidebar { width: 100%; height: auto; position: static; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.07); padding: 12px; }
  .dash-menu { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .dash-menu-item { padding: 8px 12px; font-size: 12px; }
  .tracker-row { grid-template-columns: 1fr; }
  .worklog-form .form-grid { grid-template-columns: 1fr; }
}
