/* ===========================================================================
   WORK TRACKER — Editorial Light Theme
   ===========================================================================
   Inspiré de Vibe3D : clean, éditorial, espaçant généreux, typo serif
   Light theme : fond crème/blanc cassé, texte noir profond, accents orange
   Mobile-first, typo Google Fonts (Fraunces serif + Inter sans-serif)
   ========================================================================= */

:root {
  color-scheme: light;

  /* Couleurs de fond (chaudes, légèrement cassées) */
  --bg-primary:    #fafaf7;   /* blanc cassé / papier */
  --bg-secondary:  #ffffff;   /* blanc pur pour les cards */
  --bg-tertiary:   #f5f4ef;   /* crème clair */
  --bg-dark:       #1a1a1a;   /* noir profond pour sections alternées */

  /* Couleurs de texte */
  --text-primary:   #1a1a1a;   /* noir profond */
  --text-secondary: #6b6b6b;   /* gris moyen */
  --text-muted:     #9ca3af;   /* gris clair */
  --text-inverse:   #ffffff;   /* texte sur fond sombre */

  /* Accents (orange subtil, pas criard) */
  --accent-orange:  #ea580c;   /* orange signature */
  --accent-amber:   #f59e0b;   /* orange clair / warning */
  --accent-rust:    #c2410c;   /* orange foncé / hover */
  --accent-blue:    #3b82f6;
  --accent-violet:  #8b5cf6;
  --gradient-accent: linear-gradient(135deg, #f59e0b, #ea580c);

  /* Statuts (discrets) */
  --success: #059669;          /* vert émeraude (argent gagné) */
  --warning: #f59e0b;          /* orange ambré */
  --error:   #dc2626;          /* rouge sobre */
  --danger:  #ef4444;

  /* Ombres très subtiles (style éditorial) */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.10);

  /* Border radius (généreux) */
  --radius-sm:  10px;
  --radius-md:  16px;
  --radius-lg:  24px;
  --radius-xl:  32px;

  /* Transitions */
  --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg-primary:    #0f172a;
  --bg-secondary:  #1e293b;
  --bg-tertiary:   #334155;
  --bg-dark:       #020617;

  --text-primary:   #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted:     #94a3b8;
  --text-inverse:   #ffffff;

  --accent-orange:  #fb923c;
  --accent-amber:   #fbbf24;
  --accent-rust:    #fdba74;
  --accent-blue:    #60a5fa;
  --accent-violet:  #a78bfa;
  --gradient-accent: linear-gradient(135deg, #fbbf24, #fb923c);

  --success: #34d399;
  --warning: #fbbf24;
  --error:   #f87171;
  --danger:  #ef4444;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.30);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.26);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.30);
  --shadow-lg: 0 20px 54px rgba(0, 0, 0, 0.38);
}

/* Typo globale + fond */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  padding-top: 0;
  transition: background var(--transition), color var(--transition);
}

h1, h2, h3, .editorial-title {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-feature-settings: 'ss01';
  letter-spacing: -0.02em;
}

/* ===========================================================================
   Reset & Base
   ========================================================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

a {
  color: var(--accent-orange);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--accent-rust); }

/* ===========================================================================
   Layout
   ========================================================================= */

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px;
}

