/* ------------------------------------------------------- */
/* BASE STYLES                                             */
/* ------------------------------------------------------- */

body {
    background: #f5f7fa;
    font-family: Inter, Arial, sans-serif;
}

.card {
    border-radius: 12px;
    transition: 0.2s;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.navbar-brand {
    font-weight: 600;
}

.nav-link {
    font-size: 0.95rem;
}

.nav-link:hover {
    opacity: 0.8;
}

footer {
    font-size: 0.9rem;
}



/* ------------------------------------------------------- */
/* WRAPPER                                                 */
/* ------------------------------------------------------- */

.ndf-wrapper {
    max-width: 980px;
    margin: 40px auto;
}

.ndf-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 25px;
}



/* ------------------------------------------------------- */
/* GRID                                                    */
/* ------------------------------------------------------- */

.ndf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
}



/* ------------------------------------------------------- */
/* CARDS                                                   */
/* ------------------------------------------------------- */

.ndf-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 22px;
    border: 1px solid #ebebeb;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    transition: .25s ease;
}

.ndf-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.ndf-card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}

.ndf-period {
    font-size: 20px;
    font-weight: 600;
    color: #2a4bd8;
}

.ndf-id {
    background: #f2f4ff;
    color: #2a4bd8;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
}

.ndf-dates {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 15px;
}

.ndf-dates .label {
    font-weight: 600;
    margin-right: 6px;
    color: #444;
}

.ndf-buttons {
    display: flex;
    gap: 10px;
}

.btn-outline,
.btn-filled {
    flex: 1;
    padding: 10px 0;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: .25s;
}

.btn-outline {
    background: transparent;
    border: 1px solid #2a4bd8;
    color: #2a4bd8;
}

.btn-outline:hover {
    background: #f2f4ff;
}

.btn-filled {
    background: #2a4bd8;
    border: 1px solid #2a4bd8;
    color: white;
}

.btn-filled:hover {
    opacity: .85;
}



/* ------------------------------------------------------- */
/* PAGINATION                                              */
/* ------------------------------------------------------- */

.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 25px;
    gap: 8px;
}

.pagination-btn {
    padding: 8px 14px;
    border-radius: 8px;
    background: #f5f6fa;
    border: 1px solid #d5d7df;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: .2s;
}

.pagination-btn:hover {
    background: #eceef5;
}

.pagination-btn.active {
    background: #2a4bd8;
    color: white;
    border-color: #2a4bd8;
}



/* ------------------------------------------------------- */
/* EXPENSE LIST — BASE STYLES                              */
/* ------------------------------------------------------- */

.expense-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.expense-item {
    display: flex;
    justify-content: space-between;
    background: #fff;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #e6e6e6;
    align-items: center;
    transition: .2s;
}

.expense-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

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

.expense-icon-type i {
    font-size: 24px;
    color: #2a4bd8;
}

.expense-info {
    display: flex;
    flex-direction: column;
}

.expense-title {
    font-size: 16px;
    font-weight: 600;
}

.expense-date {
    font-size: 12px;
    color: #777;
}

.expense-desc {
    font-size: 13px;
    color: #444;
}

.tag {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 4px;
    display: inline-block;
}

.tag-valid {
    background: #e5f7eb;
    color: #0c8c3f;
}

.tag-invalid {
    background: #fdeaea;
    color: #c23b3b;
}

.expense-right {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.expense-amount .ttc {
    font-weight: 700;
    font-size: 16px;
}

.small-amount {
    font-size: 11px;
    color: #777;
}

.expense-actions {
    margin-top: 6px;
    display: flex;
    gap: 6px;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
}

.btn-icon:hover {
    background: #f2f2f2;
}

.btn-icon.delete i {
    color: #c63737;
}

.btn-icon i {
    font-size: 18px;
}



/* ------------------------------------------------------- */
/* FLOATING ACTION BUTTON                                  */
/* ------------------------------------------------------- */

.floating-add-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 55px;
    height: 55px;
    background: #2a4bd8;
    border-radius: 50%;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    transition: .2s;
    z-index: 999;
}

.floating-add-btn:hover {
    transform: scale(1.08);
}

.floating-add-btn i {
    font-size: 28px;
}



