
/* =========================================
   NEXUS DASHBOARD - NAVY & GOLD THEME
========================================= */

:root {
    --dash-navy: #091a33;
    --dash-gold: #d4af37;
    --dash-gold-light: #f8f2df;

    --dash-surface: #ffffff;
    --dash-border: #e8e3d5;
    --dash-text: #091a33;
    --dash-muted: #788194;

    --dash-shadow: 0 2px 8px rgba(9, 26, 51, 0.05);
}


/* =========================================
   DASHBOARD HEADER
========================================= */

.dashboard-heading-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    background: #091a33;
    color: #d4af37;
    font-size: 20px;
}

.dashboard-title {
    color: var(--dash-text);
    font-size: 23px;
    letter-spacing: 0.2px;
}

.dashboard-date {
    background: var(--dash-surface);
    color: var(--dash-text);
    border: 1px solid var(--dash-border);
    box-shadow: var(--dash-shadow);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.dashboard-date i {
    color: var(--dash-gold);
    font-size: 15px;
}


/* =========================================
   SECTION HEADINGS
========================================= */

.dashboard-section-title {
    color: var(--dash-text);
    font-size: 16px;
    letter-spacing: 0.2px;
}


/* =========================================
   SUMMARY CARDS
========================================= */

.dash-card {
    background: var(--dash-surface);
    color: var(--dash-text);
    border: 1px solid var(--dash-border);
    border-radius: 12px;
    box-shadow: var(--dash-shadow);
    transition: all 0.25s ease;
}

.dash-card:hover {
    transform: translateY(-3px);
    border-color: var(--dash-gold);
    box-shadow: 0 8px 22px rgba(9, 26, 51, 0.09);
}

.dash-card .label {
    margin-bottom: 5px;
    color: var(--dash-navy);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.dash-card .value {
    margin-bottom: 7px;
    color: var(--dash-navy);
    font-size: 23px;
    font-weight: 700;
    line-height: 1.2;
}

.dash-card .trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 7px;
    color: var(--dash-navy);
    background: var(--dash-gold-light);
    border-radius: 5px;
    font-size: 10px;
    font-weight: 600;
}


/* =========================================
   SUMMARY CARD ICONS
========================================= */

.dash-card .d-icon {
    width: 43px;
    height: 43px;
    min-width: 43px;
    display: flex;
    align-items: center;
    justify-content: center;

    color: #b89427;
    background: var(--dash-gold-light);
    border: 1px solid #eee3bd;
    border-radius: 10px;

    font-size: 20px;
    transition: all 0.25s ease;
}

.dash-card:hover .d-icon {
    color: var(--dash-gold);
    background: var(--dash-navy);
    border-color: var(--dash-navy);
}


/* =========================================
   CUSTOMER STATUS
========================================= */

.customer-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    border-top: 1px solid var(--dash-border);
}

.status-box {
    flex: 1;
    min-width: 0;
    padding: 7px 3px 0;
}

.status-label {
    display: flex;
    align-items: center;
    gap: 7px;

    color: var(--dash-davy);
    font-size: 13px;
    font-weight: 700;
}

.status-box h5 {
    margin-left:20px;
    color: var(--dash-text);
    font-size: 17px;
    font-weight: 700;
}

.status-divider {
    width: 1px;
    height: 35px;
    flex-shrink: 0;
    background: var(--dash-border);
}


/* =========================================
   STATUS DOTS
========================================= */

.status-dot {
    width: 8px;
    height: 8px;
    display: inline-block;
    flex-shrink: 0;
    border-radius: 50%;
}

.active-dot {
    background: #16a36a;
    box-shadow: 0 0 0 3px rgba(22, 163, 106, 0.10);
}

.inactive-dot {
    background: #dc6262;
    box-shadow: 0 0 0 3px rgba(220, 98, 98, 0.10);
}


/* =========================================
   OVERVIEW CONTENT CARDS
========================================= */

.dashboard-content-card {
    background: var(--dash-surface);
    border: 1px solid var(--dash-border);
    border-radius: 12px;
    box-shadow: var(--dash-shadow);
}

.dashboard-content-card .card-header {
    background: transparent;
    border-bottom: 1px solid var(--dash-border);
}

.dashboard-card-title {
    color: var(--dash-text);
    font-size: 13px;
}


/* =========================================
   QUICK OVERVIEW TILES
========================================= */

