/* Modern Table Styling for User Manager */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap');

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

/* Body Styling */
body {
  font-family: 'Roboto', 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  background-color: #f5f7fa;
  color: #333;
  line-height: 1.6;
}

/* Links */
a {
  text-decoration: none;
  text-decoration-color: rgba(0, 0, 0, 0);
  color: var(--global-fg-link-default);
  font-weight: bold;
  cursor: pointer;
  transition: text-decoration-color .2s;
}

/* Container Styling */
.container {
  background-color: #ffffff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
}

/* Headings */
h1 {
  font-size: 24px;
  color: #2d3e50;
  margin-bottom: 1rem;
  text-align: center;
  font-family: 'Roboto', sans-serif;
}

/* Form Elements */
label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
  font-family: 'Open Sans', sans-serif;
}

input[type="text"],
input[type="password"],
input[type="email"] {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 14px;
  font-family: 'Open Sans', sans-serif;
}

input {
  width: 100%;
  padding: 0.75rem;
  border-radius: 10px !important;
}

/* Buttons */
button {
  width: 100%;
  padding: 0.75rem;
  background-color: #00aaff;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-family: 'Roboto', sans-serif;
}

button:hover {
  background-color: #008ecc;
}

/* Footer */
.footer {
  margin-top: 1rem;
  text-align: center;
  font-size: 14px;
  color: #666;
  font-family: 'Open Sans', sans-serif;
}

