:root {
  --brand: #f87e44;
  --brand-light: #ffc379;
  --grad: linear-gradient(135deg, #f87e44 0%, #ffc379 100%);
  --n50: #f8f6f6;
  --n100: #e7e0de;
  --n200: #d3c4c1;
  --n300: #b59f97;
  --n400: #907369;
  --n500: #75594f;
  --n600: #614c44;
  --n700: #51413a;
  --n800: #453a34;
  --n900: #3b342f;
  --n950: #251c12;
  --white: #ffffff;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 2px 8px rgba(59, 52, 47, 0.08);
  --shadow-md: 0 4px 20px rgba(59, 52, 47, 0.12);
  --shadow-lg: 0 8px 40px rgba(59, 52, 47, 0.16);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Nunito" !important;
}

body {
  background: var(--n50);
  color: var(--n900);
  min-height: 100vh;
}

/* ===== SCREENS ===== */
.screen {
  min-height: 100vh;
}

.screen.active {
  display: flex;
}

/* ===== LOGIN ===== */
#screen-login {
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 440px;
  overflow: hidden;
}

.login-header {
  background: var(--grad);
  padding: 40px 40px 32px;
  text-align: center;
}

.login-mascot {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-brand {
  font-size: 28px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.5px;
}

.login-tagline {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 4px;
}

.login-body {
  padding: 36px 40px 40px;
}

.login-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--n900);
  margin-bottom: 24px;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--n600);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.field input {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--n100);
  border-radius: var(--radius-md);
  font-family: "Nunito", sans-serif;
  font-size: 15px;
  color: var(--n900);
  background: var(--n50);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  outline: none;
}

.field input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(248, 126, 68, 0.12);
  background: var(--white);
}

.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--grad);
  border: none;
  border-radius: var(--radius-md);
  font-family: "Nunito", sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  cursor: pointer;
  margin-top: 8px;
  transition:
    opacity 0.2s,
    transform 0.1s;
  letter-spacing: -0.2px;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.login-forgot {
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
  color: var(--n400);
}

.login-forgot a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
}

/* ===== APP LAYOUT ===== */
#screen-app {
  flex-direction: column;
  background: var(--n50);
}

.app-body {
  display: flex;
  flex: 1;
  min-height: calc(100vh - 48px);
}

/* ===== TOPBAR (V2 Overrides) ===== */
.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--n100);
  padding: 0 20px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: none;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.topbar-brand {
  font-size: 17px;
  font-weight: 800;
  color: var(--n900);
  letter-spacing: -0.4px;
}

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

.topbar-welcome {
  font-size: 13px;
  color: var(--n400);
}

.topbar-welcome strong {
  color: var(--n700);
  font-weight: 700;
}

.topbar-avatar {
  width: 28px;
  height: 28px;
  background: var(--grad);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--white);
}

.topbar-logout {
  font-size: 13px;
  color: var(--n400);
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--n100);
  transition: all 0.2s;
  font-weight: 600;
}

.topbar-logout:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* ===== SIDEBAR (V2 Overrides) ===== */
.sidebar {
  width: 300px;
  background: #fdfcfb;
  border-right: 1px solid var(--n100);
  padding: 16px 10px;
  flex-shrink: 0;
  position: sticky;
  top: 48px;
  height: calc(100vh - 48px);
  overflow-y: auto;
}

.nav-section {
  margin-bottom: 8px;
}

.nav-section-label {
  font-size: 9px;
  font-weight: 800;
  color: var(--n300);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 0 8px;
  margin-bottom: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 13px;
  font-weight: 600;
  color: var(--n500);
  margin-bottom: 1px;
}

.nav-item:hover {
  background: var(--n50);
  color: var(--n800);
}

.nav-item.active {
  background: rgba(248, 126, 68, 0.1);
  color: var(--brand);
}

.nav-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.nav-item.active .nav-icon {
  background: rgba(248, 126, 68, 0.15);
}

.nav-item:hover .nav-icon {
  background: var(--n100);
}

/* ===== MAIN CONTENT (V2 Overrides) ===== */
.main-content {
  flex: 1;
  padding: 20px 24px;
  overflow-y: auto;
  margin-bottom: 5rem;
}

.page-header {
  margin-bottom: 16px;
}

.page-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--n900);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.page-subtitle {
  font-size: 12px;
  color: var(--n400);
  font-weight: 500;
}

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

.stat-card {
  background: var(--white);
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--n100);
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(248, 126, 68, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.stat-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--n900);
  letter-spacing: -0.5px;
}

