/* Dark theme, responsive, mobile-first — polished */
:root{
  --bg:#071026;
  --panel:#0f1724;
  --muted:#94a3b8;
  --accent:#06b6d4;
  --accent-2:#6366f1;
  --success:#16a34a;
  --danger:#ef4444;
  --glass: rgba(255,255,255,0.03);
  --radius:12px;
  --card-padding:16px;
  --max-width:1100px;
}
*{box-sizing:border-box}
html,body{height:100%;margin:0;font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,'Helvetica Neue',Arial;background:linear-gradient(180deg,#04101a 0%,var(--bg) 100%);color:#e6eef6}
nav{background:linear-gradient(90deg, rgba(6,182,212,0.06), rgba(99,102,241,0.03));backdrop-filter:blur(6px);padding:12px 18px;display:flex;align-items:center;gap:12px;border-bottom:1px solid rgba(255,255,255,0.02);position:relative;z-index:100}
.nav-left{display:flex;align-items:center;gap:12px}
.logo{display:flex;align-items:center;gap:10px}
/* Updated logo styles for image */
.logo .app-logo-small {
  width: 42px; /* Original SVG width */
  height: 42px; /* Original SVG height */
  object-fit: contain; /* Ensures the image fits within the bounds without cropping */
  display: block;
}
.logo-big .app-logo-big {
  width: 48px; /* Original SVG width */
  height: 48px; /* Original SVG height */
  object-fit: contain; /* Ensures the image fits within the bounds without cropping */
  display: block;
}

.brand{font-weight:700;font-size:18px}
.tag{font-size:12px;color:var(--muted)}
.nav-buttons{margin-left:auto;display:flex;gap:8px}
/* Hamburger menu styles */
.hamburger {
  display: none; /* Hidden by default */
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}
/* Default state for nav-buttons on desktop */
.nav-buttons {
  display: flex; /* Always visible on desktop */
  flex-direction: row; /* Horizontal on desktop */
  position: static; /* Normal flow on desktop */
  width: auto; /* Auto width on desktop */
  background: transparent; /* No background on desktop */
  border-top: none; /* No border on desktop */
  box-shadow: none; /* No shadow on desktop */
  padding: 0; /* No extra padding on desktop */
}
.nav-buttons button{background:transparent;border:0;color:var(--muted);padding:10px 12px;border-radius:8px;cursor:pointer;transition:all 0.3s ease}
.nav-buttons button.active{background:linear-gradient(90deg, rgba(6,182,212,0.15), rgba(99,102,241,0.1));color:#fff;border:1px solid rgba(6,182,212,0.3);box-shadow:0 0 12px rgba(6,182,212,0.25)}

/* Mobile specific styles for nav-buttons */
@media (max-width:768px){ /* Mobile breakpoint for hamburger */
  .nav-buttons{
    display: flex; /* Always flex for transitions */
    flex-direction: column; /* Vertical on mobile */
    position: absolute;
    top: 100%; /* Below the nav bar */
    left: 0;
    width: 100%;
    background: var(--panel);
    border-top: 1px solid rgba(255,255,255,0.02);
    padding: 0 18px;
    box-shadow: 0 5px 15px rgba(2,6,23,0.4);
    gap: 4px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-10px);
    transition: max-height 0.4s ease, opacity 0.3s ease, transform 0.3s ease, padding 0.4s ease;
  }
  .nav-buttons.mobile-show {
    max-height: 500px; /* Large enough to fit all buttons */
    opacity: 1;
    padding: 10px 18px;
    transform: translateY(0);
  }
  .nav-buttons button {
    width: 100%;
    text-align: left;
    padding: 12px 10px;
  }
}

.container{max-width:var(--max-width);margin:18px auto;padding:0 16px}
.grid{display:grid;gap:16px}
/* Adjusted grid for 3 cards in the right column on desktop */
.grid-2{grid-template-columns:1fr 360px;}
.grid-2 > div:nth-child(2) { /* This targets the second column's content */
    display: grid;
    grid-template-rows: auto auto auto; /* Adjusts rows for the new card */
    gap: 16px; /* Gap between cards in the second column */
}
.card{background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));padding:var(--card-padding);border-radius:var(--radius);box-shadow: 0 10px 30px rgba(2,6,23,0.6);border:1px solid rgba(255,255,255,0.03)}
.title{font-weight:600;margin-bottom:10px;color:#d8eef9}

/* ===== BUTTONS ===== */
button.primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #042029;
  border: 2px solid var(--accent-2); /* Added distinct border */
  padding: 14px 20px; /* Increased padding */
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

button.primary:hover,
button.primary:focus {
  border-color: #ffffff; /* Brighten border on hover/focus */
  box-shadow: 0 0 8px var(--accent-2); /* Glow effect */
  outline: none;
}

button.primary:disabled {
  cursor: not-allowed;
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
  color: rgba(230, 238, 246, 0.5);
  box-shadow: none;
}

button.ghost {
  background: transparent;
  border: 2px solid var(--accent-2); /* Added distinct border */
  padding: 12px 16px; /* Slightly increased padding */
  border-radius: 10px;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

button.ghost:hover,
button.ghost:focus {
  border-color: #ffffff;
  box-shadow: 0 0 6px var(--accent-2);
  outline: none;
}

button.ghost:disabled {
  cursor: not-allowed;
  border-color: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.3);
  box-shadow: none;
}

button.warn {
  background: var(--danger);
  color: #fff;
  border: 2px solid var(--danger); /* Added distinct border */
  padding: 12px 16px; /* Slightly increased padding */
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

button.warn:hover,
button.warn:focus {
  border-color: #fff;
  box-shadow: 0 0 8px var(--danger);
  outline: none;
}

button.warn:disabled {
  cursor: not-allowed;
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.4);
  box-shadow: none;
}

/* ===== INPUTS, SELECTS, TEXTAREAS ===== */
input,select,textarea{background:transparent;border:1px solid rgba(255,255,255,0.04);padding:10px;border-radius:10px;color:#e6eef6;font-size:1rem;transition:border-color 0.3s ease, box-shadow 0.3s ease; width: 100%; box-sizing: border-box;} /* Added font-size and width for larger tap zone and emphasis */
/* Emphasis border and focus styles */
input, select, textarea {
  border: 1.5px solid rgba(255,255,255,0.15);
  outline: none;
}
/* Checkbox and radio inputs should not take full width */
input[type="checkbox"],
input[type="radio"] {
  width: auto;
  padding: 0;
  margin: 0;
  margin-right: 8px;
  cursor: pointer;
  vertical-align: middle;
  flex-shrink: 0;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}
/* Disabled/read-only inputs muted */
input:disabled, select:disabled, textarea:disabled,
input[readonly], select[readonly], textarea[readonly] {
  border-color: rgba(255,255,255,0.05);
  color: var(--muted);
  background: rgba(255,255,255,0.01);
  box-shadow: none;
}
input::placeholder, select::placeholder, textarea::placeholder{color:rgba(230,238,246,0.35)}
/* Added style for error inputs */
input.error, select.error, textarea.error {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 2px rgba(239,68,68,0.5) !important;
}
table{width:100%;border-collapse:collapse;font-size:13px}
th,td{padding:8px;border-bottom:1px solid rgba(255,255,255,0.02);text-align:left}
th{color:var(--muted);font-weight:700}
.muted{color:var(--muted)}
.small{font-size:13px}
.stats-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
/* Adjusted grid for 3 cards in the right column on desktop */
.grid-2{grid-template-columns:1fr 360px;}
.grid-2 > div:nth-child(2) { /* This targets the second column's content */
    display: grid;
    grid-template-rows: auto auto auto; /* Adjusts rows for the new card */
    gap: 16px; /* Gap between cards in the second column */
}
.qr{width:140px;height:140px;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,0.02);border-radius:12px}
.messages{margin-bottom:14px}
.message{background:linear-gradient(90deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));padding:12px;border-radius:12px;margin-bottom:8px;border:1px solid rgba(255,255,255,0.02);display:flex;justify-content:space-between;align-items:flex-start;} /* Align items to flex-start for dismiss button */
.message .dismiss-btn { background: none; border: none; color: var(--muted); font-size: 1.2em; cursor: pointer; margin-left: 10px; padding: 0; line-height: 1; }
.message.success { border-color: var(--success); background: linear-gradient(90deg, rgba(22,163,74,0.1), rgba(22,163,74,0.05)); }
.message.error { border-color: var(--danger); background: linear-gradient(90deg, rgba(239,68,68,0.1), rgba(239,68,68,0.05)); }
.message.warning { border-color: orange; background: linear-gradient(90deg, rgba(255,165,0,0.1), rgba(255,165,0,0.05)); }
.badge{padding:6px 10px;border-radius:999px;background:rgba(255,255,255,0.03);color:var(--muted);font-weight:600}
.controls{display:flex;gap:10px;flex-wrap:wrap}
.center{display:flex;align-items:center;justify-content:center}

