html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  white-space: nowrap;
  line-height: 60px;
}

/* Custom styles for LFG Ticketing System */
.card {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  border: 1px solid rgba(0, 0, 0, 0.125);
}

.table-hover tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

.priority-high {
  color: #bd0606;
  font-weight: bold;
}

.priority-medium {
  color: #6c757d;
}

.priority-low {
  color: #dba212;
}

.status-new {
  background-color: #0d6efd;
  color: white;
}

.status-open {
  background-color: #198754;
  color: white;
}

.status-completed {
  background-color: #6c757d;
  color: white;
}

.status-paused {
  background-color: #ffc107;
  color: black;
}

.badge {
  font-size: 0.75em;
}

.time-entry-controls .btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

.future-action-item {
  border-left: 3px solid #0d6efd;
  padding-left: 0.75rem;
  margin-bottom: 0.5rem;
}

.future-action-item.paused {
  border-left-color: #ffc107;
  opacity: 0.7;
}

.attachment-list .list-group-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.client-summary .metric {
  text-align: center;
  padding: 1rem;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  margin-bottom: 1rem;
}

.client-summary .metric h4 {
  margin-bottom: 0.25rem;
  color: #0d6efd;
}

.client-summary .metric small {
  color: #6c757d;
}

.nav-link.followup-nav-alert {
  font-weight: 700;
  text-shadow: 0 0 0.45rem rgba(189, 6, 6, 0.45);
  animation: followUpNavPulse 1.4s ease-in-out infinite;
}

@keyframes followUpNavPulse {
  0%, 100% {
    text-shadow: 0 0 0.25rem rgba(189, 6, 6, 0.35);
  }
  50% {
    text-shadow: 0 0 0.85rem rgba(189, 6, 6, 0.95);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-link.followup-nav-alert {
    animation: none;
  }
}

/* Ticket Flyout Styles */
.ticket-flyout {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 35vh;
  background: white;
  border-top: 1px solid #dee2e6;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
  z-index: 1050;
}

.ticket-flyout.show {
  transform: translateY(0);
}

.flyout-header {
  display: flex;
  justify-content: between;
  align-items: center;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid #dee2e6;
  background-color: #f8f9fa;
  min-height: 45px;
}

.flyout-header h5 {
  margin: 0;
  flex-grow: 1;
  font-size: 1rem;
}

.flyout-content {
  padding: 0.75rem 1rem;
  height: calc(100% - 45px);
  overflow-y: auto;
}

.flyout-content .form-label {
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 0.125rem;
}

.flyout-content .form-control,
.flyout-content .form-select {
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
  height: calc(1.5em + 0.5rem + 2px);
}

.flyout-content .form-control:focus,
.flyout-content .form-select:focus {
  box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.25);
}

.flyout-content textarea.form-control {
  min-height: calc(1.5em + 0.5rem + 2px);
  resize: vertical;
}

.flyout-content .btn {
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
  font-weight: 600;
}

.flyout-content .row {
  margin-left: -0.25rem;
  margin-right: -0.25rem;
}

