/* Main Styles for User Management Module */
:root {
  --primary-color: #C4212A;
  --secondary-color: #6D6E71;
  --accent-color: #FED219;
  --light-gray: #f5f5f5;
  --medium-gray: #e0e0e0;
  --dark-gray: #333333;
  --white: #ffffff;
  --danger: #dc3545;
  --success: #28a745;
  --warning: #ffc107;
  --info: #17a2b8;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f8f9fa;
  color: #333;
}

.container-fluid {
  padding: 0;
}

/* Header Styles */
.header {
  background-color: #C4212A;
  color: white;
  padding: 1rem 2rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.logo {
  height: 40px;
  width: auto;
}

.header h1 {
  font-size: 24px;
  margin: 0;
}

.user-info {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.user-name {
  margin-right: 10px;
  font-weight: 500;
}

.user-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  border: 2px solid white;
}

/* Navigation Styles */
.nav-tabs {
  border-bottom: 1px solid var(--medium-gray);
}

.nav-tabs .nav-link {
  color: var(--secondary-color);
  border: none;
  border-bottom: 3px solid transparent;
  padding: 10px 15px;
  font-weight: 500;
}

.nav-tabs .nav-link.active {
  color: var(--primary-color);
  border-bottom: 3px solid var(--primary-color);
  background-color: transparent;
}

.nav-tabs .nav-link:hover {
  border-color: transparent transparent var(--accent-color);
  color: var(--primary-color);
}

/* Breadcrumb Styles */
.breadcrumb {
  background-color: transparent;
  margin-bottom: 0;
  padding: 0.5rem 0;
}

.breadcrumb-item a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.breadcrumb-item.active {
  color: white;
}

/* Main Content Styles */
.main-content {
  padding: 2rem;
}

/* Filter Bar Styles */
.filter-bar {
  background-color: var(--white);
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 10px;
}

.filter-group {
  margin-right: 15px;
  margin-bottom: 10px;
}

.filter-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 5px;
  color: var(--secondary-color);
}

.filter-control {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--medium-gray);
  border-radius: 4px;
  font-size: 14px;
}

.filter-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

/* Table Styles */
.table-container {
  background-color: var(--white);
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-bottom: 20px;
}

.table {
  width: 100%;
  margin-bottom: 0;
  color: var(--dark-gray);
  border-collapse: collapse;
}

.table th {
  background-color: var(--light-gray);
  color: var(--secondary-color);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 12px;
  padding: 12px 15px;
  border-bottom: 2px solid var(--medium-gray);
}

.table td {
  padding: 12px 15px;
  vertical-align: middle;
  border-top: 1px solid var(--medium-gray);
}

.table tbody tr:hover {
  background-color: rgba(196, 33, 42, 0.05);
}

.table .status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
}

.status-active {
  background-color: rgba(40, 167, 69, 0.2);
  color: #28a745;
}

.status-blocked {
  background-color: rgba(220, 53, 69, 0.2);
  color: #dc3545;
}

.status-inactive {
  background-color: rgba(108, 117, 125, 0.2);
  color: #6c757d;
}

.status-archived {
  background-color: rgba(255, 193, 7, 0.2);
  color: #ffc107;
}

/* Action Buttons */
.btn {
  display: inline-block;
  font-weight: 400;
  text-align: center;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.375rem 0.75rem;
  font-size: 14px;
  line-height: 1.5;
  border-radius: 0.25rem;
  transition: all 0.15s ease-in-out;
  cursor: pointer;
}

.btn-primary {
  color: var(--white);
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: #a31b22;
  border-color: #a31b22;
}

.btn-secondary {
  color: var(--white);
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.btn-secondary:hover {
  background-color: #5a5b5e;
  border-color: #5a5b5e;
}

.btn-success {
  color: var(--white);
  background-color: var(--success);
  border-color: var(--success);
}

.btn-danger {
  color: var(--white);
  background-color: var(--danger);
  border-color: var(--danger);
}

.btn-warning {
  color: var(--dark-gray);
  background-color: var(--warning);
  border-color: var(--warning);
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
  background-color: transparent;
}

.btn-outline-primary:hover {
  color: var(--white);
  background-color: var(--primary-color);
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 12px;
}

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.action-buttons {
  display: flex;
  gap: 5px;
}

/* Form Styles */
.form-container {
  background-color: var(--white);
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin-bottom: 20px;
}

.form-title {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 20px;
  color: var(--primary-color);
  border-bottom: 1px solid var(--medium-gray);
  padding-bottom: 10px;
}

.form-group {
  margin-bottom: 15px;
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 5px;
}

.form-control {
  display: block;
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--dark-gray);
  background-color: var(--white);
  border: 1px solid var(--medium-gray);
  border-radius: 4px;
  transition: border-color 0.15s ease-in-out;
}