.mini-tile {
    display: flex;
    align-items: center;
    gap: 12px;

    height: 100%;
    padding: 14px;

    background: var(--dash-surface);
    border: 1px solid var(--dash-border);
    border-radius: 10px;

    transition: all 0.25s ease;
}

.mini-tile:hover {
    transform: translateY(-2px);
    border-color: var(--dash-gold);
    box-shadow: 0 6px 16px rgba(9, 26, 51, 0.06);
}

.mini-tile .m-ico {
    width: 40px;
    height: 40px;
    min-width: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #b89427;
    background: var(--dash-gold-light);
    border: 1px solid #eee3bd;
    border-radius: 9px;

    font-size: 18px;
}

.mini-tile h6 {
    margin-bottom: 3px;
    color: var(--dash-navy);
    font-size: 17px;
    font-weight: 700;
}

.mini-tile small {
    color: var(--dash-muted);
    font-size: 11px;
}


/* =========================================
   PROGRESS BARS
========================================= */

.bar-thick {
    height: 8px;
    background: #eeedf0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar.bg-active,
.progress-bar.bg-given {
    background: var(--dash-navy) !important;
    border-radius: 10px;
}


/* =========================================
   DATATABLE VIEW BUTTON
========================================= */

.dashboard-view-btn {
    color: var(--dash-gold);
    background: var(--dash-navy);
    border: 1px solid var(--dash-navy);
}

.dashboard-view-btn:hover {
    color: var(--dash-navy);
    background: var(--dash-gold);
    border-color: var(--dash-gold);
}


/* =========================================
   DARK MODE
========================================= */

[data-bs-theme="dark"] {
    --dash-surface: #1c1c2b;
    --dash-border: #293b50;
    --dash-text: #f1f3f6;
    --dash-muted: #a5afbd;
    --dash-gold-light: #26354a;
    --dash-navy: #f1f3f6;
}

[data-bs-theme="dark"] .dashboard-heading-icon {
    background: #091a33;
    color: #d4af37;
}

[data-bs-theme="dark"] .dashboard-title,
[data-bs-theme="dark"] .dashboard-section-title,
[data-bs-theme="dark"] .dashboard-card-title,
[data-bs-theme="dark"] .dash-card .value,
[data-bs-theme="dark"] .status-box h5,
[data-bs-theme="dark"] .mini-tile h6 {
    color: #f1f3f6;
}

[data-bs-theme="dark"] .dashboard-date,
[data-bs-theme="dark"] .dash-card,
[data-bs-theme="dark"] .dashboard-content-card,
[data-bs-theme="dark"] .mini-tile {
    background: var(--dash-surface);
    border-color: var(--dash-border);
    color: var(--dash-text);
}

[data-bs-theme="dark"] .dash-card .trend {
    background: #26354a;
    color: #e1bd53;
}

[data-bs-theme="dark"] .dash-card .d-icon,
[data-bs-theme="dark"] .mini-tile .m-ico {
    color: #e1bd53;
    background: #243953;
    border-color: #3c4c60;
}

[data-bs-theme="dark"] .dash-card:hover .d-icon {
    color: #091a33;
    background: #d4af37;
}

[data-bs-theme="dark"] .customer-status {
    border-color: var(--dash-border);
}

[data-bs-theme="dark"] .status-divider {
    background: var(--dash-border);
}

[data-bs-theme="dark"] .bar-thick {
    background: #243953;
}

[data-bs-theme="dark"] .dashboard-view-btn {
    background: #d4af37;
    color: #091a33;
    border-color: #d4af37;
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 575.98px) {

    .dashboard-header .dashboard-heading-icon + div {
        min-width: 0;
    }

    .dashboard-title {
        font-size: clamp(17px, 5vw, 19px);
        line-height: 1.25;
        overflow-wrap: anywhere;
    }

    .dashboard-header .dashboard-title + small {
        display: block;
        line-height: 1.35;
    }

    .dashboard-header > p {
        max-width: 42rem;
        font-size: clamp(12px, 3.5vw, 14px) !important;
        line-height: 1.5;
        overflow-wrap: anywhere;
    }

    .dashboard-heading-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 17px;
    }

    .dashboard-date {
        padding: 7px 9px !important;
        font-size: 11px;
        gap: 6px !important;
    }

    .dash-card .card-body {
        padding: 15px;
    }

    .dash-card .value {
        font-size: 21px;
    }

    .dash-card .d-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }

    .mini-tile {
        padding: 11px;
    }

    .mini-tile .m-ico {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }
}