.flyout-content .row > * {
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

/* Priority Buttons */
.priority-buttons {
  display: flex;
  gap: 0.125rem;
  margin-top: 0.125rem;
}

.priority-btn {
  flex: 1;
  border: none;
  border-radius: 12px;
  padding: 0.25rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0.6;
}

.priority-btn:hover {
  opacity: 0.8;
  transform: translateY(-1px);
}

.priority-btn.active {
  opacity: 1;
  transform: scale(1.05);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.priority-btn.priority-low {
  background-color: #dba212;
  color: white;
}

.priority-btn.priority-medium {
  background-color: #6c757d;
  color: white;
}

.priority-btn.priority-high {
  background-color: #bd0606;
  color: white;
}

/* Priority Badge Classes - Match Button Colors */
.priority-low-badge {
  background-color: #dba212 !important;
  color: white !important;
}

.priority-medium-badge {
  background-color: #6c757d !important;
  color: white !important;
}

.priority-high-badge {
  background-color: #bd0606 !important;
  color: white !important;
}

/* Expandable Ticket Rows */
.ticket-row {
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.ticket-row:hover {
  background-color: rgba(13, 110, 253, 0.05);
}

.ticket-row.expanded {
  background-color: rgba(13, 110, 253, 0.1);
}

.ticket-edit-row {
  background-color: #f8f9fa;
  border-top: 2px solid #0d6efd;
}

.ticket-edit-form {
  background: white;
  border-radius: 0.375rem;
  border: 1px solid #dee2e6;
}

.ticket-edit-form .form-label {
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.ticket-name-display {
  font-weight: 500;
}

/* Sortable Table Headers */
.sort-link {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.sort-link:hover {
  color: #0d6efd;
  text-decoration: none;
}

.sort-link i {
  font-size: 0.8rem;
  opacity: 0.5;
  margin-left: 0.5rem;
}

.sort-link.sort-asc i:before {
  content: "\f0de"; /* fa-sort-up */
  opacity: 1;
  color: #0d6efd;
}

.sort-link.sort-desc i:before {
  content: "\f0dd"; /* fa-sort-down */
  opacity: 1;
  color: #0d6efd;
}

th {
  position: relative;
  user-select: none;
}

/* Select2 customization for flyout */
.select2-container--default .select2-selection--single {
  height: calc(1.5em + 0.5rem + 2px);
  padding: 0;
  border: 1px solid #ced4da;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 1.5;
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: calc(1.5em + 0.5rem);
  right: 5px;
}

.flyout-content .select2-container {
  width: 100% !important;
}

/* Professional Login Page Styles */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 2rem 1rem;
}

.login-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  border: 1px solid #dee2e6;
  overflow: hidden;
  width: 100%;
  max-width: 440px;
  animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-header {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: white;
  text-align: center;
  padding: 3rem 2rem 2rem;
  position: relative;
}

.login-logo {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.login-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.login-subtitle {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 0;
  font-weight: 300;
}

.login-body {
  padding: 2.5rem 2rem;
}

.login-body .form-floating {
  position: relative;
}

.login-body .form-floating > label {
  color: #6c757d;
  font-weight: 500;
  left: 0.75rem;
}

.login-body .form-floating > label i {
  color: #3498db;
}

.login-body .form-control {
  border: 2px solid #e9ecef;
  border-radius: 12px;
  padding: 1rem 0.75rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  background-color: #f8f9fa;
}

.login-body .form-control:focus {
  border-color: #3498db;
  box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.15);
  background-color: white;
  transform: translateY(-2px);
}

.captcha-section {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 1.5rem;
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
}

.captcha-section:hover {
  border-color: #3498db;
  background: #f8fbff;
}

.captcha-section .form-label {
  color: #495057;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
}

.captcha-section .form-label i {
  color: #3498db;
}

.captcha-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.captcha-image {
  border: 2px solid #dee2e6;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  max-width: 100%;
  height: auto;
}

.captcha-image:hover {
  border-color: #3498db;
  transform: scale(1.02);
}

.captcha-refresh {
  border-radius: 8px;
  height: 38px;
  width: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 14px;
}

.captcha-refresh:empty::before {
  content: "↻";
  font-size: 16px;
}

.captcha-refresh:hover {
  background-color: #3498db;
  border-color: #3498db;
  color: white;
  transform: rotate(180deg);
}

.form-check {
  margin-left: 0.25rem;
}

.form-check-label {
  color: #6c757d;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.3s ease;
}

.form-check-label:hover {
  color: #495057;
}

.form-check-input:checked {
  background-color: #3498db;
  border-color: #3498db;
}

.form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.15);
}

.login-btn {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  border: none;
  border-radius: 12px;
  padding: 0.875rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
  background: linear-gradient(135deg, #2980b9 0%, #1f639a 100%);
}

.login-btn:active {
  transform: translateY(0);
}

.login-footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e9ecef;
}

.forgot-password-link {
  color: #3498db;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
}

.forgot-password-link:hover {
  color: #2980b9;
  text-decoration: none;
  transform: translateY(-1px);
}

.forgot-password-link i {
  transition: transform 0.3s ease;
}

.forgot-password-link:hover i {
  transform: translateX(-2px);
}

/* Alert Styling for Login */
.login-body .alert {
  border-radius: 12px;
  border: none;
  margin-bottom: 1.5rem;
}

.login-body .alert-danger {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

/* Validation Error Styling */
.login-body .text-danger {
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: block;
}

/* Responsive Design */
@media (max-width: 576px) {
  .login-container {
    padding: 1rem 0.5rem;
  }
  
  .login-card {
    border-radius: 16px;
    max-width: 100%;
  }
  
  .login-header {
    padding: 2rem 1.5rem 1.5rem;
  }
  
  .login-title {
    font-size: 1.5rem;
  }
  
  .login-body {
    padding: 2rem 1.5rem;
  }
  
  .captcha-container {
    flex-direction: column;
    align-items: stretch;
  }
  
  .captcha-refresh {
    align-self: center;
    margin-top: 0.5rem;
  }
}