/* Login styles */
.login-screen{position:fixed;inset:0;background:linear-gradient(180deg, rgba(2,6,23,0.85), rgba(2,6,23,0.95));display:flex;align-items:center;justify-content:center;z-index:999}
.login-card{width:min(420px,96%);padding:22px;border-radius:14px;background:linear-gradient(180deg, rgba(6,182,212,0.03), rgba(99,102,241,0.02));border:1px solid rgba(255,255,255,0.03);box-shadow: 0 10px 30px rgba(2,6,23,0.6);}
.logo-big{display:flex;align-items:center;gap:12px;margin-bottom:10px}
/* .logo-big svg{width:48px;height:48px} */ /* Removed as it's now an img */
.muted-block{color:var(--muted);font-size:13px}

/* Login error message container */
#login-error-message {
  display: none;
  background: rgba(239,68,68,0.15);
  border: 1.5px solid var(--danger);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  user-select: none;
}

/* QR Modal styles */
.qr-modal-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.4); /* Slightly less opaque black for blur effect */
  backdrop-filter:blur(8px); /* Apply blur to the background */
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:1000;
  opacity:0;
  visibility:hidden;
  transition:opacity 0.3s ease, visibility 0.3s ease;
}
.qr-modal-overlay.show{opacity:1;visibility:visible;}
.qr-modal-content{
  background:var(--panel); /* Use a solid background for the modal content */
  padding:var(--card-padding);
  border-radius:var(--radius);
  box-shadow: 0 10px 30px rgba(2,6,23,0.8);
  border:1px solid rgba(255,255,255,0.03);
  width:min(400px,96%);
  max-height:90vh;
  overflow-y:auto;
  position:relative;
}
.qr-modal-close{position:absolute;top:10px;right:10px;background:none;border:none;font-size:1.5rem;color:var(--muted);cursor:pointer;padding:5px;transition:color 0.2s ease;}
.qr-modal-close:hover{color:#fff;}
.qr-modal-content .title{margin-top:0;}

/* Edit User Modal styles (duplicated from QR Modal for safety) */
.edit-user-modal-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.4);
  backdrop-filter:blur(8px);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:1000;
  opacity:0;
  visibility:hidden;
  transition:opacity 0.3s ease, visibility 0.3s ease;
}
.edit-user-modal-overlay.show{opacity:1;visibility:visible;}
.edit-user-modal-content{
  background:var(--panel);
  padding:var(--card-padding);
  border-radius:var(--radius);
  box-shadow: 0 10px 30px rgba(2,6,23,0.8);
  border:1px solid rgba(255,255,255,0.03);
  width:min(400px,96%);
  max-height:90vh;
  overflow-y:auto;
  position:relative;
}
.edit-user-modal-close{position:absolute;top:10px;right:10px;background:none;border:none;font-size:1.5rem;color:var(--muted);cursor:pointer;padding:5px;transition:color 0.2s ease;}
.edit-user-modal-close:hover{color:#fff;}
.edit-user-modal-content .title{margin-top:0;}

/* Specific styles for voucher details in modal */
#modal-voucher-details.connect-mode .detail-row {
    display: none; /* Hide these rows in connect mode */
}
#modal-voucher-details.connect-mode .username-password-row {
    font-size: 1.2em; /* Make username/password bigger */
}
#modal-voucher-details.connect-mode .username-password-row strong {
    font-size: 1.3em; /* Make username/password strong text even bigger */
}

