/* Login and User Management Styles - Brand Colors */

.login-container {
  max-width: 450px;
  margin: 80px auto;
  padding: 35px;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(43, 43, 42, 0.15);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(220, 220, 220, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.login-container:hover {
  box-shadow: 0 20px 50px rgba(43, 43, 42, 0.2);
  transform: translateY(-5px);
}

.login-title {
  text-align: center;
  margin-bottom: 15px;
  background: linear-gradient(135deg, #2B2B2A 0%, #434341 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  font-size: 1.8rem;
}

.login-form .form-group {
  margin-bottom: 25px;
}

.login-form .form-control {
  height: 55px;
  border-radius: 10px;
  border: 2px solid rgba(220, 220, 220, 0.5);
  padding-left: 18px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.9);
  color: #2B2B2A;
  font-weight: 500;
}

.login-form .form-control:focus {
  border-color: #05FE84;
  box-shadow: 0 0 0 0.3rem rgba(5, 254, 132, 0.15);
  background: white;
  transform: translateY(-2px);
}

.login-form .input-group-text {
  background: linear-gradient(135deg, #DCDCDC 0%, #f0f0f0 100%);
  border: 2px solid rgba(220, 220, 220, 0.5);
  color: #2B2B2A;
  border-radius: 10px 0 0 10px;
  font-weight: 600;
}

.login-btn {
  height: 55px;
  background: linear-gradient(135deg, #2B2B2A 0%, #434341 100%);
  border: none;
  font-weight: 700;
  font-size: 16px;
  transition: all 0.3s ease;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}

.login-btn:hover {
  background: linear-gradient(135deg, #05FE84 0%, #00d16a 100%);
  color: #2B2B2A;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(5, 254, 132, 0.4);
}

.login-btn:active {
  transform: translateY(-1px);
}

#login-error {
  color: #ff4757;
  text-align: center;
  font-size: 14px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 71, 87, 0.1);
  border: 1px solid rgba(255, 71, 87, 0.3);
  font-weight: 600;
}

.toggle-password {
  cursor: pointer;
  border-left: 0;
  background: linear-gradient(135deg, #DCDCDC 0%, #f0f0f0 100%);
  color: #2B2B2A;
  border-radius: 0 10px 10px 0;
}

.toggle-password:hover {
  color: #05FE84;
  background: rgba(5, 254, 132, 0.1);
}

/* User Admin Panel */
.admin-panel {
  padding: 25px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(43, 43, 42, 0.1);
  margin-bottom: 25px;
  border: 1px solid rgba(220, 220, 220, 0.3);
}

.admin-title {
  background: linear-gradient(135deg, #2B2B2A 0%, #434341 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 25px;
  font-weight: 700;
}

.user-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(43, 43, 42, 0.08);
}

.user-table th, .user-table td {
  padding: 15px 18px;
  text-align: left;
  border-bottom: 1px solid rgba(220, 220, 220, 0.3);
}

.user-table th {
  background: linear-gradient(135deg, #2B2B2A 0%, #434341 100%);
  color: white;
  font-weight: 600;
  position: relative;
}

.user-table th::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: #05FE84;
}

.user-table tr:hover {
  background: rgba(5, 254, 132, 0.05);
  transform: scale(1.001);
}

.action-btn {
  padding: 8px 15px;
  margin-right: 8px;
  font-size: 14px;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-edit {
  background: linear-gradient(135deg, #2B2B2A 0%, #434341 100%);
  color: white;
  border: none;
}

.btn-edit:hover {
  background: linear-gradient(135deg, #05FE84 0%, #00d16a 100%);
  color: #2B2B2A;
  transform: translateY(-2px);
}

.btn-delete {
  background: linear-gradient(135deg, #ff4757 0%, #ff3742 100%);
  color: white;
  border: none;
}

.btn-delete:hover {
  background: linear-gradient(135deg, #ff3742 0%, #ff2837 100%);
  transform: translateY(-2px);
}

/* User Form Modal */
.user-form .form-label {
  font-weight: 600;
  color: #2B2B2A;
  margin-bottom: 8px;
}

.company-checkbox-list {
  max-height: 200px;
  overflow-y: auto;
  padding: 15px;
  border-radius: 10px;
  background: rgba(220, 220, 220, 0.2);
  border: 2px solid rgba(220, 220, 220, 0.5);
  scrollbar-width: thin;
  scrollbar-color: #05FE84 rgba(220, 220, 220, 0.3);
}

.company-checkbox-list::-webkit-scrollbar {
  width: 8px;
}

.company-checkbox-list::-webkit-scrollbar-track {
  background: rgba(220, 220, 220, 0.3);
  border-radius: 10px;
}

.company-checkbox-list::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #05FE84 0%, #00d16a 100%);
  border-radius: 10px;
}

.company-checkbox-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #00d16a 0%, #05FE84 100%);
}

.company-checkbox {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  padding: 6px 8px;
  transition: all 0.2s ease;
  border-radius: 6px;
}

.company-checkbox:hover {
  background: rgba(5, 254, 132, 0.1);
  transform: translateX(3px);
}

.company-checkbox input[type="checkbox"] {
  margin-right: 10px;
  cursor: pointer;
  width: 18px;
  height: 18px;
  accent-color: #05FE84;
}

.company-checkbox label {
  cursor: pointer;
  margin-bottom: 0;
  font-size: 14px;
  user-select: none;
  flex: 1;
  color: #2B2B2A;
  font-weight: 500;
}

/* Modal Styling */
#userModal .modal-header {
  border-bottom: 2px solid rgba(220, 220, 220, 0.3);
  background: linear-gradient(135deg, #2B2B2A 0%, #434341 100%);
  color: white;
  border-radius: 15px 15px 0 0;
}

#userModal .modal-footer {
  border-top: 2px solid rgba(220, 220, 220, 0.3);
  background: rgba(220, 220, 220, 0.1);
  border-radius: 0 0 15px 15px;
}

#userModal .modal-content {
  border-radius: 15px;
  border: none;
  box-shadow: 0 15px 40px rgba(43, 43, 42, 0.15);
}

#userModal .modal-title {
  color: white;
  font-weight: 700;
}

#userModal .btn-outline-secondary.user-form-toggle-password:hover {
  color: #05FE84;
  background: rgba(5, 254, 132, 0.1);
  border-color: #05FE84;
}

#userModal .invalid-feedback {
  font-size: 0.85em;
  color: #ff4757;
  font-weight: 600;
}

#userModal .form-text {
  font-size: 0.85em;
  color: #2B2B2A;
}

#modal-form-error {
  font-size: 0.9em;
  border-left: 4px solid #ff4757;
  background: rgba(255, 71, 87, 0.1);
  color: #ff4757;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .login-container {
    margin: 40px auto;
    padding: 25px;
  }
  
  .admin-panel {
    padding: 20px;
  }
  
  .user-table thead {
    display: none;
  }
  
  .user-table, .user-table tbody, .user-table tr, .user-table td {
    display: block;
    width: 100%;
  }
  
  .user-table tr {
    margin-bottom: 20px;
    border-bottom: 3px solid #05FE84;
    padding-bottom: 15px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(43, 43, 42, 0.08);
  }
  
  .user-table td {
    text-align: right;
    padding-left: 50%;
    position: relative;
    border-bottom: 1px solid rgba(220, 220, 220, 0.3);
    padding: 10px 15px;
  }
  
  .user-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    width: 50%;
    padding-left: 15px;
    font-weight: 600;
    text-align: left;
    color: #2B2B2A;
  }
}

/* Hide admin tab for non-admin users */
.admin-tab {
  display: none;
}

/* Show for admin users */
body.is-admin .admin-tab {
  display: block;
}