@media (max-width: 640px) {
  .container {
    padding: 16px 14px;
  }
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  margin: 0 -28px 40px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 247, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

@supports (padding-top: env(safe-area-inset-top)) {
  body {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .header {
    padding-top: calc(20px + env(safe-area-inset-top));
  }
}

.header h1 {
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.btn-add-session {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.btn-add-session .plus-icon {
  display: none;
}

.btn-header-back {
  font-size: 22px;
  line-height: 1;
  min-width: 46px;
  padding: 8px 14px;
}

.btn-theme-toggle {
  appearance: none;
  cursor: pointer;
  padding: 8px 12px;
}

.btn-theme-toggle:active,
.btn-theme-toggle[aria-pressed="true"] {
  box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.12);
  transform: translateY(1px);
}

.btn-theme-toggle .theme-icon {
  align-items: center;
  background: transparent;
  display: inline-flex;
  font-size: 20px;
  height: 24px;
  justify-content: center;
  line-height: 1;
  opacity: 1;
  transition: opacity var(--transition), transform var(--transition);
  width: 24px;
}

.btn-theme-toggle .theme-icon-dark {
  display: none;
}

.btn-theme-toggle[aria-pressed="true"] .theme-icon-light {
  display: none;
}

.btn-theme-toggle[aria-pressed="true"] .theme-icon-dark {
  display: inline-flex;
}

.btn-theme-toggle:focus-visible {
  outline: 3px solid rgba(234, 88, 12, 0.28);
  outline-offset: 3px;
}

@media (max-width: 480px) {
  .header h1 {
    font-size: 16px;
    white-space: nowrap;
  }
  .header {
    gap: 8px;
    padding: 14px 16px;
    margin: 0 -14px 24px;
  }
  @supports (padding-top: env(safe-area-inset-top)) {
    .header {
      padding-top: calc(14px + env(safe-area-inset-top));
    }
  }
  .header-actions {
    gap: 6px;
    min-width: 0;
  }
  .header .btn-add-session {
    height: 40px;
    min-height: 40px;
    min-width: 40px;
    padding: 6px;
    width: 40px;
    font-size: 12px;
  }
  .header .btn-header-back {
    height: 40px;
    flex: 0 0 36px;
    font-size: 22px;
    min-height: 40px;
    min-width: 36px;
    padding: 6px;
    width: 36px;
  }
  .header .btn-theme-toggle {
    height: 40px;
    flex: 0 0 36px;
    min-height: 40px;
    min-width: 36px;
    padding: 6px;
    width: 36px;
  }
  .header .btn-theme-toggle .theme-icon {
    font-size: 19px;
    height: 22px;
    width: 22px;
  }
  .btn-add-session .plus-text {
    display: none;
  }
  .btn-add-session .plus-icon {
    display: inline-block;
  }
  .user-badge {
    gap: 4px;
    min-width: 0;
  }
  /* Cacher le nom d'utilisateur et le texte des boutons sur mobile */
  .user-name,
  .btn-text {
    display: none;
  }
  /* Boutons Admin et Settings : icônes seulement */
  .header .btn-icon-2fa,
  .header .btn-icon-users,
  .header .btn-icon-settings,
  .header .btn-icon-logout,
  .header .btn-icon-admin {
    height: 40px;
    flex: 0 0 36px;
    min-height: 40px;
    min-width: 36px;
    overflow: hidden;
    padding: 6px;
    text-align: center;
    width: 36px;
  }
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}

.user-badge .crown {
  color: var(--warning);
}

.settings-header {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: none;
  color: var(--text-primary);
  margin: 0 -28px 32px;
  padding: 20px 24px;
  width: auto;
}

.settings-header h1 {
  color: var(--text-primary);
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1;
}

.settings-header-actions {
  display: grid;
  gap: clamp(14px, 2vw, 28px);
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  width: min(62vw, 760px);
}

.settings-header-btn {
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 28px;
  box-shadow: var(--shadow-sm);
  color: var(--text-primary);
  display: inline-flex;
  font-size: clamp(32px, 4vw, 52px);
  height: clamp(88px, 11vw, 142px);
  justify-content: center;
  line-height: 1;
  transition: background var(--transition), transform var(--transition);
}

.settings-header-btn:hover {
  background: #fff7ed;
  color: var(--text-primary);
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .settings-header {
    gap: clamp(10px, 3vw, 18px);
    margin: 0 -14px 22px;
    padding: 14px 16px 18px;
  }

  .settings-header h1 {
    font-size: clamp(26px, 6.6vw, 34px);
  }

  .settings-header-actions {
    gap: 6px;
    grid-template-columns: repeat(auto-fit, minmax(42px, 1fr));
    width: min(50vw, 204px);
  }

  .settings-header-btn {
    border-radius: 16px;
    font-size: clamp(23px, 6vw, 30px);
    height: clamp(52px, 14vw, 66px);
  }

}

/* ===========================================================================
   Cards (les 3 grandes cards du dashboard)
   ========================================================================= */

.card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card-stat {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 24px 24px;
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

@media (max-width: 640px) {
  .card-stat {
    padding: 20px 18px;
    border-radius: 18px;
  }
}

/* Pas de margin-bottom pour les cards dans la grid (déjà géré par gap) */
.grid-3 .card-stat {
  margin-bottom: 0;
}

.card-stat:hover {
  transform: translateY(-2px);
}

.card-stat::before {
  display: none;
}

/* Card "info" (non-cliquable) - style plus discret pour AUJOURD'HUI */
.card-stat.info-card {
  opacity: 0.7;
  cursor: default;
}

.card-stat.info-card:hover {
  transform: none;
  box-shadow: var(--shadow-md);
}

.card-stat.info-card::before {
  display: none;
}

/* ===========================================================================
   Today Card (déroulante avec historique)
   ========================================================================= */

.today-card {
  cursor: pointer;
  padding: 0;
}

.today-card summary {
  padding: 24px;
  list-style: none;
  display: block;
  position: relative;
}

.today-card summary::-webkit-details-marker {
  display: none;
}

.today-card summary::after {
  content: "▼";
  position: absolute;
  bottom: 12px;
  right: 16px;
  font-size: 12px;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.today-card[open] summary::after {
  transform: rotate(180deg);
}

.today-card summary > div {
  margin: 0;
}

.history-section {
  border-top: 1px solid var(--bg-tertiary);
  background: var(--bg-primary);
  max-height: 350px;
  overflow-y: auto;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  scrollbar-width: thin;
  scrollbar-color: var(--bg-tertiary) transparent;
}

.history-section::-webkit-scrollbar {
  width: 6px;
}

.history-section::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 3px;
}

.btn-today-jump {
  display: none;
  width: 100%;
  padding: 10px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  position: sticky;
  top: 0;
  z-index: 2;
}

.btn-today-jump:hover {
  background: var(--accent-blue);
  color: white;
}

.btn-today-jump.visible {
  display: block;
}

.history-list {
  padding: 8px 0;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 14px;
}

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

.history-item .date-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.history-item .date-label .label {
  font-weight: 600;
  color: var(--text-primary);
}

.history-item .date-label .date {
  font-size: 11px;
  color: var(--text-muted);
}

.history-item .stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.history-item .stats .hours {
  color: var(--text-secondary);
  font-size: 12px;
}

.history-item .stats .money {
  font-weight: 700;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 15px;
}

.history-loading,
.history-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* Items "aujourd'hui" dans l'historique de la semaine */
.history-item.today-item {
  background: rgba(245, 158, 11, 0.15);
  border-left: 3px solid var(--warning);
  font-weight: 600;
}

.week-card-header {
  padding: 24px;
}

.week-card .value {
  display: block;
  font-size: 42px;
  font-weight: 700;
  line-height: 1.1;
  margin-top: 4px;
}

.week-card .subvalue {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
  margin-left: 0;
}

/* Flèche ▼ pour la card semaine (comme € Jour et € Mois) */
.week-card > summary {
  list-style: none;
  display: block;
  position: relative;
}

.week-card > summary::-webkit-details-marker {
  display: none;
}

.week-card > summary::after {
  content: "▼";
  position: absolute;
  bottom: 12px;
  right: 16px;
  font-size: 12px;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.week-card[open] > summary::after {
  transform: rotate(180deg);
}

.week-nav-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--bg-tertiary);
  flex-wrap: wrap;
}

.week-nav-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
  min-width: 110px;
  text-align: center;
}

.week-nav-btn {
  background: var(--bg-tertiary);
  border: none;
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.week-nav-btn:hover {
  background: var(--accent-blue);
}

.week-today-btn {
  background: var(--warning);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-left: auto;
  white-space: nowrap;
  transition: all 0.15s;
}

.week-today-btn:hover {
  background: #d97706;
  transform: scale(1.05);
}

.week-today-btn[hidden] {
  display: none;
}

@media (max-width: 480px) {
  .week-summary-inline {
    gap: 10px;
  }
  .stat-inline-value {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .today-card summary {
    padding: 18px 16px;
  }
  .history-item {
    padding: 12px 16px;
  }
}

.card-stat .label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.card-stat .value {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.05;
  margin-top: 8px;
}

@media (max-width: 640px) {
  .card-stat .value {
    font-size: 34px;
  }
}

.card-stat .subvalue {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ===========================================================================
   Grille (responsive)
   ========================================================================= */

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 24px;
  align-items: stretch;  /* Force les cards à avoir la même hauteur */
}

.grid-3 .card-stat {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 160px;  /* Hauteur minimum commune */
}

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

@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}

/* ===========================================================================
   Boutons
   ========================================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  min-height: 48px;  /* Touch target optimal */
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--text-primary);
  color: var(--text-inverse);
  border: 1px solid var(--text-primary);
  box-shadow: var(--shadow-sm);
  letter-spacing: 0.01em;
}
.btn-primary:hover {
  transform: translateY(-1px);
  background: var(--bg-dark);
  box-shadow: var(--shadow-md);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(0, 0, 0, 0.12);
}
.btn-secondary:hover {
  background: var(--bg-tertiary);
  border-color: rgba(0, 0, 0, 0.2);
}

.btn-danger {
  background: var(--error);
  color: white;
}
.btn-danger:hover { background: #dc2626; }

.btn-block { width: 100%; }

/* ===========================================================================
   Formulaires
   ========================================================================= */

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input,
.form-select {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 16px;
  font-family: inherit;
  transition: all var(--transition);
  min-height: 48px;  /* Touch target */
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}

.form-input::placeholder { color: var(--text-muted); }

/* Select pour les heures/minutes (plus compact, centré) */
.form-select.time-select {
  padding: 14px 12px;
  text-align: center;
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23999' d='M6 8L0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* Input numérique pour heures/minutes (centré, gros) */
.form-input.time-input {
  padding: 14px 12px;
  text-align: center;
  font-weight: 700;
  font-size: 20px;
  -moz-appearance: textfield;  /* Firefox */
}

.form-input.time-input::-webkit-outer-spin-button,
.form-input.time-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.form-input.date-picker-input {
  font-size: 18px;
  padding: 16px;
  text-align: center;
  font-weight: 600;
  cursor: pointer;
  min-height: 56px;
}

.form-input.date-picker-input::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
  opacity: 0.7;
  font-size: 18px;
}

.form-input.date-picker-input::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

@media (max-width: 480px) {
  .form-input.date-picker-input {
    font-size: 16px;
    padding: 14px;
  }
}

/* ===========================================================================
   Flash messages (notifications)
   ========================================================================= */

.flash {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.flash.success { background: rgba(5, 150, 105, 0.08); color: #047857; border-left: 4px solid var(--success); }
.flash.error   { background: rgba(220, 38, 38, 0.08);  color: #b91c1c; border-left: 4px solid var(--error); }
.flash.warning { background: rgba(245, 158, 11, 0.10); color: #b45309; border-left: 4px solid var(--warning); }
.flash.info    { background: rgba(234, 88, 12, 0.08);  color: #9a3412; border-left: 4px solid var(--accent-orange); }
/* Toast notification (en bas de l'écran, mobile-friendly) */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: var(--text-inverse);
  padding: 16px 24px;
  border-radius: var(--radius-md);
  max-width: calc(100vw - 32px);
  border-left: 4px solid var(--success);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 14px;
  animation: toast-slide-in 0.3s ease-out, toast-fade-out 0.3s ease-in 2.7s forwards;
}

.toast[hidden] {
  display: none;
}

.toast-icon {
  font-size: 18px;
}

@keyframes toast-slide-in {
  from {
    bottom: -100px;
    opacity: 0;
  }
  to {
    bottom: 24px;
    opacity: 1;
  }
}

@keyframes toast-fade-out {
  to {
    bottom: -100px;
    opacity: 0;
  }
}
.flash.info    { background: rgba(245, 158, 11, 0.15); color: #fde68a; border-left: 4px solid var(--accent-blue); }

/* ===========================================================================
   Login (page centrée)
   ========================================================================= */

.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg-primary);
}

.login-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}
.login-logo h1 {
  font-size: 28px;
  font-weight: 700;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.login-logo p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
}

.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* ===========================================================================
   Charts (Chart.js container)
   ========================================================================= */

.chart-container {
  position: relative;
  height: 300px;
  width: 100%;
}

.chart-month-mode[hidden],
.chart-week-mode[hidden] {
  display: none;
}

/* Le card "Mois" doit être pleine largeur pour le calendrier */
.chart-month-mode {
  width: 100%;
}

.chart-month-mode > .card {
  padding: 16px 12px;
}

.chart-month-mode .mini-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  width: 100%;
}

.mini-cal-weekday {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  padding: 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mini-cal-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border-radius: 8px;
  font-size: 12px;
  position: relative;
  min-height: 56px;
  transition: transform 0.15s;
}

.mini-cal-day.clickable {
  cursor: pointer;
}

.mini-cal-day.clickable:hover {
  background: var(--accent-blue);
  transform: scale(1.05);
}

.mini-cal-day.empty {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.05);
  cursor: default;
}

.mini-cal-day.today {
  background: var(--warning);
  color: white;
  font-weight: 700;
  border: 2px solid var(--warning);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
}

.mini-cal-day.has-session {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.3), rgba(234, 88, 12, 0.3));
  font-weight: 700;
}

