/* app/assets/stylesheets/application.css */
@import url("https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css");
@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css");
@import url("https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css");
@import url("https://cdn.jsdelivr.net/npm/select2-bootstrap-5-theme@1.3.0/dist/select2-bootstrap-5-theme.min.css");

/* Sign-in Page Styles */
.signin-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.signin-left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  padding: 2rem;
}

.signin-form-wrapper {
  width: 100%;
  max-width: 450px;
}

.signin-form-card {
  background: #fafafa;
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid #e5e7eb;
}

.signin-header {
  margin-bottom: 1.5rem;
  text-align: center;
}

.logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-image {
  height: 80px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

.dual-logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.practice-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.practice-logo-image {
  height: 60px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  border-radius: 8px;
}

.petpulse-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.signin-content {
  width: 100%;
}

.signin-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
  line-height: 1.2;
  text-align: center;
}

.signin-subtitle {
  font-size: 1rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
  line-height: 1.5;
  text-align: center;
}

.signin-form {
  width: 100%;
}

.signin-form .form-group {
  margin-bottom: 1rem;
}

.form-group:has(.form-check) {
  margin-bottom: 1rem;
}

.signin-form .form-input {
  padding: 0.475rem 0.725rem;
  border-radius: 0.4rem;
}

.form-group label {
  margin-bottom: 5px;
}

.form-group-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.25rem 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-input:focus {
  outline: none;
  border-color: #225B73;
  box-shadow: 0 0 0 3px rgba(34, 91, 115, 0.1);
}

/* Form check styling - consolidated */
.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.form-check-input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  margin-right: 0.5rem;
  background-color: #fff;
  border: 1px solid #d1d5db;
  cursor: pointer;
}

.form-check-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin: 0;
  cursor: pointer;
}

.forgot-password {
  font-size: 0.875rem;
  color: #225B73;
  text-decoration: none;
  font-weight: 500;
}

.forgot-password:hover {
  color: #1a4d5a;
  text-decoration: underline;
}

.signin-button {
  margin-bottom: 1rem;
}

.btn-signin {
  width: 100%;
  background-color: #225B73;
  color: white;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 300;
  cursor: pointer;
  transition: background-color 0.15s ease-in-out;
}

.btn-signin:hover {
  background-color: #1a4d5a;
}

.signin-divider {
  position: relative;
  text-align: center;
  margin: 1rem 0;
}

.signin-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background-color: #e5e7eb;
  z-index: 1;
}

.signin-divider-text {
  position: relative;
  background-color: #ffffff;
  padding: 0 1rem;
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
  z-index: 2;
  display: inline-block;
}

.social-login {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.social-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background-color: #ffffff;
  color: #374151;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.social-btn:hover {
  border-color: #9ca3af;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}


.signin-right {
  flex: 1;
  background: linear-gradient(135deg, #a7d7a0 0%, #c8e6c9 50%, #f0f8f0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
}

.signin-right-content {
  max-width: 500px;
  color: #1f2937;
}

.right-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #225B73;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.right-description {
  font-size: 1.125rem;
  color: #374151;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.features-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.feature-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: #225B73;
}

.feature-icon i,
.feature-icon svg {
  font-size: 1.25rem;
  color: white;
}

.feature-icon svg {
  stroke: white;
}

.feature-icon-light {
  background-color: #A7D7A0 !important;
}

.feature-content {
  flex: 1;
}

.feature-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.25rem;
}

.feature-description {
  font-size: 1rem;
  color: #6b7280;
  line-height: 1.5;
  margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .signin-container {
    flex-direction: column;
  }

  .signin-right {
    order: -1;
    min-height: 300px;
  }

  .signin-right-content {
    text-align: center;
  }

  .right-title {
    font-size: 2rem;
  }

  .features-list {
    display: none;
  }

  .dual-logo-container {
    flex-direction: column;
    gap: 1rem;
  }

  .practice-logo-image {
    height: 50px;
    max-width: 150px;
  }

  .logo-image {
    height: 60px;
    max-width: 180px;
  }
}

@media (max-width: 480px) {

  .signin-left,
  .signin-right {
    padding: 1rem;
  }

  .social-login {
    flex-direction: column;
  }

  .form-group-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

.back-to-signin {
  text-align: center;
  margin-top: 1rem;
}

.devise-link {
  display: block;
  text-align: center;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: #225B73;
  text-decoration: none;
  font-weight: 500;
}

.devise-link:hover {
  color: #1a4d5a;
  text-decoration: underline;
}

.password-reset-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background-color: #ffffff;
  padding: 2rem;
}

.password-reset-form-wrapper {
  width: 100%;
  max-width: 450px;
}

.password-hint {
  display: block;
  font-size: 0.75rem;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

/* Base Styles */
body {
  font-family: 'Lato', 'Inter', sans-serif;
  color: #1f1f1f;
  background-color: #ffffff;
}

.teal-green {
  background-color: #225B73;
}

.light-green {
  background-color: #A7D7A0;
}

/* Navbar Logo */
.navbar-logo {
  height: 40px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
}

/* Custom Navbar Styling */
.navbar-dark.bg-dark {
  background-color: #A7D7A0 !important;
}

.navbar-dark .navbar-brand,
.navbar-dark .navbar-nav .nav-link {
  color: #1f1f1f !important;
}

.navbar-dark .navbar-brand:hover,
.navbar-dark .navbar-nav .nav-link:hover {
  color: #1f1f1f !important;
  opacity: 0.8;
}

/* Wrapper */
.wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
  overflow: visible;
}

/* Main Content */
.main-content {
  margin-left: 220px;
  flex-grow: 1;
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 100vh;
  width: calc(100% - 220px);
  overflow: visible;
}

.row {
  margin-left: 0;
  margin-right: 0;
}

/* Top Bar */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #e5e7eb;
}

.top-bar .right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* General Elements */
.profile-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin-bottom: 10px;
}

.trix-content {
  min-height: 150px;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.user-profile-image {
  max-height: 150px;
  height: auto;
  display: block;
  margin-bottom: 10px;
}

.image-preview {
  display: flex;
  flex-direction: column;
  align-items: start;
}

.user-profile-image-rounded {
  max-width: 40px;
  height: auto;
  display: block;
  border-radius: 50%;
}

.alert {
  border-radius: 0;
  color: #fff;
  border: none;
}

.alert-success {
  background-color: #9fde87;
}

.alert-danger {
  background-color: #cd2121;
}

.alert-info {
  background-color: #356075;
}

.alert-warning {
  background-color: #7d7237;
}

/* Form error and success messages for tenant lookup */
.form-error {
  background-color: #fee;
  border: 1px solid #fcc;
  color: #c33;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 16px;
}

.form-success {
  background-color: #efe;
  border: 1px solid #cfc;
  color: #363;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 16px;
}

/* Font Awesome Icons */
.btn.btn-primary .fa-solid {
  color: #fff;
  margin-right: 6px;
}


.btn.btn-light .fa-solid {
  color: #6366f1;
}


/* Sidebar */
.sidebar {
  width: 220px;
  background: #e6edf0;
  position: fixed;
  height: 100vh;
  padding: 20px 10px;
  border-right: 1px solid #e5e7eb;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  overflow-x: visible;
  overflow-y: auto;
}

.sidebar.collapsed {
  width: 80px;
  padding: 20px 10px;
}

/* Sidebar Header */
.sidebar .sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  min-height: 40px;
  position: relative;
}

/* Ensure the logo link occupies full width so its child can center content */
.sidebar .sidebar-header>a {
  display: block;
  width: 100%;
}

.sidebar .logo-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  width: 100%;
  padding: 4px 0;
  overflow: hidden;
}

.sidebar .sidebar-toggle {
  position: fixed;
  left: calc(220px - 15px);
  top: 4px;
  transform: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #F8F9FA;
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4001;
  transition: left 0.3s ease, box-shadow 0.3s ease;
}

.sidebar .sidebar-toggle:hover {
  background: #f8f9fadf;
  transform: none;
}

/* Reposition toggle when sidebar is collapsed */
.wrapper.sidebar-collapsed .sidebar .sidebar-toggle {
  left: calc(80px - 15px);
  top: 4px;
}

.sidebar .sidebar-toggle i {
  font-size: 14px;
  color: #1f1f1f;
  transition: transform 0.3s ease;
}

.sidebar.collapsed .sidebar-toggle i {
  transform: none;
}


.sidebar .sidebar-logo {
  max-width: 100%;
  max-height: 56px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  visibility: visible;
}

.sidebar.collapsed .sidebar-logo {
  opacity: 0;
  visibility: hidden;
  max-width: 0;
}

