/* NEZO.app — Admin Styles */

/* ── Page header ── */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.page-title {
  font-size: 22px; font-weight: 800; color: var(--t1);
  display: flex; align-items: center; gap: 10px;
}
.page-title svg { width: 22px; height: 22px; flex-shrink: 0; }
.page-subtitle { font-size: 13px; color: var(--t4); margin-top: 4px; }

/* ── Dashboard grid ── */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.dash-card { min-height: 120px; }

/* ── Focus du jour ── */
.focus-input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--t1);
  font-size: 15px;
  font-family: var(--font);
  font-weight: 600;
  outline: none;
  padding: 8px 0;
}
.focus-input::placeholder { color: var(--t5); }

/* ── Inbox progress circle ── */
.inbox-circle {
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.inbox-circle svg { transform: rotate(-90deg); }
.inbox-pct {
  position: absolute;
  font-family: var(--mono);
  font-size: 22px; font-weight: 700;
  color: var(--cyan);
}

/* ── Dossier list ── */
.dossier-list { display: flex; flex-direction: column; gap: 8px; }

.dossier-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--bg2);
  border: 1px solid var(--b1);
  border-radius: var(--r3);
  cursor: pointer;
  transition: all var(--trans);
}
.dossier-row:hover {
  border-color: var(--b2);
  background: var(--bg3);
  transform: translateX(2px);
}
.dossier-row-name {
  font-size: 14px; font-weight: 600; color: var(--t1);
  flex: 1;
}
.dossier-row-client {
  font-size: 12px; color: var(--t4);
}
.dossier-row-meta {
  display: flex; align-items: center; gap: 8px;
}

/* ── Dossier view ── */
.dossier-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.dossier-back {
  display: flex; align-items: center; gap: 6px;
  color: var(--t4); cursor: pointer;
  font-size: 13px; transition: color var(--trans);
}
.dossier-back svg { width: 16px; height: 16px; }
.dossier-back:hover { color: var(--cyan); }
.dossier-name {
  font-size: 20px; font-weight: 800; color: var(--t1);
}

.dossier-tabs { margin-bottom: 20px; }
.dossier-tab-content { min-height: 300px; }

/* ── Actions tab ── */
.action-section {
  margin-bottom: 20px;
}
.action-section-title {
  font-size: 11px; font-weight: 700; color: var(--t4);
  text-transform: uppercase; letter-spacing: 0.8px;
  padding: 8px 0; border-bottom: 1px solid var(--b1);
  margin-bottom: 8px;
}
.action-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r2);
  transition: background var(--trans);
}
.action-item:hover { background: var(--bg3); }
.action-item-content { flex: 1; }
.action-item-title { font-size: 13px; color: var(--t2); }
.action-item-title.done { text-decoration: line-through; color: var(--t5); }
.action-item-meta {
  display: flex; align-items: center; gap: 8px;
  margin-top: 4px;
}

.action-add {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  color: var(--t5);
  cursor: pointer;
  font-size: 13px;
  transition: color var(--trans);
}
.action-add:hover { color: var(--cyan); }

/* ── Notes tab ── */
.note-item {
  padding: 14px 16px;
  background: var(--bg2);
  border: 1px solid var(--b1);
  border-radius: var(--r3);
  margin-bottom: 8px;
}
.note-item-text { font-size: 13px; color: var(--t2); line-height: 1.6; white-space: pre-wrap; }
.note-item-meta {
  display: flex; align-items: center; gap: 8px;
  margin-top: 8px; font-size: 11px; color: var(--t5);
}
.note-source-badge {
  font-size: 10px; padding: 2px 6px;
  border-radius: 4px; font-weight: 600;
}

/* ── Chat tab ── */
.chat-container {
  display: flex; flex-direction: column;
  height: calc(100vh - 260px);
  min-height: 400px;
}
.chat-messages {
  flex: 1; overflow-y: auto;
  padding: 16px; display: flex; flex-direction: column; gap: 6px;
}
.chat-msg {
  max-width: 75%; padding: 10px 14px;
  border-radius: 12px 12px 12px 4px;
  font-size: 13px; line-height: 1.5;
  position: relative;
}
.chat-msg.nezo {
  background: var(--cyan-bg2);
  color: var(--t1);
  align-self: flex-end;
  border-radius: 12px 12px 4px 12px;
}
.chat-msg.client {
  background: var(--bg3);
  color: var(--t2);
  align-self: flex-start;
}
.chat-msg-time {
  font-size: 10px; color: var(--t5);
  margin-top: 4px; font-family: var(--mono);
}
.chat-msg-handled {
  position: absolute; top: 6px; right: 8px;
  font-size: 10px; color: var(--green);
}
.chat-msg-reply {
  padding: 6px 10px; margin-bottom: 6px;
  background: rgba(0,0,0,0.15);
  border-left: 2px solid var(--cyan);
  border-radius: 0 6px 6px 0;
  font-size: 12px; color: var(--t4);
}
.chat-msg-actions {
  display: none; position: absolute; top: -8px; right: 8px;
  gap: 2px; background: var(--bg2);
  border: 1px solid var(--b2);
  border-radius: var(--r1); padding: 2px;
}
.chat-msg-actions svg { width: 14px; height: 14px; }
.chat-msg:hover .chat-msg-actions { display: flex; }

