/* User-wise Audit Details – extends AuditStatus design */

.user-wise-audit-details-page .user-wise-audit-intro {
  margin: 0 0 1.5rem 0;
  font-size: 0.9375rem;
  color: #525252;
  line-height: 1.5;
}

/* Filters bar: date-wise, timestamp-wise, location, country */
.user-wise-filters-bar {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.875rem;
}

.user-wise-filters-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
}

.user-wise-filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 0;
}

.user-wise-filter-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.user-wise-filter-select,
.user-wise-filter-input {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border: 2px solid #e5e5e5;
  border-radius: 0.5rem;
  background: #fff;
  color: #1e293b;
  min-width: 140px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.user-wise-filter-select:focus,
.user-wise-filter-input:focus {
  outline: none;
  border-color: #f21b23;
  box-shadow: 0 0 0 3px rgba(242, 27, 35, 0.12);
}

.user-wise-filter-input[type="date"] {
  min-width: 150px;
}

.user-wise-filter-actions {
  align-self: flex-end;
}

.user-wise-filter-actions .btn {
  white-space: nowrap;
}

.user-wise-audit-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e5e5e5;
  border-radius: 0.875rem;
  background: #fff;
}

.user-wise-audit-table thead th {
  white-space: nowrap;
}

.user-wise-col-expand {
  width: 3rem;
  text-align: center;
  vertical-align: middle;
}

.user-wise-audit-row-main {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.user-wise-audit-row-main:hover {
  background-color: #fafafa;
}

.user-wise-expand-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 2px solid #e5e5e5;
  border-radius: 0.5rem;
  background: #fff;
  color: #4d4d4f;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}

.user-wise-expand-btn:hover {
  border-color: #f21b23;
  background: #fef2f2;
  color: #d91820;
}

.user-wise-audit-detail-row {
  background: #f8f9fa;
  vertical-align: top;
}

.user-wise-audit-detail-cell {
  padding: 0;
  border-top: none;
  border-bottom: 2px solid #e5e5e5;
  vertical-align: top;
}

.user-wise-audit-detail-inner {
  padding: 1rem 1.5rem 1.5rem 2.5rem;
}

.user-wise-audit-subtable {
  width: 100%;
  margin: 0;
  border: 1px solid #e5e5e5;
  border-radius: 0.5rem;
  background: #fff;
}

.user-wise-audit-subtable thead th {
  background: #f1f5f9;
  font-size: 0.8125rem;
}

.user-wise-audit-subtable tbody tr:hover {
  background: #f8fafc;
}

.user-wise-audit-subtable .audit-status-table-actions {
  white-space: nowrap;
}

/* ========== Dark theme – User-wise Audit Details ========== */
body.night-mode .user-wise-audit-details-page .user-wise-audit-intro,
.night-mode .user-wise-audit-details-page .user-wise-audit-intro {
  color: rgba(255, 255, 255, 0.88);
}

body.night-mode .user-wise-audit-details-page .audit-status-actions .btn-secondary,
.night-mode .user-wise-audit-details-page .audit-status-actions .btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.98);
}

body.night-mode .user-wise-audit-details-page .audit-status-actions .btn-secondary:hover,
.night-mode .user-wise-audit-details-page .audit-status-actions .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(248, 113, 113, 0.5);
  color: #fca5a5;
}

body.night-mode .user-wise-filters-bar,
.night-mode .user-wise-filters-bar {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

body.night-mode .user-wise-filter-label,
.night-mode .user-wise-filter-label {
  color: rgba(255, 255, 255, 0.9);
}

body.night-mode .user-wise-filter-select,
body.night-mode .user-wise-filter-input,
.night-mode .user-wise-filter-select,
.night-mode .user-wise-filter-input {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.95);
}

body.night-mode .user-wise-filter-select:focus,
body.night-mode .user-wise-filter-input:focus,
.night-mode .user-wise-filter-select:focus,
.night-mode .user-wise-filter-input:focus {
  border-color: rgba(248, 113, 113, 0.6);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.15);
}

body.night-mode .user-wise-filter-actions .btn-secondary,
.night-mode .user-wise-filter-actions .btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.95);
}

body.night-mode .user-wise-filter-actions .btn-secondary:hover,
.night-mode .user-wise-filter-actions .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(248, 113, 113, 0.5);
  color: #fca5a5;
}

body.night-mode .user-wise-audit-table-wrap,
.night-mode .user-wise-audit-table-wrap {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

body.night-mode .user-wise-audit-row-main:hover,
.night-mode .user-wise-audit-row-main:hover {
  background: rgba(255, 255, 255, 0.06);
}

body.night-mode .user-wise-expand-btn,
.night-mode .user-wise-expand-btn {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.9);
}

body.night-mode .user-wise-expand-btn:hover,
.night-mode .user-wise-expand-btn:hover {
  background: rgba(248, 113, 113, 0.25);
  border-color: rgba(248, 113, 113, 0.5);
  color: #fca5a5;
}

body.night-mode .user-wise-audit-detail-row,
.night-mode .user-wise-audit-detail-row {
  background: rgba(255, 255, 255, 0.04);
}

body.night-mode .user-wise-audit-detail-cell,
.night-mode .user-wise-audit-detail-cell {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.night-mode .user-wise-audit-subtable,
.night-mode .user-wise-audit-subtable {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

body.night-mode .user-wise-audit-subtable thead th,
.night-mode .user-wise-audit-subtable thead th {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 255, 255, 0.1);
}

body.night-mode .user-wise-audit-subtable tbody tr:hover,
.night-mode .user-wise-audit-subtable tbody tr:hover {
  background: rgba(255, 255, 255, 0.06);
}

body.night-mode .user-wise-audit-details-page .pagination-container,
.night-mode .user-wise-audit-details-page .pagination-container {
  border-top-color: rgba(255, 255, 255, 0.15);
}

body.night-mode .user-wise-audit-details-page .pagination-info,
.night-mode .user-wise-audit-details-page .pagination-info {
  color: rgba(255, 255, 255, 0.88);
}

body.night-mode .user-wise-audit-details-page .pagination-info span,
.night-mode .user-wise-audit-details-page .pagination-info span {
  color: rgba(255, 255, 255, 0.98);
}

body.night-mode .user-wise-audit-details-page .pagination-controls .btn,
body.night-mode .user-wise-audit-details-page .pagination-controls .pagination-btn,
.night-mode .user-wise-audit-details-page .pagination-controls .btn,
.night-mode .user-wise-audit-details-page .pagination-controls .pagination-btn {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.98);
}

body.night-mode .user-wise-audit-details-page .pagination-controls .btn:hover:not(:disabled),
body.night-mode .user-wise-audit-details-page .pagination-controls .pagination-btn:hover:not(:disabled),
.night-mode .user-wise-audit-details-page .pagination-controls .btn:hover:not(:disabled),
.night-mode .user-wise-audit-details-page .pagination-controls .pagination-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(248, 113, 113, 0.5);
  color: #fca5a5;
}