/* When collapsed, prefer showing the practice logo (if present) as an icon-size image */
.sidebar.collapsed .logo-container .sidebar-logo {
  opacity: 1;
  visibility: visible;
  max-width: 40px;
  max-height: 40px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.sidebar.collapsed .logo-container {
  justify-content: center;
}

.sidebar .sidebar-logo-text {
  font-size: 22px;
  font-weight: bold;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  visibility: visible;
  white-space: nowrap;
}

.sidebar.collapsed .sidebar-logo-text {
  opacity: 0;
  visibility: hidden;
  max-width: 0;
  overflow: hidden;
}

/* Navigation Links */
.sidebar .nav-links {
  list-style: none;
  padding: 0;
}

.sidebar .nav-links>li {
  margin-bottom: 10px;
}

.sidebar .nav-links>li>a {
  text-decoration: none;
  color: #1f1f1f;
  display: flex;
  align-items: center;
  font-size: 14px;
  padding: 8px 8px;
  border-radius: 8px;
  transition: background 0.3s ease;
}

.sidebar .nav-links>li>a:hover,
.sidebar .nav-links>li>a.active {
  background: #d9e4e8;
}

/* Apply active styling when the li has the active class (Rails helper adds it to li) */
.sidebar .nav-links>li.active>a {
  background: #d9e4e8;
  color: #1f1f1f;
}

.sidebar .nav-links>li.active>a i {
  color: #1f1f1f;
}

/* Enhanced hover effect for collapsed sidebar */
.sidebar.collapsed .nav-links>li>a:hover {
  background: #d9e4e8;
  transform: scale(1.05);
  transition: all 0.2s ease;
}

/* Center icons and link blocks when collapsed */
.sidebar.collapsed .nav-links>li {
  display: flex;
  justify-content: center;
}

.sidebar.collapsed .nav-links>li>a {
  justify-content: center;
  text-align: center;

}

/* Icon and Text for Links */
.sidebar .nav-links li>a i {
  font-size: 16px;
  min-width: 16px;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed .nav-links li>a i {
  margin: 0;
}

.sidebar .nav-links li>a .link-text {
  margin-left: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  visibility: visible;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar.collapsed .nav-links li>a .link-text {
  opacity: 0;
  visibility: hidden;
  max-width: 0;
  margin-left: 0;
}

/* Nested (Collapsible) Links */
.sidebar .nav-links li ul {
  list-style: none;
  padding-left: 15px;
  margin-top: 5px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  visibility: visible;
  max-height: 500px;
  overflow: hidden;
}

.sidebar.collapsed .nav-links li ul {
  opacity: 0;
  visibility: hidden;
  max-height: 0;
  padding-left: 0;
  display: none;
}

/* Hover submenu for collapsed sidebar */
.sidebar.collapsed .nav-links li {
  position: relative;
}

.sidebar.collapsed .nav-links li a .link-text {
  display: none;
}

.sidebar.collapsed .nav-links li:hover::after {
  content: '';
  position: absolute;
  left: 100%;
  top: 0;
  width: 200px;
  height: 100%;
  background: transparent;
  z-index: 1001;
}

/* Submenu positioning outside sidebar */
.sidebar-submenus {
  position: fixed;
  top: 0;
  left: 80px;
  /* Position to the right of collapsed sidebar */
  z-index: 1002;
  pointer-events: none;
  max-height: 100vh;
  overflow: visible;
}

.sidebar-submenus .submenu-hover {
  display: none;
  position: absolute;
  top: 0;
  width: 200px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  padding: 8px 0;
  margin-left: 8px;
  animation: slideInRight 0.2s ease-out;
  pointer-events: auto;
  max-height: calc(100vh - 20px);
  overflow-y: auto;
}

.sidebar-submenus .submenu-hover.show {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.submenu-hover {
  display: none;
  list-style: none;
  padding: 0;
  margin: 0;
}

.submenu-hover.show {
  display: block !important;
}

.submenu-hover li {
  margin: 0;
}

.submenu-hover li a {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.submenu-hover li a:hover {
  background: #eaf1ff;
}

.submenu-hover li a i {
  margin-right: 8px;
  font-size: 16px;
  width: 16px;
  text-align: center;
}

.sidebar .nav-links li ul li a {
  text-decoration: none;
  color: #676a64;
  font-size: 14px;
  padding: 5px 15px;
  display: block;
  border-radius: 6px;
  transition: background 0.3s ease;
}

.sidebar .nav-links li ul li a:hover,
.sidebar .nav-links li ul li a.active {
  background: #eef2ec;
}

/* Nested active item when active class is on li */
.sidebar .nav-links li ul li.active>a {
  background: #e3e7df;
  color: #333;
}

.sidebar .nav-links li ul li.active>a i {
  color: #333;
}

/* User Profile Dropdown */
.sidebar {
  display: flex;
  flex-direction: column;
}

.sidebar .user-profile {
  position: relative;
  margin-top: auto;
  width: 100%;
}

.sidebar .user-profile .user-profile-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #676a64;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 8px;
  transition: background 0.3s ease;
  width: 100%;
  font-size: 16px;
  font-weight: bold;
}

.sidebar .user-profile .user-profile-link .link-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 40px);
}

.sidebar .user-profile .user-profile-link:hover {
  background: #eef2ec;
}

.sidebar .user-profile .user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.sidebar .user-profile .user-avatar-sm,
.user-avatar-mini {
  width: 20px;
  height: 20px;
}

/* Ensure profile avatar in nav aligns like other icons */
.sidebar .nav-links li>a .user-avatar-mini {
  border-radius: 50%;
  object-fit: cover;
  min-width: 20px;
}

.sidebar.collapsed .user-profile .user-avatar {
  width: 30px;
  height: 30px;
  margin-right: 0;
}

/* Ensure collapsed profile icon is perfectly centered like other icons */
.sidebar.collapsed .user-profile .user-profile-link {
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar.collapsed .user-profile .user-profile-link {
  justify-content: center;
  text-align: center;
  padding-left: 0;
  padding-right: 0;
}

.sidebar .user-profile .link-text {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  visibility: visible;
  white-space: nowrap;
  overflow: hidden;
  flex-grow: 1;
}

.sidebar.collapsed .user-profile .link-text {
  opacity: 0;
  visibility: hidden;
  max-width: 0;
  margin-left: 0;
}

/* User dropdown icon */
.sidebar .user-profile .user-dropdown-icon {
  font-size: 12px;
  color: #666;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  visibility: visible;
  margin-left: 8px;
}

.sidebar.collapsed .user-profile .user-dropdown-icon {
  opacity: 0;
  visibility: hidden;
  max-width: 0;
  margin-left: 0;
}

/* User dropdown menu for expanded sidebar */
.sidebar .user-dropdown-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  display: none;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  z-index: 1000;
  overflow: hidden;
}

.sidebar .user-dropdown-menu.show {
  display: block !important;
}

.sidebar .user-dropdown-menu li {
  margin: 0;
  border-bottom: 1px solid #f1f5f9;
}

.sidebar .user-dropdown-menu li:last-child {
  border-bottom: none;
}

.sidebar .user-dropdown-menu li a {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: #374151;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.sidebar .user-dropdown-menu li a:hover {
  background: #f8fafc;
  color: #225d72;
}

.sidebar .user-dropdown-menu li a i {
  margin-right: 12px;
  font-size: 16px;
  width: 16px;
  text-align: center;
  color: #6b7280;
  transition: color 0.2s ease;
}

.sidebar .user-dropdown-menu li a:hover i {
  color: #225d72;
}

/* Hide dropdown menu when sidebar is collapsed */
.sidebar.collapsed .user-dropdown-menu {
  display: none;
}

/* Adjust Main Content when Sidebar is Collapsed */
.wrapper.sidebar-collapsed .main-content {
  margin-left: 80px !important;
  width: calc(100% - 80px) !important;
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsive sidebar behavior */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 260px;
  }

  .sidebar.collapsed {
    transform: translateX(0);
    width: 260px;
  }

  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .wrapper.sidebar-collapsed .main-content {
    margin-left: 0 !important;
    width: 100% !important;
  }

  /* Backdrop for mobile sidebar */
  .sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .sidebar-backdrop.show {
    opacity: 1;
    visibility: visible;
  }
}

/* Tooltip styles for collapsed sidebar */
.sidebar.collapsed .tooltip {
  z-index: 1100;
}

.sidebar.collapsed .tooltip-inner {
  background-color: #333;
  color: white;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  max-width: 200px;
}

/* Ensure tooltips are visible when sidebar is collapsed */
.sidebar.collapsed [data-toggle="tooltip"] {
  position: relative;
}

/* Side Panel */
.side-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 350px;
  height: 100vh;
  background: white;
  box-shadow: -3px 0 10px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease-in-out;
  padding: 20px;
  z-index: 1050;
}

.side-panel.show {
  right: 0;
}



/* User Profile in Sidebar */
.user-profile {
  position: absolute;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-profile .user-info {
  display: flex;
  flex-direction: column;
}

.user-profile img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

/* Side Panel */
.side-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  height: 100vh;
  background: white;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  padding: 20px;
  overflow-y: auto;
}

.side-panel.show {
  transform: translateX(0);
}

.panel-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Form Slide-in */
.form-slide-in {
  position: fixed;
  top: 0;
  right: -400px;
  width: 350px;
  height: 100vh;
  background: white;
  box-shadow: -3px 0 10px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease-in-out;
  padding: 20px;
}

.form-slide-in.show {
  right: 0;
}


/* Breadcrumb */
.breadcrumb-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #e5e7eb;
}


.breadcrumb {
  display: flex;
  align-items: center;
}

/* Breadcrumb Buttons */
.breadcrumb-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.breadcrumb-buttons .btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
}

.breadcrumb ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb li {
  display: flex;
  align-items: center;
}

.breadcrumb li a {
  color: #246bfd;
  text-decoration: none;
  font-weight: 600;
}

.breadcrumb li a:hover {
  text-decoration: underline;
}

.breadcrumb li::after {
  content: "›";
  color: #888;
  margin: 0 8px;
  font-size: 16px;
}

.breadcrumb li:last-child::after {
  content: "";
}


/* Patient Details */
.patient-details {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.patient-details .card-body {
  padding: 1.05rem 0.25rem;
}

.patient-details h3 {
  font-weight: 600;
  font-size: 1.2rem;
}

.patient-profile {
  text-align: center;
}

.patient-profile .patient-name {
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 4px;
}

.patient-profile .patient-email {
  font-size: 0.9rem;
  color: #6c757d;
}

.patient-profile .patient-stats {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 10px 0;
}

.patient-profile .patient-stats div {
  text-align: center;
}

.patient-profile .patient-stats strong {
  display: block;
  font-size: 1.3rem;
}

.patient-profile .patient-stats span {
  font-size: 0.9rem;
  color: #6c757d;
}

/* Patient Info Grid */
.patient-info .row {
  margin-bottom: 12px;
}

.patient-info h6.label {
  font-size: 0.9rem;
  color: #6c757d;
  text-transform: uppercase;
  font-weight: bold;
  margin-bottom: 2px;
}

.patient-info p {
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 0;
}

/* Section Tabs */
.section-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.section-tabs .tab {
  padding: 10px 20px;
  background: #eaf1ff;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  text-align: center;
  transition: 0.3s;
}

.section-tabs .tab:hover {
  background: #d1e2ff;
}

.section-tabs .tab.active {
  background: #246bfd;
  color: #fff;
}

/* Notes Section */
.notes-section {
  background: #fff;
  padding: 15px;
  border-radius: 10px;
}

.notes-section .grey-text {
  color: #6c757d;
}

/* Documents Section */
.documents {
  background: #fff;
  padding: 15px;
  border-radius: 10px;
}


/* Tables */
.table {
  margin-bottom: 0;
  border: 1px solid #e5e7eb;
  border-radius: 5px;
  overflow: hidden;
}

.table .table-striped {
  border-radius: 0;
}

.table .table-striped tbody tr:nth-of-type(odd) {
  background-color: #f8f9fa;
}

.table .table-striped tbody tr:nth-of-type(even) {
  background-color: #f8f9fa;
}





/* Trix Editor */
.trix-toolbar {
  background-color: #f7f7f7;
  border: 1px solid #ccc;
  padding: 4px;
  border-radius: 4px;
}

.trix-button-group--text-tools {
  margin-right: 8px;
}

.trix-button {
  background: none;
  border: none;
  cursor: pointer;
  margin-right: 4px;

  &:hover {
    background-color: #eee;
  }
}




#dashboard .trix-content {
  min-height: 50px;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}


/* Dental Chart Styles */