.chat-input-bar {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 12px 16px;
  background: var(--bg1);
  border-top: 1px solid var(--b1);
  border-radius: 0 0 var(--r4) var(--r4);
}
.chat-input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--b2);
  border-radius: var(--r3);
  padding: 10px 14px;
  color: var(--t1);
  font-family: var(--font);
  font-size: 13px;
  resize: none;
  min-height: 40px;
  max-height: 120px;
  outline: none;
}
.chat-input:focus { border-color: var(--cyan); }

/* ── Documents tab ── */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.doc-thumb {
  aspect-ratio: 1;
  border-radius: var(--r3);
  overflow: hidden;
  border: 1px solid var(--b1);
  cursor: pointer;
  transition: border-color var(--trans);
}
.doc-thumb:hover { border-color: var(--cyan); }
.doc-thumb img { width: 100%; height: 100%; object-fit: cover; }

.doc-file {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--bg2);
  border: 1px solid var(--b1);
  border-radius: var(--r3);
  cursor: pointer;
  transition: border-color var(--trans);
}
.doc-file:hover { border-color: var(--b3); }
.doc-file-name { font-size: 13px; color: var(--t2); flex: 1; }
.doc-file-size { font-size: 11px; color: var(--t5); font-family: var(--mono); }

/* ── Echeances ── */
.ech-month { margin-bottom: 24px; }
.ech-month-title {
  font-size: 14px; font-weight: 700; color: var(--t1);
  padding-bottom: 8px; border-bottom: 1px solid var(--b1);
  margin-bottom: 10px;
}
.ech-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: var(--r2);
  margin-bottom: 4px;
}
.ech-date {
  font-family: var(--mono); font-size: 12px;
  font-weight: 600; color: var(--t3);
  min-width: 80px;
}
.ech-label { font-size: 13px; color: var(--t2); flex: 1; }

/* ── Calendar week ── */
.cal-week {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 1px; background: var(--b1); border-radius: var(--r3); overflow: hidden;
}
.cal-day {
  background: var(--bg2);
  padding: 8px;
  min-height: 100px;
}
.cal-day-header {
  font-size: 10px; font-weight: 700; color: var(--t4);
  text-transform: uppercase; margin-bottom: 4px;
}
.cal-day-num {
  font-family: var(--mono); font-size: 18px; font-weight: 700;
  color: var(--t3); margin-bottom: 8px;
}
.cal-day.today .cal-day-num { color: var(--cyan); }

.cal-event {
  font-size: 10px; padding: 3px 6px;
  border-radius: 4px; margin-bottom: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── Private space ── */
.private-tabs { margin-bottom: 20px; }

.todo-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: var(--r2);
  transition: background var(--trans);
}
.todo-item:hover { background: var(--bg3); }
.todo-priority {
  width: 4px; height: 4px; border-radius: 50%;
  margin-top: 7px; flex-shrink: 0;
}
.todo-priority.critical { background: var(--red); box-shadow: 0 0 6px var(--red); }
.todo-priority.urgent { background: var(--orange); box-shadow: 0 0 6px var(--orange); }
.todo-priority.important { background: var(--cyan); }
.todo-priority.normal { background: var(--t5); }

.reminder-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--bg2);
  border: 1px solid var(--b1);
  border-radius: var(--r3);
  margin-bottom: 6px;
}
.reminder-date {
  font-family: var(--mono); font-size: 11px;
  color: var(--purple); font-weight: 600;
}
.reminder-label { font-size: 13px; color: var(--t2); flex: 1; }

/* ── Quick reply ── */
.quick-reply {
  padding: 12px;
  background: var(--bg2);
  border: 1px solid var(--b1);
  border-radius: var(--r3);
  margin-bottom: 8px;
}
.quick-reply-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.quick-reply-name { font-size: 13px; font-weight: 600; color: var(--t1); }
.quick-reply-msg {
  font-size: 12px; color: var(--t4);
  padding: 6px 0; border-bottom: 1px solid var(--b1);
  margin-bottom: 8px;
}
.quick-reply-input {
  display: flex; gap: 6px;
}

@media (max-width: 768px) {
  .dash-grid { grid-template-columns: 1fr; }
  .cal-week { grid-template-columns: 1fr; }
  .chat-msg { max-width: 90%; }
}
