
/* Base error message styling */

/* --- Login Error Notifications --- */
.login-error-modern {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border-radius: 16px;
  padding: 14px 15px;
  margin-bottom: 18px;
  text-align: left;
  font-weight: 700;
  box-shadow: 0 14px 30px rgba(127, 29, 29, 0.10);
  animation: noticePop 0.25s ease both;
  transition: all 0.3s ease;
  border-left: 6px solid #dc2626; /* Default error border */
  background: linear-gradient(135deg,#fff7ed,#fff1f2);
  color: #7f1d1d;
  border: 1px solid #fecaca;
}

.login-error-modern .notice-icon {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.25);
  font-size: 18px;
  background: #dc2626; /* Default icon color */
}

.login-error-modern .notice-content {
  flex: 1;
  min-width: 0;
}

.login-error-modern .notice-title {
  display: block;
  margin: 0 0 3px;
  font-size: 16px;
  font-weight: 900;
  color: #7f1d1d;
}

.login-error-modern .notice-message {
  display: block;
  font-size: 14px;
  line-height: 1.35;
  color: #991b1b;
}

.login-error-modern .notice-detail {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
  color: #64748b;
}

/* Specific styles for different notice types */
.login-error-modern.notice-error {
  border-left-color: #dc2626; /* Red border for general errors */
}
.login-error-modern.notice-error .notice-icon {
  background: #dc2626;
}
.login-error-modern.notice-error .notice-title,
.login-error-modern.notice-error .notice-message {
  color: #7f1d1d;
}


.login-error-modern.notice-blocked {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color: #fff;
  border-color: #7f1d1d;
  border-left-color: #facc15; /* Yellow indicator for blocked */
  box-shadow: 0 18px 38px rgba(153, 27, 27, 0.22);
}
.login-error-modern.notice-blocked .notice-icon {
  background: #facc15; /* Yellow icon for blocked */
  color: #7f1d1d;
}
.login-error-modern.notice-blocked .notice-title,
.login-error-modern.notice-blocked .notice-message {
  color: #fff;
}
.login-error-modern.notice-blocked .notice-detail {
  color: #fee2e2; /* Lighter detail for blocked */
}