#tooth-canine-104,
#tooth-canine-204,
#tooth-canine-304,
#tooth-canine-404,
#tooth-incisor-303,
#tooth-incisor-403,
#tooth-incisor-302,
#tooth-incisor-402,
#tooth-incisor-301,
#tooth-incisor-401,
#tooth-incisor-202,
#tooth-incisor-102,
#tooth-incisor-103,
#tooth-incisor-203,
#tooth-incisor-101,
#tooth-incisor-201,
#tooth-molar-209,
#tooth-molar-109,
#tooth-molar-208,
#tooth-molar-108,
#tooth-molar-207,
#tooth-molar-107,
#tooth-molar-210,
#tooth-molar-110,
#tooth-incisor-411,
#tooth-incisor-311,
#tooth-molar-410,
#tooth-premolar-108,
#tooth-premolar-208,
#tooth-premolar-107,
#tooth-premolar-207,
#tooth-premolar-206,
#tooth-premolar-105,
#tooth-premolar-205,
#tooth-incisor-303,
#tooth-incisor-403,
#tooth-premolar-106,
#tooth-premolar-206,
#tooth-premolar-409,
#tooth-premolar-309,
#tooth-premolar-405,
#tooth-premolar-305,
#tooth-premolar-407,
#tooth-premolar-307,
#tooth-premolar-408,
#tooth-premolar-308,
#tooth-premolar-406,
#tooth-premolar-306,
#tooth-molar-310 {
  cursor: pointer;
  transition: fill 0.2s ease;
}

#tooth-canine-104:hover,
#tooth-canine-204:hover,
#tooth-canine-304:hover,
#tooth-canine-404:hover,
#tooth-incisor-303:hover,
#tooth-incisor-403:hover,
#tooth-incisor-302:hover,
#tooth-incisor-402:hover,
#tooth-incisor-301:hover,
#tooth-incisor-401:hover,
#tooth-incisor-202:hover,
#tooth-incisor-102:hover,
#tooth-incisor-103:hover,
#tooth-incisor-203:hover,
#tooth-incisor-101:hover,
#tooth-incisor-201:hover,
#tooth-molar-209:hover,
#tooth-molar-109:hover,
#tooth-molar-208:hover,
#tooth-molar-108:hover,
#tooth-molar-207:hover,
#tooth-molar-107:hover,
#tooth-molar-210:hover,
#tooth-molar-110:hover,
#tooth-incisor-411:hover,
#tooth-incisor-311:hover,
#tooth-molar-410:hover,
#tooth-premolar-108:hover,
#tooth-premolar-208:hover,
#tooth-premolar-107:hover,
#tooth-premolar-207:hover,
#tooth-premolar-206:hover,
#tooth-premolar-105:hover,
#tooth-premolar-205:hover,
#tooth-incisor-303:hover,
#tooth-incisor-403:hover,
#tooth-premolar-106:hover,
#tooth-premolar-206:hover,
#tooth-premolar-409:hover,
#tooth-premolar-309:hover,
#tooth-premolar-405:hover,
#tooth-premolar-305:hover,
#tooth-premolar-407:hover,
#tooth-premolar-307:hover,
#tooth-premolar-408:hover,
#tooth-premolar-308:hover,
#tooth-premolar-406:hover,
#tooth-premolar-306:hover,
#tooth-molar-310:hover {
  fill: #eb800e;
}

/* Custom Select2 Styles */
.select2-container--bootstrap5 .select2-selection {
  border: 1px solid #ced4da;
  border-radius: 4px;
  min-height: 38px;
}

.select2-container--bootstrap5 .select2-selection--multiple {
  padding: 2px 6px;
}

/* Dental Chart Styles - Converted from Tailwind CSS */

/* Base Layout */
.space-y-6>*+* {
  margin-top: 1.5rem;
}

.space-y-4>*+* {
  margin-top: 1rem;
}

.space-y-3>*+* {
  margin-top: 0.75rem;
}

.space-x-3>*+* {
  margin-left: 0.75rem;
}

.space-x-4>*+* {
  margin-left: 1rem;
}

/* Grid Layouts */
.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-cols-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (min-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .md\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 0.75rem;
}

.gap-4 {
  gap: 1rem;
}

.gap-6 {
  gap: 1.5rem;
}