[data-bs-theme="dark"] #viewCollectionModal .modal-content {
    background-color: var(--dash-surface);
    color: var(--dash-text);
}

[data-bs-theme="dark"] #viewCollectionModal .modal-body > .text-center {
    background-color: #222235 !important;
}

[data-bs-theme="dark"] #viewCollectionModal #viewAmount {
    color: var(--dash-text) !important;
}

[data-bs-theme="dark"] #viewCollectionModal .row > .col > strong {
    color: var(--dash-text);
}

[data-bs-theme="dark"] #viewCollectionModal .modal-body > .row:last-child .rounded-3[style*="background"] {
    background-color: #302229 !important;
}

[data-bs-theme="dark"] #viewCollectionModal .modal-body > .row:last-child .col:last-child .rounded-3[style*="background"] {
    background-color: #203229 !important;
}

[data-bs-theme="dark"] #viewCollectionModal hr {
    border-color: var(--dash-border);
    opacity: 1;
}



  .collection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
  }

  .collection-date-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    padding: 8px 14px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  }

  .collection-date-wrapper .date-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--dash-gold);
    font-size: 15px;
  }

  .collection-date-wrapper label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #7b8490;
    margin-bottom: 2px;
  }

  .collection-date-input {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    color: #212529;
    font-size: 14px;
    font-weight: 600;
    min-width: 150px;
    cursor: pointer;
    background: transparent;
  }

  .collection-date-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.8;
  }

  .collection-card {
    border-radius: 12px;
    transition: transform 0.2s ease;
  }

  .collection-card:hover {
    transform: translateY(-3px);
  }

  .collection-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
  }

  #table td {
    vertical-align: middle;
  }

  .d-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
  }

  .trend {
    white-space: nowrap;
    font-size: 12px;
  }

  [data-bs-theme="dark"] .collection-date-wrapper {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }

  [data-bs-theme="dark"] .collection-date-wrapper .date-icon {
    background: #143b2a;
  
  }

  [data-bs-theme="dark"] .collection-date-wrapper label {
    color: #a0aec0;
  }

  [data-bs-theme="dark"] .collection-date-input {
    color: #f1f5f9;
    background: transparent;
    color-scheme: dark;
  }

  [data-bs-theme="dark"] .collection-date-input::-webkit-calendar-picker-indicator {
    filter: brightness(0) invert(1);
    opacity: 1;
  }

  [data-bs-theme="dark"] .collection-card {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
  }

  [data-bs-theme="dark"] .collection-card .card-body {
    color: #e2e8f0;
  }

  [data-bs-theme="dark"] .collection-icon,
  [data-bs-theme="dark"] .d-icon {
    color: #e2e8f0;
  }

  [data-bs-theme="dark"] #table td {
    color: #e2e8f0;
  }

  [data-bs-theme="dark"] .trend {
    color: #a0aec0;
  }

  [data-bs-theme="dark"] .collection-card .text-muted {
    color: #a0aec0 !important;
  }

  @media (max-width: 576px) {
    .collection-header {
      align-items: stretch;
    }

    .collection-date-wrapper {
      width: 100%;
    }

    .collection-date-input {
      width: 100%;
    }
  }


  .place-dropdown {
    position: absolute;
    top: 100%;
    left: 12px;
    right: 12px;
    z-index: 1050;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    max-height: 220px;
    overflow-y: auto;
  }

  .place-option {
    padding: 10px 12px;
    cursor: pointer;
    font-size: 14px;
  }

  .place-option:hover {
    background: var(--primary);
    color: #fff;
  }

  .place-option.add-new {
    color: var(--primary);
    font-weight: 600;
    border-top: 1px solid #eee;
  }

  .place-option.add-new:hover {
    color: #fff;
    font-weight: 600;
    border-top: 1px solid #eee;
  }

  .place-option.no-results {
    color: #777;
    cursor: default;
  }


  
  .loan-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
  }

  .loan-summary-item span {
    color: var(--bs-secondary-color);
    font-size: 0.9rem;
  }

  .loan-summary-item strong {
    text-align: right;
  }

  [data-bs-theme="dark"] .loan-summary-item {
    color: #e2e8f0;
  }

  @media (max-width: 575.98px) {
    .loan-summary-item {
      font-size: 0.9rem;
    }
  }