.footer a {
  color: #00aaff;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* Tab Styles */
.tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.tab {
  padding: 0.75rem 1.5rem;
  background-color: #e6f2ff;
  color: #2d3e50;
  border: 1px solid #b3d8ff;
  border-radius: 20px;
  margin: 0 0.5rem;
  cursor: pointer;
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.tab:hover {
  background-color: #cce6ff;
}

.tab.active {
  background-color: #ffffff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border: 1px solid #99ccff;
  font-weight: 500;
}

/* Bootstrap Nav Tabs Customization */
.nav-tabs {
  box-shadow: 0px 4px 6px rgba(173, 216, 230, 0.5);
  display: flex;
  justify-content: center;
  background: #e0f2ff;
  margin-left: 20%;
  margin-right: 22%;
  border-radius: 25px;
  padding: 3px;
  width: fit-content;
  margin: auto;
}

.nav-tabs .nav-link {
  background: #e0f2ff;
  font-weight: normal;
  border-radius: 25px;
  transition: all 0.3s ease;
  padding-left: 15px;
  padding-right: 15px;
  color: #001b66;
  border: none;
}

.nav.nav-tabs .nav-item .nav-link {
  background: #e0f2ff;
  color: #001b66;
  font-weight: normal;
  border-radius: 25px;
  transition: all 0.3s ease;
  padding-left: 15px;
  padding-right: 15px;
  border: none;
}

.nav-tabs .nav-link.active {
  background-color: white;
  color: #001b66;
  font-weight: bold;
  border-radius: 25px;
  padding-left: 15px;
  padding-right: 15px;
  border-bottom: none;
  border: none;
}

.nav.nav-tabs.nav-tabs-line .nav-link.active {
  border-bottom: none;
  color: #001b66;
  font-weight: bold;
}

.tab-content {
  border: none !important;
  padding: 0px !important;
}

/* Table Styling */
.table {
  --bs-table-color-type: initial;
  --bs-table-bg-type: initial;
  --bs-table-color-state: initial;
  --bs-table-bg-state: initial;
  --bs-table-color: var(--bs-emphasis-color);
  --bs-table-bg: var(--bs-body-bg);
  --bs-table-border-color: var(--bs-border-color);
  --bs-table-accent-bg: transparent;
  --bs-table-striped-color: var(--bs-emphasis-color);
  --bs-table-striped-bg: rgba(121, 135, 161, 0.2);
  --bs-table-active-color: var(--bs-emphasis-color);
  --bs-table-active-bg: rgba(121, 135, 161, 0.2);
  --bs-table-hover-color: #0b0b0b !important;
  --bs-table-hover-bg: #e0f2ff !important;
  width: 100%;
  margin-bottom: 1rem;
  vertical-align: top;
  border-color: #e0f2ff;
  border-left: none !important;
  border-right: none !important;
}

.table thead th {
  border-top: 0 !important;
  border-bottom: 2px solid !important;
  font-weight: bold !important;
  font-size: 12px !important;
  text-transform: uppercase !important;
  color: #000000 !important;
}

.table_heads {
  border-top: 0 !important;
  font-weight: 800 !important;
  font-size: 16px !important;
  text-transform: uppercase !important;
  color: #000000 !important;
}

.table > :not(caption) > * > * {
  padding: 0.2rem 0.8rem;
  background-color: var(--bs-table-bg);
  border-bottom-width: 1px;
  box-shadow: inset 0 0 0 9999px var(--bs-table-accent-bg);
}

/* Table Structure */
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th, td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: center;
}

th {
  background: #dea718;
  color: white;
}

/* Table Borders */
thead, tbody, tfoot, tr, td, th {
  border-style: none;
  border: none !important;
  border-bottom: 0.3px solid #b2bbc8 !important;
}

/* Table Responsiveness */
.table-responsive {
  overflow-x: visible !important;
  -webkit-overflow-scrolling: touch;
}

/* Table Links */
.tb_cell_link {
  text-decoration: none;
  text-decoration-color: rgba(0, 0, 0, 0);
  color: #0040ff;
  font-weight: bold;
  cursor: pointer;
  transition: text-decoration-color .2s;
}

/* Dropdown Items */
.dropdown-item {
  display: block;
  padding: 8px 16px;
  font-weight: 400;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
  cursor: pointer;
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  outline: none;
  color: inherit;
  background-color: rgba(0, 0, 0, 0);
  border: none;
  font-family: Dinero Sans, sans-serif;
  font-size: 16px;
  line-height: 1.4;
}

/* Highlight Classes */
.highlight-unpaid {
  color: #232226;
  background: #f9ddde;
  border-radius: 8px;
}

.highlight-paid {
  color: #364b46;
  background-color: #b6edd8;
  border-radius: 8px;
}

/* Clickable Rows */
.clickable-row {
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.clickable-row:hover {
  background-color: #e0f2ff !important;
  color: #0040ff !important;
  box-shadow: inset 0 0 0 9999px rgba(0, 64, 255, 0.04);
}

table tbody tr.clickable-row {
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

table tbody tr.clickable-row:hover {
  background-color: #e0f2ff !important;
}

table tbody tr.clickable-row td {
  background-color: inherit !important;
}

/* Microfinance Button Style */
.mf_button_outline_style {
  border-radius: 8px !important;
  border: 1px solid #0040ff !important;
  color: #0040ff !important;
  padding: 8px 20px !important;
  padding-top: 3px !important;
  padding-bottom: 3px !important;
  outline: 0;
  font-weight: 600 !important;
  font-size: 18px !important;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.mf_button_outline_style:hover {
  background-color: #0040ff !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(0, 64, 255, 0.25);
  transform: translateY(-2px);
}

.mf_button_outline_style:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 64, 255, 0.2);
}

/* Status Text Highlight */
.text_status_hilight {
  padding: 4px !important;
}

/* Status Badges */
.status-badge {
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-active {
  background-color: #b6edd8;
  color: #364b46;
}

.status-inactive {
  background-color: #f9ddde;
  color: #232226;
}

.status-pending {
  background-color: #fff3cd;
  color: #856404;
}

/* ── Action Button Tooltips ─────────────────────────────────── */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #1e293b;
  color: #f1f5f9;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
  letter-spacing: 0.3px;
}

[data-tooltip]::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  border: 5px solid transparent;
  border-top-color: #1e293b;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 9999;
}

[data-tooltip]:hover::after,
[data-tooltip]:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


/* Responsive Design */
@media (max-width: 600px) {
  .container {
    padding: 1.5rem;
  }

  h1 {
    font-size: 20px;
  }

  .tab {
    font-size: 14px;
    padding: 0.5rem 1rem;
  }

  .nav-tabs {
    margin-left: 5%;
    margin-right: 5%;
  }

  .table {
    font-size: 14px;
  }

  .table thead th {
    font-size: 11px !important;
  }
}

/* Card Styling for Table Containers */
.table-card {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.table-card .card-header {
  background: linear-gradient(135deg, #00aaff, #0088cc);
  color: white;
  border-radius: 8px 8px 0 0;
  padding: 1rem 1.5rem;
  margin: -1.5rem -1.5rem 1.5rem -1.5rem;
}

.table-card .card-header h4 {
  margin: 0;
  font-weight: 600;
  font-size: 18px;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.action-buttons .btn {
  font-size: 12px;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-weight: 500;
}

/* Search and Filter Section */
.search-filter-section {
  background-color: #f8f9fa;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.search-filter-section .form-control {
  border-radius: 20px;
  border: 1px solid #e0e0e0;
  padding: 0.5rem 1rem;
}

.search-filter-section .btn {
  border-radius: 20px;
  padding: 0.5rem 1.5rem;
}