/* Flexbox */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-1 {
  flex: 1 1 0%;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-end {
  justify-content: flex-end;
}

/* Spacing */
.p-1 {
  padding: 0.25rem;
}

.p-2 {
  padding: 0.5rem;
}

.p-3 {
  padding: 0.75rem;
}

.p-4 {
  padding: 1rem;
}

.p-5 {
  padding: 1.25rem;
}

.p-6 {
  padding: 1.5rem;
}

.px-1 {
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

.px-2 {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.px-3 {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.px-6 {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.py-1 {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.m-0 {
  margin: 0;
}

.mb-1 {
  margin-bottom: 0.25rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-3 {
  margin-bottom: 0.75rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mt-1 {
  margin-top: 0.25rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-3 {
  margin-top: 0.75rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.ml-1 {
  margin-left: 0.25rem;
}

.ml-2 {
  margin-left: 0.5rem;
}

.ml-3 {
  margin-left: 0.75rem;
}

.ml-4 {
  margin-left: 1rem;
}

.mr-1 {
  margin-right: 0.25rem;
}

.mr-2 {
  margin-right: 0.5rem;
}

.mr-3 {
  margin-right: 0.75rem;
}

.mr-4 {
  margin-right: 1rem;
}

/* Typography */
.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}

.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.text-base {
  font-size: 1rem;
  line-height: 1.5rem;
}

.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}

.font-medium {
  font-weight: 500;
}

.font-bold {
  font-weight: 700;
}

.font-semibold {
  font-weight: 600;
}

/* Colors */
.text-gray-500 {
  color: #6b7280;
}

.text-gray-600 {
  color: #4b5563;
}

.text-gray-700 {
  color: #374151;
}

.text-gray-800 {
  color: #1f2937;
}

.text-gray-900 {
  color: #111827;
}

.text-indigo-600 {
  color: #4f46e5;
}

.text-indigo-700 {
  color: #4338ca;
}

.text-indigo-800 {
  color: #3730a3;
}

.text-white {
  color: #ffffff;
}

.text-red-600 {
  color: #dc2626;
}

.text-red-700 {
  color: #b91c1c;
}

.text-green-600 {
  color: #16a34a;
}

.text-green-700 {
  color: #15803d;
}

.text-green-800 {
  color: #166534;
}

.text-amber-600 {
  color: #d97706;
}

.text-amber-700 {
  color: #b45309;
}

.text-blue-600 {
  color: #2563eb;
}

.text-purple-600 {
  color: #9333ea;
}

/* Background Colors */
.bg-white {
  background-color: #ffffff;
}

.bg-gray-50 {
  background-color: #f9fafb;
}

.bg-gray-100 {
  background-color: #f3f4f6;
}

.bg-gray-200 {
  background-color: #e5e7eb;
}

.bg-gray-300 {
  background-color: #d1d5db;
}

.bg-indigo-50 {
  background-color: #eef2ff;
}

.bg-indigo-100 {
  background-color: #e0e7ff;
}

.bg-indigo-600 {
  background-color: #4f46e5;
}

.bg-red-50 {
  background-color: #fef2f2;
}

.bg-red-100 {
  background-color: #fee2e2;
}

.bg-red-600 {
  background-color: #dc2626;
}

.bg-green-50 {
  background-color: #f0fdf4;
}

.bg-green-100 {
  background-color: #dcfce7;
}

.bg-green-200 {
  background-color: #bbf7d0;
}

.bg-blue-50 {
  background-color: #eff6ff;
}

.bg-blue-100 {
  background-color: #dbeafe;
}

.bg-amber-50 {
  background-color: #fffbeb;
}

.bg-amber-100 {
  background-color: #fef3c7;
}

.bg-yellow-100 {
  background-color: #fef3c7;
}

.bg-yellow-200 {
  background-color: #fef3c7;
}

.bg-orange-100 {
  background-color: #fed7aa;
}

.bg-orange-200 {
  background-color: #fed7aa;
}

.bg-red-100 {
  background-color: #fee2e2;
}

.bg-red-200 {
  background-color: #fecaca;
}

.bg-purple-100 {
  background-color: #f3e8ff;
}

.bg-purple-200 {
  background-color: #e9d5ff;
}

.bg-black {
  background-color: #000000;
}

.bg-opacity-50 {
  --tw-bg-opacity: 0.5;
}

/* Borders */
.border {
  border-width: 1px;
}

.border-2 {
  border-width: 2px;
}

.border-gray-200 {
  border-color: #e5e7eb;
}

.border-gray-300 {
  border-color: #d1d5db;
}

.border-gray-400 {
  border-color: #9ca3af;
}

.border-indigo-300 {
  border-color: #a5b4fc;
}

.border-indigo-500 {
  border-color: #6366f1;
}

.border-indigo-600 {
  border-color: #4f46e5;
}

.border-red-300 {
  border-color: #fca5a5;
}

.border-transparent {
  border-color: transparent;
}

.border-t {
  border-top-width: 1px;
}

.border-b {
  border-bottom-width: 1px;
}

.border-l {
  border-left-width: 1px;
}

.border-r {
  border-right-width: 1px;
}

.border-dashed {
  border-style: dashed;
}

/* Border Radius */
.rounded {
  border-radius: 0.25rem;
}

.rounded-sm {
  border-radius: 0.125rem;
}

.rounded-md {
  border-radius: 0.375rem;
}

.rounded-lg {
  border-radius: 0.5rem;
}

.rounded-full {
  border-radius: 9999px;
}

.rounded-t-lg {
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
}

.rounded-b-lg {
  border-bottom-left-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
}

/* Shadows */
.shadow-sm {
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.shadow-md {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Ring (Focus/Selection) */
.ring-2 {
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.5);
}

.ring-indigo-500 {
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.5);
}

/* Sizing */
.w-1 {
  width: 0.25rem;
}

.w-2 {
  width: 0.5rem;
}

.w-3 {
  width: 0.75rem;
}

.w-4 {
  width: 1rem;
}

.w-5 {
  width: 1.25rem;
}

.w-6 {
  width: 1.5rem;
}

.w-8 {
  width: 2rem;
}

.w-10 {
  width: 2.5rem;
}

.w-12 {
  width: 3rem;
}

.w-16 {
  width: 4rem;
}

.w-20 {
  width: 5rem;
}

.w-40 {
  width: 10rem;
}

.w-52 {
  width: 13rem;
}

.w-full {
  width: 100%;
}

.w-auto {
  width: auto;
}

.h-1 {
  height: 0.25rem;
}

.h-2 {
  height: 0.5rem;
}

.h-3 {
  height: 0.75rem;
}

.h-4 {
  height: 1rem;
}

.h-5 {
  height: 1.25rem;
}

.h-6 {
  height: 1.5rem;
}

.h-8 {
  height: 2rem;
}

.h-10 {
  height: 2.5rem;
}

.h-12 {
  height: 3rem;
}

.h-16 {
  height: 4rem;
}

.h-20 {
  height: 5rem;
}

.h-40 {
  height: 10rem;
}

.h-52 {
  height: 13rem;
}

.h-64 {
  height: 16rem;
}

.h-full {
  height: 100%;
}

.h-auto {
  height: auto;
}

/* Positioning */
.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.fixed {
  position: fixed;
}

.inset-0 {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.top-2 {
  top: 0.5rem;
}

.top-4 {
  top: 1rem;
}

.right-2 {
  right: 0.5rem;
}

.right-4 {
  right: 1rem;
}

.bottom-0 {
  bottom: 0;
}

.left-0 {
  left: 0;
}

.right-0 {
  right: 0;
}

/* Display */
.block {
  display: block;
}

.inline-block {
  display: inline-block;
}

.inline-flex {
  display: inline-flex;
}

.hidden {
  display: none !important;
}

/* Cursor */
.cursor-pointer {
  cursor: pointer;
}

.cursor-not-allowed {
  cursor: not-allowed;
}

/* Overflow */
.overflow-hidden {
  overflow: hidden;
}

.overflow-auto {
  overflow: auto;
}

.overflow-y-auto {
  overflow-y: auto;
}

/* Z-index */
.z-50 {
  z-index: 50;
}

/* Transitions */
.transition-colors {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.transition-opacity {
  transition-property: opacity;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

/* Opacity */
.opacity-0 {
  opacity: 0;
}

.opacity-50 {
  opacity: 0.5;
}

.opacity-100 {
  opacity: 1;
}

/* Hover states */
.hover\:bg-gray-50:hover {
  background-color: #f9fafb;
}

.hover\:bg-gray-100:hover {
  background-color: #f3f4f6;
}

.hover\:bg-indigo-50:hover {
  background-color: #eef2ff;
}

.hover\:bg-indigo-100:hover {
  background-color: #e0e7ff;
}

.hover\:bg-indigo-700:hover {
  background-color: #4338ca;
}

.hover\:bg-indigo-800:hover {
  background-color: #3730a3;
}

.hover\:border-indigo-300:hover {
  border-color: #a5b4fc;
}

.hover\:text-gray-700:hover {
  color: #374151;
}

.hover\:text-gray-800:hover {
  color: #1f2937;
}

.hover\:text-indigo-600:hover {
  color: #4f46e5;
}

.hover\:text-indigo-700:hover {
  color: #4338ca;
}

.hover\:text-indigo-800:hover {
  color: #3730a3;
}

.hover\:text-red-600:hover {
  color: #dc2626;
}

.hover\:text-red-700:hover {
  color: #b91c1c;
}

.hover\:text-red-800:hover {
  color: #991b1b;
}

.hover\:opacity-80:hover {
  opacity: 0.8;
}

/* Group hover */
.group:hover .group-hover\:opacity-100 {
  opacity: 1;
}

.group:hover .group-hover\:border-indigo-300 {
  border-color: #a5b4fc;
}

.group:hover .group-hover\:bg-indigo-50 {
  background-color: #eef2ff;
}

/* Focus states */
.focus\:outline-none:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
}

/* Responsive utilities */
@media (min-width: 640px) {
  .sm\:flex-row {
    flex-direction: row;
  }

  .sm\:items-center {
    align-items: center;
  }

  .sm\:justify-between {
    justify-content: space-between;
  }

  .sm\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sm\:w-auto {
    width: auto;
  }

  .sm\:max-w-md {
    max-width: 28rem;
  }

  .sm\:text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
  }

  .sm\:p-6 {
    padding: 1.5rem;
  }
}

@media (min-width: 768px) {
  .md\:col-span-2 {
    grid-column: span 2 / span 2;
  }

  .md\:col-span-3 {
    grid-column: span 3 / span 3;
  }

  .md\:flex-row {
    flex-direction: row;
  }

  .md\:items-center {
    align-items: center;
  }

  .md\:justify-between {
    justify-content: space-between;
  }

  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .md\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .md\:w-auto {
    width: auto;
  }

  .md\:max-w-md {
    max-width: 28rem;
  }

  .md\:text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
  }

  .md\:p-6 {
    padding: 1.5rem;
  }

  .md\:mt-0 {
    margin-top: 0;
  }
}

@media (min-width: 1024px) {
  .lg\:col-span-2 {
    grid-column: span 2 / span 2;
  }

  .lg\:col-span-3 {
    grid-column: span 3 / span 3;
  }

  .lg\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .lg\:text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
  }

  .lg\:pl-20 {
    padding-left: 5rem;
  }
}

/* Max width utilities */
.max-w-md {
  max-width: 28rem;
}

.max-w-lg {
  max-width: 32rem;
}

.max-w-xl {
  max-width: 36rem;
}

.max-w-2xl {
  max-width: 42rem;
}

.max-w-4xl {
  max-width: 56rem;
}

.max-w-5xl {
  max-width: 64rem;
}

.max-w-full {
  max-width: 100%;
}

/* Min width utilities */
.min-w-full {
  min-width: 100%;
}

/* Min height utilities */
.min-h-screen {
  min-height: 100vh;
}

/* Max height utilities */
.max-h-\[70vh\] {
  max-height: 70vh;
}

.max-h-\[90vh\] {
  max-height: 90vh;
}

/* Aspect ratio */
.aspect-square {
  aspect-ratio: 1 / 1;
}

/* Object fit */
.object-cover {
  object-fit: cover;
}

/* Truncate */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Whitespace */
.whitespace-nowrap {
  white-space: nowrap;
}

/* List styles */
.list-decimal {
  list-style-type: decimal;
}

/* Transform */
.transform {
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

/* Specific component styles */
.card {
  background: #fff;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  margin: 0.625rem 0;
}

.card-body {
  padding: 1.25rem;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 500;
  color: #1f2937;
  margin-bottom: 1rem;
}

.card-text {
  color: #6b7280;
}

.card.appointments-card {
  margin: 0.625rem 0;
}

.card.appointments-card .nav-item .nav-link.active {
  background: #6366f1;
}

/* Button styles */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.375rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

.btn-primary {
  background-color: #225d72;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  color: white;
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.2s;
}

.btn-primary:hover {
  background-color: #1a202c;
  color: white;
}

/* Secondary Button Style for Print/PDF and Media buttons */
.btn-secondary {
  background-color: #ffffff;
  color: #495057;
  border: 1px solid #dee2e6;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-weight: 500;
  transition: all 0.15s ease-in-out;
}

.btn-secondary:hover {
  background-color: #e9ecef;
  color: #495057;
  border-color: #dee2e6;
}

.btn-secondary i {
  margin-right: 0.5rem;
}

.btn-outline-secondary {
  background-color: transparent;
  color: #6b7280;
  border-color: #d1d5db;
}

.btn-outline-secondary:hover {
  background-color: #f3f4f6;
  color: #374151;
}

.btn-link {
  background-color: transparent;
  color: #4f46e5;
  border-color: transparent;
  padding: 0.25rem;
}

.btn-link:hover {
  color: #4338ca;
}

.btn-clear-link {
  background-color: white;
  color: #6366f1;
  padding: 0;
  border: none;
}

.btn-clear-link i {
  color: #6366f1;
  margin-right: 0.25rem;
}

.btn-clear-link:hover {
  color: #4338ca;
}


/* Form controls */
.form-control {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #495057;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
  color: #495057;
  background-color: #fff;
  border-color: #80bdff;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-select {
  display: block;
  width: 100%;
  padding: 0.5rem 2.25rem 0.5rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #495057;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-select:focus {
  border-color: #80bdff;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}


/* Input group */
.input-group {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  width: 100%;
}

.input-group-append {
  display: flex;
}

.input-group-text {
  display: flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #495057;
  text-align: center;
  white-space: nowrap;
  background-color: #e9ecef;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
}

/* Modal styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1055;
  display: none;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  outline: 0;
}

.modal.show {
  display: block;
}

.modal-dialog {
  position: relative;
  width: auto;
  margin: 0.5rem;
  pointer-events: none;
}

.modal-xl {
  max-width: 1140px;
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  pointer-events: auto;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 0.3rem;
  outline: 0;
}

.modal-header {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid #dee2e6;
  border-top-left-radius: calc(0.3rem - 1px);
  border-top-right-radius: calc(0.3rem - 1px);
}

.modal-title {
  margin-bottom: 0;
  line-height: 1.5;
  font-size: 1.25rem;
  font-weight: 500;
}

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

.close {
  float: right;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  color: #000;
  text-shadow: 0 1px 0 #fff;
  opacity: 0.5;
  background: transparent;
  border: 0;
  padding: 0;
}

.close:hover {
  color: #000;
  text-decoration: none;
  opacity: 0.75;
}

/* Table styles */
.table {
  width: 100%;
  margin-bottom: 1rem;
  color: #212529;
  vertical-align: top;
  border-color: #dee2e6;
}

.table th,
.table td {
  padding: 0.75rem;
  vertical-align: top;
  border-top: 1px solid #dee2e6;
}

.table thead th {
  vertical-align: bottom;
  border-bottom: 2px solid #dee2e6;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
}

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

/* Utility classes for specific components */
.text-muted {
  color: #6b7280 !important;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-left {
  text-align: left;
}

.d-inline-flex {
  display: inline-flex;
}

.align-items-center {
  align-items: center;
}

.justify-content-center {
  justify-content: center;
}

.justify-content-between {
  justify-content: space-between;
}

.justify-content-end {
  justify-content: flex-end;
}

.rounded-circle {
  border-radius: 50%;
}

.rounded-circle.bg-primary {
  background-color: #e0e7ff !important;
  color: #4246e5 !important;
}

.text-white {
  color: #ffffff;
}

.h-100 {
  height: 100%;
}

.w-100 {
  width: 100%;
}

/* Specific dental chart styles */
.dental-chart-container {
  background-color: #f8f9fa;
  min-height: 100vh;
}

.tooth-button {
  width: 40px;
  height: 64px;
  border: 1px solid #d1d5db;
  background-color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 500;
}

.tooth-button:hover {
  border-color: #a5b4fc;
  background-color: #eef2ff;
}

.tooth-button.selected {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.5);
}

.tooth-button.upper {
  border-bottom-left-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
}

.tooth-button.lower {
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
}

/* Assessment option styles */
.assessment-option {
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 0.75rem;
}

.assessment-option.select-patient-card:hover {
  border-color: #a5b4fc;
  background-color: rgba(238, 242, 255, 0.5);
}

.assessment-option.selected {
  border-color: #6366f1;
  background-color: #eef2ff;
}

.assessment-option .radio-indicator {
  width: 20px;
  height: 20px;
  border: 1px solid #d1d5db;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.5rem;
}

.assessment-option.selected .radio-indicator {
  border-color: #6366f1;
}

.assessment-option.selected .radio-indicator::after {
  content: '';
  width: 12px;
  height: 12px;
  background-color: #6366f1;
  border-radius: 50%;
}

/* Image thumbnail styles */
.image-thumbnail {
  position: relative;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  overflow: hidden;
  background-color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.image-thumbnail:hover {
  border-color: #a5b4fc;
}

.image-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-thumbnail .remove-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background-color: #dc2626;
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.image-thumbnail:hover .remove-btn {
  opacity: 1;
}

/* Step indicator styles */
.step-indicator {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  background-color: transparent;
  color: #6b7280;
}

.step-indicator:hover {
  color: #374151;
}

.step-indicator.active {
  background-color: #eef2ff;
  color: #4f46e5;
}

.step-indicator.completed {
  background-color: #dcfce7;
  color: #16a34a;
}

.step-indicator.disabled {
  background-color: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
}

/* Assessment option styles */
.assessment-option {
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 0.75rem;
}

.assessment-option:hover {
  border-color: #a5b4fc;
  background-color: rgba(238, 242, 255, 0.5);
}

.assessment-option.selected {
  border-color: #6366f1;
  background-color: #eef2ff;
}

.assessment-option .radio-indicator {
  width: 20px;
  height: 20px;
  border: 1px solid #d1d5db;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.5rem;
}

.assessment-option.selected .radio-indicator {
  border-color: #6366f1;
}

.assessment-option.selected .radio-indicator::after {
  content: '';
  width: 12px;
  height: 12px;
  background-color: #6366f1;
  border-radius: 50%;
}

/* Treatment plan styles */
.treatment-form {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.treatment-list {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  overflow: hidden;
}

.treatment-list .table {
  margin-bottom: 0;
}

.treatment-list .table th {
  background-color: #f9fafb;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
}

/* Media library styles */
.d-grid.grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.media-item {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  background-color: #ffffff;
}

.media-item:hover {
  border-color: #a5b4fc;
}

.media-item.selected {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.5);
}

.media-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.media-item .media-info {
  padding: 0.5rem;
}

.media-item .media-name {
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.media-item .media-size {
  font-size: 0.75rem;
  color: #6b7280;
}

/* Responsive utilities */
@media (max-width: 640px) {
  .sm\:hidden {
    display: none;
  }

  .sm\:block {
    display: block;
  }

  .sm\:flex {
    display: flex;
  }

  .sm\:flex-col {
    flex-direction: column;
  }

  .sm\:items-center {
    align-items: center;
  }

  .sm\:justify-between {
    justify-content: space-between;
  }

  .sm\:space-x-3>*+* {
    margin-left: 0.75rem;
  }

  .sm\:space-y-4>*+* {
    margin-top: 1rem;
  }

  .sm\:w-full {
    width: 100%;
  }

  .sm\:max-w-md {
    max-width: 28rem;
  }

  .sm\:text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
  }

  .sm\:p-6 {
    padding: 1.5rem;
  }

  .sm\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sm\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }

  .print-only {
    display: block !important;
  }

  .card {
    box-shadow: none;
    border: 1px solid #000;
  }

  .btn {
    display: none;
  }
}

/* Media library styles */

.grey-background {
  background-color: #f5f5f5;
}

/* Reference image thumbnails */
.reference-thumbnail {
  transition: all 0.2s ease;
}

.reference-thumbnail:hover {
  transform: scale(1.02);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Image modal styles */
.modal.show.d-block[data-dental-chart-target="imageModal"] {
  background-color: rgba(0, 0, 0, 0.9);
}

.modal.show.d-block[data-dental-chart-target="imageModal"] .modal-content {
  background: transparent;
  border: none;
  box-shadow: none;
}

.modal.show.d-block[data-dental-chart-target="imageModal"] .modal-header {
  border: none;
  padding: 1rem 0;
}

.modal.show.d-block[data-dental-chart-target="imageModal"] .modal-title {
  color: white;
  font-size: 1.25rem;
}

.modal.show.d-block[data-dental-chart-target="imageModal"] .close {
  color: white;
  opacity: 0.8;
  font-size: 2rem;
}

.modal.show.d-block[data-dental-chart-target="imageModal"] .close:hover {
  opacity: 1;
}

.modal.show.d-block[data-dental-chart-target="imageModal"] .modal-body {
  padding: 0;
  text-align: center;
}

.modal.show.d-block[data-dental-chart-target="imageModal"] img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
}

.media-toolbar {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
  margin-top: 0;
  margin-left: 1rem;
  margin-right: 1rem;
}

.border-bottom {
  border-bottom: 1.5px solid #e5e7eb;
}

.media-grid.grid-view .media-item {
  display: inline-block;
  width: 200px;
  margin: 0 10px 10px 0;
  vertical-align: top;
}

.media-grid.list-view .media-item {
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: 10px;
}

.media-grid.list-view .media-info {
  margin-left: 16px;
}

.media-tabs {
  border-bottom: 1.5px solid #e5e7eb;
  /* light grey divider */
  margin-bottom: 0.5rem;
  gap: 2rem;
}

.media-tabs .nav-link {
  border: none;
  border-radius: 0;
  color: #6366f1;
  background: none;
  font-weight: 500;
  padding-bottom: 0.5rem;
  transition: color 0.2s;
}

.media-tabs .nav-link.active {
  color: #4f46e5;
  border-bottom: 2.5px solid #4f46e5;
  /* purple underline */
  background: none;
}

.media-tabs .nav-link:not(.active):hover {
  color: #4338ca;
  background: none;
  border-bottom: none;
  /* No colored border on hover */
}


.patient-show-tabs {
  border-bottom: 1.5px solid #e5e7eb;
  /* light grey divider */
  margin-bottom: 0.5rem;
  gap: 2rem;
}

.patient-show-tabs .nav-link {
  border: none;
  border-radius: 0;
  color: #333;
  background: none;
  font-weight: 500;
  padding-bottom: 0.5rem;
  transition: color 0.2s;
}

.patient-show-tabs .nav-link.active {
  color: #4f46e5;
  border-bottom: 2.5px solid #4f46e5;
  background: none;
}

.patient-show-tabs .nav-link:not(.active):hover {
  color: #4338ca;
  background: none;
  border-bottom: 2.5px solid #b6afaf;
}

/* Dental Chart Radio Button Indicators */
.assessment-option .rounded-full.border {
  transition: all 0.2s ease;
  border-width: 2px;
}

.assessment-option .rounded-full.border.border-gray-300 {
  background-color: white;
}

.assessment-option .rounded-full.border.bg-primary {
  background-color: #0d6efd;
  border-color: #0d6efd;
}

.assessment-option .rounded-full.border .checkmark {
  transition: all 0.2s ease;
}

.assessment-option.selected .rounded-full.border {
  background-color: #0d6efd;
  border-color: #0d6efd;
}

.assessment-option.selected .rounded-full.border .checkmark {
  background-color: white;
  border-radius: 50%;
  width: 8px;
  height: 8px;
  margin: auto;
}

.select-patient-card {
  height: 160px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: none;
  transition: box-shadow 0.2s, border-color 0.2s;
  cursor: pointer;
  background: #fff;
}

.select-patient-card:hover {
  border-color: #6366f1;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
}

.select-patient-card .flex-grow-1 {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.select-patient-card .flex-grow-1>div:first-child {
  margin-bottom: 0.25rem;
}

.select-patient-card .text-muted.small {
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: block;
  line-height: 1.3;
}

.icon-wrapper {
  flex-shrink: 0;
}

.select-patient-card .icon-wrapper {
  margin-right: 0;
}

.select-patient-card .rounded-circle {
  font-size: 1.5rem;
}

.select-patient-card .fw-bold {
  font-size: 1.1rem;
}

.select-patient-card .text-muted.small {
  font-size: 0.95rem;
}

@media (max-width: 767px) {

  .col-md-6,
  .col-lg-4 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

#loading-indicator,
#no-results-indicator {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.dental-chart-search {
  position: relative;
}

.dental-chart-search .input-group-text {
  background-color: #f8f9fa;
  border-color: #dee2e6;
}

/* Tooth Assessment Modal */
.tooth-assessment-modal {
  z-index: 1060;
}

.tooth-assessment-modal .modal-content {
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Dental Chart SVG Styling */
.dental-chart-container svg {
  max-width: 100%;
  height: auto;
}

.dental-chart-container [data-tooth] {
  cursor: pointer;
  transition: all 0.2s ease;
}


.dental-chart-container [data-tooth].assessed {
  fill: #10b981;
  stroke: #059669;
  stroke-width: 2;
}

.dental-chart-container [data-tooth].unassessed {
  fill: #f3f4f6;
  stroke: #d1d5db;
  stroke-width: 1;
}


/* Tooth Assessment Side-Pane */
.tooth-assessment-side-pane {
  position: fixed;
  top: 0;
  right: 0;
  width: 600px;
  height: 100vh;
  background: white;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 1050;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  overflow-y: auto;
}

.tooth-assessment-side-pane.show {
  transform: translateX(0);
}

.tooth-assessment-side-pane.hidden {
  transform: translateX(100%);
}

.tooth-assessment-side-pane .side-pane-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  background: #f8f9fa;
}

.tooth-assessment-side-pane .side-pane-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
}

.tooth-assessment-side-pane .side-pane-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: #6b7280;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.25rem;
  transition: all 0.2s ease;
}

.tooth-assessment-side-pane .side-pane-close:hover {
  background: #e5e7eb;
  color: #374151;
}

.tooth-assessment-side-pane .side-pane-content {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
}

.tooth-assessment-side-pane .side-pane-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #e5e7eb;
  background: #f8f9fa;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* Backdrop for side-pane */
.tooth-assessment-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease-in-out;
}

.tooth-assessment-backdrop.show {
  opacity: 1;
  visibility: visible;
}

/* Comment button styling */
.comment-btn {
  transition: all 0.2s ease;
  border: 1px solid #dee2e6;
  background-color: #f8f9fa;
  color: #6c757d;
}

.comment-btn:hover {
  background-color: #e9ecef;
  border-color: #adb5bd;
  color: #495057;
  transform: scale(1.05);
}

.comment-btn:active {
  transform: scale(0.95);
}

/* Popover styling improvements */
.popover {
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.popover .popover-body {
  padding: 0;
}

.popover .form-control {
  border-radius: 6px;
}

.popover .btn {
  border-radius: 6px;
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
}

/* Custom popover styling */
.custom-popover {
  animation: fadeIn 0.2s ease-in-out;
  font-family: inherit;
}

.custom-popover .form-control {
  border: 1px solid #ced4da;
  border-radius: 4px;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.custom-popover .form-control:focus {
  border-color: #80bdff;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.custom-popover .btn {
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
  border-radius: 4px;
  transition: all 0.15s ease-in-out;
}

.custom-popover .btn-primary {
  background-color: #007bff;
  border-color: #007bff;
  color: white;
}

.custom-popover .btn-primary:hover {
  background-color: #0056b3;
  border-color: #0056b3;
}

.custom-popover .btn-outline-secondary {
  color: #6c757d;
  border-color: #6c757d;
  background-color: transparent;
}

.custom-popover .btn-outline-secondary:hover {
  color: #fff;
  background-color: #6c757d;
  border-color: #6c757d;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.select-action-card {
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.select-action-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #e5e7eb;
}

.select-action-card.selected {
  border-color: #3b82f6;
  background-color: #f8fafc;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.select-action-card .icon-wrapper {
  transition: transform 0.2s ease;
}

.select-action-card:hover .icon-wrapper {
  transform: scale(1.1);
}

.select-action-card.selected .icon-wrapper {
  transform: scale(1.05);
}


/* Generic Page Header Styles */
.page-container {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.page-header .header-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.page-header .header-text {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.page-header .header-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.page-title {
  font-size: 2.5rem;
  font-weight: bold;
  color: #2d3748;
  margin: 0 0 0.5rem 0;
}

.page-subtitle {
  font-size: 1.1rem;
  color: #4a5568;
  margin: 0;
}


.dashboard-cards-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.summary-card {
  background: #fafafa;
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid #e2e8f0;
}


.card-title {
  font-size: 0.9rem;
  color: #718096;
  font-weight: 500;
  margin: 0;
}

.summary-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.summary-card .card-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: flex-start;
}

.card-icon {
  color: #225B73;
  font-size: 1.2rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.75rem 0.5rem 0.75rem;
}

.card-content {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.25rem 0.75rem 0.75rem 0.75rem;
}

.card-value {
  font-size: 2rem;
  font-weight: bold;
  color: #2d3748;
}

.card-change {
  font-size: 0.85rem;
  font-weight: 500;
}

.card-change.positive {
  color: #A7D7A0;
}

.card-change.negative {
  color: #ce7171;
}

.dashboard-charts-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.chart-card {
  background: #fafafa;
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid #e2e8f0;
}

.chart-title {
  font-size: 1.1rem;
  font-weight: bold;
  color: #2d3748;
  margin: 0 0 1.5rem 0;
}

.chart-container {
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-placeholder {
  text-align: center;
  color: #718096;
}

.chart-placeholder p {
  margin: 0.5rem 0;
}

/* Patients Page Styles */
.page-container {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.search-container {
  margin-bottom: 2rem;
}

.search-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.search-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.search-bar {
  position: relative;
  flex: 1;
  max-width: 400px;
}

.add-button-bar {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #a0aec0;
  font-size: 0.9rem;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  background-color: white;
  transition: border-color 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: #225d72;
  box-shadow: 0 0 0 3px rgba(34, 93, 114, 0.1);
}

.search-results {
  margin-top: 1rem;
}

.search-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #4a5568;
  font-size: 0.9rem;
  margin: 0;
}

.clear-search-btn {
  color: #225d72;
  text-decoration: none;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.clear-search-btn:hover {
  background-color: #f1f5f9;
  color: #225d72;
}

.filter-bar {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.status-filter {
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background-color: white;
  font-size: 1rem;
  color: #4a5568;
  min-width: 150px;
  height: 100%;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.status-filter:focus {
  outline: none;
  border-color: #225d72;
  box-shadow: 0 0 0 3px rgba(34, 93, 114, 0.1);
}

.table-container {
  background: white;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

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

.patients-table th {
  background-color: #ffffff;
  padding: 1rem;
  text-align: left;
  font-weight: normal;
  font-size: 14px;
  color: #666666;
  border-bottom: 1px solid #e2e8f0;
}

.patients-table td {
  padding: 1rem;
  font-size: 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #1f1f1f;
}

.patients-table tr:hover {
  background-color: #f8fafc;
}

.patient-row {
  cursor: pointer;
  transition: background-color 0.2s;
}

.patient-row:hover {
  background-color: #f1f5f9;
}

.patient-name {
  font-weight: 600;
  color: #2d3748;
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
}

.status-badge.active {
  background-color: #225d72;
  color: white;
}

.status-badge.inactive {
  background-color: #e2e8f0;
  color: #4a5568;
}

.actions {
  display: flex;
  gap: 0.5rem;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
  color: #4a5568;
  text-decoration: none;
  transition: all 0.2s;
  text-align: right !important;
}

.action-btn:hover {
  background-color: #acd6a4;
  color: #2d3748;
}

.delete-btn:hover {
  background-color: #fed7d7;
  color: #e53e3e;
}

/* Medical Records Card Layout */
.medical-records-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* Teams Grid */
.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* Patient Show Page Medical Records */
.patient-show-container .medical-records-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

/* Ensure medical record cards have gap in patient show */
#medical-records-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#medical-records-list .medical-record-card {
  margin-bottom: 0;
}

.patient-show-container .medical-record-card {
  max-width: 100%;
  width: 100%;
}

.patient-show-container .card-header {
  padding: 0.75rem 1rem 0.25rem 1rem;
}

.patient-show-container .card-content {
  padding: 0.25rem 1rem 0.75rem 1rem;
}

.patient-show-container .record-detail {
  margin-bottom: 0.25rem;
}

.patient-show-container .record-detail:last-child {
  margin-bottom: 0;
}

.patient-show-container .record-detail.diagnosis {
  margin-top: 0.25rem;
  padding-top: 0.25rem;
}

.patient-show-container .record-detail:not(.diagnosis):not(.treatment) {
  color: #6b7280;
}

/* File Modal Centering */
#fileModal .modal-dialog {
  margin: 0.5rem auto;
  max-width: 60vw;
  max-height: 95vh;
  width: auto;
  display: flex;
  align-items: center;
  min-height: 95vh;
}

#fileModal .modal-content {
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  max-height: 95vh;
  display: flex;
  flex-direction: column;
}

#fileModal .modal-body {
  max-height: 80vh;
  overflow-y: auto;
  flex: 1;
}

#fileModal .file-content {
  text-align: center;
}

#fileModal .file-content img {
  max-width: 100%;
  padding: 0.5rem;
  height: auto;
  border-radius: 0;
}

#fileModal .file-content iframe {
  border-radius: 0;
}

#fileModal .modal-header {
  border-bottom: 1px solid #dee2e6;
  padding: 0.75rem 1.5rem;
}

#fileModal .modal-header .file-info {
  flex: 1;
  margin-right: 1rem;
}

#fileModal .modal-header .file-info div {
  margin-bottom: 0.125rem;
}

#fileModal .modal-header .file-info div:last-child {
  margin-bottom: 0;
}

#fileModal .modal-footer {
  padding: 0.5rem 1.5rem;
  border-top: 1px solid #dee2e6;
}

#fileModal .modal-footer .btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
}

/* Medical Records Pagination */
.medical-records-pagination {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pagination-link {
  color: #6c757d;
  text-decoration: none;
  padding: 0.375rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 0.25rem;
  transition: all 0.15s ease-in-out;
  font-size: 0.875rem;
}

.pagination-link:hover {
  color: #495057;
  background-color: #f8f9fa;
  border-color: #dee2e6;
}

.pagination-link.active {
  background-color: #f8f9fa;
  border-color: #dee2e6;
  color: #495057;
  font-weight: 500;
}

.pagination-link.disabled {
  color: #adb5bd;
  cursor: not-allowed;
  pointer-events: none;
}

.pagination-numbers {
  display: flex;
  gap: 0.25rem;
}

.pagination-link i {
  margin: 0 0.25rem;
}

.pagination-link.prev-link i {
  margin-right: 0.25rem;
  margin-left: 0;
}

.pagination-link.next-link i {
  margin-left: 0.25rem;
  margin-right: 0;
}

/* Medical Records Header Filter */
.medical-records-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.medical-records-header .header-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
}

.medical-records-header .header-text {
  flex: 1;
}

.medical-records-header .filter-bar {
  margin-left: 1rem;
}

/* Medical Record Show Page */
.medical-record-container {
  margin: 0 auto;
}

/* Medical Record Show Page Card */
.medical-record-show-card {
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.medical-record-show-card .card-header {
  display: flex;
  align-items: flex-start;
  padding: 1.5rem;
  border-bottom: none;
  background: transparent;
}

.medical-record-show-card .record-icon {
  width: 48px;
  height: 48px;
  background: #e2e8f0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  flex-shrink: 0;
}

.medical-record-show-card .record-icon i {
  font-size: 1.5rem;
  color: #64748b;
}

.medical-record-show-card .patient-info {
  flex: 1;
  margin-right: 1rem;
}

.medical-record-show-card .patient-name-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.medical-record-show-card .patient-name {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.medical-record-show-card .record-type-badge {
  display: inline-block;
  vertical-align: middle;
}

.medical-record-show-card .record-meta {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  align-items: center;
}

.medical-record-show-card .record-detail {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  color: #64748b;
  font-size: 0.875rem;
  white-space: nowrap;
  margin: 0;
  line-height: 1;
}

.medical-record-show-card .record-detail i {
  width: 16px;
  text-align: center;
}

/* Heart Rate Data Grid */
.heart-rate-data {
  padding: 1.5rem;
}

.data-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.data-card {
  background: #f8fafc;
  border-radius: 8px;
  padding: 1.5rem;
  border: 1px solid #e2e8f0;
}

.data-header {
  margin-bottom: 1rem;
}

.data-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  margin: 0;
}

.data-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.data-value {
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1;
}

.data-unit {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 400;
}

.data-value.status-normal {
  color: #059669;
}

.data-value.status-low {
  color: #dc2626;
}

.data-value.status-high {
  color: #dc2626;
}

.data-value.status-unknown {
  color: #64748b;
}

/* Notes Section */
.notes-section {
  padding: 1.5rem;
  background: #f8fafc;
}

.notes-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 0.75rem 0;
}

.notes-content {
  color: #475569;
  line-height: 1.6;
}

.medical-record-card {
  background: #edf3ec;
  border-radius: 12px;
  border: 1px solid #c8dfc3;
  transition: background-color 0.2s ease;
  cursor: pointer;
  overflow: hidden;
}

.medical-record-card:hover {
  background: #e0edde;
}

.record-icon {
  background: #d1f2eb;
  color: #0d6b47;
  width: 3rem;
  height: 3rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(13, 107, 71, 0.1);
}

.record-icon i {
  font-size: 1.25rem;
}

.patient-info {
  flex: 1;
  min-width: 0;
}

.patient-info h3 {
  margin: 0 0 0.15rem 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a202c;
}

.record-type-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.675rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0.25px;
  margin-bottom: 0.5rem;
}