.mini-cal-day .day-num {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 1px;
}

.mini-cal-day .day-money {
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  margin-bottom: 1px;
  color: var(--success, #10b981);
}

.mini-cal-day.today .day-money {
  color: white;
}

.mini-cal-day .day-hours {
  font-size: 9px;
  opacity: 0.85;
  line-height: 1;
}

/* Point vert pour les jours avec session (mini-calendrier dashboard) */
.mini-cal-day .cal-dot {
  width: 5px;
  height: 5px;
  background: var(--success, #10b981);
  border-radius: 50%;
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
}

/* Couleurs d'intensité (bleu/violet clair -> foncé) */
.mini-cal-day.intensity-0 .day-num { color: var(--text-muted); }
.mini-cal-day.intensity-1 {
  background: rgba(34, 197, 94, 0.15);
  color: var(--text-primary);
}
.mini-cal-day.intensity-2 {
  background: rgba(34, 197, 94, 0.30);
  color: white;
}
.mini-cal-day.intensity-3 {
  background: rgba(34, 197, 94, 0.50);
  color: white;
}
.mini-cal-day.intensity-4 {
  background: rgba(34, 197, 94, 0.75);
  color: white;
}
.mini-cal-day.intensity-5 {
  background: rgba(34, 197, 94, 1.0);
  color: white;
  font-weight: 800;
  box-shadow: 0 0 12px rgba(234, 88, 12, 0.5);
}

.mini-calendar-legend {
  display: flex;
  justify-content: space-around;
  margin-top: 16px;
  font-size: 11px;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 8px;
}

/* Table des profils */
.profile-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.profile-table th {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--bg-tertiary);
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}

.profile-table td {
  padding: 12px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.profile-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

@media (max-width: 480px) {
  .profile-table {
    font-size: 13px;
  }
  .profile-table th,
  .profile-table td {
    padding: 8px 4px;
  }
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.legend-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.dot-0 { background: var(--bg-tertiary); }
.dot-1 { background: rgba(34, 197, 94, 0.15); }
.dot-2 { background: rgba(34, 197, 94, 0.30); }
.dot-3 { background: rgba(34, 197, 94, 0.50); }
.dot-4 { background: rgba(34, 197, 94, 0.75); }

.calendar-nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.calendar-nav-btn-inline {
  background: var(--bg-tertiary);
  border: none;
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}

.calendar-nav-btn-inline:hover:not(:disabled) {
  background: var(--accent-blue);
}

.calendar-nav-btn-inline:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .mini-cal-day {
    min-height: 44px;
  }
  .mini-cal-day .day-hours {
    display: none;
  }
}

/* ===========================================================================
   Chart controls (toggle + navigation)
   ========================================================================= */

.chart-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding: 8px 0;
  background: transparent;
}

.chart-toggle {
  display: inline-flex;
  background: var(--bg-tertiary);
  border-radius: 999px;
  padding: 4px;
}

.chart-toggle button {
  padding: 6px 14px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  transition: all var(--transition);
}

.chart-toggle button.active {
  background: var(--gradient-accent);
  color: white;
}

/* Séparateur de section */
.section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 16px;
}