/* Hamburger menu styles */
.hamburger {
  display: none; /* Hidden by default */
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}
/* Default state for nav-buttons on desktop */
.nav-buttons {
  display: flex; /* Always visible on desktop */
  flex-direction: row; /* Horizontal on desktop */
  position: static; /* Normal flow on desktop */
  width: auto; /* Auto width on desktop */
  background: transparent; /* No background on desktop */
  border-top: none; /* No border on desktop */
  box-shadow: none; /* No shadow on desktop */
  padding: 0; /* No extra padding on desktop */
}

/* Mobile specific styles for nav-buttons */
@media (max-width:768px){ /* Mobile breakpoint for hamburger */
  .nav-buttons{
    display: flex; /* Always flex for transitions */
    flex-direction: column; /* Vertical on mobile */
    position: absolute;
    top: 100%; /* Below the nav bar */
    left: 0;
    width: 100%;
    background: var(--panel);
    border-top: 1px solid rgba(255,255,255,0.02);
    padding: 0 18px;
    box-shadow: 0 5px 15px rgba(2,6,23,0.4);
    gap: 4px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-10px);
    transition: max-height 0.4s ease, opacity 0.3s ease, transform 0.3s ease, padding 0.4s ease;
  }
  .nav-buttons.mobile-show {
    max-height: 500px; /* Large enough to fit all buttons */
    opacity: 1;
    padding: 10px 18px;
    transform: translateY(0);
  }
  .nav-buttons button {
    width: 100%;
    text-align: left;
    padding: 12px 10px;
  }
}

