@import url("variables.5b1f13a0a9b9.css");

:root {
  --bs-primary: #96c2b7 !important;
  --bs-primary-lighter: #aad3cd !important;
  --bs-darker: #54928f !important;
  --bs-primary-bg: #dcebebda !important;
  --gradient-bg-primary: radial-gradient(circle at center, #fafbfc 0%, #f2f8f8 30%, #e8f1f1 100%) !important;
  --gradient-primary: linear-gradient(135deg, #bfe2d2 0%, #4d8888 100% 100%) !important;
  --gradient-primary-hover: linear-gradient(135deg, #7fad98 0%, #3a7070 100% 100%) !important;
  --gradient-primary-active: linear-gradient(135deg, #8ab9a4 0%, #244646 100%) !important;
  /* Custom primary color - override variables.css */
}

/* Modern Typography - Lato Font */
* {
  font-family: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
  font-family: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.btn {
  font-family: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  border: none !important;
  padding: 0.5rem 1.2rem 0.5rem;
}

.btn-link {
  min-width: 0 !important;
}
/* Additional typography refinements for Lato */
strong,
b {
  font-weight: 700;
}

.fw-bold {
  font-weight: 700 !important;
}

.fw-medium {
  font-weight: 500 !important;
}

.navbar-brand {
  font-weight: 900 !important;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #d5f3ee 0%, #87bfb7 100%);
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.primary-light {
  color: var(--bs-primary-lighter) !important;
}

/* Force nav-pills active link background color to custom */
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
  background-color: var(--bs-primary) !important;
  color: #fff !important;
}

.btn-primary {
  background: var(--gradient-primary) !important;
  border-color: none !important;
  color: white !important;
}

.btn-primary:hover {
  background: var(--gradient-primary-hover) !important;
  border-color: var(--bs-primary) !important;
  color: white !important;
}

.btn-primary:active,
.btn-primary.active {
  background: var(--gradient-primary-active) !important;
  border-color: var(--bs-primary) !important;
  color: white !important;
}

.btn-outline-primary {
  color: var(--bs-primary) !important;
  border-color: var(--bs-primary) !important;
  background-color: transparent !important;
}

.btn-outline-primary:hover {
  background: var(--gradient-primary) !important;
  border-color: var(--bs-primary) !important;
  color: white !important;
}

.btn-outline-primary:active,
.btn-outline-primary.active {
  background: var(--gradient-primary) !important;
  border-color: var(--bs-primary) !important;
  color: white !important;
}

body {
  background-color: rgb(248, 249, 250) !important;
}

/* Main content wrapper for non-authenticated users */
.main-content-wrapper {
  min-height: calc(100vh - 100px);
  overflow-x: hidden;
  padding: 0 12px;
  box-sizing: border-box;
}

.btn-outline-secondary {
  color: var(--bs-primary) !important;
  border-color: var(--bs-primary) !important;
  background-color: transparent !important;
}

.btn-outline-secondary:hover {
  background: var(--gradient-primary) !important;
  border-color: var(--bs-primary) !important;
  color: white !important;
}

.btn-outline-secondary:active,
.btn-outline-secondary.active {
  background: var(--gradient-primary) !important;
  border-color: var(--bs-primary) !important;
  color: white !important;
}

/* Compact button variants - styled as links */
.btn-xs {
  border: none !important;
  background: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  color: var(--bs-primary) !important;
  text-decoration: none !important;
  font-weight: 400 !important;
  font-size: 0.9rem !important;
}

.btn-xs:hover {
  color: var(--bs-primary) !important;
  opacity: 0.8;
}

.btn-compact {
  border: none !important;
  background: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  color: var(--bs-primary) !important;
  text-decoration: none !important;
  font-weight: 400 !important;
  font-size: 0.9rem !important;
}

.btn-compact:hover {
  color: var(--bs-primary) !important;
  opacity: 0.8;
}

.btn-compact-save {
  border: none !important;
  background: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  color: var(--bs-primary) !important;
  text-decoration: none !important;
  font-weight: 400 !important;
  font-size: 0.9rem !important;
}

.btn-compact-save:hover {
  color: var(--bs-primary) !important;
  opacity: 0.8;
}

/* Button group styling */
.btn-group {
  display: inline-flex;
  margin-top: 1rem;
  gap: 0;
}

.btn-group.big {
  gap: 0;
}

.btn-group.big .btn {
  border: 2px solid var(--bs-primary) !important;
  padding: 0.65rem 1.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  cursor: pointer;
  border-radius: 0 !important;
}

.btn-group.big .btn:first-child {
  border-radius: 0.5rem 0 0 0.5rem !important;
}

.btn-group.big .btn:last-child {
  border-radius: 0 0.5rem 0.5rem 0 !important;
}

.btn-group.big .btn + .btn {
  border-left: none;
}

.btn-group.bigger {
  display: flex;
  justify-content: center;
  width: 100%;
  gap: 0;
}

.btn-group.bigger .btn {
  border: 2px solid var(--bs-primary) !important;
  padding: 0.75rem 2.25rem;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s ease;
  cursor: pointer;
  border-radius: 0 !important;
}

.btn-group.bigger .btn:first-child {
  border-radius: 0.5rem 0 0 0.5rem !important;
}

.btn-group.bigger .btn:last-child {
  border-radius: 0 0.5rem 0.5rem 0 !important;
}

.btn-group.bigger .btn + .btn {
  border-left: none;
}

.btn-group .btn {
  border: 1px solid var(--bs-primary) !important;
  padding: 0.5rem 1.5rem;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  cursor: pointer;
  border-radius: 0 !important;
}

.btn-group .btn:first-child {
  border-radius: 1.5rem 0 0 1.5rem !important;
}

.btn-group .btn:last-child {
  border-radius: 0 1.5rem 1.5rem 0 !important;
}

.btn-group .btn + .btn {
  border-left: none;
}

.btn.left {
  border-radius: 1.5rem 0 0 1.5rem !important;
}

.btn.right {
  border-radius: 0 1.5rem 1.5rem 0 !important;
}

/* Appointment and Contact buttons as outline */
.btn-appointment {
  background: var(--gradient-primary) !important;
  border-color: var(--bs-primary) !important;
  color: white !important;
}

.btn-appointment:hover {
  background: var(--gradient-primary-hover, var(--gradient-primary)) !important;
  border-color: var(--bs-primary) !important;
  color: white !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(67, 175, 175, 0.3);
}

.btn-contact {
  color: var(--bs-primary) !important;
  border-color: var(--bs-primary) !important;
  background-color: transparent !important;
}

.btn-contact:hover {
  background: var(--gradient-primary) !important;
  border-color: var(--bs-primary) !important;
  color: white !important;
}

.btn.btn-small {
  padding: 0.25rem 0.5rem !important;
  font-size: 0.875rem !important;
  border-radius: 1.5rem !important;
}

header {
  align-content: center;
  border-bottom: 1px solid #dde3e2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

header a {
  color: var(--bs-primary) !important;
}

footer {
  font-size: 1rem;
}

footer a {
  color: var(--bs-primary) !important;
}

footer a:hover {
  color: var(--bs-darker) !important;
}

footer a:active {
  color: var(--bs-darker) !important;
}

/* Mobile footer - keep same layout but smaller font */
@media (max-width: 768px) {
  footer {
    font-size: 0.85rem;
  }

  footer h5 {
    font-size: 1rem;
  }

  footer .navbar-brand {
    font-size: 18px !important;
  }

  footer p {
    font-size: 0.85rem;
  }

  footer ul li {
    font-size: 0.85rem;
  }

  /* Keep columns layout on mobile */
  footer .col-md-3 {
    flex: 0 0 50%;
    max-width: 50%;
    margin-bottom: 1.5rem;
  }

  footer .row {
    display: flex;
    flex-wrap: wrap;
  }
}

.btn-outline-primary:hover {
  color: white !important;
}

.btn-outline-primary {
  border: solid 1px var(--bs-primary) !important;
}

.btn {
  min-width: 120px;
  border-radius: 1.5rem !important;
}

.btn-primary:hover {
  background-color: var(--bs-primary) !important;
  border-color: var(--bs-primary) !important;
}

.btn-sm {
  border-radius: 1.5rem !important;
}

/* Fix navbar elements margin */
.navbar .btn,
.navbar .navbar-text,
.navbar span {
  margin-bottom: 0 !important;
}

.navbar {
  --bs-navbar-padding-y: 0 !important;
}

/* Header and Navigation Styles */
header .px-3 {
  padding-left: 3rem !important;
  padding-right: 3rem !important;
}

@media (max-width: 900px) {
  .margin-top-mobile {
    margin-top: 70px !important;
  }
}

@media (max-width: 768px) {
  header .px-3 {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }
}

@media (max-width: 1200px) {
  .services-buttons {
    padding: 0;
  }
}

@media (max-width: 576px) {
  header .px-3 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

/* Modern Admin Layout */
.admin-layout {
  display: flex;
  min-height: 100vh;
  padding: 80px 0 0 0;
}

/* Sidebar bez tła */
.admin-sidebar {
  width: 245px;
  height: calc(100vh - 80px);
  min-height: calc(100vh - 80px);
  position: sticky;
  top: 80px;
  align-self: flex-start;
  background-color: transparent;
  border: none;
  border-right: 1px solid #dde3e2;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.05);
  border-radius: 0;
  overflow-y: auto;
  flex-shrink: 0;
  margin-right: 10px;
  transition: transform 0.3s ease;
}

/* Hamburger Menu Button */
.hamburger-menu {
  display: none;
  position: fixed;
  top: 100px;
  left: 20px;
  z-index: 1001;
  background-color: var(--bs-primary);
  color: white;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  padding: 10px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

.hamburger-menu:hover {
  background-color: var(--bs-darker);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(67, 175, 175, 0.3);
}

.hamburger-menu ion-icon {
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* Hamburger menu in header (mobile only) */
.hamburger-menu-header {
  display: none;
  background-color: var(--bs-primary);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  padding: 8px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  margin-right: 15px;
  flex-shrink: 0;
}

.hamburger-menu-header:hover {
  background-color: var(--bs-darker);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(67, 175, 175, 0.3);
}

.hamburger-menu-header ion-icon {
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* Overlay dla mobilnego menu */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* Sidebar Categories */
.sidebar-category {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 1rem 1rem 0.5rem 1rem;
  margin-top: 1rem;
  opacity: 0.9;
}

.sidebar-category:first-child {
  margin-top: 0;
}

.admin-sidebar .nav-link {
  color: #333;
  padding: 0.5rem 1rem 0.5rem 0;
  margin: 0;
  border-radius: 2rem;
  font-weight: 400;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
  transition: all 0.2s ease;
  border: none;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.admin-sidebar .nav-link:hover {
  color: var(--bs-primary);
  font-weight: 700;
}

.admin-sidebar .nav-link:active,
.admin-sidebar .nav-link.active {
  color: var(--bs-primary);
  font-weight: 700;
}

/* Sidebar logout button - hidden on desktop, shown on mobile */
.sidebar-logout {
  display: none;
  margin-top: auto;
  padding: 1rem;
  border-top: 1px solid #dee2e6;
}

.sidebar-logout .btn {
  border-radius: 1.5rem;
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-logout .btn ion-icon {
  font-size: 1.2rem;
}

.nav-item .nav-link:active {
  color: var(--bs-primary);
  font-weight: 700;
}

.admin-sidebar .nav-link i,
.admin-sidebar .nav-link ion-icon {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  padding: 6px !important;
  line-height: 1 !important;
  border-radius: 50% !important;
  background-color: var(--bs-primary-lighter) !important;
  color: white !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  margin-right: 0.75rem;
  transition: background-color 0.2s ease;
  box-sizing: border-box !important;
}

.admin-sidebar .nav-link ion-icon {
  transform: scale(0.6) !important;
}

.admin-sidebar .nav-link:hover i,
.admin-sidebar .nav-link:hover ion-icon {
  background-color: var(--bs-primary);
}

/* Content area adjustments */
.admin-content {
  flex: 1;
  padding: 1rem;
  min-height: calc(100vh - 100px);
  background-color: #fafafa00;
  overflow-x: visible;
  overflow-y: visible;
  margin: 1rem;
  border-radius: 1.3rem;
  /* box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); */

  .admin-content_visit-card {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 1.7rem !important;
  }
}

.patient-info-box {
  border-radius: 1.5rem;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.141);
  margin-bottom: 1rem;
}

/* Mobile responsiveness */
@media (max-width: 1150px) {
  .admin-layout {
    padding: 90px 0 0 20px;
  }

  /* Pokaż hamburger menu w headerze */
  .hamburger-menu-header {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Ukryj stary hamburger menu */
  .hamburger-menu {
    display: none !important;
  }

  /* Ukryj sidebar domyślnie */
  .admin-sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 260px;
    height: 100vh;
    background-color: white;
    z-index: 1000;
    margin-right: 0;
    padding-top: 100px;
    padding-bottom: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease;
    overflow-y: auto;
  }

  /* Show logout button in sidebar on mobile */
  .sidebar-logout {
    display: block;
  }

  /* Sidebar otwarty */
  .admin-sidebar.active {
    left: 0;
  }

  /* Dim hamburger when sidebar is open but keep it clickable */
  body:has(.admin-sidebar.active) .hamburger-menu-header {
    opacity: 1;
    transition: opacity 0.2s ease;
  }

  /* Zwiększ padding content area gdy sidebar jest ukryty */
  .admin-content {
    margin-left: 20px;
  }
}

@media (max-width: 1150px) {
  .admin-layout {
    padding: 80px 4px 0 4px;
  }

  .admin-content {
    margin: 0px 4px 0 4px;
    padding: 0.5rem;
  }

  .patient-info-box {
    padding: 1rem;
  }
}

@media (max-width: 576px) {
  .hamburger-menu-header {
    width: 36px;
    height: 36px;
    margin-right: 10px;
  }

  .hamburger-menu-header ion-icon {
    font-size: 1rem;
  }

  .navbar-brand {
    font-size: 20px !important;
  }

  .admin-sidebar {
    width: 240px;
    left: -260px;
  }

  .patient-info-box {
    padding: 0.75rem !important;
  }

  .admin-sidebar .nav-link {
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
  }
}

/* Table Styling */
.table {
  font-weight: 400;
  font-size: 0.9rem;
}

.table thead th {
  font-weight: 600;
  letter-spacing: -0.01em;
  border-bottom: 2px solid var(--bs-primary);
  background-color: transparent;
  color: #333;
}

.table tbody td {
  font-weight: 400;
  border-bottom: 1px solid rgba(67, 175, 175, 0.1);
  vertical-align: middle;
}

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

.table .fw-bold {
  font-weight: 600;
}

/* Badge Status Styling */
.badge-status {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 1.5rem;
  letter-spacing: 0.01em;
}

.badge-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.badge-danger {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.badge-status ion-icon {
  font-size: 1rem;
}

/* Custom Details/Summary Styling */
.custom-details {
  cursor: pointer;
}

.custom-summary {
  display: inline-flex;
  align-items: center;
  color: var(--bs-primary);
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  list-style: none;
  padding: 0.25rem 0;
}

.custom-summary::-webkit-details-marker {
  display: none;
}

.custom-summary:hover {
  color: var(--bs-darker);
  text-decoration: underline;
}

.custom-summary ion-icon {
  font-size: 1.1rem;
}

.questions-list {
  margin-top: 0.75rem;
  margin-bottom: 0;
  padding-left: 1.5rem;
  list-style-type: disc;
}

.questions-list li {
  margin-bottom: 0.5rem;
  color: #555;
  font-size: 0.9rem;
  line-height: 1.5;
}

.questions-list li:last-child {
  margin-bottom: 0;
}

/* Alert Styling Enhancements */
.alert {
  border-radius: 0.5rem;
  border-left: 4px solid;
}

.alert-info {
  border-left-color: var(--bs-primary);
  background-color: rgba(67, 175, 175, 0.1);
  border-color: rgba(67, 175, 175, 0.2);
}

.alert ion-icon {
  flex-shrink: 0;
}

/* Button Group Enhancements */
.btn-group-sm > .btn,
.btn-group-sm .btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  min-width: auto;
  border-radius: 0 !important;
}

.btn-group-sm > .btn:first-child,
.btn-group-sm .btn:first-child {
  border-radius: 1.5rem 0 0 1.5rem !important;
}

.btn-group-sm > .btn:last-child,
.btn-group-sm .btn:last-child {
  border-radius: 0 1.5rem 1.5rem 0 !important;
}

.btn-group .btn + .btn {
  margin-left: -1px;
}

.btn-outline-primary ion-icon,
.btn-outline-danger ion-icon {
  font-size: 1rem;
  vertical-align: middle;
}

/* Responsive Table Container */
.table-responsive {
  border-radius: 1rem;
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-height: calc(100vh - 300px);
}

/* Custom scrollbar for tables */
.table-responsive::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: var(--bs-primary-lighter);
  border-radius: 4px;
  transition: background 0.2s ease;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: var(--bs-primary);
}

/* Sticky table header */
.table-responsive thead {
  position: sticky;
  top: 0;
  background-color: #ffffff00;
  z-index: 10;
}

@media (max-width: 768px) {
  .table-responsive {
    max-height: calc(100vh - 250px);
  }
}

/* Text Muted with Icons */
.text-muted {
  display: inline-flex;
  align-items: center;
}

.text-muted ion-icon {
  font-size: 1rem;
}

/* Staff Info in Tables */
.staff-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.staff-info strong {
  font-weight: 600;
  color: #333;
}

.staff-info small {
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  color: #6c757d;
}

.staff-info small ion-icon {
  vertical-align: middle;
}

/* Frameless Icon Button */
.btn-icon-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: none;
  border: none;
  color: var(--bs-primary) !important;
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none !important;
  font-weight: 500;
}

.btn-icon-edit:hover {
  color: var(--bs-darker) !important;
  transform: scale(1.05);
  background-color: rgba(67, 175, 175, 0.1);
  border-radius: 1.5rem;
  text-decoration: none !important;
}

.btn-icon-edit:active {
  transform: scale(0.95);
  color: var(--bs-darker) !important;
}

.btn-icon-edit:focus {
  outline: none;
  color: var(--bs-primary) !important;
  text-decoration: none !important;
}

.btn-icon-edit ion-icon {
  font-size: 1.2rem;
  color: inherit;
}

.btn-icon-edit span {
  font-size: 0.9rem;
  color: inherit;
}

.btn-icon-edit.text-danger {
  color: #dc3545 !important;
}

.btn-icon-edit.text-danger:hover {
  color: #a71d2a !important;
  background-color: rgba(220, 53, 69, 0.1);
}

/* Page Title Styles */
.admin-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
}

.page-title-border {
  margin-bottom: 2rem;
}

.centered-admin-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.4rem;
  background-color: #fafafa00;
  overflow-x: auto;
  margin: 1rem;
  border-radius: 1.3rem;
}

.centered-admin-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
}

/* Icon Circle - Standalone Class */
.icon-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--bs-primary-lighter);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  flex-shrink: 0;
}

.icon-circle ion-icon {
  color: white;
  font-size: 1.3rem;
}

/* Section Subtitle Styles */
.admin-content h3,
.admin-content h5 {
  font-size: 1.2rem;
  font-weight: 700;
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 80px 40px;
}

.admin-content h3 ion-icon,
.admin-content h5 ion-icon {
  color: var(--bs-primary-lighter);
}

/* Modal with Square Corners */
.modal-square .modal-content {
  border: 2px solid var(--bs-primary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.modal-square .modal-header {
  color: var(--bs-primary-lighter);
  border-bottom: 2px solid;
  padding: 1.25rem 1.5rem;
}

.modal-square .modal-title {
  font-weight: 600;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  color: #333;
}

.modal-square .modal-title .icon-circle {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background-color: var(--bs-primary-lighter);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.modal-square .modal-title .icon-circle ion-icon {
  color: white;
  font-size: 1.2rem;
}

.modal-square .modal-header .btn-close {
  opacity: 0.8;
  color: var(--bs-primary);
}

.modal-square .modal-header .btn-close:hover {
  opacity: 1;
}

.modal-square .modal-body {
  padding: 1.5rem;
  max-height: 70vh;
  overflow-y: auto;
}

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

/* Button styles in modal */
.modal-square .btn {
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  min-width: 100px;
}

.modal-square .btn-primary {
  background: var(--gradient-primary) !important;
  border-color: var(--bs-primary) !important;
  color: white !important;
}

.modal-square .btn-primary:hover {
  background: var(--gradient-primary-hover) !important;
  border-color: var(--bs-primary) !important;
  color: white !important;
}

.modal-square .btn-outline-primary {
  color: var(--bs-primary) !important;
  border-color: var(--bs-primary) !important;
  background-color: transparent !important;
}

.modal-square .btn-outline-primary:hover {
  background: var(--gradient-primary) !important;
  border-color: var(--bs-primary) !important;
  color: white !important;
}

/* Form controls in modal */
.modal-square input[type="text"],
.modal-square input[type="email"],
.modal-square input[type="number"],
.modal-square textarea,
.modal-square select {
  border-radius: 0.5rem !important;
}

.modal-square input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

/* Global form control styling */
.form-control {
  border-radius: 0.5rem !important;
}

textarea.form-control {
  border-radius: 0.5rem !important;
}

select.form-control {
  border-radius: 0.5rem !important;
}

/* Checkbox styles with primary color */
.form-check-input:checked {
  background-color: var(--bs-primary) !important;
  border-color: var(--bs-primary) !important;
}

.form-check-input:focus {
  border-color: var(--bs-primary-lighter) !important;
  box-shadow: 0 0 0 0.25rem rgba(67, 175, 175, 0.25) !important;
}

.modal-square .form-check-input:checked {
  background-color: var(--bs-primary) !important;
  border-color: var(--bs-primary) !important;
}

/* Spinner in modal */
.modal-square .spinner-border {
  color: var(--bs-primary) !important;
}

/* Patient Info Box - rounded with shadow */
.patient-info-box {
  border-radius: 1.5rem;
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  margin-bottom: 1rem;
}

/* Card Styling - Rounded */
.card {
  border-radius: 1rem !important;
  border: 1px solid #dee2e6;
  box-shadow: 0 2px 4px rgba(70, 70, 70, 0.08);
}

.card-primary {
  border-radius: 1.5rem !important;
  border: 2px solid var(--bs-primary);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  background-color: var(--gradient-bg-primary) !important;
}

.card-primary .card-header {
  background: var(--gradient-bg-primary);
  border-bottom: 1px solid #dee2e6;
  border-radius: 1.5rem 1.5rem 0 0 !important;
}

.card-primary .card-body {
  border-radius: 0 0 1.5rem 1.5rem !important;
  background: var(--gradient-bg-primary);
}

/* Small icon circles for card headers */
.card-header .icon-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: var(--bs-primary-lighter);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-header .icon-circle ion-icon {
  color: white;
  font-size: 1rem;
}

/* AI Badge - positioned absolute */
.ai-badge {
  position: absolute;
  top: 5px;
  margin-left: 10px;
  z-index: 100;
  color: var(--bs-primary);
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ai-badge .icon-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: var(--bs-primary-lighter);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  animation: pulse-ai 2s ease-in-out infinite;
}

.ai-badge .icon-circle ion-icon {
  color: white;
  font-size: 1rem;
  animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes pulse-ai {
  0%,
  100% {
    box-shadow: 0 2px 8px rgba(67, 175, 175, 0.3);
  }
  50% {
    box-shadow: 0 2px 12px rgba(67, 175, 175, 0.5);
  }
}

@keyframes sparkle {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

/* Hide user greeting text on mobile */
@media (max-width: 768px) {
  .user-greeting-text {
    display: none;
  }

  .lang-switch-group {
    margin-right: 0.5rem !important;
  }

  div.container {
    max-width: 780px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Reduce header height on mobile */
  header {
    height: 70px !important;
    min-height: 70px !important;
  }

  /* On mobile: hide settings icon, logout button — both are in the sidebar */
  .header-auth-buttons .btn-link,
  .header-auth-buttons .btn-outline-primary {
    display: none !important;
  }

  /* Reduce all font sizes by 20% on mobile */
  body {
    font-size: 0.8rem;
  }

  h1 {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.44rem;
  }

  h3 {
    font-size: 1.28rem;
  }

  h4 {
    font-size: 1.12rem;
  }

  h5 {
    font-size: 0.96rem;
  }

  h6 {
    font-size: 0.8rem;
  }

  .btn {
    font-size: 0.8rem;
  }

  .form-control,
  .form-select {
    font-size: 0.8rem;
  }

  .badge {
    font-size: 0.64rem;
  }

  .card-title {
    font-size: 1.5rem;
  }

  .card-text,
  p {
    font-size: 0.8rem;
  }

  .table {
    font-size: 0.8rem;
  }

  .nav-link {
    font-size: 0.8rem;
  }

  .small,
  small {
    font-size: 0.7rem;
  }
}

/* ====================================
   Custom Select/Form-Select Arrow Icon
   ===================================== */
/* Replace Bootstrap SVG arrow with custom styling for all select elements */
select,
.form-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 2.5rem;
}

/* Remove default browser arrow */
select::-ms-expand {
  display: none;
}

/* Custom arrow icon for form-select - using SVG in primary color */
.form-select {
  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='%237fbfbf' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.1rem auto;
  padding-right: 2.5rem;
  background-color: #fff;
}

.form-select:hover {
  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='%23549392' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
}

.form-select:focus {
  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='%237fbfbf' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
}

/* --- Language Switcher Toggle --- */
.lang-switch-group {
    gap: 0 !important;
}

.lang-switch-group form:first-child .lang-switch-btn {
    border-radius: 6px 0 0 6px !important;
    border-right: none !important;
}

.lang-switch-group form:last-child .lang-switch-btn {
    border-radius: 0 6px 6px 0 !important;
}

.lang-switch-btn {
    font-size: 0.6rem !important;
    padding: 0.05rem 0.12rem !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    line-height: 1.3 !important;
    min-width: 0 !important;
    width: auto !important;
    border-width: 1px !important;
    box-shadow: none !important;
}

.lang-switch-btn.lang-inactive {
    background: transparent !important;
    border: 1px solid rgba(13, 110, 253, 0.3) !important;
    color: var(--bs-primary) !important;
    opacity: 0.7;
}

.lang-switch-btn.lang-inactive:hover {
    border-color: rgba(13, 110, 253, 0.6) !important;
    opacity: 1;
}

.lang-switch-btn.lang-active {
    cursor: default;
    border: 1px solid var(--bs-primary) !important;
}