.record-type-badge.heart-rate {
  background: #225B73;
  color: white;
}

.record-type-badge.respiratory-rate {
  background: #d8964c;
  color: white;
}

.record-type-badge.dental-chart {
  background: #71375f;
  color: white;
}

.record-type-badge.other {
  background: #6b7280;
  color: white;
}

.record-type-badge.default {
  background: #6b7280;
  color: white;
}

.card-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: 1rem;
}

.card-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  background: transparent;
  color: #6b7280;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.card-action-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: #374151;
}

.card-action-btn.delete-btn:hover {
  background-color: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

/* Team Card Styles */
.team-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  cursor: pointer;
  overflow: hidden;
}

.team-card:hover {
  background: #f4f2f2;
}

.team-icon {
  background: #f3f4f6;
  color: #6b7280;
  width: 3rem;
  height: 3rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  flex-shrink: 0;
}

.team-icon i {
  font-size: 1.25rem;
}

.team-info {
  flex-grow: 1;
}

.team-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 0.25rem 0;
}

.team-description {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
  line-height: 1.4;
}

.members-badge {
  display: inline-block;
  background-color: #A7D7A0;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
  width: auto;
  align-self: flex-start;
}

.members-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.member-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.member-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background-color: #f3f4f6;
  color: #374151;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}