/* Responsive adjustments */
@media (max-width:980px){
  .grid-2{grid-template-columns:1fr}
  .grid-2 > div:nth-child(2) { /* Reset for single column layout */
      display: block; /* Revert to block flow */
      gap: 0; /* Remove gap */
  }
  .grid-2 > div:nth-child(2) > .card { /* Add margin between cards when stacked */
      margin-bottom: 16px;
  }
  .grid-2 > div:nth-child(2) > .card:last-child {
      margin-bottom: 0;
  }
}
@media (max-width:768px){ /* Mobile breakpoint for hamburger */
  .hamburger{display:block;} /* Show hamburger */
  .brand{font-size:16px}
  /* .logo svg{width:34px;height:34px} */ /* Removed as it's now an img */
  .logo .app-logo-small { /* Adjust small logo for mobile */
    width: 34px;
    height: 34px;
  }
  .controls{flex-direction:column;align-items:flex-start;}
  .controls select, .controls button {width:100%;}
  .stats-grid{grid-template-columns:1fr;} /* Stack stats cards */
}
@media (max-width:480px){
  .login-card{width:96%;}
}

/* New analytics stats grid */
.analytics-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Responsive columns */
  gap: 10px;
  margin-bottom: 20px; /* Space between stats and chart */
}
.analytics-stats-grid .card {
  padding: 12px; /* Slightly less padding than main cards */
  text-align: center;
}
.analytics-stats-grid .card strong {
  font-size: 1.4em; /* Larger font for numbers */
  display: block; /* Ensure strong tag takes full width */
  margin-top: 4px;
}

/* Loading spinner */
.spinner {
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid #fff;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  animation: spin 1s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
button .spinner { margin-left: 0; margin-right: 8px; } /* For button text alignment */

/* Voucher status visuals */
.status-badge {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.status-unused { background-color: var(--success); }
.status-reserved { background-color: var(--accent); }
.status-used { background-color: var(--muted); } /* Used vouchers are greyed out */
.status-pending { background-color: #ffc107; } /* Yellow/orange for pending debts */
.status-paid { background-color: var(--success); } /* Green for paid debts */

/* No data message */
.no-data-message {
  text-align: center;
  color: var(--muted);
  padding: 20px;
  font-style: italic;
}

/* Styles for clickable voucher IDs */
.voucher-id-link {
    cursor: pointer;
    color: var(--accent); /* Or any color to indicate it's clickable */
    text-decoration: underline;
}

/* User management styles */
.user-list {
    max-height: 200px;
    overflow-y: auto;
    margin-top: 10px;
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 10px;
}
.user-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.02);
}
.user-list-item:last-child {
    border-bottom: none;
}
.user-list-item .actions button {
    margin-left: 8px;
    padding: 6px 10px;
    font-size: 0.85em;
}
.user-list-item .username {
    font-weight: 600;
}
.user-list-item .role {
    font-size: 0.9em;
    color: var(--muted);
    margin-left: 8px
}

/* Settings page sections */
.settings-section {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.02);
}
.settings-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.settings-section .title {
    margin-bottom: 16px;
    font-size: 1.1em;
    color: #d8eef9;
}
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

/* New styles for settings tabs */
.settings-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.02);
  padding-bottom: 8px;
  overflow-x: auto; /* Allow horizontal scrolling on small screens */
}

.settings-tab-button {
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap; /* Prevent text wrapping */
  transition: all 0.3s ease;
}

.settings-tab-button.active {
  background: linear-gradient(90deg, rgba(6,182,212,0.15), rgba(99,102,241,0.1));
  color: #fff;
  border: 1px solid rgba(6,182,212,0.3);
  box-shadow: 0 0 12px rgba(6,182,212,0.25);
}