.stat-label {
  font-size: 11px;
  color: var(--n400);
  font-weight: 600;
  margin-top: 0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.card {
  background: var(--white);
  border-radius: 12px !important;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--n100);
}

.card-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--n800);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== PROPERTY CARD ===== */
.property-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: linear-gradient(
    135deg,
    rgba(248, 126, 68, 0.06) 0%,
    rgba(255, 195, 121, 0.06) 100%
  );
  border-radius: var(--radius-md);
  border: 1px solid rgba(248, 126, 68, 0.15);
  margin-bottom: 12px;
}

.property-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.property-info {
  flex: 1;
}

.property-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--n800);
}

.property-address {
  font-size: 13px;
  color: var(--n400);
  margin-top: 2px;
  font-weight: 500;
}

.property-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(248, 126, 68, 0.12);
  color: var(--brand);
}

/* ===== QUICK ACTIONS ===== */
.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.quick-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--n50);
  border-radius: var(--radius-md);
  border: 1px solid var(--n100);
  cursor: pointer;
  transition: all 0.15s;
  font-size: 13px;
  font-weight: 700;
  color: var(--n700);
}

.quick-btn:hover {
  background: rgba(248, 126, 68, 0.06);
  border-color: rgba(248, 126, 68, 0.3);
  color: var(--brand);
}

.quick-btn span {
  font-size: 16px;
}

/* ===== CALENDAR MINI ===== */
.mini-cal {
  font-size: 13px;
}

.mini-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-weight: 700;
  color: var(--n700);
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}

.cal-day-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--n300);
  padding: 4px 0;
  text-transform: uppercase;
}

.cal-day {
  padding: 6px 4px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--n600);
  cursor: pointer;
  transition: all 0.1s;
}

.cal-day:hover {
  background: var(--n50);
}

.cal-day.today {
  background: var(--grad);
  color: white;
  font-weight: 800;
}

.cal-day.other-month {
  color: var(--n200);
}

/* ===== COMPTE (Settings) ===== */
.account-sections {
  display: grid;
  gap: 24px;
}

.section-card {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--n100);
  overflow: hidden;
}

.section-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--n100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-header-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(248, 126, 68, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
}

.section-header h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--n800);
}

.section-header p {
  font-size: 13px;
  color: var(--n400);
  margin-top: 1px;
}

.section-body {
  padding: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-row.full {
  grid-template-columns: 1fr;
}

.form-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--n400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.form-field input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--n100);
  border-radius: var(--radius-sm);
  font-family: "Nunito", sans-serif;
  font-size: 15px;
  color: var(--n800);
  background: var(--n50);
  transition: all 0.2s;
  outline: none;
  font-weight: 500;
}

.form-field input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(248, 126, 68, 0.1);
  background: var(--white);
}

.form-field input:read-only {
  background: var(--n50);
  color: var(--n400);
  cursor: default;
}

.btn-save {
  padding: 11px 24px;
  background: var(--grad);
  border: none;
  border-radius: var(--radius-sm);
  font-family: "Nunito", sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-save:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-outline {
  padding: 11px 24px;
  background: transparent;
  border: 1.5px solid var(--n200);
  border-radius: var(--radius-sm);
  font-family: "Nunito", sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--n600);
  cursor: pointer;
  transition: all 0.2s;
  margin-right: 8px;
}

.btn-outline:hover {
  border-color: var(--n400);
  color: var(--n800);
}

.btn-row {
  display: flex;
  justify-content: flex-end;
  padding-top: 8px;
  gap: 8px;
}

.password-rules {
  background: var(--n50);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-top: 16px;
  border: 1px solid var(--n100);
}

.password-rules p {
  font-size: 12px;
  color: var(--n400);
  font-weight: 600;
}

/* ===== LOCATIONS (V1 Default styling maintained unless overridden) ===== */
.location-table {
  width: 100%;
  border-collapse: collapse;
}

.location-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 800;
  color: var(--n400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 16px 12px;
  border-bottom: 1px solid var(--n100);
}

.location-table td {
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--n700);
  border-bottom: 1px solid var(--n50);
}

.location-table tr:last-child td {
  border-bottom: none;
}

.location-table tr:hover td {
  background: rgba(248, 126, 68, 0.03);
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.badge-orange {
  background: rgba(248, 126, 68, 0.12);
  color: var(--brand);
}

.badge-green {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
}

/* ===== DOCUMENTS & UPLOADS ===== */
.docs-tabs {
  display: flex;
  gap: 4px;
  background: var(--n100);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 20px;
  width: fit-content;
}

.docs-tab {
  padding: 8px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--n500);
  cursor: pointer;
  transition: all 0.15s;
}

