/* Modern AdminLTE 4 styling enhancements */
:root {
  /* Pets Domain inspired palette */
  --primary-color: #00a3e0;   /* Bright Pets Domain blue */
  --secondary-color: #0070b8; /* Darker accent blue */
  --success-color: #28a745;
  --info-color: #17a2b8;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
}

body {
  font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  line-height: 1.6;
}

/* Enhanced sidebar */
.app-sidebar {
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.1);
}

.sidebar-brand {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-link {
  text-decoration: none;
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
  background: linear-gradient(135deg, #00a3e0 0%, #0070b8 100%);
}

.brand-text {
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
}

.sidebar-menu .menu-item {
  margin: 0.25rem 0;
}

.sidebar-menu .menu-link {
  border-radius: 0.375rem;
  margin: 0 0.5rem;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
}

.sidebar-menu .menu-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: translateX(4px);
}

.sidebar-menu .menu-link.active {
  background-color: var(--primary-color);
  color: #fff;
}

.menu-icon {
  width: 1.5rem;
  margin-right: 0.75rem;
  text-align: center;
}

.menu-header {
  padding: 1rem 1.5rem 0.5rem;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Enhanced cards */
.card {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  border: 1px solid rgba(0, 0, 0, 0.125);
  transition: box-shadow 0.3s ease, transform 0.2s ease;
  margin-bottom: 1.5rem;
}

.card:hover {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.card-header {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
  font-weight: 600;
  padding: 1rem 1.5rem;
}

/* Enhanced buttons */
.btn {
  border-radius: 0.375rem;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2);
}

.btn-primary {
  background: linear-gradient(135deg, #00a3e0 0%, #0070b8 100%);
  border: none;
}

.btn-success {
  background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
  border: none;
}

.btn-danger {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  border: none;
}

/* Enhanced navbar (top navigation) */
.app-header.navbar {
  /* Keep header blue across the full width so text is always readable */
  background: linear-gradient(90deg, #00a3e0 0%, #0070b8 50%, #66c7f5 100%);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid #dee2e6;
}

.app-header .nav-link {
  color: #ffffff;
  font-weight: 500;
}

.app-header .nav-link:hover {
  color: #e9f5fb;
}

.app-header .btn-link {
  color: #ffffff;
  font-weight: 500;
}

.app-header .btn-link:hover {
  color: #e9f5fb;
  text-decoration: none;
}

.app-header .dropdown-menu {
  background-color: #ffffff;
  border-radius: 0.5rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.app-header .dropdown-item {
  color: #111827;
  font-weight: 500;
  font-size: 0.9rem;
}

.app-header .dropdown-item:hover {
  background-color: #e5f3fb;
  color: #0f172a;
}

.app-header .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.7);
}

.app-header .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Enhanced tables */
.table {
  border-collapse: separate;
  border-spacing: 0;
}

.table thead th {
  background-color: #f8f9fa;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #dee2e6;
}

.table tbody tr {
  transition: background-color 0.2s ease;
}

.table tbody tr:hover {
  background-color: #f8f9fa;
}

/* Enhanced forms */
.form-control {
  border-radius: 0.375rem;
  border: 1px solid #ced4da;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Small boxes (dashboard stats) */
.small-box {
  border-radius: 1rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(6px);
}

.small-box:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
  filter: brightness(1.03);
}

.small-box .inner h3 {
  font-weight: 700;
  font-size: 2.5rem;
}

.small-box .icon {
  opacity: 0.3;
  font-size: 5rem;
  top: -10px;
  right: 10px;
}

/* App Content Header */
.app-content-header {
  background: #fff;
  padding: 1.5rem 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #dee2e6;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.app-content-header h3 {
  font-weight: 700;
  color: #343a40;
  margin: 0;
}

.breadcrumb {
  margin-bottom: 0;
  background: transparent;
  padding: 0;
}

.breadcrumb-item a {
  color: var(--primary-color);
  text-decoration: none;
}

.breadcrumb-item.active {
  color: #6c757d;
}

/* Badges */
.badge {
  padding: 0.35em 0.65em;
  font-weight: 600;
  border-radius: 0.25rem;
}

/* Dropdown enhancements */
.dropdown-menu {
  border-radius: 0.375rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.dropdown-item {
  transition: background-color 0.2s ease;
}

.dropdown-item:hover {
  background-color: #f8f9fa;
}

/* Footer */
.main-footer {
  background: #fff;
  border-top: 1px solid #dee2e6;
  padding: 1rem;
  margin-top: 2rem;
}

/* Login page enhancements - Pets Domain styling */
.login-page {
  background: #00a3e0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-box {
  width: 100%;
  max-width: 400px;
}

.login-logo img {
  max-width: 260px;
  height: auto;
}

.login-card-body {
  padding: 2rem;
}

.login-subtitle {
  font-size: 0.95rem;
  color: #6c757d;
}

.login-help-link {
  font-size: 0.875rem;
}

.input-group-text {
  background-color: #f8f9fa;
  border-color: #ced4da;
}

/* Latest news / announcement panel under auth card */
.auth-news-panel {
  max-width: 420px;
  margin: 1.5rem auto 0;
}

.auth-news-panel .card-body {
  padding: 1rem 1.25rem;
}

.auth-news-panel .news-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.auth-news-panel .news-meta {
  font-size: 0.75rem;
  color: #6c757d;
}

/* Enhanced card outlines */
.card-outline {
  border-top: 3px solid;
}

.card-outline.card-primary {
  border-top-color: var(--primary-color);
}

.card-outline.card-success {
  border-top-color: var(--success-color);
}

.card-outline.card-danger {
  border-top-color: var(--danger-color);
}

.card-outline.card-warning {
  border-top-color: var(--warning-color);
}

.card-outline.card-info {
  border-top-color: var(--info-color);
}

/* App Content spacing */
.app-content {
  padding: 1.5rem 0;
  min-height: calc(100vh - 200px);
}

.app-main {
  background: radial-gradient(circle at top left, #00a3e0 0%, #e9f5fb 55%, #f5f7fb 100%);
}

/* Enhanced badges */
.badge-primary {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.badge-success {
  background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

.badge-danger {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.badge-warning {
  background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
  color: #212529;
}

.badge-info {
  background: linear-gradient(135deg, #17a2b8 0%, #117a8b 100%);
}

/* Loading states */
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Smooth transitions */
* {
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Focus states */
a:focus,
button:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Mobile-first adjustments for Audit Runner */
@media (max-width: 768px) {
  .sticky-bottom-bar {
    padding: 10px !important;
  }
  
  .sticky-bottom-bar .btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
  }
  
  .parameter-card {
    margin-bottom: 1.5rem;
  }
  
  .photo-item {
    position: relative;
  }
  
  .photo-delete {
    position: absolute;
    top: 0;
    right: 0;
    padding: 0.125rem 0.375rem;
    font-size: 1rem;
    line-height: 1;
  }
  
  .content-wrapper {
    padding-bottom: 80px; /* Space for sticky bottom bar */
  }
}

/* Ensure content doesn't hide behind sticky bar */
.content {
  padding-bottom: 100px;
}

/* Photo upload styling */
.photo-upload-area {
  border: 2px dashed #dee2e6;
  border-radius: 0.25rem;
  padding: 1rem;
  background-color: #f8f9fa;
}

.photo-item {
  position: relative;
  display: inline-block;
}

.photo-item img {
  display: block;
}

.photo-delete {
  position: absolute;
  top: -5px;
  right: -5px;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  padding: 0;
  line-height: 1;
  font-size: 18px;
}

/* Toast notifications */
.alert.position-fixed {
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Remove hover effects that might cause flickering */
.btn:hover {
  transform: none !important;
}

.card:hover {
  transform: none !important;
}

/* Print styles */
@media print {
  .main-sidebar,
  .main-header,
  .main-footer,
  .btn,
  .no-print {
    display: none !important;
  }
  
  .content-wrapper {
    margin-left: 0 !important;
  }
}

/* --- Pets Domain themed sidebar overrides (modern nav) --- */
.main-sidebar {
  background: #001b2b; /* deep navy to contrast primary blue */
  color: rgba(255, 255, 255, 0.8);
}

.brand-link {
  background: linear-gradient(135deg, #00a3e0 0%, #0070b8 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-link .brand-text {
  letter-spacing: 0.3px;
}

.nav-sidebar .nav-item {
  margin: 0.1rem 0.45rem;
}

.nav-sidebar .nav-link {
  border-radius: 0.75rem;
  padding: 0.55rem 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.nav-sidebar .nav-link .nav-icon {
  width: 1.2rem;
}

.nav-sidebar .nav-link.active,
.nav-sidebar .nav-link:hover {
  background: rgba(0, 163, 224, 0.22);
  color: #ffffff;
  transform: translateX(3px);
}

.nav-sidebar .nav-link.active .nav-icon,
.nav-sidebar .nav-link:hover .nav-icon {
  color: #00c0ff;
}
