/* MoneyRootFS Portal - Custom Styles */

/* Brand Colors */
:root {
  --mr-primary: #007bff;
  --mr-success: #28a745;
  --mr-warning: #ffc107;
  --mr-danger: #dc3545;
  --mr-dark: #343a40;
}

/* Sidebar branding */
.brand-link {
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Small boxes - stat cards */
.small-box h3 {
  font-size: 2rem;
  font-weight: 700;
}

.small-box .icon i {
  font-size: 60px;
}

/* Status badges */
.badge {
  font-size: 0.8rem;
  padding: 0.35em 0.65em;
}

.badge-lg {
  font-size: 1rem;
}

/* Table improvements */
.table td, .table th {
  vertical-align: middle;
}

.table-sm td, .table-sm th {
  padding: 0.4rem 0.5rem;
}

/* Timeline adjustments */
.timeline > div > .timeline-item {
  border-radius: 4px;
}

.timeline > div > .timeline-item > .timeline-header {
  font-size: 0.9rem;
  font-weight: 600;
}

/* Card header consistency */
.card-header .card-title {
  font-size: 1rem;
  font-weight: 600;
}

/* Filter bar compact */
.card-body .form-control-sm {
  font-size: 0.85rem;
}

/* Login page */
.login-page .login-box {
  width: 400px;
}

.login-box .card-header {
  background: linear-gradient(135deg, var(--mr-primary) 0%, #0056b3 100%);
  color: #fff;
}

.login-box .card-header a {
  color: #fff;
  text-decoration: none;
}

/* Commission summary cards */
.small-box .inner h3 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .small-box h3 {
    font-size: 1.5rem;
  }

  .content-header h1 {
    font-size: 1.3rem;
  }

  .table-responsive {
    font-size: 0.85rem;
  }

  .btn-xs {
    padding: 0.15rem 0.4rem;
    font-size: 0.75rem;
  }

  /* Stack filter controls on mobile */
  .card-body .row > [class*="col-md"] {
    margin-bottom: 0.5rem;
  }

  /* Hide less important columns on mobile */
  .table .d-none-mobile {
    display: none;
  }
}

@media (max-width: 576px) {
  .login-page .login-box {
    width: 95%;
  }

  .small-box .icon {
    display: none;
  }
}

/* HTMX loading indicator */
.htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator {
  display: inline-block;
}

.htmx-request.htmx-indicator {
  display: inline-block;
}

/* Smooth transitions for HTMX swaps */
.htmx-swapping {
  opacity: 0.5;
  transition: opacity 200ms ease-in;
}

.htmx-settling {
  opacity: 1;
  transition: opacity 200ms ease-in;
}

/* DL (definition list) styling in detail pages */
dl.row dt {
  font-weight: 600;
  color: #555;
}

dl.row dd {
  color: #333;
}

/* Chart containers */
canvas {
  max-width: 100%;
}
