/* ============================================================
   pension.azeo.ch — Board & Admin CSS
   ============================================================ */

/* ---- Header tabs entreprises ---- */
.ent-header {
  background: #0F172A;
  border-bottom: 1px solid rgba(255,255,255,.08);
  position: sticky;
  top: 0;
  z-index: 100;
}
.ent-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.ent-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}
.ent-logo-sep { color: rgba(255,255,255,.25); font-weight: 300; }
.ent-logo-sub { font-size: 12px; font-weight: 400; color: rgba(255,255,255,.5); }
.ent-tabs {
  display: flex;
  gap: 4px;
}
.ent-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.5);
  text-decoration: none;
  letter-spacing: .03em;
  text-transform: uppercase;
  transition: background .15s, color .15s;
}
.ent-tab:hover { background: rgba(255,255,255,.07); color: rgba(255,255,255,.85); }
.ent-tab.active { background: rgba(255,255,255,.12); color: #fff; }

/* ---- Login pages ---- */
.board-body { background: #F1F5F9; min-height: 100vh; }
.board-login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  min-height: calc(100vh - 56px);
}
.board-login-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 32px rgba(0,0,0,.10);
  padding: 48px 44px;
  width: 100%;
  max-width: 400px;
  text-align: center;
}
.board-login-icon { font-size: 48px; margin-bottom: 16px; }
.board-login-title { font-size: 22px; font-weight: 800; color: #0F172A; margin-bottom: 8px; }
.board-login-sub { font-size: 14px; color: #64748B; margin-bottom: 32px; }
.board-login-note {
  margin-top: 20px;
  font-size: 11px;
  color: #94A3B8;
  background: #F8FAFC;
  border-radius: 6px;
  padding: 8px 12px;
}
.btn-board-login {
  width: 100%;
  background: #1E73BE;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 13px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
  margin-top: 8px;
}
.btn-board-login:hover { background: #1558A0; }

/* ---- Layout Board/Admin ---- */
.board-wrap {
  display: flex;
  min-height: calc(100vh - 56px);
}

/* Sidebar */
.board-sidebar {
  width: 220px;
  min-width: 220px;
  background: #0F172A;
  display: flex;
  flex-direction: column;
  padding: 20px 0;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
}
.board-sidebar-company {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  margin-bottom: 16px;
}
.board-company-avatar {
  width: 38px;
  height: 38px;
  background: #1E73BE;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.board-company-name { font-size: 13px; font-weight: 700; color: #fff; }
.board-company-role { font-size: 11px; color: #64748B; }

.board-nav { flex: 1; padding: 0 8px; }
.board-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #94A3B8;
  text-decoration: none;
  transition: background .15s, color .15s;
  margin-bottom: 2px;
}
.board-nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.board-nav-item.active { background: rgba(255,255,255,.1); color: #fff; }

.board-sidebar-footer { padding: 16px; border-top: 1px solid rgba(255,255,255,.06); }
.board-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #64748B;
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 6px;
  transition: color .15s;
}
.board-logout:hover { color: #F87171; }

/* Main content */
.board-main { flex: 1; padding: 32px; overflow-y: auto; }
.board-section { display: none; }
.board-section.active { display: block; }
.board-section-header { margin-bottom: 28px; }
.board-section-header h1 { font-size: 24px; font-weight: 800; color: #0F172A; margin-bottom: 6px; }
.board-section-header p { font-size: 14px; color: #64748B; }

/* Stats cards */
.board-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.board-stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #E2E8F0;
}
.bsc-value { font-size: 28px; font-weight: 800; color: #0F172A; margin-bottom: 4px; }
.bsc-label { font-size: 12px; color: #64748B; }
.bsc-bar { height: 4px; background: #E2E8F0; border-radius: 2px; margin-top: 12px; }
.bsc-fill { height: 100%; border-radius: 2px; }

/* Cards */
.board-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  padding: 24px;
}
.board-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.board-card-header h3 { font-size: 15px; font-weight: 700; color: #0F172A; }
.btn-board-add {
  background: #EFF6FF;
  color: #1E73BE;
  border: 1px solid #BFDBFE;
  border-radius: 7px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.btn-board-add:hover { background: #DBEAFE; }

/* Table */
.board-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.board-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #94A3B8;
  border-bottom: 1px solid #E2E8F0;
}
.board-table td {
  padding: 12px 12px;
  color: #334155;
  border-bottom: 1px solid #F1F5F9;
}
.board-table tr:last-child td { border-bottom: none; }
.table-action { color: #1E73BE; text-decoration: none; font-weight: 600; font-size: 12px; }
.table-action:hover { text-decoration: underline; }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
}
.badge-green  { background: #DCFCE7; color: #15803D; }
.badge-orange { background: #FEF3C7; color: #B45309; }
.badge-blue   { background: #DBEAFE; color: #1E40AF; }
.badge-purple { background: #EDE9FE; color: #6D28D9; }

/* Docs grid */
.docs-grid { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.doc-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 16px 20px;
  transition: border-color .15s;
}
.doc-card:hover { border-color: #1E73BE; }
.doc-icon { font-size: 24px; flex-shrink: 0; }
.doc-info { flex: 1; }
.doc-title { font-size: 14px; font-weight: 600; color: #0F172A; }
.doc-meta { font-size: 12px; color: #94A3B8; margin-top: 3px; }
.doc-tag {
  display: inline-block;
  background: #F1F5F9;
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 11px;
  color: #475569;
}
.doc-btn {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 7px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #1E73BE;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s;
}
.doc-btn:hover { background: #EFF6FF; }

.docs-upload-zone {
  border: 2px dashed #CBD5E1;
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  color: #94A3B8;
  font-size: 14px;
  cursor: pointer;
  transition: border-color .2s;
}
.docs-upload-zone:hover { border-color: #1E73BE; }
.docs-upload-zone a { color: #1E73BE; }
.docs-upload-zone span { display: block; font-size: 12px; margin-top: 6px; }

/* FAQ bars */
.faq-bars { display: flex; flex-direction: column; gap: 14px; }
.faq-bar-row { display: flex; align-items: center; gap: 12px; }
.faq-bar-label { flex: 0 0 280px; font-size: 13px; color: #334155; }
.faq-bar-track { flex: 1; height: 8px; background: #F1F5F9; border-radius: 4px; }
.faq-bar-fill { height: 100%; background: #1E73BE; border-radius: 4px; }
.faq-bar-count { flex: 0 0 40px; text-align: right; font-size: 13px; font-weight: 700; color: #64748B; }

/* Board chat */
.board-chat-wrap {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  max-height: 600px;
}
.board-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 300px;
  max-height: 400px;
}
.board-chat-input-wrap {
  display: flex;
  gap: 10px;
  padding: 16px;
  border-top: 1px solid #E2E8F0;
}
.board-chat-input-wrap textarea {
  flex: 1;
  border: 1.5px solid #E2E8F0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  resize: none;
  font-family: inherit;
}
.board-chat-input-wrap textarea:focus { outline: none; border-color: #1E73BE; }
.btn-board-send {
  background: #1E73BE;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.btn-board-send:hover { background: #1558A0; }
.board-chat-footer {
  padding: 8px 16px;
  font-size: 11px;
  color: #94A3B8;
  text-align: center;
  border-top: 1px solid #F1F5F9;
}

/* Connexions grid */
.admin-connections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}
.conn-card {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.conn-card.conn-active { border-left: 3px solid #22C55E; }
.conn-card.conn-inactive { border-left: 3px solid #CBD5E1; }
.conn-logo { font-size: 28px; flex-shrink: 0; }
.conn-info { flex: 1; }
.conn-name { font-size: 14px; font-weight: 700; color: #0F172A; }
.conn-desc { font-size: 12px; color: #64748B; margin-top: 2px; }
.conn-key { font-size: 11px; color: #94A3B8; margin-top: 4px; font-family: monospace; }

/* Admin stripe note */
.admin-stripe-note {
  margin-top: 16px;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  color: #92400E;
}
.admin-stripe-note a { color: #1E73BE; font-weight: 600; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal-card {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.modal-header h3 { font-size: 18px; font-weight: 700; color: #0F172A; }
.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #94A3B8;
  line-height: 1;
}
.modal-close:hover { color: #0F172A; }
.modal-form .form-group { text-align: left; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}
.btn-cancel {
  background: #F1F5F9;
  color: #475569;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.btn-cancel:hover { background: #E2E8F0; }

/* Responsive */
@media (max-width: 768px) {
  .board-wrap { flex-direction: column; }
  .board-sidebar { width: 100%; min-width: unset; position: static; height: auto; flex-direction: row; flex-wrap: wrap; padding: 12px; }
  .board-sidebar-company { display: none; }
  .board-nav { display: flex; flex-wrap: wrap; padding: 0; }
  .board-main { padding: 16px; }
  .faq-bar-label { flex: 0 0 160px; }
  .admin-connections-grid { grid-template-columns: 1fr; }
  .ent-logo-sub { display: none; }
  .ent-tab span { display: none; }
}