.login-error-modern.notice-warning {
  background: linear-gradient(135deg, #fffbeb, #fff7ed);
  border-color: #fed7aa;
  border-left-color: #f59e0b; /* Warning border */
  color: #7c2d12;
}
.login-error-modern.notice-warning .notice-icon {
  background: #f59e0b; /* Yellow icon for warning */
  color: #fff;
}
.login-error-modern.notice-warning .notice-title {
  color: #7c2d12;
}
.login-error-modern.notice-warning .notice-message {
  color: #9a3412;
}

/* Animation for notice pop-up */
@keyframes noticePop {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes noticePop {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}



/* --- Audit Log Table Styles --- */
.audit-log-table {
  border-collapse: separate; /* Needed for border-radius on cells */
  border-spacing: 0;
  width: 100%;
  border-radius: 16px; /* Rounded corners for the whole table */
  overflow: hidden; /* Clip content to rounded corners */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.audit-log-table thead th {
  background-color: #eef4ff; /* Muted blue background for headers */
  color: #09213f; /* Dark blue text */
  font-weight: 700;
  letter-spacing: 0.2px;
  padding: 12px 15px;
  border-bottom: 2px solid #dce8f6 !important; /* Stronger header separation */
  vertical-align: middle;
}
.audit-log-table tbody td {
  vertical-align: middle; /* Align content vertically */
  padding: 10px 15px;
  border-color: #e8f1fb; /* Lighter border for cells */
  background-color: #ffffff; /* White background for rows */
}
/* Style for the actor column */
.audit-log-table .user-details {
  font-weight: 600;
  color: #1d4ed8; /* Primary blue for user names */
}
.audit-log-table .user-type {
  display: block; /* Put type on a new line */
  font-size: 0.8em;
  color: #6d7d95; /* Muted color for user type */
  margin-top: 4px;
}
/* Style for the entity ID */
.audit-log-table .entity-id {
    font-weight: 600;
    color: #0b63ce; /* Primary blue for entity IDs */
}
/* Style for the snapshot details */
.audit-log-table .entity-snapshot {
  font-family: 'Courier New', Courier, monospace;
  background-color: #f0f4ff;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.85em;
  color: #3b3b3b;
  word-break: break-word; /* Break long words */
  max-height: 150px; /* Limit height and add scroll */
  overflow-y: auto;
  white-space: pre-wrap; /* Preserve whitespace and wrap */
}
/* Ensure snapshot key names are bold */
.audit-log-table .entity-snapshot strong {
  color: #0b63ce; /* Primary blue for field names */
  font-weight: 700;
}
/* General table responsive adjustments */
.table-responsive {
    overflow-x: auto; /* Enable horizontal scroll for small screens */
}
/* Specific responsive adjustments for audit log table */
@media (max-width: 768px) {
  .audit-log-table th, .audit-log-table td {
    padding: 8px 10px;
    font-size: 0.9em;
  }
  .audit-log-table .user-type {
    font-size: 0.75em;
  }
  .audit-log-table .entity-snapshot {
    font-size: 0.8em;
    padding: 6px 10px;
  }
  /* Hide some less critical columns or adjust layout for small screens */
}

.audit-log-table th {
  background-color: #eef4ff; /* Muted blue background for headers */
  color: #09213f;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 12px 15px; /* Slightly more padding */
}
.audit-log-table td {
  vertical-align: middle; /* Align content vertically */
  padding: 10px 15px;
}
.audit-log-table .user-details {
  font-weight: 600;
  color: #1d4ed8; /* Primary blue for user names */
}
.audit-log-table .user-type {
  font-size: 0.8em;
  color: #6d7d95; /* Muted color for user type */
  margin-left: 8px;
  display: block; /* Ensure it's on its own line */
}
.audit-log-table .entity-snapshot {
  font-family: 'Courier New', Courier, monospace;
  background-color: #f0f4ff;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.85em;
  color: #3b3b3b;
  word-break: break-word;
  max-height: 150px; /* Limit height for potentially long snapshots */
  overflow-y: auto; /* Add scroll if content overflows */
}
.audit-log-table .entity-snapshot code {
  font-family: 'Courier New', Courier, monospace;
}
.audit-log-table .entity-snapshot strong {
  color: #0b63ce; /* Primary blue for field names */
}
/* Ensure older styles for .table are not interfering negatively */
.box-body .table {
  border-radius: 16px; /* Rounded corners for tables */
  overflow: hidden; /* Clipping to respect rounded corners */
}
.box-body .table thead th {
  border-bottom: 2px solid #dce8f6 !important;
}
.box-body .table td {
  border-color: #e8f1fb;
}
/* Specific style for entity ID in the entity column */
.audit-log-table .entity-id {
    font-weight: 600;
    color: #0b63ce;
}

/* Historial de eventos */
.audit-panel {
  border: 0 !important;
  border-radius: 8px !important;
  overflow: hidden;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08) !important;
}
.audit-panel .box-body {
  padding: 18px;
}
.audit-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px !important;
  border-bottom: 1px solid #dbe7f1;
  background: linear-gradient(135deg, #f8fbff, #eef7fc);
}
.audit-panel-header .box-title {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #0f2740;
  font-size: 20px;
  font-weight: 800;
}
.audit-panel-subtitle {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.35;
}
.audit-filter-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr)) auto;
  gap: 14px;
  align-items: end;
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid #d9e9f5;
  border-radius: 8px;
  background: #f8fbfd;
}
.audit-filter-field label {
  display: block;
  margin-bottom: 6px;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.audit-filter-field .form-control {
  height: 38px;
  border-radius: 6px;
  border-color: #cdddea;
  box-shadow: none;
}
.audit-filter-field .form-control:focus {
  border-color: #0e9fdb;
  box-shadow: 0 0 0 3px rgba(14, 159, 219, 0.12);
}
.audit-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}
.audit-filter-actions .btn {
  height: 38px;
  border-radius: 6px !important;
  padding: 8px 14px;
  font-weight: 800;
}
.audit-filter-actions .btn-default {
  border-color: #cdddea;
  color: #334155;
  background: #fff;
}
.audit-log-table {
  border: 1px solid #dce8f2 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}
.audit-log-table thead th,
.audit-log-table th {
  background: #0f2740 !important;
  color: #fff !important;
  border-color: #173958 !important;
  padding: 12px 10px !important;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}
.audit-log-table tbody td,
.audit-log-table td {
  padding: 11px 10px !important;
  border-color: #e5eef5 !important;
  color: #1f2937;
  font-size: 13px;
}
.audit-log-table.table-striped > tbody > tr:nth-of-type(odd) {
  background-color: #fbfdff;
}
.audit-log-table.table-striped > tbody > tr:nth-of-type(odd) > td,
.audit-log-table.table-striped > tbody > tr:nth-of-type(even) > td {
  background: transparent !important;
}
.audit-log-table tbody tr:hover {
  background: #eef8fd !important;
}
.audit-date {
  white-space: nowrap;
  color: #334155 !important;
  font-weight: 700;
}
.audit-log-table .user-details {
  color: #0f2740 !important;
  font-weight: 800;
}
.audit-log-table .user-type {
  display: block;
  margin: 3px 0 0;
  color: #64748b !important;
  font-size: 12px;
  font-weight: 700;
}
.audit-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
.audit-action {
  color: #075985;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
}
.audit-log-table .entity-name {
  display: block;
  color: #0f2740;
  font-weight: 800;
}
.audit-log-table .entity-id {
  display: inline-block;
  margin-top: 3px;
  color: #64748b !important;
  font-size: 12px;
  font-weight: 700;
}
.audit-detail {
  min-width: 320px;
  color: #334155 !important;
  line-height: 1.4;
}
.audit-log-table .entity-snapshot {
  max-height: 130px;
  padding: 9px 10px;
  border: 1px solid #dbeafe;
  border-radius: 6px;
  background: #f8fbff !important;
  color: #334155;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.45;
}
.audit-log-table .entity-snapshot strong {
  color: #0f5f8f !important;
}
@media (max-width: 1199px) {
  .audit-filter-panel {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
  .audit-filter-actions {
    justify-content: flex-start;
  }
}
@media (max-width: 767px) {
  .audit-panel .box-body {
    padding: 12px;
  }
  .audit-panel-header {
    padding: 14px !important;
  }
  .audit-filter-panel {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  .audit-filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .audit-detail {
    min-width: 260px;
  }
}




/* --- Audit Log Table Styles --- */
.audit-log-table {
  border-collapse: separate; /* Needed for border-radius on cells */
  border-spacing: 0;
  width: 100%;
  border-radius: 16px; /* Rounded corners for the whole table */
  overflow: hidden; /* Clip content to rounded corners */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.audit-log-table thead th {
  background-color: #eef4ff; /* Muted blue background for headers */
  color: #09213f; /* Dark blue text */
  font-weight: 700;
  letter-spacing: 0.2px;
  padding: 12px 15px;
  border-bottom: 2px solid #dce8f6 !important; /* Stronger header separation */
  vertical-align: middle;
}
.audit-log-table tbody td {
  vertical-align: middle; /* Align content vertically */
  padding: 10px 15px;
  border-color: #e8f1fb; /* Lighter border for cells */
  background-color: #ffffff; /* White background for rows */
}
/* Style for the actor column */
.audit-log-table .user-details {
  font-weight: 600;
  color: #1d4ed8; /* Primary blue for user names */
}
.audit-log-table .user-type {
  display: block; /* Put type on a new line */
  font-size: 0.8em;
  color: #6d7d95; /* Muted color for user type */
  margin-top: 4px;
}
/* Style for the entity ID */
.audit-log-table .entity-id {
    font-weight: 600;
    color: #0b63ce; /* Primary blue for entity IDs */
}
/* Style for the snapshot details */
.audit-log-table .entity-snapshot {
  font-family: 'Courier New', Courier, monospace;
  background-color: #f0f4ff;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.85em;
  color: #3b3b3b;
  word-break: break-word; /* Break long words */
  max-height: 150px; /* Limit height and add scroll */
  overflow-y: auto;
  white-space: pre-wrap; /* Preserve whitespace and wrap */
}
/* Ensure snapshot key names are bold */
.audit-log-table .entity-snapshot strong {
  color: #0b63ce; /* Primary blue for field names */
  font-weight: 700;
}
/* General table responsive adjustments */
.table-responsive {
    overflow-x: auto; /* Enable horizontal scroll for small screens */
}
/* Specific responsive adjustments for audit log table */
@media (max-width: 768px) {
  .audit-log-table th, .audit-log-table td {
    padding: 8px 10px;
    font-size: 0.9em;
  }
  .audit-log-table .user-type {
    font-size: 0.75em;
  }
  .audit-log-table .entity-snapshot {
    font-size: 0.8em;
    padding: 6px 10px;
  }
  /* Hide some less critical columns or adjust layout for small screens */
}

.audit-log-table th {
  background-color: #eef4ff; /* Muted blue background for headers */
  color: #09213f;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 12px 15px; /* Slightly more padding */
}
.audit-log-table td {
  vertical-align: middle; /* Align content vertically */
  padding: 10px 15px;
}
.audit-log-table .user-details {
  font-weight: 600;
  color: #1d4ed8; /* Primary blue for user names */
}
.audit-log-table .user-type {
  font-size: 0.8em;
  color: #6d7d95; /* Muted color for user type */
  margin-left: 8px;
  display: block; /* Ensure it's on its own line */
}
.audit-log-table .entity-snapshot {
  font-family: 'Courier New', Courier, monospace;
  background-color: #f0f4ff;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.85em;
  color: #3b3b3b;
  word-break: break-word;
  max-height: 150px; /* Limit height for potentially long snapshots */
  overflow-y: auto; /* Add scroll if content overflows */
}
.audit-log-table .entity-snapshot code {
  font-family: 'Courier New', Courier, monospace;
}
.audit-log-table .entity-snapshot strong {
  color: #0b63ce; /* Primary blue for field names */
}
/* Ensure older styles for .table are not interfering negatively */
.box-body .table {
  border-radius: 16px; /* Rounded corners for tables */
  overflow: hidden; /* Clipping to respect rounded corners */
}
.box-body .table thead th {
  border-bottom: 2px solid #dce8f6 !important;
}
.box-body .table td {
  border-color: #e8f1fb;
}
/* Specific style for entity ID in the entity column */
.audit-log-table .entity-id {
    font-weight: 600;
    color: #0b63ce;
}

.audit-log-table th {
  background-color: #eef4ff; /* Muted blue background for headers */
  color: #09213f;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.audit-log-table td {
  vertical-align: middle; /* Align content vertically */
}
.audit-log-table .user-details {
  font-weight: 600;
  color: #1d4ed8; /* Primary blue for user names */
}
.audit-log-table .user-type {
  font-size: 0.8em;
  color: #6d7d95; /* Muted color for user type */
  margin-left: 8px;
}
.audit-log-table .entity-snapshot {
  font-family: 'Courier New', Courier, monospace;
  background-color: #f0f4ff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.85em;
  color: #3b3b3b;
  word-break: break-word;
}
.audit-log-table .entity-snapshot code {
  font-family: 'Courier New', Courier, monospace;
}
.audit-log-table .entity-snapshot strong {
  color: #0b63ce; /* Primary blue for field names */
}
/* Ensure older styles for .table are not interfering negatively */
.box-body .table {
  border-radius: 16px; /* Rounded corners for tables */
  overflow: hidden; /* Clipping to respect rounded corners */
}
.box-body .table thead th {
  border-bottom: 2px solid #dce8f6 !important;
}
.box-body .table td {
  border-color: #e8f1fb;
}
