/* Audit / Historique - Styles (theme bleu/cyan) */

/* ============================================
   FILTRES
   ============================================ */
.audit-filters-bar {
  background: rgba(154, 138, 78, 0.05);
  border: 1px solid rgba(154, 138, 78, 0.2);
  border-radius: 8px;
  padding: 14px;
}

.audit-filters-bar .form-select,
.audit-filters-bar .form-control {
  background: #241710;
  border-color: rgba(58, 42, 30, 0.5);
  color: var(--text-main);
  font-size: 0.85rem;
}

.audit-filters-bar .form-select:focus,
.audit-filters-bar .form-control:focus {
  border-color: rgba(154, 138, 78, 0.5);
  box-shadow: 0 0 0 2px rgba(154, 138, 78, 0.15);
}

/* ============================================
   TABLE
   ============================================ */
.audit-table-container {
  border: 1px solid rgba(58, 42, 30, 0.3);
  border-radius: 8px;
  overflow: hidden;
  max-height: calc(100vh - 380px);
  overflow-y: auto;
}

.audit-table {
  margin: 0;
  color: var(--text-main);
}

.audit-table thead th {
  background: rgba(154, 138, 78, 0.1);
  border-bottom: 2px solid rgba(154, 138, 78, 0.3);
  color: #a8924e;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 12px;
  position: sticky;
  top: 0;
  z-index: 1;
}

.audit-table tbody tr {
  border-bottom: 1px solid rgba(58, 42, 30, 0.2);
  transition: background 0.15s;
}

.audit-table tbody tr:hover {
  background: rgba(154, 138, 78, 0.06);
}

.audit-table td {
  padding: 8px 12px;
  font-size: 0.85rem;
  vertical-align: middle;
}

/* ============================================
   BADGES ACTIONS
   ============================================ */
.audit-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
  white-space: nowrap;
}

.audit-badge-creer {
  background: rgba(90, 168, 115, 0.15);
  color: #5aa873;
}

.audit-badge-modifier {
  background: rgba(200, 119, 67, 0.15);
  color: #c87743;
}

.audit-badge-supprimer {
  background: rgba(184, 70, 92, 0.15);
  color: #c0455a;
}

.audit-badge-ajouter {
  background: rgba(91, 155, 112, 0.15);
  color: #4f9d69;
}

.audit-badge-default {
  background: rgba(162, 143, 127, 0.15);
  color: #b49a82;
}

/* ============================================
   TAB BADGES
   ============================================ */
.audit-tab-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  display: inline-block;
}

.audit-tab-items { background: rgba(200, 119, 67, 0.15); color: #c87743; }
.audit-tab-monstres { background: rgba(184, 70, 92, 0.15); color: #c0455a; }
.audit-tab-npcs { background: rgba(192, 95, 116, 0.15); color: #a855f7; }
.audit-tab-sorts { background: rgba(184, 70, 92, 0.15); color: #ec4899; }
.audit-tab-panoplies { background: rgba(20, 184, 166, 0.15); color: #14b8a6; }
.audit-tab-drops { background: rgba(91, 155, 112, 0.15); color: #4f9d69; }

/* ============================================
   DATE CELL
   ============================================ */
.audit-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: monospace;
}

.audit-date .date-day {
  color: var(--text-main);
  font-weight: 600;
}

/* ============================================
   DETAILS BUTTON / MODAL
   ============================================ */
.audit-details-btn {
  background: rgba(154, 138, 78, 0.15);
  border: 1px solid rgba(154, 138, 78, 0.3);
  color: #a8924e;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s;
}

.audit-details-btn:hover {
  background: rgba(154, 138, 78, 0.25);
}

.audit-details-content {
  background: #1a0f07;
  border: 1px solid rgba(58, 42, 30, 0.3);
  border-radius: 6px;
  padding: 12px;
  font-family: monospace;
  font-size: 0.8rem;
  color: #b49a82;
  max-height: 300px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.audit-details-content .detail-key {
  color: #a8924e;
  font-weight: 600;
}

.audit-details-content .detail-value {
  color: #e9ecef;
}

/* ============================================
   PAGINATION
   ============================================ */
.audit-pagination .page-link {
  background: #241710;
  border-color: rgba(58, 42, 30, 0.4);
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 6px 12px;
}

.audit-pagination .page-link:hover {
  background: rgba(154, 138, 78, 0.15);
  color: #a8924e;
}

.audit-pagination .page-item.active .page-link {
  background: rgba(154, 138, 78, 0.2);
  border-color: rgba(154, 138, 78, 0.4);
  color: #a8924e;
  font-weight: 700;
}

.audit-pagination .page-item.disabled .page-link {
  background: rgba(20, 12, 7, 0.5);
  color: rgba(162, 143, 127, 0.3);
}

/* ============================================
   STATS PANEL
   ============================================ */
.audit-stats-panel {
  background: rgba(154, 138, 78, 0.05);
  border: 1px solid rgba(154, 138, 78, 0.2);
  border-radius: 8px;
  padding: 16px;
}

.audit-stats-card {
  background: #241710;
  border: 1px solid rgba(58, 42, 30, 0.3);
  border-radius: 6px;
  padding: 12px;
  text-align: center;
}

.audit-stats-card .stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #a8924e;
}

.audit-stats-card .stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.audit-stats-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.audit-stats-list li {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(58, 42, 30, 0.2);
}

.audit-stats-list li:last-child {
  border-bottom: none;
}

.audit-stats-list .stat-name {
  color: var(--text-main);
}

.audit-stats-list .stat-count {
  color: #a8924e;
  font-weight: 700;
}

/* ============================================
   TARGET INFO
   ============================================ */
.audit-target {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.audit-target-name {
  font-weight: 600;
  color: var(--text-main);
}

.audit-target-id {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: monospace;
}

/* ============================================
   USER CELL
   ============================================ */
.audit-user {
  font-weight: 600;
  color: #a8924e;
}

/* ============================================
   DIFF VIEW (old/new values)
   ============================================ */
.audit-diff-entry {
  margin-bottom: 6px;
}

.audit-diff-key {
  color: #a8924e;
  font-weight: 600;
}

.audit-diff-old {
  color: #c0455a;
  text-decoration: line-through;
  opacity: 0.8;
}

.audit-diff-new {
  color: #5aa873;
  font-weight: 600;
}

.audit-diff-arrow {
  color: #8b7461;
  margin: 0 6px;
}

.audit-deleted-value {
  color: #c0455a;
  opacity: 0.8;
}

.audit-new-value {
  color: #5aa873;
}

.audit-diff-header {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(58, 42, 30, 0.3);
}

.audit-diff-header-modify { color: #c87743; }
.audit-diff-header-delete { color: #c0455a; }
.audit-diff-header-create { color: #5aa873; }