.member-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  flex-grow: 1;
}

.member-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1f2937;
  line-height: 1.2;
}

.member-role {
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.2;
}

.more-members {
  padding-left: 2.75rem;
}

.more-text {
  font-size: 0.75rem;
  color: #6b7280;
  font-style: italic;
}

.no-members {
  color: #9ca3af;
  font-size: 0.875rem;
  font-style: italic;
  text-align: center;
  padding: 1rem 0;
}

/* Team Show Page Styles */
.team-show-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.team-info-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
  overflow: hidden;
}

.team-info-card .card-header {
  display: flex;
  align-items: flex-start;
  padding: 1.5rem;
  border-bottom: 1px solid #f3f4f6;
  background: #fafafa;
}

.team-info-card .team-icon {
  background: #f3f4f6;
  color: #6b7280;
  width: 4rem;
  height: 4rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1.5rem;
  flex-shrink: 0;
}

.team-info-card .team-icon i {
  font-size: 1.5rem;
}

.team-details {
  flex-grow: 1;
}

.team-info-card .team-name {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 0.5rem 0;
}

.team-info-card .team-description {
  font-size: 1rem;
  color: #6b7280;
  margin: 0 0 1rem 0;
  line-height: 1.5;
}

.team-stats {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #6b7280;
  font-size: 0.875rem;
}