.docs-tab.active {
  background: var(--white);
  color: var(--brand);
  box-shadow: var(--shadow-sm);
}

.doc-panel {
  display: none;
}

.doc-panel.active {
  display: block;
}

.doc-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--n100);
  background: var(--white);
  margin-bottom: 6px;
  transition: all 0.15s;
}

.doc-item:hover {
  border-color: rgba(248, 126, 68, 0.3);
  box-shadow: var(--shadow-sm);
}

.doc-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(248, 126, 68, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.doc-info {
  flex: 1;
}

.doc-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--n800);
}

.doc-date {
  font-size: 12px;
  color: var(--n400);
  font-weight: 500;
  margin-top: 2px;
}

.doc-download {
  padding: 8px 14px;
  background: rgba(248, 126, 68, 0.08);
  border: none;
  border-radius: 8px;
  font-family: "Nunito", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
  cursor: pointer;
  transition: all 0.15s;
}

.doc-download:hover {
  background: rgba(248, 126, 68, 0.16);
}

.upload-zone {
  border: 2px dashed var(--n200);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--white);
  margin-bottom: 20px;
}

.upload-zone:hover {
  border-color: var(--brand);
  background: rgba(248, 126, 68, 0.02);
}

.upload-zone-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.upload-zone h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--n700);
  margin-bottom: 6px;
}

.upload-zone p {
  font-size: 13px;
  color: var(--n400);
  font-weight: 500;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--n600);
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 14px;
  color: var(--n400);
  font-weight: 500;
}

/* ===== MESSAGERIE ===== */
.message-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  height: calc(100vh - 200px);
  min-height: 500px;
}

.conversations-list {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--n100);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.conv-list-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--n100);
  font-size: 14px;
  font-weight: 800;
  color: var(--n800);
}

.conv-new-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  transition: all 0.15s;
  border-bottom: 1px solid var(--n50);
}

.conv-new-btn:hover {
  background: rgba(248, 126, 68, 0.05);
}

.conv-new-avatar {
  width: 40px;
  height: 40px;
  background: var(--grad);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.conv-new-info h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--n800);
}

.conv-new-info p {
  font-size: 12px;
  color: var(--n400);
  font-weight: 500;
}

.message-panel {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--n100);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.message-panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--n100);
  display: flex;
  align-items: center;
  gap: 12px;
}

.message-panel-avatar {
  width: 38px;
  height: 38px;
  background: var(--grad);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.message-panel-info h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--n800);
}

.message-panel-info p {
  font-size: 12px;
  color: var(--n400);
}

.messages-area {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: var(--n50);
}

.message-bubble {
  max-width: 70%;
  margin-bottom: 12px;
}

.message-bubble.incoming {
  margin-right: auto;
}

.message-bubble.outgoing {
  margin-left: auto;
}

.bubble-content {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.incoming .bubble-content {
  background: var(--white);
  color: var(--n800);
  border: 1px solid var(--n100);
  border-bottom-left-radius: 4px;
}

.outgoing .bubble-content {
  background: var(--grad);
  color: var(--white);
  border-bottom-right-radius: 4px;
}

.bubble-time {
  font-size: 11px;
  color: var(--n300);
  margin-top: 4px;
  padding: 0 4px;
  font-weight: 600;
}

.outgoing .bubble-time {
  text-align: right;
}

.message-input-area {
  padding: 16px 20px;
  border-top: 1px solid var(--n100);
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.message-input-wrap {
  flex: 1;
  position: relative;
}

.message-input {
  width: 100%;
  padding: 11px 44px 11px 14px;
  border: 1.5px solid var(--n100);
  border-radius: var(--radius-md);
  font-family: "Nunito", sans-serif;
  font-size: 14px;
  resize: none;
  outline: none;
  transition: all 0.2s;
  font-weight: 500;
}

.message-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(248, 126, 68, 0.1);
}

.attach-btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--n400);
}

.send-btn {
  width: 42px;
  height: 42px;
  background: var(--grad);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.send-btn:hover {
  opacity: 0.9;
  transform: scale(1.05);
}

/* ===== RAPPORT ===== */
.rapport-filters {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--n100);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--n600);
}

.filter-group input[type="date"] {
  padding: 8px 12px;
  border: 1.5px solid var(--n100);
  border-radius: var(--radius-sm);
  font-family: "Nunito", sans-serif;
  font-size: 13px;
  color: var(--n700);
  background: var(--n50);
  outline: none;
  font-weight: 600;
}

.filter-group input[type="date"]:focus {
  border-color: var(--brand);
}