.section-divider::before,
.section-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--bg-tertiary);
}

.section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.chart-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chart-nav button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 16px;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-nav button:hover:not(:disabled) {
  background: var(--accent-blue);
  transform: translateY(-1px);
}

.chart-nav button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.chart-period {
  font-size: 14px;
  color: var(--text-secondary);
  min-width: 180px;
  text-align: center;
}

/* ===========================================================================
   Week card (détail de la semaine)
   ========================================================================= */

.week-detail {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
}

.week-detail h3 {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.week-summary {
  display: flex;
  gap: 32px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--bg-tertiary);
}

.week-summary .stat {
  display: flex;
  flex-direction: column;
}

.week-summary .stat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.week-summary .stat-value {
  font-size: 28px;
  font-weight: 700;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.week-days {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.week-day {
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
}

.week-day.today {
  background: linear-gradient(135deg, rgba(59,130,246,0.15), rgba(139,92,246,0.15));
  border-left: 3px solid var(--accent-blue);
}

.week-day.future {
  opacity: 0.4;
}

.week-day .day-name {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.week-day .day-hours {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 2px;
}

.week-day .day-money {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ===========================================================================
   Password strength indicator
   ========================================================================= */

.pwd-strength small,
.pwd-match small {
  display: inline-block;
  margin-top: 6px;
}

/* ===========================================================================
   Password wrapper (input + bouton œil)
   ========================================================================= */

.pwd-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.pwd-wrapper .pwd-input {
  padding-right: 48px; /* laisse la place au bouton */
}

.pwd-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pwd-toggle:hover {
  background: var(--bg-tertiary);
  transform: translateY(-50%) scale(1.1);
}

.pwd-toggle:active {
  transform: translateY(-50%) scale(0.95);
}

/* ===========================================================================
   Empty state
   ========================================================================= */

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}
.empty-state .emoji { font-size: 48px; margin-bottom: 16px; }
.empty-state h3 { color: var(--text-primary); margin-bottom: 8px; }
.empty-state p { font-size: 14px; }

/* ===========================================================================
   Utilitaires
   ========================================================================= */

.text-center { text-align: center; }
.text-muted  { color: var(--text-secondary); }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }

/* ===========================================================================
   Calendrier mensuel
   ========================================================================= */

.calendar-shell-card {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.calendar-shell-card:hover {
  box-shadow: none;
  transform: none;
}

.calendar-container {
  color: var(--text-primary);
  margin-top: 16px;
  width: 100%;
}

.calendar-nav-row {
  align-items: center;
  display: grid;
  gap: clamp(16px, 7vw, 84px);
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  margin: 0 0 22px;
}

.calendar-period {
  color: var(--text-secondary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: clamp(20px, 4vw, 34px);
  font-weight: 500;
  line-height: 1;
  text-align: center;
}

.calendar-nav {
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 50%;
  color: var(--text-primary);
  cursor: pointer;
  display: inline-flex;
  font-size: 18px;
  height: 56px;
  justify-content: center;
  line-height: 1;
  min-width: 56px;
  transition: background 0.2s, opacity 0.2s, transform 0.2s;
  width: 56px;
}

.calendar-nav:hover {
  background: var(--accent-orange);
  color: var(--text-inverse);
  transform: translateY(-1px);
}

.calendar-nav:active {
  transform: translateY(0);
}

.calendar-panel {
  background: var(--bg-secondary);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  padding: clamp(22px, 4.8vw, 38px);
}

.calendar-heading {
  align-items: center;
  display: flex;
  gap: 14px;
  margin-bottom: clamp(24px, 5vw, 46px);
}

.calendar-heading-icon {
  align-items: center;
  background: #fff7ed;
  border-radius: 6px;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: clamp(28px, 5vw, 42px);
  height: clamp(42px, 7vw, 56px);
  justify-content: center;
  width: clamp(42px, 7vw, 56px);
}

.calendar-title {
  color: var(--text-primary);
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-size: clamp(34px, 7vw, 56px);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.05;
  text-transform: none;
}

.calendar-weekdays {
  color: var(--text-muted);
  display: grid !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: clamp(13px, 2.5vw, 22px);
  font-weight: 700;
  gap: clamp(6px, 1.5vw, 12px);
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  letter-spacing: 0;
  margin-bottom: 14px;
  text-align: center;
}

.calendar-weekdays span {
  min-width: 0;
}

.calendar-grid {
  display: grid !important;
  gap: clamp(6px, 1.5vw, 12px);
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  width: 100%;
}

.cal-cell {
  align-items: center;
  aspect-ratio: 1;
  background: var(--bg-tertiary);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 14px;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  justify-content: center;
  min-height: 0;
  min-width: 0;
  outline: none;
  overflow: hidden;
  position: relative;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.cal-cell:hover:not(.empty),
.cal-cell:focus-visible:not(.empty) {
  border-color: rgba(234, 88, 12, 0.35);
  box-shadow: 0 10px 24px rgba(234, 88, 12, 0.12);
  transform: translateY(-2px);
}

.cal-cell.empty {
  background: #fafaf7;
  border: 2px dashed rgba(0, 0, 0, 0.06);
  box-shadow: none;
  cursor: default;
  pointer-events: none;
}

.cal-cell.intensity-0 {
  background: var(--bg-tertiary);
}

.cal-cell.intensity-1 {
  background: #fff7ed;
}

.cal-cell.intensity-2 {
  background: #fed7aa;
}

.cal-cell.intensity-3 {
  background: #fb923c;
  color: var(--text-inverse);
}

.cal-cell.intensity-4 {
  background: var(--gradient-accent);
  color: var(--text-inverse);
}

.cal-cell.today {
  border: 4px solid var(--accent-orange);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.cal-cell.selected-from-url {
  outline: 3px solid var(--accent-orange);
  outline-offset: -3px;
}

.cal-num {
  font-size: clamp(18px, 4vw, 34px);
  font-weight: 800;
  line-height: 1;
}

.cal-cell .day-money {
  color: var(--accent-rust);
  font-size: clamp(13px, 2.8vw, 26px);
  font-weight: 800;
  line-height: 1;
  margin-top: 8px;
  white-space: nowrap;
}

.cal-cell.intensity-3 .day-money,
.cal-cell.intensity-4 .day-money {
  color: var(--text-inverse);
}

.calendar-legend {
  align-items: center;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: clamp(13px, 2.7vw, 22px);
  gap: 18px clamp(22px, 7vw, 66px);
  justify-content: center;
  letter-spacing: 0;
  margin-top: clamp(28px, 5vw, 48px);
}

.calendar-legend span {
  align-items: center;
  display: inline-flex;
  gap: 10px;
}

.legend-swatch {
  border-radius: 5px;
  display: inline-block;
  height: clamp(16px, 3vw, 26px);
  width: clamp(16px, 3vw, 26px);
}

.legend-swatch.intensity-0 { background: var(--bg-tertiary); }
.legend-swatch.intensity-1 { background: #fff7ed; }
.legend-swatch.intensity-2 { background: #fed7aa; }
.legend-swatch.intensity-3 { background: #fb923c; }
.legend-swatch.intensity-4 { background: var(--accent-orange); }

@media (max-width: 480px) {
  .calendar-container {
    margin-top: 12px;
  }

  .calendar-nav-row {
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    margin-bottom: 18px;
  }

  .calendar-nav {
    height: 52px;
    min-width: 52px;
    width: 52px;
  }

  .calendar-panel {
    border-radius: 24px;
    padding: 20px 14px 24px;
  }

  .calendar-heading {
    gap: 10px;
    margin-bottom: 26px;
  }

  .cal-cell {
    border-radius: 10px;
  }

  .cal-cell.today {
    border-width: 3px;
  }
}

/* ===========================================================================
   Modal
   ========================================================================= */

.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay[hidden] {
  display: none;
}

.modal-content {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

@media (max-width: 640px) {
  .modal-content {
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    max-height: 95vh;
  }
  .modal-overlay {
    align-items: flex-end;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--bg-tertiary);
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  text-transform: capitalize;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 20px 24px;
}

.modal-loading,
.modal-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 24px;
  font-size: 14px;
}

.modal-sessions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.modal-session-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
}

.modal-session-info {
  flex: 1;
}

.modal-session-time {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.modal-session-stats {
  font-size: 12px;
  color: var(--text-muted);
}

.btn-delete-session {
  background: transparent;
  border: 1px solid var(--bg-tertiary);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.btn-delete-session:hover {
  background: var(--danger, #ef4444);
  border-color: var(--danger, #ef4444);
  transform: scale(1.1);
}

.modal-add-form {
  border-top: 1px solid var(--bg-tertiary);
  padding-top: 20px;
}

/* ===========================================================================
   Dark mode
   ========================================================================= */

:root[data-theme="dark"] body {
  background: var(--bg-primary);
  color: var(--text-primary);
}

:root[data-theme="dark"] .header {
  background: rgba(15, 23, 42, 0.88);
  border-bottom-color: rgba(148, 163, 184, 0.16);
}

:root[data-theme="dark"] .settings-header {
  border-bottom-color: rgba(148, 163, 184, 0.14);
}

:root[data-theme="dark"] .settings-header-btn {
  background: var(--bg-secondary);
  border-color: rgba(148, 163, 184, 0.16);
  box-shadow: var(--shadow-sm);
}

:root[data-theme="dark"] .settings-header-btn:hover {
  background: var(--bg-tertiary);
}

:root[data-theme="dark"] .card,
:root[data-theme="dark"] .card-stat,
:root[data-theme="dark"] .login-card,
:root[data-theme="dark"] .week-detail,
:root[data-theme="dark"] .calendar-panel,
:root[data-theme="dark"] .modal-content {
  border: 1px solid rgba(148, 163, 184, 0.14);
  color: var(--text-primary);
}

:root[data-theme="dark"] .card:hover,
:root[data-theme="dark"] .card-stat:hover {
  box-shadow: var(--shadow-lg);
}

:root[data-theme="dark"] .btn-primary {
  background: var(--gradient-accent);
  border-color: transparent;
  color: #ffffff;
}

:root[data-theme="dark"] .btn-primary:hover {
  background: linear-gradient(135deg, #fdba74, #fb923c);
  box-shadow: var(--shadow-md);
}

:root[data-theme="dark"] .btn-secondary {
  border-color: rgba(148, 163, 184, 0.22);
}

:root[data-theme="dark"] .btn-secondary:hover {
  background: var(--bg-tertiary);
  border-color: rgba(148, 163, 184, 0.34);
}

:root[data-theme="dark"] .form-input,
:root[data-theme="dark"] .form-select {
  border-color: rgba(148, 163, 184, 0.22);
}

:root[data-theme="dark"] .form-input:focus,
:root[data-theme="dark"] .form-select:focus {
  box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.22);
}

:root[data-theme="dark"] .flash.success {
  background: rgba(52, 211, 153, 0.12);
  color: #a7f3d0;
}

:root[data-theme="dark"] .flash.error {
  background: rgba(248, 113, 113, 0.12);
  color: #fecaca;
}

:root[data-theme="dark"] .flash.warning,
:root[data-theme="dark"] .flash.info {
  background: rgba(251, 191, 36, 0.12);
  color: #fde68a;
}

:root[data-theme="dark"] .calendar-nav,
:root[data-theme="dark"] .calendar-nav-btn-inline,
:root[data-theme="dark"] .chart-nav button,
:root[data-theme="dark"] .week-nav-btn {
  border-color: rgba(148, 163, 184, 0.16);
}

:root[data-theme="dark"] .calendar-nav:hover,
:root[data-theme="dark"] .calendar-nav-btn-inline:hover:not(:disabled),
:root[data-theme="dark"] .chart-nav button:hover:not(:disabled),
:root[data-theme="dark"] .week-nav-btn:hover {
  color: #ffffff;
}

:root[data-theme="dark"] .calendar-heading-icon {
  background: rgba(251, 146, 60, 0.14);
}

:root[data-theme="dark"] .cal-cell,
:root[data-theme="dark"] .mini-cal-day {
  border-color: rgba(148, 163, 184, 0.12);
}

:root[data-theme="dark"] .cal-cell.empty,
:root[data-theme="dark"] .mini-cal-day.empty {
  background: rgba(15, 23, 42, 0.42);
  border-color: rgba(148, 163, 184, 0.14);
}

:root[data-theme="dark"] .cal-cell.intensity-1,
:root[data-theme="dark"] .legend-swatch.intensity-1 {
  background: #3b2a22;
}

:root[data-theme="dark"] .cal-cell.intensity-2,
:root[data-theme="dark"] .legend-swatch.intensity-2 {
  background: #92400e;
  color: #ffffff;
}

:root[data-theme="dark"] .cal-cell.intensity-3,
:root[data-theme="dark"] .legend-swatch.intensity-3 {
  background: #ea580c;
  color: #ffffff;
}

:root[data-theme="dark"] .cal-cell.intensity-4 {
  color: #ffffff;
}

:root[data-theme="dark"] .cal-cell .day-money {
  color: #fdba74;
}

:root[data-theme="dark"] .cal-cell.intensity-2 .day-money,
:root[data-theme="dark"] .cal-cell.intensity-3 .day-money,
:root[data-theme="dark"] .cal-cell.intensity-4 .day-money {
  color: #ffffff;
}

:root[data-theme="dark"] .cal-cell.today {
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.58);
}

:root[data-theme="dark"] .mini-cal-day.intensity-1,
:root[data-theme="dark"] .dot-1 {
  background: rgba(251, 146, 60, 0.16);
}

:root[data-theme="dark"] .mini-cal-day.intensity-2,
:root[data-theme="dark"] .dot-2 {
  background: rgba(251, 146, 60, 0.34);
}

:root[data-theme="dark"] .mini-cal-day.intensity-3,
:root[data-theme="dark"] .dot-3 {
  background: rgba(251, 146, 60, 0.56);
}

:root[data-theme="dark"] .mini-cal-day.intensity-4,
:root[data-theme="dark"] .dot-4,
:root[data-theme="dark"] .mini-cal-day.intensity-5 {
  background: rgba(251, 146, 60, 0.82);
}

:root[data-theme="dark"] .mini-cal-day .day-money {
  color: #fdba74;
}

:root[data-theme="dark"] .mini-cal-day.today .day-money,
:root[data-theme="dark"] .mini-cal-day.intensity-3 .day-money,
:root[data-theme="dark"] .mini-cal-day.intensity-4 .day-money,
:root[data-theme="dark"] .mini-cal-day.intensity-5 .day-money {
  color: #ffffff;
}

:root[data-theme="dark"] .profile-table td,
:root[data-theme="dark"] .history-item {
  border-bottom-color: rgba(148, 163, 184, 0.10);
}

:root[data-theme="dark"] .profile-table tbody tr:hover {
  background: rgba(148, 163, 184, 0.06);
}

:root[data-theme="dark"] .modal-overlay {
  background: rgba(2, 6, 23, 0.76);
}

:root[data-theme="dark"] .modal-content {
  box-shadow: var(--shadow-lg);
}

:root[data-theme="dark"] .btn-delete-session {
  border-color: rgba(148, 163, 184, 0.18);
}