/* Responsive table for logs and connections */
.table-responsive {
    width: 100%;
    overflow-x: auto; /* Enable horizontal scrolling */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.table-responsive table {
    width: 100%; /* Ensure table takes full width of its container */
    min-width: 600px; /* Minimum width to prevent excessive squishing */
}

/* Adjust input field width for responsiveness */
.settings-grid input[type="text"],
.settings-grid input[type="number"],
.settings-grid input[type="password"] {
    width: 100%; /* Make inputs fill their grid column */
    box-sizing: border-box; /* Include padding and border in the element's total width */
}

/* Responsive adjustments for controls */
@media (max-width: 768px) {
  .controls {
    flex-direction: column;
    align-items: stretch; /* Stretch items to fill width */
  }
  .controls select,
  .controls button,
  .controls input {
    width: 100%; /* Make controls full width on mobile */
    min-width: unset; /* Remove min-width constraint */
  }
}

/* Adjust user list item for smaller screens */
@media (max-width: 480px) {
  .user-list-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .user-list-item .actions {
    width: 100%;
    display: flex;
    justify-content: flex-end;
  }
  .user-list-item .actions button {
    flex-grow: 1; /* Allow buttons to grow and fill space */
  }
}

/* Footer styles */
footer#site-footer {
  background: linear-gradient(90deg, rgba(6,182,212,0.06), rgba(99,102,241,0.03));
  backdrop-filter: blur(6px);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 12px 0;
  position: fixed;
  bottom: 0;
  width: 100%;
  user-select: none;
  z-index: 100;
}


.connect-type-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 12px 14px;
}

.connect-type-btn .btn-label {
  font-weight: 600;
  font-size: 1rem;
  color: #e6eef6; /* main text */
}

.connect-type-btn .btn-sub {
  font-size: 0.8rem;
  color: var(--muted); /* slightly dimmer */
}

.connect-type-btn.active {
  background: linear-gradient(90deg, rgba(255,255,255,0.05), rgba(255,255,255,0.03));
  color: #fff;
  border-color: var(--accent-2);
}

/* Debt Management Styles */
.status-badge {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.pending {
  background-color: rgba(255, 193, 7, 0.2);
  color: #ffc107;
  border: 1px solid rgba(255, 193, 7, 0.3);
}

.status-badge.paid {
  background-color: rgba(40, 167, 69, 0.2);
  color: #28a745;
  border: 1px solid rgba(40, 167, 69, 0.3);
}

.pay-debt-btn {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.9em;
  cursor: pointer;
  transition: background-color 0.2s;
}

.pay-debt-btn:hover {
  background-color: var(--primary-hover);
}

#modal-partial-payment-section {
  transition: all 0.3s ease;
}

#modal-partial-payment-section input {
  margin-bottom: 4px;
}

/* Debt table styling */
#debts-table th {
  background-color: var(--panel);
  position: sticky;
  top: 0;
  z-index: 10;
}

#debts-table .no-data-message {
  text-align: center;
  color: var(--muted);
  font-style: italic;
  padding: 20px;
}

/* Responsive debt view */
@media (max-width: 768px) {
  #debts-table {
    font-size: 0.9em;
  }
  
  .analytics-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .analytics-stats-grid .card.small {
    padding: 8px;
  }
}


.connect-type-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 12px;
}

.connect-type-btn .btn-label {
  font-weight: 600;
  font-size: 1rem;
  color: #e6eef6;
}

.connect-type-btn .btn-sub {
  font-size: 0.8rem;
  color: var(--muted);
}

.connect-type-btn.active {
  background: linear-gradient(90deg, rgba(255,255,255,0.05), rgba(255,255,255,0.03));
  color: #fff;
  border-color: var(--accent-2);
}

/* Debt Management Styles */
.status-badge {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.pending {
  background-color: rgba(255, 193, 7, 0.2);
  color: #ffc107;
  border: 1px solid rgba(255, 193, 7, 0.3);
}

.status-badge.paid {
  background-color: rgba(40, 167, 69, 0.2);
  color: #28a745;
  border: 1px solid rgba(40, 167, 69, 0.3);
}

.pay-debt-btn {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.9em;
  cursor: pointer;
  transition: background-color 0.2s;
}

.pay-debt-btn:hover {
  background-color: var(--primary-hover);
}

#modal-partial-payment-section {
  transition: all 0.3s ease;
}

#modal-partial-payment-section input {
  margin-bottom: 4px;
}

/* Debt table styling */
#debts-table th {
  background-color: var(--panel);
  position: sticky;
  top: 0;
  z-index: 10;
}

#debts-table .no-data-message {
  text-align: center;
  color: var(--muted);
  font-style: italic;
  padding: 20px;
}

/* Responsive debt view */
@media (max-width: 768px) {
  #debts-table {
    font-size: 0.9em;
  }
  
  .analytics-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .analytics-stats-grid .card.small {
    padding: 8px;
  }
}