.form-control:focus {
  border-color: var(--primary-color);
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(196, 33, 42, 0.25);
}

.form-control.is-invalid {
  border-color: var(--danger);
}

.invalid-feedback {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 12px;
  color: var(--danger);
}

.required-field::after {
  content: "*";
  color: var(--danger);
  margin-left: 4px;
}

/* Permission Matrix Styles */
.matrix-container {
  background-color: var(--white);
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-bottom: 20px;
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
}

.matrix-table th,
.matrix-table td {
  padding: 12px 15px;
  text-align: center;
  border: 1px solid var(--medium-gray);
}

.matrix-table th {
  background-color: var(--light-gray);
  font-weight: 500;
}

.matrix-table th:first-child {
  text-align: left;
}

.matrix-table td:first-child {
  text-align: left;
  font-weight: 500;
}

.matrix-table .module-header {
  background-color: rgba(109, 110, 113, 0.1);
}

/* Profile Page Styles */
.profile-header {
  background-color: var(--white);
  border-radius: 5px 5px 0 0;
  padding: 20px;
  margin-bottom: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.profile-title {
  font-size: 24px;
  margin-bottom: 10px;
}

.profile-subtitle {
  color: var(--secondary-color);
  margin-bottom: 15px;
}

.profile-actions {
  margin-top: 15px;
}

.profile-content {
  background-color: var(--white);
  border-radius: 0 0 5px 5px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.profile-section {
  margin-bottom: 20px;
}

.profile-section-title {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 15px;
  color: var(--primary-color);
  border-bottom: 1px solid var(--medium-gray);
  padding-bottom: 10px;
}

.profile-info-row {
  display: flex;
  margin-bottom: 10px;
}

.profile-info-label {
  width: 150px;
  font-weight: 500;
  color: var(--secondary-color);
}

.profile-info-value {
  flex: 1;
}

/* Pagination Styles */
.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  background-color: var(--light-gray);
  border-top: 1px solid var(--medium-gray);
}

.pagination {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
}

.pagination li {
  margin: 0 2px;
}

.pagination a {
  display: block;
  padding: 6px 12px;
  border-radius: 4px;
  text-decoration: none;
  color: var(--dark-gray);
  background-color: var(--white);
  border: 1px solid var(--medium-gray);
}

.pagination a:hover {
  background-color: var(--light-gray);
}

.pagination .active a {
  background-color: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

.pagination-info {
  color: var(--secondary-color);
  font-size: 14px;
}

/* Alert Styles */
.alert {
  padding: 12px 15px;
  margin-bottom: 20px;
  border: 1px solid transparent;
  border-radius: 4px;
}

.alert-success {
  color: #155724;
  background-color: #d4edda;
  border-color: #c3e6cb;
}

.alert-danger {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
}

.alert-warning {
  color: #856404;
  background-color: #fff3cd;
  border-color: #ffeeba;
}

.alert-info {
  color: #0c5460;
  background-color: #d1ecf1;
  border-color: #bee5eb;
}

/* Modal Styles */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1050;
}

.modal-dialog {
  width: 100%;
  max-width: 500px;
  margin: 1.75rem auto;
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: var(--white);
  border-radius: 5px;
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
  outline: 0;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
  border-bottom: 1px solid var(--medium-gray);
}

.modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
}

.modal-body {
  position: relative;
  flex: 1 1 auto;
  padding: 15px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 15px;
  border-top: 1px solid var(--medium-gray);
}

.modal-footer > :not(:first-child) {
  margin-left: 0.25rem;
}

.btn-close {
  background: transparent;
  border: 0;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .filter-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-group {
    width: 100%;
    margin-right: 0;
  }
  
  .table-responsive {
    overflow-x: auto;
  }
  
  .profile-info-row {
    flex-direction: column;
  }
  
  .profile-info-label {
    width: 100%;
    margin-bottom: 5px;
  }
}

/* Utility Classes */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }

.ml-auto { margin-left: auto !important; }
.mr-auto { margin-right: auto !important; }

.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-left { text-align: left !important; }

.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }

.align-items-center { align-items: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-end { justify-content: flex-end !important; }

.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }

.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--secondary-color) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
