/* LIK-USPEH Forms Management System Styles */

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  background-color: #f8f9fa;
}

.navbar-brand {
  font-weight: 600;
  color: #0d6efd !important;
}

.nav-link {
  border-radius: 0.375rem;
  margin: 0 0.25rem;
  transition: all 0.2s ease;
}

.nav-link:hover {
  background-color: rgba(13, 110, 253, 0.1);
}

.nav-link.active {
  background-color: #0d6efd;
  color: white !important;
}

.card {
  border: none;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  border-radius: 1rem;
}

.card-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  font-weight: 500;
}

.table th {
  border-top: none;
  font-weight: 600;
  color: #495057;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge {
  font-size: 0.75rem;
  font-weight: 500;
}

.btn {
  border-radius: 0.375rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn:focus {
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Form improvements */
.form-control:focus,
.form-select:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-label {
  font-weight: 500;
  color: #495057;
  margin-bottom: 0.5rem;
}

.form-check-label {
  font-weight: 400;
}

.form-text {
  font-size: 0.875rem;
  color: #6c757d;
}

/* Loading states */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

/* Dynamic form specific styles */
#dynamic-form {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.form-control, .form-select {
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.form-control:hover, .form-select:hover {
  border-color: #b3d4fc;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1.125rem;
  border-radius: 0.75rem;
}

/* Validation styles */
.was-validated .form-control:valid,
.was-validated .form-select:valid {
  border-color: #198754;
}

.was-validated .form-control:invalid,
.was-validated .form-select:invalid {
  border-color: #dc3545;
}

.was-validated .form-check-input:valid {
  border-color: #198754;
}

.was-validated .form-check-input:invalid {
  border-color: #dc3545;
}

/* Enhanced card design */
.card {
  border: none;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  border-radius: 1rem;
}

.shadow-sm {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

/* Loading spinner */
.spinner-border-sm {
  width: 1rem;
  height: 1rem;
}

/* Alert improvements */
.alert {
  border-radius: 0.75rem;
  border: none;
}

.alert-info {
  background-color: #e7f3ff;
  color: #084298;
}

.alert-success {
  background-color: #d1e7dd;
  color: #0a3622;
}

.alert-danger {
  background-color: #f8d7da;
  color: #58151c;
}

.alert-warning {
  background-color: #fff3cd;
  color: #664d03;
}

/* Enhanced form result messages */
.alert.alert-success,
.alert.alert-danger {
  border-radius: 1rem;
  border: none;
  padding: 1.5rem;
  margin-top: 2rem;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
  animation: slideInUp 0.4s ease-out;
}

.alert.alert-success {
  background: linear-gradient(135deg, #d1e7dd 0%, #a3cfbb 100%);
  color: #0f5132;
}

.alert.alert-danger {
  background: linear-gradient(135deg, #f8d7da 0%, #f1aeb5 100%);
  color: #842029;
}

.alert .alert-heading {
  font-weight: 600;
  margin-bottom: 1rem;
}

.alert ul {
  padding-left: 1.2rem;
  margin-bottom: 1rem;
}

.alert ul li {
  margin-bottom: 0.3rem;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Bounce animation for success icon */
@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale3d(0.3, 0.3, 0.3);
  }
  20% {
    transform: scale3d(1.1, 1.1, 1.1);
  }
  40% {
    transform: scale3d(0.9, 0.9, 0.9);
  }
  60% {
    opacity: 1;
    transform: scale3d(1.03, 1.03, 1.03);
  }
  80% {
    transform: scale3d(0.97, 0.97, 0.97);
  }
  100% {
    opacity: 1;
    transform: scale3d(1, 1, 1);
  }
}

/* Info blocks styling */
.info-block {
  padding: 1rem;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 0.75rem;
  border: 1px solid rgba(13, 110, 253, 0.1);
}

.info-block h6 {
  color: #0d6efd;
  font-weight: 600;
}

.info-block ul li {
  padding: 0.2rem 0;
  color: #495057;
}

.success-message-content .badge {
  font-size: 0.8rem;
  padding: 0.4rem 0.6rem;
}

/* Enhanced alert with border */
.alert.border-start {
  border-left-width: 4px !important;
}

/* Text color improvements */
.text-primary {
  color: #0d6efd !important;
}

.display-6 {
  font-weight: 600;
}

/* Responsive improvements */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
  
  .card {
    margin-bottom: 1rem;
  }
  
  .table-responsive {
    font-size: 0.875rem;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 0 0.75rem;
  }
  
  .card-body {
    padding: 1.5rem !important;
  }
  
  .btn-lg {
    padding: 0.625rem 1.25rem;
    font-size: 1rem;
  }
}

/* Remove old unused styles */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* Consent section styles */
.consent-section {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  margin-top: 2rem;
}

.consent-section h2 {
  color: #0d6efd;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e9ecef;
}

.consent-section h3 {
  color: #495057;
  font-size: 1.25rem;
  font-weight: 500;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.consent-section p {
  color: #6c757d;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.consent-section ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.consent-section li {
  color: #6c757d;
  margin-bottom: 0.5rem;
}

.consent-section strong {
  color: #495057;
  font-weight: 600;
}

.consent-section a {
  color: #0d6efd;
  text-decoration: none;
}

.consent-section a:hover {
  color: #0b5ed7;
  text-decoration: underline;
}

/* Responsive improvements for consent */
@media (max-width: 768px) {
  .consent-section {
    padding: 1.5rem;
    margin-top: 1.5rem;
  }
  
  .consent-section h2 {
    font-size: 1.25rem;
  }
}

/* Telegram Users Page Styles */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.9;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    display: block;
}

.users-container {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    padding: 1.5rem;
}

.users-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.users-header h3 {
    margin: 0;
    color: #495057;
}

.filter-controls select {
    padding: 0.5rem 1rem;
    border: 1px solid #ced4da;
    border-radius: 0.5rem;
    background-color: white;
    color: #495057;
    font-size: 0.875rem;
}

.users-table-container {
    overflow-x: auto;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.users-table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
}

.users-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #f1f3f4;
    vertical-align: middle;
}

.user-row:hover {
    background-color: #f8f9fa;
}

.user-row.active {
    border-left: 3px solid #28a745;
}

.user-row.inactive {
    border-left: 3px solid #dc3545;
    opacity: 0.7;
}

.user-id {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #6c757d;
}

.username-link {
    color: #0d6efd;
    font-weight: 500;
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.active {
    background-color: #d4edda;
    color: #155724;
}

.status-badge.inactive {
    background-color: #f8d7da;
    color: #721c24;
}

.no-data {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 2rem !important;
}

.loading, .error {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.error {
    color: #dc3545;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 0.5rem;
}

/* Header with button */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.header h2 {
    margin: 0;
    color: #495057;
}

/* Responsive design */
@media (max-width: 768px) {
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .users-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .users-table {
        font-size: 0.75rem;
    }
    
    .users-table th,
    .users-table td {
        padding: 0.5rem;
    }
    
    .header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
}