.btn-filter {
  padding: 9px 20px;
  background: var(--grad);
  border: none;
  border-radius: var(--radius-sm);
  font-family: "Nunito", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-filter:hover {
  opacity: 0.9;
}

.rapport-actions {
  display: flex;
  gap: 10px;
  margin-left: auto;
}

.btn-action {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: var(--n50);
  border: 1.5px solid var(--n100);
  border-radius: var(--radius-sm);
  font-family: "Nunito", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--n600);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-action:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: rgba(248, 126, 68, 0.05);
}

.transactions-table {
  width: 100%;
  border-collapse: collapse;
}

.transactions-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 800;
  color: var(--n400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 16px 12px;
  border-bottom: 1.5px solid var(--n100);
}

.transactions-table th:last-child,
.transactions-table th:nth-last-child(2) {
  text-align: right;
}

.transactions-table td {
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--n700);
  border-bottom: 1px solid var(--n50);
}

.transactions-table td:last-child,
.transactions-table td:nth-last-child(2) {
  text-align: right;
}

.transactions-table tr:last-child td {
  border-bottom: none;
}

.transactions-table tr:hover td {
  background: rgba(248, 126, 68, 0.02);
}

.amount-credit {
  color: #16a34a;
  font-weight: 700;
}

.amount-debit {
  color: #dc2626;
  font-weight: 700;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--n900);
  color: white;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s;
  z-index: 1000;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== BANNIÈRE FACTURE ELEC ===== */
.banner-facture {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #3b342f 0%, #51413a 100%);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin-bottom: 24px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid rgba(248, 126, 68, 0.2);
}

.banner-facture:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(248, 126, 68, 0.2);
  border-color: rgba(248, 126, 68, 0.4);
}

.banner-icon {
  width: 46px;
  height: 46px;
  background: var(--grad);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.banner-text {
  flex: 1;
}

.banner-text strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 3px;
}

.banner-text span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

.banner-cta {
  padding: 9px 18px;
  background: var(--grad);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 800;
  color: white;
  white-space: nowrap;
  flex-shrink: 0;
}

.facture-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--n100);
  background: var(--white);
  margin-bottom: 6px;
  transition: all 0.15s;
}

.facture-row:hover {
  border-color: rgba(248, 126, 68, 0.3);
  box-shadow: var(--shadow-sm);
}

.facture-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(248, 126, 68, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.facture-meta {
  flex: 1;
  min-width: 0;
}

.facture-nom {
  font-size: 13px;
  font-weight: 700;
  color: var(--n800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.facture-details {
  display: flex;
  gap: 16px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.facture-detail {
  font-size: 11px;
  color: var(--n400);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.facture-detail strong {
  color: var(--n600);
  font-weight: 700;
}

.facture-amount {
  font-size: 14px;
  font-weight: 800;
  color: var(--n800);
  white-space: nowrap;
  flex-shrink: 0;
}

.facture-dl {
  padding: 7px 14px;
  background: rgba(248, 126, 68, 0.08);
  border: none;
  border-radius: 8px;
  font-family: "Nunito", sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand);
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}

.facture-dl:hover {
  background: rgba(248, 126, 68, 0.16);
}

.facture-badge-new {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(248, 126, 68, 0.12);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  color: var(--brand);
  margin-left: 8px;
}

/* ========================================================= */
/* ===== V2 SPECIFIC ADDITIONS (Pisteur, Mail, Solde) ====== */
/* ========================================================= */

/* Version tag */
.version-tag {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(248, 126, 68, 0.1);
  border: 1px solid rgba(248, 126, 68, 0.25);
  color: var(--brand);
  font-size: 10px;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 20px;
  z-index: 200;
  font-family: "Nunito", sans-serif;
  letter-spacing: 0.5px;
  pointer-events: none;
}

/* Barre de filtres rapides type Pisteur */
.pisteur-filterbar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.pf-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.15s;
  font-family: "Nunito", sans-serif;
}

.pf-chip:hover {
  opacity: 0.85;
}

.pf-chip.all {
  background: var(--n50);
  border-color: var(--n200);
  color: var(--n700);
}

.pf-chip.all.active {
  background: var(--n900);
  border-color: var(--n900);
  color: white;
}

.pf-chip.nouveau {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.25);
  color: #1d4ed8;
}

.pf-chip.nouveau.active {
  background: #1d4ed8;
  border-color: rgba(59, 130, 246, 0.25);
  color: white;
}

.pf-chip.encours {
  background: rgba(234, 179, 8, 0.1);
  border-color: rgba(234, 179, 8, 0.35);
  color: #92400e;
}

.pf-chip.recu {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
  color: #15803d;
}

.pf-chip.recu.active {
  background: #15803d;
  border-color: rgba(34, 197, 94, 0.3);
  color: white;
}

.pf-chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pf-count {
  font-size: 11px;
  opacity: 0.6;
  margin-left: 2px;
}

/* Table Pisteur-style */
.pisteur-table-wrap {
  background: white;
  border-radius: 12px;
  border: 1px solid var(--n100);
  overflow: hidden;
}

.pisteur-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--n100);
}

