/* SolarCRM custom styles */
.login-page {
  background: linear-gradient(135deg, #1e3a5f 0%, #2d6a4f 100%);
}

.login-logo a {
  color: #fff;
  font-weight: 600;
}

.login-card-body {
  border-radius: 0.5rem;
}

.brand-link .brand-text {
  font-weight: 600;
}

.content-header h1 {
  font-size: 1.5rem;
}

.table td,
.table th {
  vertical-align: middle;
}

.lead-desc {
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-select {
  min-width: 180px;
  max-width: 210px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}

.status-hint {
  display: block;
  font-size: 0.75rem;
  color: #6c757d;
  margin-top: 0.25rem;
}

.leads-toolbar label {
  font-size: 0.875rem;
  font-weight: 600;
}

#leadsTable_wrapper .dt-buttons {
  display: none;
}

#leadsTable td {
  vertical-align: middle;
}

/* Status change log table (event history — same status can repeat) */
.status-log-help {
  font-size: 0.875rem;
}

.status-log-table td,
.status-log-table th {
  vertical-align: middle;
}

.status-log-table td:nth-child(3) {
  white-space: normal;
  max-width: 320px;
  font-size: 0.875rem;
}

#statusNotesModal .modal-header .close,
#viewStatusLogModal .modal-header .close {
  opacity: 0.9;
}

.status-log-repeat td {
  font-weight: 500;
}

.document-row .custom-file-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge-lg {
  font-size: 0.95rem;
  padding: 0.4em 0.65em;
}

/* Compact dashboard stat boxes */
.dashboard-stats > [class*="col-"] {
  padding-left: 8px;
  padding-right: 8px;
}

.dashboard-stats .small-box {
  margin-bottom: 12px;
  border-radius: 0.35rem;
}

.dashboard-stats .small-box > .inner {
  padding: 10px 12px 6px;
}

.dashboard-stats .small-box > .inner h3 {
  font-size: 1.6rem;
  margin: 0 0 4px;
  font-weight: 700;
}

.dashboard-stats .small-box > .inner p {
  font-size: 0.85rem;
  margin-bottom: 0;
}

.dashboard-stats .small-box .icon {
  top: 8px;
  right: 10px;
  font-size: 50px;
}

.dashboard-stats .small-box .icon > i {
  font-size: 50px;
}

.dashboard-stats .small-box > .small-box-footer {
  padding: 4px 0;
  font-size: 0.8rem;
}

.report-section-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: #343a40;
}

.report-table th,
.report-table td {
  vertical-align: middle;
  font-size: 0.875rem;
}

#leadStatusChart,
#orderStatusChart {
  max-height: 180px;
}

/* Mobile-friendly listing tables — horizontal scroll */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.dataTables_wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.dataTables_wrapper .dataTables_scroll {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

.dataTables_wrapper .table {
  width: 100% !important;
  min-width: 640px;
}

#leadsTable,
#customersTable,
#ordersTable,
#mastersTable {
  min-width: 700px;
}

#ordersTable {
  min-width: 860px;
}

#leadsTable {
  min-width: 900px;
}

@media (max-width: 767.98px) {
  .content-wrapper {
    overflow-x: hidden;
  }

  .card-body {
    padding: 0.75rem;
  }

  .status-select {
    min-width: 150px;
    max-width: 170px;
    font-size: 0.8rem;
  }

  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter {
    float: none;
    text-align: left;
    margin-bottom: 0.5rem;
  }

  .dataTables_wrapper .dataTables_filter input {
    width: 100%;
    margin-left: 0 !important;
    display: block;
    margin-top: 0.25rem;
  }

  .table td,
  .table th {
    white-space: nowrap;
  }

  .report-table td,
  .report-table th {
    white-space: nowrap;
  }
}