/* ------------------------------------------------------- */
/* MODAL                                                   */
/* ------------------------------------------------------- */
/*
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 9990;
}

.modal-box {
    background: white;
    width: 100%;
    max-width: 480px;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    position: relative;
    animation: fadeIn .25s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: scale(1); }
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
    gap: 12px;
}

.btn-cancel {
    padding: 10px 16px;
    background: #ddd;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

.btn-submit {
    padding: 10px 16px;
    background: #2a4bd8;
    color: white;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

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

.form-group label {
    font-weight: 600;
    margin-bottom: 4px;
    display: block;
}

.form-control {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
}
    */

/* =========================
   DASHBOARD (COMMON)
   Put in: assets/css/main.css
   ========================= */

.dash-container { width: 100%; }

/* Desktop/Mobile toggles (valeur neutre) */
.dash-desktop, .dash-mobile { display: block; }

/* ---- Edit mode visibility ---- */
.dash-edit-only { display: none !important; }
body.dash-edit .dash-edit-only { display: inline-flex !important; }

/* Add panel must be block in edit mode */
body.dash-edit #dashAddPanel { display: block !important; }

/* ---- Topbar (common) ---- */
.dash-title { font-weight: 700; }
.dash-subtitle { font-size: 13px; opacity: .75; }
.dash-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- Add panel ---- */
.dash-add-panel{
  border: 1px solid rgba(0,0,0,.08);
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 12px;
}
.dash-add-title{
  font-weight: 800;
  margin-bottom: 8px;
}
.dash-add-grid{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dash-add-btn{
  border: 1px solid rgba(0,0,0,.10);
  background: #fff;
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.dash-add-btn:hover{
  background: rgba(13,110,253,.06);
}
.dash-add-btn:disabled{
  opacity: .55;
  cursor: not-allowed;
}

/* ---- Widget card ---- */
.dash-widget{
  border: 1px solid rgba(0,0,0,.08);
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 8px 22px rgba(0,0,0,.06);
}
.dash-widget-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.dash-widget-title{
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}
.dash-widget-title i{ opacity: .85; }
.dash-widget-body{ font-size: 13px; opacity: .88; }

/* Actions shown only in edit */
.dash-widget-actions{
  display: flex;
  gap: 8px;
  align-items: center;
}
.dash-handle,
.dash-remove{
  display: none;
}
body.dash-edit .dash-handle,
body.dash-edit .dash-remove{
  display: inline-flex;
}

.dash-handle{
  cursor: grab;
  border: 1px dashed rgba(0,0,0,.18);
  border-radius: 10px;
  padding: 6px 8px;
  background: rgba(0,0,0,.02);
}
.dash-remove{
  cursor: pointer;
  border: 1px solid rgba(220,53,69,.25);
  border-radius: 10px;
  padding: 6px 8px;
  background: rgba(220,53,69,.06);
}

/* Drag feedback */
body.dash-edit .dash-widget{ user-select: none; }
body.dash-edit .dash-widget[draggable="true"]{ cursor: grab; }
.dash-drag-over{
  outline: 2px solid rgba(13,110,253,.35);
  outline-offset: 2px;
}

/* Empty state */
.dash-empty{
  border: 1px dashed rgba(0,0,0,.18);
  border-radius: 16px;
  padding: 16px;
  background: rgba(0,0,0,.02);
  opacity: .85;
}

/* ------------------------------------------------------- */
/* OCR LOADER                                              */
/* ------------------------------------------------------- */

.ocr-loader {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(2px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    z-index: 99999;
}

.spinner {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 4px solid #d7d7d7;
    border-top-color: #2a4bd8;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.ocr-loader p {
    font-size: 15px;
    font-weight: 600;
    color: #2a2a2a;
}



/* ------------------------------------------------------- */
/* GLOBAL LOADER                                           */
/* ------------------------------------------------------- */

.global-loader {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(2px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999999;
}

.gl-spinner {
    width: 55px;
    height: 55px;
    border: 5px solid #d7d7d7;
    border-top-color: #2a4bd8;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
/* =============== */
/* DEFAULT (desktop) */
/* =============== */
.desktop-expense-list {
    display: block;
}

.mobile-expense-screen {
    display: none;
}

/* =============== */
/* HOLIDAYS        */
/* =============== */
.holidays-page{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.holidays-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.holidays-title{
  font-size:18px;
  font-weight:900;
  line-height:1.1;
}

.holidays-subtitle{
  margin-top:4px;
  font-size:13px;
  color: rgba(0,0,0,0.55);
  font-weight:700;
}

.holidays-actions{ display:flex; gap:10px; }

/* Sections */
.holidays-section{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.holidays-section-title{
  font-size:14px;
  font-weight:900;
}

/* Meters */
.holidays-meters .card-body{ padding:14px; }

.holidays-meters-grid{
  display:grid;
  gap:14px;
}

.meter-item{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.meter-top{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:10px;
}

.meter-label{
  font-size:12px;
  font-weight:900;
  color: rgba(0,0,0,0.60);
}

.meter-value{
  font-size:14px;
  font-weight:900;
}

.meter-hint{
  font-size:12px;
  color: rgba(0,0,0,0.55);
  font-weight:700;
}

/* Requests grid + cards */
.holiday-requests-grid{
  display:grid;
  gap:12px;
}

.holiday-card{
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  padding: 12px;
  background:#fff;
  /*cursor:pointer;
  transition: transform .06s ease, box-shadow .06s ease, border-color .06s ease;*/
}

/*.holiday-card:hover{
  transform: translateY(-1px);
  box-shadow: 0 16px 26px rgba(0,0,0,0.06);
  border-color: rgba(0,0,0,0.12);
}*/

.holiday-card-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}

.holiday-card-title{
  font-weight:900;
  font-size:14px;
}

.holiday-card-sub{
  margin-top:6px;
  font-size:12px;
  color: rgba(0,0,0,0.55);
  font-weight:700;
}

/* Status badges */
.badge-status{
  font-size:11px;
  font-weight:900;
  border-radius:999px;
  padding:6px 10px;
  border:1px solid transparent;
  white-space:nowrap;
}

.badge-approved{
  background: rgba(25,135,84,0.12);
  color: rgba(25,135,84,1);
  border-color: rgba(25,135,84,0.25);
}

.badge-rejected{
  background: rgba(220,53,69,0.12);
  color: rgba(220,53,69,1);
  border-color: rgba(220,53,69,0.25);
}

.badge-pending{
  background: rgba(13,110,253,0.12);
  color: rgba(13,110,253,1);
  border-color: rgba(13,110,253,0.25);
}

/* Modal layout */
.holiday-modal-grid{
  display:grid;
  gap:12px;
}

.calendar-card,
.selection-card{
  border:1px solid rgba(0,0,0,0.08);
  border-radius:14px;
  padding:12px;
  background:#fff;
}

/* Calendar */
.calendar-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.calendar-title{
  font-weight:900;
  font-size:14px;
}

.calendar-weekdays{
  display:grid;
  grid-template-columns:repeat(7,1fr);
  gap:6px;
  font-size:11px;
  color: rgba(0,0,0,0.55);
  margin-bottom:8px;
  font-weight:800;
}

.calendar-grid{
  display:grid;
  grid-template-columns:repeat(7,1fr);
  gap:6px;
}

/* Calendar day cells */
.cal-day{
  position:relative;
  border:1px solid rgba(0,0,0,0.08);
  border-radius:12px;
  background:#fff;
  min-height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  user-select:none;
  font-weight:900;
}

.cal-day.muted{
  opacity:.25;
  cursor:default;
  background: rgba(0,0,0,0.02);
}

.cal-day.sel-half{
  background: rgba(13,110,253,0.10);
  border-color: rgba(13,110,253,0.35);
}

.cal-day.sel-full{
  background: rgba(13,110,253,0.18);
  border-color: rgba(13,110,253,0.50);
}

.cal-badge{
  position:absolute;
  top:6px;
  right:6px;
  min-width:24px;
  height:18px;
  padding:0 6px;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background: rgba(13,110,253,0.16);
  color: rgba(13,110,253,1);
}

.calendar-legend{
  display:flex;
  gap:12px;
  margin-top:10px;
  font-size:12px;
  color: rgba(0,0,0,0.60);
  font-weight:800;
}

.leg-item{ display:inline-flex; align-items:center; gap:6px; }
.leg-dot{ width:10px; height:10px; border-radius:999px; display:inline-block; }
.leg-dot.half{ background: rgba(13,110,253,0.25); }
.leg-dot.full{ background: rgba(13,110,253,0.45); }

/* Selection block */
.selection-title{
  font-weight:900;
  font-size:14px;
  margin-bottom:10px;
}

.selection-summary{
  padding:10px;
  border-radius:12px;
  background: rgba(0,0,0,0.03);
  font-size:13px;
  font-weight:800;
}

/* Details (per day + half-days) */
.selection-details{
  display:flex;
  flex-direction:column;
  gap:8px;
  max-height: 240px;
  overflow:auto;
  padding-right: 4px;
}

.sel-detail-row{
  display:grid;
  grid-template-columns: 110px 1fr 34px;
  gap:10px;
  align-items:start;
  padding:10px;
  border-radius:12px;
  background: rgba(0,0,0,0.03);
}

.sel-detail-date{
  font-weight:900;
  font-size:13px;
  padding-top:6px;
}

.sel-halves{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}

.half-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  border:1px solid rgba(0,0,0,0.10);
  background:#fff;
  border-radius:999px;
  padding:6px 10px;
  font-size:12px;
  font-weight:900;
}

.half-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:34px;
  height:18px;
  padding:0 8px;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
  background: rgba(13,110,253,0.12);
  color: rgba(13,110,253,1);
}

.half-reason-badge{
  border:1px solid rgba(0,0,0,0.10);
  background:#fff;
  border-radius:999px;
  padding:6px 10px;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
  max-width: 220px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.half-remove{
  width:26px;
  height:26px;
  border:0;
  border-radius:999px;
  background: rgba(220,53,69,0.12);
  color:#dc3545;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.half-add{
  border:1px dashed rgba(0,0,0,0.20);
  background: rgba(255,255,255,0.85);
  border-radius:999px;
  padding:6px 10px;
  font-size:12px;
  font-weight:900;
}

.sel-row-remove-day{
  width:34px;
  height:34px;
  border:0;
  border-radius:10px;
  background: rgba(220,53,69,0.10);
  color:#dc3545;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* Modal footer buttons */
.holiday-modal-footer{
  display:flex;
  justify-content:flex-end;
  gap:10px;
}

/* Detail modal list */
.detail-days-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.detail-day-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px;
  border-radius:12px;
  background: rgba(0,0,0,0.03);
  font-size:12px;
  font-weight:800;
}

/* Reason modal badges */
#holidayReasonModal{ z-index: 2000; }

.reason-badges{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.reason-badge{
  border:1px solid rgba(0,0,0,0.10);
  background:#fff;
  border-radius:999px;
  padding:10px 12px;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
  user-select:none;
  transition: transform .06s ease, box-shadow .06s ease;
}

.reason-badge:hover{
  transform: translateY(-1px);
  box-shadow: 0 16px 26px rgba(0,0,0,0.06);
}

.reason-badge.active{
  border-color: rgba(13,110,253,0.55);
  background: rgba(13,110,253,0.10);
}

/* Header actions (status + download menu) */
.edh-actions{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  margin-top:10px;
}

.edh-status{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}

.edh-badge{
  display:inline-flex;
  align-items:center;
  padding:4px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:600;
  border:1px solid rgba(0,0,0,.08);
}

.edh-badge-pending{ background:#fff4e5; color:#8a4b00; }
.edh-badge-validated{ background:#e8f7ee; color:#0f6a2a; }
.edh-badge-refused{ background:#fdecec; color:#8a1f1f; }

.edh-download{ position:relative; }

.edh-menu{
  position:absolute;
  right:0;
  top:calc(100% + 6px);
  min-width:260px;
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:12px;
  box-shadow:0 10px 30px rgba(0,0,0,.12);
  padding:6px;
  z-index:9999;
}

.edh-menu-item{
  width:100%;
  border:0;
  background:transparent;
  padding:10px 10px;
  border-radius:10px;
  text-align:left;
  display:flex;
  gap:10px;
  align-items:center;
  font-size:14px;
}

.edh-menu-item:hover{
  background:#f6f7f9;
}

.pay-pill{
  display:inline-flex; align-items:center; gap:8px;
  padding:6px 10px; border-radius:999px;
  background:#e9f8ef; color:#16794a; font-weight:700;
  font-size:12px;
}
.pay-toggle{
  display:inline-flex; align-items:center; gap:10px;
}
.pay-toggle input[type="checkbox"]{
  width:44px; height:24px; accent-color:#16a34a;
}

.pay-switch{
  position:relative; width:46px; height:26px;
}
.pay-switch input{
  opacity:0; width:0; height:0;
}
.pay-slider{
  position:absolute; inset:0;
  border-radius:999px;
  background:#d0d5dd;
  transition: .2s;
}
.pay-slider:before{
  content:"";
  position:absolute; top:3px; left:3px;
  width:20px; height:20px; border-radius:50%;
  background:white;
  transition:.2s;
}
.pay-switch input:checked + .pay-slider{
  background:#16a34a;
}
.pay-switch input:checked + .pay-slider:before{
  transform: translateX(20px);
}