.pisteur-search input {
  flex: 1;
  border: none;
  outline: none;
  font-family: "Nunito", sans-serif;
  font-size: 13px;
  color: var(--n800);
  background: transparent;
  font-weight: 500;
}

.pisteur-search input::placeholder {
  color: var(--n300);
}

.pisteur-search-icon {
  font-size: 14px;
  color: var(--n300);
}

.pisteur-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.pisteur-table thead th {
  text-align: left;
  font-size: 10px;
  font-weight: 800;
  color: var(--n400);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--n100);
  background: var(--n50);
  white-space: nowrap;
}

.pisteur-table tbody td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--n50);
  color: var(--n700);
  font-weight: 600;
  vertical-align: middle;
}

.pisteur-table tbody tr:last-child td {
  border-bottom: none;
}

.pisteur-table tbody tr:hover td {
  background: rgba(248, 126, 68, 0.03);
}

/* Inline status badges */
.st-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.st-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.st-nouveau {
  background: rgba(59, 130, 246, 0.08);
  color: #1d4ed8;
}

.st-nouveau .dot {
  background: #3b82f6;
}

.st-recu {
  background: rgba(34, 197, 94, 0.1);
  color: #15803d;
}

.st-recu .dot {
  background: #22c55e;
}

.st-attente {
  background: rgba(234, 179, 8, 0.1);
  color: #92400e;
}

.st-attente .dot {
  background: #eab308;
}

/* Metric pill inline */
.metric-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--n600);
}

/* Row actions */
.row-action {
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(248, 126, 68, 0.08);
  border: none;
  font-size: 11px;
  font-weight: 700;
  color: var(--brand);
  cursor: pointer;
  font-family: "Nunito", sans-serif;
  transition: all 0.1s;
  text-decoration: none;
}

.row-action:hover {
  background: rgba(248, 126, 68, 0.16);
}

/* SOLDE BAR */
.solde-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--white);
  border: 1px solid var(--n100);
  border-radius: 12px;
  padding: 14px 20px;
  margin-bottom: 18px;
  cursor: pointer;
  transition: all 0.15s;
}

.solde-bar:hover {
  border-color: rgba(248, 126, 68, 0.4);
  box-shadow: var(--shadow-sm);
}

.solde-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.solde-icon {
  font-size: 22px;
}

.solde-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--n700);
}

.solde-sub {
  font-size: 11px;
  color: var(--n300);
  font-weight: 500;
  margin-top: 2px;
}

.solde-amount {
  font-size: 20px;
  font-weight: 800;
  color: #16a34a;
  margin-right: 16px;
}

.solde-cta {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand);
  white-space: nowrap;
}

.stat-since {
  font-size: 10px;
  color: var(--n300);
  font-weight: 500;
  margin-top: 2px;
}

/* MAIL */
.mail-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mail-compose-card {
  background: var(--white);
  border: 1px solid var(--n100);
  border-radius: 12px;
  overflow: hidden;
}

.mail-compose-header {
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 800;
  color: var(--n700);
  border-bottom: 1px solid var(--n100);
  background: var(--n50);
}

.mail-compose-body {
  padding: 0;
}

.mail-field-row {
  display: flex;
  align-items: center;
  padding: 10px 18px;
  border-bottom: 1px solid var(--n50);
  gap: 12px;
}

.mail-field-row.border-top {
  border-top: 1px solid var(--n100);
}

.mail-field-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--n400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: 32px;
  flex-shrink: 0;
}

.mail-field-value {
  font-size: 13px;
  color: var(--n700);
  font-weight: 600;
}

.mail-subject-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: "Nunito", sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--n800);
  background: transparent;
}

.mail-subject-input::placeholder {
  color: var(--n300);
  font-weight: 500;
}

.mail-body-input {
  width: 100%;
  padding: 14px 18px;
  border: none;
  outline: none;
  font-family: "Nunito", sans-serif;
  font-size: 14px;
  color: var(--n700);
  resize: none;
  background: transparent;
  line-height: 1.6;
  font-weight: 500;
}

.mail-body-input::placeholder {
  color: var(--n300);
}

.mail-compose-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-top: 1px solid var(--n100);
  background: var(--n50);
}