.stat-item i {
  color: #9ca3af;
}

.team-info-card .card-content {
  padding: 1.5rem;
}

.members-section {
  margin-top: 1rem;
}

.section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 1rem 0;
}

.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.member-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: all 0.2s ease;
}

.member-card:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.member-card .member-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background-color: #e5e7eb;
  color: #374151;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 600;
  flex-shrink: 0;
}

.member-card .member-info {
  flex-grow: 1;
  min-width: 0;
}

.member-card .member-name {
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 0.25rem 0;
}

.member-card .member-role {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0 0 0.25rem 0;
}

.member-card .member-email {
  font-size: 0.75rem;
  color: #9ca3af;
  margin: 0 0 0.5rem 0;
}

.member-card .member-last-seen {
  font-size: 0.75rem;
  color: #9ca3af;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.member-card .member-last-seen i {
  font-size: 0.625rem;
}

.team-info-card .no-members {
  text-align: center;
  padding: 3rem 1rem;
  color: #6b7280;
}

.no-members-icon {
  font-size: 3rem;
  color: #d1d5db;
  margin-bottom: 1rem;
}

.team-info-card .no-members h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #374151;
  margin: 0 0 0.5rem 0;
}

.team-info-card .no-members p {
  margin: 0 0 1.5rem 0;
  color: #6b7280;
}

/* User Show Page Styles - Patient Style Layout */
.user-show-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1rem 0 1rem;
}

.user-header {
  margin-bottom: 2rem;
}

.user-header-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.user-title {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-info {
  flex-grow: 1;
}

.user-name {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 0.5rem 0;
}

.user-subtitle {
  font-size: 1rem;
  color: #6b7280;
  margin: 0;
}

.user-actions {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.user-info-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.left-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.right-column {
  display: flex;
  flex-direction: column;
}

.user-info-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 1rem 0;
}

.user-photo-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.user-avatar {
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  background-color: #e5e7eb;
  color: #374151;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 600;
  object-fit: cover;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.status-badge.active {
  background-color: #dcfce7;
  color: #166534;
}

.status-badge.inactive {
  background-color: #fef2f2;
  color: #dc2626;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f9fafb;
}

.info-item:last-child {
  border-bottom: none;
}

.info-item i {
  width: 1rem;
  color: #6b7280;
  flex-shrink: 0;
}

.info-item span {
  color: #374151;
  font-size: 0.875rem;
}

.divider {
  height: 1px;
  background-color: #e5e7eb;
  margin: 1rem 0;
}

.text-success {
  color: #059669 !important;
}

.text-danger {
  color: #dc2626 !important;
}

.user-activity-section {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.user-activity-header {
  padding: 1.5rem;
  border-bottom: 1px solid #f3f4f6;
  background: #fafafa;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.header-text {
  flex-grow: 1;
}

.user-activity-subtitle {
  color: #6b7280;
  margin: 0;
  font-size: 0.875rem;
}

.user-activity-container {
  padding: 1.5rem;
}

.activity-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.activity-section {
  background: #f9fafb;
  border-radius: 8px;
  padding: 1.25rem;
  border: 1px solid #e5e7eb;
}

.section-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 1rem 0;
}

.activity-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.activity-item i {
  width: 1rem;
  color: #6b7280;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.activity-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.activity-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.activity-value {
  font-size: 0.875rem;
  color: #374151;
  font-weight: 500;
}

.alert.alert-warning {
  background-color: #fef3c7;
  border: 1px solid #f59e0b;
  color: #92400e;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.alert.alert-warning i {
  color: #f59e0b;
}

/* Profile Form Styles */
.profile-form-card {
  background: #fafafa;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  margin: 3rem;
}

.profile-picture-section {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.profile-picture-container {
  flex-shrink: 0;
}

.profile-picture {
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  object-fit: cover;
}

.profile-picture-placeholder {
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  background-color: #e5e7eb;
  color: #374151;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 600;
}

.profile-picture-info {
  flex-grow: 1;
}

.profile-picture-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.profile-picture-description {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0 0 1rem 0;
}

.profile-upload-btn {
  display: none;
}

.profile-upload-label {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  background-color: #ffffff;
  color: #495057;
  border: 1px solid #dee2e6;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  transition: all 0.15s ease-in-out;

}

.profile-upload-label:hover {
  background-color: #e9ecef;
  color: #495057;
  border-color: #dee2e6;
}

.status-tags {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
}

.status-tag.veterinarian {
  background-color: #225B73;
  color: white;
}

.status-tag.active {
  background-color: #A7D7A0;
  color: #1f2937;
}

@media (max-width: 768px) {
  .user-info-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .user-header-content {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .user-actions {
    justify-content: flex-start;
  }
}

.action-btn.restore-btn:hover {
  background-color: #c6f6d5;
  color: #22543d;
  border-color: #c6f6d5;
}



/* Patient Show Page Styles */
.patient-show-container {
  background-color: #ffffff;
  min-height: 100vh;
  padding: 2rem 1rem;
}

.patient-header {
  background: transparent;
  margin-bottom: 1rem;
  padding: 1.5rem 0 0.5rem 0;
}

.patient-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.patient-title {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.back-link {
  color: #6c757d;
  text-decoration: none;
  font-size: 1.25rem;
  transition: color 0.15s ease-in-out;
}

.back-link:hover {
  color: #495057;
}

.patient-name {
  font-size: 2rem;
  font-weight: 700;
  color: #212529;
  margin: 0;
}

.patient-subtitle {
  color: #6c757d;
  font-size: 1rem;
  margin: 0.25rem 0 0 0;
}

.patient-actions {
  display: flex;
  gap: 0.75rem;
}

.patient-info-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.left-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.right-column {
  display: flex;
  flex-direction: column;
}

.patient-info-card {
  background: #fafafa;
  border-radius: 0.5rem;
  border: 1px solid #e9ecef;
  padding: 1rem 1.5rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #212529;
  margin-bottom: 0.25rem;
}

.patient-photo-section {
  text-align: center;
  margin-bottom: 1rem;
}

.patient-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem auto;
  background-color: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #6c757d;
  border: 3px solid #e9ecef;
}

.divider {
  height: 1px;
  background-color: #e9ecef;
  margin: 1.5rem 0;
}

/* Files & Documents Card Styles */
.files-subtitle {
  color: #6c757d;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  margin-bottom: 1rem;
}

.files-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 0.375rem;
  transition: all 0.15s ease-in-out;
  cursor: pointer;
}

.file-item:hover {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  background-color: #f8f9fa;
  border-color: #dee2e6;
}

.file-icon {
  color: #6c757d;
  font-size: 1rem;
  width: 1.25rem;
  text-align: center;
}

.file-details {
  flex: 1;
  min-width: 0;
}

.file-name {
  font-weight: 500;
  color: #495057;
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.25rem;
  max-width: 100%;
}

.file-date {
  color: #6c757d;
  font-size: 0.75rem;
}

.file-type-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 0.25rem;
  background-color: #f8f9fa;
  color: #495057;
  border: 1px solid #e9ecef;
}

.no-files {
  color: #6c757d;
  font-style: italic;
  text-align: center;
  padding: 1rem;
}

.status-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-size: 0.675rem;
  font-weight: 500;
  border-radius: 0.5rem;
}

.status-badge.active {
  background-color: #d1ecf1;
  color: #0c5460;
}

.info-item {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
  gap: 0.75rem;
}

.info-item i {
  color: #6c757d;
  width: 1rem;
  text-align: center;
}

.info-item span {
  color: #495057;
  font-weight: 500;
  font-size: 0.875rem;
}

.medical-records-section {
  background: #fafafa;
  border-radius: 0.5rem;
  border: 1px solid #e9ecef;
  padding: 1rem 1.5rem;
}

.medical-records-header {
  margin-bottom: 1.5rem;
}

.medical-records-subtitle {
  color: #6c757d;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}


.record-detail {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: #4b5563;
  line-height: 1.5;
}

.record-detail:last-child {
  margin-bottom: 0;
}


.record-detail i {
  width: 1rem;
  margin-right: 0.45rem;
  color: #6b7280;
  flex-shrink: 0;
  font-size: 0.875rem;
}

.record-detail strong {
  color: #1f2937;
  margin-right: 0.5rem;
  font-weight: 600;
}

/* Patient Form Styling */
.form-card {
  background: #fafafa;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  padding: 2rem;
  margin: 3rem;
}

.form-section {
  margin-bottom: 2rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2d3748;
  margin: 0 0 0.5rem 0;
}

.section-subtitle {
  font-size: 1rem;
  color: #4a5568;
  margin: 0 0 2rem 0;
}

.form-fields {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  align-items: start;
}

.form-row-full {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  align-items: start;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #2d3748;
  margin-bottom: 0.5rem;
}

.form-input,
.form-select,
.form-textarea {
  padding: 0.5rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background-color: white;
  font-size: 1rem;
  color: #2d3748;
  transition: border-color 0.2s ease;
  font-family: inherit;
  resize: vertical;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: #225d72;
  box-shadow: 0 0 0 3px rgba(34, 93, 114, 0.1);
}

.form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Custom dropdown options styling */
.form-select option {
  padding: 0.5rem 1rem;
  background-color: white;
  color: #2d3748;
}

.form-select option:hover {
  background-color: #acd6a4;
  color: white;
}

.form-select option:checked {
  background-color: #acd6a4;
  color: white;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
}

.btn-cancel {
  padding: 0.75rem 1.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background-color: #f7fafc;
  color: #4a5568;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-cancel:hover {
  background-color: #edf2f7;
  color: #2d3748;
  text-decoration: none;
}

.back-link {
  display: inline-flex;
  align-items: center;
  color: #4a5568;
  text-decoration: none;
  margin-right: 1rem;
  font-size: 1.25rem;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: #2d3748;
  text-decoration: none;
}

.header-content {
  display: flex;
  align-items: center;
}

.header-text {
  flex: 1;
}

/* Chart Styles */
.chart-container {
  position: relative;
  height: 300px;
  width: 100%;
}

.chart-container canvas {
  max-height: 300px;
}

/* Heart Rate Calculator Styles */
.heart-rate-calculator {
  min-height: 100vh;
  background: linear-gradient(135deg, hsl(196 54% 29% / 0.2) 0%, hsl(110 38% 74% / 0.2) 50%, hsl(196 54% 29% / 0.1) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  margin: 2rem;
}

.calculator-container {
  padding: 2rem;
  max-width: 500px;
  width: 100%;
  text-align: center;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: max-width 0.3s ease;
}

.calculator-container.results-state {
  max-width: 700px;
}

.calculator-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.calculator-state.hidden {
  display: none;
}

.instruction {
  font-size: 1.25rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.75rem;
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.4;
}

/* Beat Count Card */
.beat-count-card {
  background: #225d721a;
  border-radius: 12px;
  padding: 1rem;
  width: 100%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  margin-bottom: 1rem;
}

.beat-count-label {
  font-size: 1rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 1rem;
}

.beat-slider-container {
  position: relative;
  margin-bottom: 1rem;
}

.beat-slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(to right, #225d72 0%, #A7D7A0 100%);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.beat-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: white;
  border: 3px solid #225d72;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.beat-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: white;
  border: 3px solid #225d72;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.beat-slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.beat-count-display {
  font-size: 1.125rem;
  font-weight: 600;
  color: #225d72;
}

/* Heart Indicator */
.hrc-heart-indicator {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 1rem 0;
}

.hrc-progress-ring {
  width: 100%;
  height: 100%;
  border: 3px solid #e5e7eb;
  border-radius: 50%;
  position: relative;
}

/* Removed all CSS-based spinning rules - now handled by JavaScript inline styles */

.hrc-heart-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 4rem;
  color: #ef4444;
  z-index: 2;
}

/* Removed pulsing CSS rule - now handled by JavaScript inline styles */

/* Heart icon is now a sibling, so it won't inherit the ring's rotation */

/* Prevent any hover interference with spinning animation */
/* Animation should run continuously without hover dependency */

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}


@keyframes pulse {

  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    transform: translate(-50%, -50%) scale(1.1);
  }
}