.mail-attach-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--n400);
  cursor: pointer;
  transition: color 0.15s;
}

.mail-attach-label:hover {
  color: var(--brand);
}

.mail-inbox-card {
  background: var(--white);
  border: 1px solid var(--n100);
  border-radius: 12px;
  overflow: hidden;
}

.mail-inbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 800;
  color: var(--n700);
  border-bottom: 1px solid var(--n100);
  background: var(--n50);
}

.mail-count {
  font-size: 11px;
  font-weight: 700;
  background: rgba(248, 126, 68, 0.1);
  color: var(--brand);
  padding: 2px 8px;
  border-radius: 20px;
}

.mail-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--n50);
  cursor: pointer;
  transition: background 0.1s;
}

.mail-item:hover {
  background: rgba(248, 126, 68, 0.02);
}

.mail-item:last-child {
  border-bottom: none;
}

.mail-item-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  flex-shrink: 0;
  margin-top: 5px;
}

.mail-item.read .mail-item-dot {
  background: transparent;
  border: 1.5px solid var(--n200);
}

.mail-item-body {
  flex: 1;
}

.mail-item-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3px;
}

.mail-item-from {
  font-size: 13px;
  font-weight: 800;
  color: var(--n800);
}

.mail-item.read .mail-item-from {
  font-weight: 600;
  color: var(--n500);
}

.mail-item-date {
  font-size: 11px;
  color: var(--n300);
  font-weight: 500;
}

.mail-item-subject {
  font-size: 13px;
  font-weight: 700;
  color: var(--n700);
  margin-bottom: 3px;
}

.mail-item-preview {
  font-size: 12px;
  color: var(--n400);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mail-item-full {
  margin-top: 12px;
  font-size: 13px;
  color: var(--n600);
  line-height: 1.7;
  padding-top: 12px;
  border-top: 1px solid var(--n100);
  font-weight: 500;
}

/* STATUS SELECT */
.status-select {
  border: none;
  outline: none;
  font-family: "Nunito", sans-serif;
  font-size: 12px;
  font-weight: 700;
  border-radius: 20px;
  padding: 3px 8px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23907369'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  padding-right: 20px;
}

.st-select-nouveau {
  background-color: rgba(59, 130, 246, 0.08);
  color: #1d4ed8;
}

.st-select-attente {
  background-color: rgba(234, 179, 8, 0.1);
  color: #92400e;
}

.st-select-recu {
  background-color: rgba(34, 197, 94, 0.1);
  color: #15803d;
}

/* DEMANDE ITEM */
.demande-item {
  background: var(--white);
  border: 1px solid var(--n100);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 8px;
}

.demande-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--n800);
}

.demande-sub {
  font-size: 12px;
  color: var(--n400);
  font-weight: 500;
  margin-top: 4px;
}

.demande-upload {
  margin-top: 10px;
}

/* UPLOAD MULTI */
.upload-dropzone {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px dashed var(--n200);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--n50);
}

.upload-dropzone:hover {
  border-color: var(--brand);
  background: rgba(248, 126, 68, 0.03);
}

.upload-dz-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--n600);
  flex: 1;
}

.upload-dz-hint {
  font-size: 11px;
  color: var(--n300);
  font-weight: 500;
  white-space: nowrap;
}

.upload-file-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.upload-file-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: rgba(248, 126, 68, 0.06);
  border: 1px solid rgba(248, 126, 68, 0.2);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--n700);
}

.upload-file-tag span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-file-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--n400);
  font-size: 14px;
  padding: 0 2px;
  line-height: 1;
  transition: color 0.1s;
}

.upload-file-remove:hover {
  color: #dc2626;
}

.demande-required-docs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.req-doc-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  background: var(--n50);
  border: 1px solid var(--n100);
  border-radius: 20px;
  color: var(--n500);
}

/* Permet de positionner l'œil par rapport à l'input */
.password-wrapper {
  position: relative;
  display: block;
  width: 100%;
}

/* On laisse de la place à droite pour que le texte ne passe pas sous l'œil */
.password-wrapper input {
  width: 100%;
  padding-right: 40px;
}

/* Style du bouton œil */
.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  /* Pour centrer verticalement parfaitement */
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0;
  color: #6c757d;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Enlève le contour bleu au clic sur le petit bouton */
.toggle-password:focus {
  outline: none;
}

/* ==========================================================
   TRANSFORMATION TABLEAU EN CARDS BOOTSTRAP SUR MOBILE
   ========================================================== */
@media (max-width: 768px) {
  .pisteur-table,
  .pisteur-table thead,
  .pisteur-table tbody,
  .pisteur-table th,
  .pisteur-table td,
  .pisteur-table tr {
    display: block;
    width: 100%;
  }

  /* On cache l'entête */
  .pisteur-table thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  /* La ligne devient une Card */
  .pisteur-table tbody tr {
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    padding: 0.5rem;
  }

  /* Les cellules s'alignent avec leur label */
  .pisteur-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none;
    border-bottom: 1px solid #f1f1f1;
    padding: 0.75rem 0.5rem;
    text-align: right;
  }

  .pisteur-table td:last-child {
    border-bottom: none;
  }

  /* Table Pisteur-style */
  .pisteur-table-wrap {
    background: transparent;
    overflow: hidden;
    border: none;
  }

  /* On injecte le nom de la colonne grâce au data-label */
  .pisteur-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #6c757d;
    text-align: left;
    padding-right: 15px;
  }

  /* Cas spécial : si c'est la ligne "Aucun document", on la centre normalement */
  .pisteur-table tr.no-data-row td {
    justify-content: center;
  }

  .pisteur-table tr.no-data-row td::before {
    content: none;
  }
}

.fe-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(37, 28, 18, 0.55);
  z-index: 400;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.fe-overlay.open {
  display: flex;
}

.fe-modal {
  background: white;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.fe-modal-header {
  background: var(--grad);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.fe-modal-header-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.fe-modal-header h3 {
  font-size: 17px;
  font-weight: 800;
  color: white;
  margin-bottom: 2px;
}

.fe-modal-header p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.fe-modal-body {
  padding: 24px 28px;
}

.fe-modal-info {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: rgba(248, 126, 68, 0.06);
  border: 1px solid rgba(248, 126, 68, 0.2);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 20px;
}

.fe-modal-info span {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.fe-modal-info p {
  font-size: 13px;
  color: var(--n600);
  font-weight: 500;
  line-height: 1.5;
}

.fe-modal-footer {
  padding: 16px 28px 24px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

@media (max-width: 640px) {
  .fe-modal-footer {
    flex-direction: column;
  }

  .fe-modal-footer button {
    width: 100%;
  }
}

#screen-forgot,
#screen-reset-mail,
#screen-reset-pwd,
#screen-reset-success {
  align-items: center;
  justify-content: center;
  background: var(--n50);
  padding: 24px;
}

.forgot-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--n400);
  cursor: pointer;
  margin-bottom: 20px;
  transition: color 0.15s;
  background: none;
  border: none;
  font-family: "Nunito", sans-serif;
  padding: 0;
}

.forgot-back:hover {
  color: var(--brand);
}

.confirm-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 16px;
}

.confirm-icon.success {
  background: rgba(34, 197, 94, 0.12);
}

.confirm-icon.info {
  background: rgba(248, 126, 68, 0.1);
}

.confirm-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--n900);
  text-align: center;
  margin-bottom: 8px;
}

.confirm-text {
  font-size: 14px;
  color: var(--n400);
  text-align: center;
  line-height: 1.6;
  font-weight: 500;
  margin-bottom: 24px;
}

.confirm-text strong {
  color: var(--n700);
}

/* Style moderne pour la pagination */
.extranet-pagination {
  display: flex;
  flex-wrap: wrap; /* Ligne ajoutée pour régler le problème sur mobile */
  justify-content: center;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 25px 0 15px 0;
  gap: 8px;
}

.extranet-pagination li a,
.extranet-pagination li span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  /* Arrondi doux */
  text-decoration: none;
  color: #6c757d;
  background-color: #ffffff;
  border: 1px solid #e9ecef;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease-in-out;
}

/* Effet au survol des pages cliquables */
.extranet-pagination li a:hover {
  color: #fa945e;
  border-color: #fa945e;
  transform: translateY(-2px);
  /* Petit bond vers le haut */
  box-shadow: 0 4px 8px rgba(13, 110, 253, 0.15);
  /* Ombre bleutée */
}

/* Style de la page actuelle */
.extranet-pagination li.active span {
  background-color: #fa945e;
  color: #ffffff;
  border-color: #fa945e;
  box-shadow: 0 4px 8px rgba(250, 148, 94, 0.3);
}

/* Style des flèches bloquées (ex: page 1) */
.extranet-pagination li.disabled span {
  color: #dee2e6;
  background-color: #f8f9fa;
  border-color: #e9ecef;
  cursor: not-allowed;
}

.btn-see-more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background-color: #ffffff;
  color: #fa945e;
  /* Couleur principale */
  border: 1px solid #fa945e;
  border-radius: 50px;
  /* Bordures très arrondies, style moderne */
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