/* Buttons */
.start-button,
.hrc-stop-button,
.save-button,
.save-to-patient-button {
  background: #225d72;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  max-width: 100%;
}

.start-button:hover {
  background: #1a4a5c;
}

.save-button {
  background-color: #ffffff;
  color: #495057;
  border: 1px solid #dee2e6;
}

.save-button:hover {
  background-color: #e9ecef;
  color: #495057;
  border-color: #dee2e6;
}

.hrc-stop-button {
  background: #dc2626;
}

.hrc-stop-button:hover {
  background: #b91c1c;
  transform: translateY(-1px);
}

.save-to-patient-button {
  background-color: #225d72;
  color: white;
  border: none;
}

.save-to-patient-button:hover {
  background-color: #1a202c;
  color: white;
}

.hrc-reset-link {
  color: #6b7280;
  text-decoration: none;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: 1px solid transparent;
}

.hrc-reset-link:hover {
  color: #225d72;
  border: 1px solid #225d72;
  background-color: rgba(34, 93, 114, 0.05);
}

/* Species Status Indicators */
.species-status {
  font-size: 1rem;
  margin-left: 0.5rem;
  flex-shrink: 0;
}

.species-status.normal {
  color: #10b981;
}

.species-status.abnormal {
  color: #ef4444;
}

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

.patient-modal {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  width: 70%;
  max-width: 600px;
  max-height: 80vh;
  overflow: hidden;
}

.patient-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1.5rem 0.5rem 1.5rem;
}

.patient-modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
}

.patient-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6b7280;
  padding: 0.25rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.patient-modal-close:hover {
  background-color: #f3f4f6;
  color: #374151;
}

.patient-modal-body {
  padding: 0.5rem 1.5rem 1.5rem 1.5rem;
  max-height: 60vh;
  overflow-y: auto;
}

.patient-modal-instruction {
  margin: 0 0 1rem 0;
  color: #6b7280;
  font-size: 0.875rem;
}

.patient-search-list {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.patient-search {
  position: relative;
  margin-bottom: 0.2rem;
}

.patient-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 0.875rem;
}

.patient-search-input {
  width: 100%;
  padding: 0.75rem 0.75rem 0.75rem 2.5rem;
  border: 1px solid #d1d5db;
  border-radius: 6px 6px 0 0;
  font-size: 0.875rem;
  transition: border-color 0.2s ease;
  background-color: #f9fafb;
}

.patient-search-input:focus {
  outline: none;
  border-color: #225d72;
  box-shadow: 0 0 0 2px rgba(34, 93, 114, 0.1);
  background-color: white;
}

.patient-list {
  max-height: 300px;
  overflow-y: auto;
}

.patient-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  border-radius: 3px;
  margin-left: 0.3rem;
  margin-right: 0.3rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.patient-item:hover {
  background-color: #A7D7A0;
}

.patient-modal-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  flex-shrink: 0;
}

.patient-modal-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.patient-modal-avatar-initial {
  font-weight: 600;
  color: #6b7280;
  font-size: 1rem;
}

.patient-details {
  flex: 1;
  min-width: 0;
}

.patient-modal-name {
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
}

.patient-modal-species {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 0.125rem;
}

.patient-modal-owner {
  font-size: 0.875rem;
  color: #9ca3af;
}

.no-patients,
.error {
  text-align: center;
  padding: 2rem;
  color: #6b7280;
}


/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  max-width: 400px;
}

.toast {
  background: white;
  border: none;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  margin-bottom: 10px;
  min-width: 300px;
  max-width: 400px;
}

.toast-header {
  background: transparent;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.75rem 1rem;
  border-radius: 8px 8px 0 0;
}

.toast-body {
  padding: 1rem;
  color: #374151;
  font-size: 0.875rem;
  line-height: 1.5;
  position: relative;
}

.toast-success {
  border-left: 4px solid #10b981;
}

.toast-success .toast-header {
  color: #10b981;
}

.toast-success .toast-header .toast-icon {
  color: #10b981;
}

.toast-error {
  border-left: 4px solid #ef4444;
}

.toast-error .toast-header {
  color: #ef4444;
}

.toast-error .toast-header .toast-icon {
  color: #ef4444;
}

.toast-warning {
  border-left: 4px solid #f59e0b;
}

.toast-warning .toast-header {
  color: #f59e0b;
}

.toast-warning .toast-header .toast-icon {
  color: #f59e0b;
}

.toast-info {
  border-left: 4px solid #225d72;
}

.toast-info .toast-header {
  color: #225d72;
}

.toast-info .toast-header .toast-icon {
  color: #225d72;
}

.toast-icon {
  margin-right: 0.5rem;
  font-size: 1rem;
}

.toast-title {
  font-weight: 600;
  font-size: 0.875rem;
  margin: 0;
}

.toast-close {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 1.25rem;
  padding: 0;
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.toast-close:hover {
  color: #374151;
}

/* Toast Animation */
.toast-enter {
  opacity: 0;
  transform: translateX(100%);
}

.toast-enter-active {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast-exit {
  opacity: 1;
  transform: translateX(0);
}

.toast-exit-active {
  opacity: 0;
  transform: translateX(100%);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Ensure toasts are visible */
.toast {
  display: block !important;
  visibility: visible !important;
}

/* Results State */
.rate-display {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.75rem;
}

.rate-number {
  font-size: 4rem;
  font-weight: 700;
  color: #225d72;
  line-height: 1;
}

.rate-label {
  font-size: 1.5rem;
  font-weight: 600;
  color: #6b7280;
}

.species-ranges {
  background: transparent;
  text-align: left;
  width: 100%;
  max-width: 100%;
}

.calculator-container.results-state .species-ranges {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}

.calculator-container.results-state .species-header {
  grid-column: 1 / -1;
  text-align: center;
}

.calculator-container.results-state .species-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  grid-column: 1 / -1;
}

.calculator-container.results-state .hrc-action-buttons {
  flex-direction: row;
  gap: 1rem;
}

.species-range-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: #225d721a;
  border-radius: 6px;
  border: 1px solid #225d7233;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  margin-bottom: 0.5rem;
}


.species-name {
  font-weight: 500;
  color: #374151;
  font-size: 0.75rem;
  flex: 1;
}

.species-range {
  color: #6b7280;
  font-size: 0.7rem;
  margin-right: 0.5rem;
  font-weight: 500;
}

.species-indicator {
  font-size: 1.25rem;
  font-weight: bold;
}


.species-header {
  font-size: 1.125rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
  text-align: center;
}

/* Removed duplicate .species-range-item rules - using the updated version above */

.species-indicator {
  font-size: 1.25rem;
  font-weight: bold;
}

.text-green-500 {
  color: #10b981;
}

.text-red-500 {
  color: #ef4444;
}

.info-card {
  background: #225d721a;
  border-radius: 12px;
  padding: 0.5rem 1.5rem;
  margin-bottom: 1rem;
}

.calculator-container.results-state .info-card {
  background: #225d721a;
  border-radius: 6px;
  border: 1px solid #225d7233;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  padding: 0.5rem 1.5rem;
  width: 100%;
  max-width: 100%;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: none;
}

.info-label {
  font-weight: 500;
  color: #374151;
}

.info-value {
  font-weight: 600 !important;
  color: #225d72 !important;
}

.hrc-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  justify-content: flex-start;
  margin-bottom: 3rem;
  min-height: 5rem;
  align-items: center;
  width: 100%;
  position: relative;
}

.hrc-action-buttons .start-button,
.hrc-action-buttons .hrc-stop-button {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 100%;
}

.hrc-action-buttons .hrc-reset-link {
  margin-top: 3rem;
}

/* Responsive Design */
@media (max-width: 640px) {
  .heart-rate-calculator {
    padding: 1rem;
  }

  .calculator-container {
    padding: 2rem;
  }

  .rate-number {
    font-size: 3rem;
  }

  .hrc-action-buttons {
    flex-direction: column;
    align-items: center;
  }

  .start-button,
  .hrc-stop-button,
  .save-button,
  .save-to-patient-button {
    width: 100%;
    max-width: 100%;
  }
}

/* Respiratory Rate Calculator Styles */
.respiratory-rate-calculator {
  min-height: 100vh;
  background: linear-gradient(135deg, hsl(196 54% 29% / 0.2) 0%, hsl(110 38% 74% / 0.2) 50%, hsl(196 54% 29% / 0.1) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  margin: 2rem;
}