.btn-see-more:hover {
  background-color: #fa945e;
  color: #ffffff;
  transform: translateY(-2px);
  /* Petit saut au survol */
  box-shadow: 0 4px 12px rgba(250, 148, 94, 0.2);
}

/* ===== THEME TOGGLE BUTTON ===== */
.btn-theme-toggle {
  background: none;
  border: none;
  font-size: 16px;
  color: var(--n400);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  transition: all 0.2s ease-in-out;
  outline: none;
}

.btn-theme-toggle:hover {
  background: var(--n50);
  color: var(--brand);
  transform: scale(1.08);
}

.btn-theme-toggle:focus {
  outline: none;
}

/* ===== DARK THEME DEFINITION ===== */
[data-theme="dark"] {
  --n50: #1b1614;
  /* Main page background */
  --n100: #2c2420;
  /* Dark border and line separator */
  --n200: #3d322d;
  /* Slightly lighter brown/gray border */
  --n300: #5e4c44;
  /* Subtitles / light text */
  --n400: #887268;
  /* Grey/brown text */
  --n500: #a78e82;
  /* Medium text */
  --n600: #c2ada4;
  /* Stronger text */
  --n700: #d8c8c1;
  /* Light gray text */
  --n800: #eae1dd;
  /* Very light text */
  --n900: #f7f3f1;
  /* Title text */
  --n950: #faf8f7;
  /* Pure white-ish text */
  --white: #221c1a;
  /* Card & panel backgrounds */

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.6);
}

/* ===== DARK MODE OVERRIDES & POLISH ===== */
[data-theme="dark"] body {
  background: var(--n50);
  color: var(--n900);
}

/* Sidebar background */
[data-theme="dark"] .sidebar {
  background: #1e1917;
  border-right-color: var(--n100);
}

/* Global loader */
[data-theme="dark"] #global-loader {
  background-color: rgba(27, 22, 20, 0.95);
}

[data-theme="dark"] #global-loader .loader-text {
  color: var(--n600);
}

/* Mobile pisteur tables / cards */
@media (max-width: 768px) {
  [data-theme="dark"] .pisteur-table tbody tr {
    background-color: var(--white);
    border-color: var(--n100);
    box-shadow: var(--shadow-sm);
  }
}

/* Table wrapper */
[data-theme="dark"] .pisteur-table-wrap {
  background: var(--white);
  border-color: var(--n100);
}

/* Pagination */
[data-theme="dark"] .extranet-pagination li a,
[data-theme="dark"] .extranet-pagination li span {
  background-color: var(--white);
  border-color: var(--n100);
  color: var(--n500);
}

[data-theme="dark"] .extranet-pagination li.disabled span {
  background-color: var(--n100);
  color: var(--n300);
  border-color: var(--n100);
}

[data-theme="dark"] .extranet-pagination li a:hover {
  color: #fa945e;
  border-color: #fa945e;
  background-color: var(--n100);
}

/* See more button */
[data-theme="dark"] .btn-see-more {
  background-color: var(--white);
  color: #fa945e;
  border-color: #fa945e;
}

[data-theme="dark"] .btn-see-more:hover {
  background-color: #fa945e;
  color: #ffffff;
}

/* Custom inputs (login fields and account form fields) */
[data-theme="dark"] .field input:focus,
[data-theme="dark"] .form-field input:focus {
  background: var(--white);
}

/* Status selection select element */
[data-theme="dark"] .status-select {
  background-color: var(--n100);
  border-color: var(--n200);
  color: var(--n800);
}

/* Incoming chat message bubbles */
[data-theme="dark"] .incoming .bubble-content {
  background: var(--white);
  color: var(--n800);
  border-color: var(--n100);
}

/* Upload zone dashed border */
[data-theme="dark"] .upload-zone {
  border-color: var(--n300);
  background: var(--white);
}

[data-theme="dark"] .upload-zone:hover {
  border-color: var(--brand);
  background: rgba(248, 126, 68, 0.05);
}

/* File attachments dropzone */
[data-theme="dark"] .upload-dropzone {
  border-color: var(--n300);
  background: var(--white);
}

[data-theme="dark"] .upload-dropzone:hover {
  border-color: var(--brand);
  background: rgba(248, 126, 68, 0.05);
}

[data-theme="dark"] .pf-chip.all.active {
  background: var(--n50);
  border-color: var(--n900);
  color: white;
}

.chat-container {
  display: flex;
  flex-direction: column;
  height: 70vh;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #e9ecef;
  overflow: hidden;
  position: relative;
  /* <--- AJOUTE JUSTE CETTE LIGNE */
}
