/* ==========================================================================
   Clinica One theme: "clean clinical"
   A restyling layer over AdminLTE 2 / Bootstrap 3. Loaded LAST in
   layouts/admin.blade.php (and on the login page), so it only overrides
   colors, type, radii and shadows; sizes stay AdminLTE's (50px header,
   230px sidebar) so no page layout shifts. Remove the <link> to revert.
   ========================================================================== */

:root {
  --brand: #20b0f0;          /* logo background */
  --brand-soft: #e6f6fd;
  --primary: #0b7db5;        /* buttons/links: white text passes AA */
  --primary-hover: #096892;
  --ink: #1f2937;
  --ink-muted: #6b7280;
  --line: #e5e7eb;
  --page: #f4f6f9;
  --card: #ffffff;
  --success: #15924a;
  --warning: #d97706;
  --danger: #dc2626;
  --info: #0b7db5;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .08);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .16);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

/* ---- Base ---------------------------------------------------------------- */
body,
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.main-header .logo,
.btn, .form-control, .table, .modal, .popover, .tooltip {
  font-family: var(--font);
}
body {
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
}
a { color: var(--primary); }
a:hover, a:focus { color: var(--primary-hover); }
.content-wrapper, .right-side { background: var(--page); }
::selection { background: var(--brand-soft); }

/* ---- Top bar ------------------------------------------------------------- */
.skin-blue .main-header .navbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}
/* ---- brand (logo block): vector mark + wordmark on white, matching the light sidebar ---- */
.skin-blue .main-header .logo,
.skin-blue .main-header .logo:hover {
  background: #fff;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.main-header .logo.brand { text-align: left; padding: 0 16px; }
.main-header .logo.brand .logo-lg { display: flex; align-items: center; gap: 10px; height: 50px; }
.main-header .logo.brand .logo-mini { height: 50px; align-items: center; justify-content: center; }
.sidebar-mini.sidebar-collapse .main-header .logo.brand .logo-mini { display: flex; }
.brand-mark { width: 32px; height: 32px; flex: 0 0 32px; filter: drop-shadow(0 2px 4px rgba(11, 125, 181, .3)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text b { font-size: 17px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.brand-text small { font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); margin-top: 3px; }
.main-header .logo.brand:hover .brand-mark { transform: rotate(-4deg); transition: transform .2s; }
.sidebar-mini.sidebar-collapse .main-header .logo.brand { padding: 0; }

.skin-blue .main-header .navbar .sidebar-toggle { color: var(--ink-muted); }
.skin-blue .main-header .navbar .sidebar-toggle:hover { background: var(--page); color: var(--ink); }

/* context next to the menu toggle: clinic + date */
.main-header .navbar > .hb-context { float: left; display: flex; flex-direction: column; justify-content: center; height: 50px; line-height: 1.2; padding-left: 4px; }
.hb-context b { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.hb-context span { font-size: 12px; color: var(--ink-muted); }

/* header icon buttons (calendar, messages, notifications, help) */
.skin-blue .main-header .navbar .hb-icon > a,
.skin-blue .main-header .navbar .nt-menu > a {
  width: 40px; height: 40px; margin: 5px 2px; padding: 0 !important;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; font-size: 17px; color: var(--ink-muted); position: relative;
}
.skin-blue .main-header .navbar .hb-icon > a:hover,
.skin-blue .main-header .navbar .hb-icon.open > a,
.skin-blue .main-header .navbar .nt-menu.open > a { background: var(--page); color: var(--ink); }
.skin-blue .main-header .navbar .hb-icon .nt-badge,
.skin-blue .main-header .navbar .nt-menu .nt-badge { top: 3px; right: 1px; }
.navbar-custom-menu > .navbar-nav > li.user-menu { margin-left: 8px; padding-left: 8px; border-left: 1px solid var(--line); }
/* AdminLTE's focus state turns header links white on grey; keep them readable */
.skin-blue .main-header .navbar .nav > li > a:focus,
.skin-blue .main-header .navbar .nav > li > a:active { background: var(--page); color: var(--ink); }
.hb-caret { margin-left: 4px; color: var(--ink-muted); font-size: 13px; }

/* account dropdown */
.navbar-nav > .user-menu > .dropdown-menu.hb-user-panel { width: 270px; padding: 6px !important; }
.hb-user-panel > li > a { display: flex !important; align-items: center; gap: 8px; padding: 9px 10px !important; border-radius: 8px; color: var(--ink) !important; font-weight: 500; }
.hb-user-panel > li > a:hover { background: var(--page) !important; }
.hb-user-panel > li > a .fa { color: var(--ink-muted); }
.hb-user-panel > li > a.hb-signout, .hb-user-panel > li > a.hb-signout .fa { color: var(--danger) !important; }
.hb-user-panel > .divider { margin: 6px 4px; background: var(--line); }
.hb-user-head { display: flex; align-items: center; gap: 12px; padding: 10px 10px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.hb-user-head b { display: block; font-size: 14px; }
.hb-user-head small { color: var(--ink-muted); font-size: 12px; }
.hb-user-avatar {
  flex: 0 0 42px; width: 42px; height: 42px; border-radius: 50%; object-fit: cover;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #20b0f0, #0b7db5); color: #fff; font-weight: 700; font-size: 14px;
}

/* sidebar account card */
.sb-account {
  display: flex; align-items: center; gap: 12px;
  margin: 12px 10px 10px; padding: 12px;
  border-radius: 14px; background: linear-gradient(135deg, #f5fbfe, #eaf6fc);
  border: 1px solid #d6eefa; color: var(--ink) !important;
  transition: box-shadow .15s, border-color .15s;
}
.sb-account:hover, .sb-account:focus { text-decoration: none; border-color: #9fd8f3; box-shadow: 0 4px 14px rgba(11, 125, 181, .12); }
.sb-avatar {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #20b0f0, #0b7db5); color: #fff; font-weight: 700; font-size: 15px;
  box-shadow: 0 0 0 3px #fff;
}
.sb-info { min-width: 0; line-height: 1.3; }
.sb-info b {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 13.5px; line-height: 1.25; white-space: normal; word-break: break-word;
}
.sb-role { display: inline-block; margin: 2px 0 3px; padding: 1px 8px; border-radius: 999px; background: #fff; color: var(--primary); font-size: 11px; font-weight: 700; border: 1px solid #cfe9f6; }
.sb-info small { display: block; color: var(--ink-muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-mini.sidebar-collapse .sb-account { padding: 6px; margin: 10px 3px; justify-content: center; background: transparent; border-color: transparent; }
.sidebar-mini.sidebar-collapse .sb-info { display: none; }
.sidebar-mini.sidebar-collapse .sb-avatar { flex-basis: 36px; width: 36px; height: 36px; font-size: 12px; }

/* messages dropdown */
.msg-avatar {
  flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #e6f6fd, #c9ebfb); color: var(--primary); font-weight: 700; font-size: 12.5px;
}
.msg-role { font-style: normal; font-weight: 600; font-size: 11px; color: var(--ink-muted); }
.msg-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: 0 0 auto; }
.msg-meta small { color: var(--ink-muted); font-size: 11.5px; }
.msg-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }

/* legacy: product-name div some old layouts still render */
.main-header .navbar > div:not(.navbar-custom-menu):not(.hb-context) {
  color: var(--ink) !important;
  font-style: normal !important;
  font-weight: 600 !important;
  font-size: 18px !important;
  margin-top: 13px !important;
  letter-spacing: -.01em;
}
.skin-blue .main-header .navbar .nav > li > a { color: var(--ink); font-weight: 500; }
.skin-blue .main-header .navbar .nav > li > a:hover,
.skin-blue .main-header .navbar .nav .open > a,
.skin-blue .main-header .navbar .nav .open > a:hover,
.skin-blue .main-header .navbar .nav .open > a:focus { background: var(--page); color: var(--ink); }
/* uploaded profile photo replaces the generic user icon */
.navbar-nav > .user-menu.has-photo > a:before { display: none; }
.navbar-nav > .user-menu > a > .user-image {
  float: none; width: 28px; height: 28px; margin: -4px 8px -4px 0;
  border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--brand-soft);
}

/* ---- notification bell ---- */
.skin-blue .main-header .navbar .nt-menu > a { font-size: 17px; color: var(--ink-muted); padding: 15px 14px; position: relative; }
.skin-blue .main-header .navbar .nt-menu > a:hover { color: var(--ink); }
.nt-badge {
  position: absolute; top: 9px; right: 6px;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: #dc2626; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px #fff;
}
.nt-badge[hidden] { display: none; }
.nt-panel {
  width: 380px; max-width: calc(100vw - 20px); padding: 0 !important;
  border: 1px solid var(--line) !important; border-radius: 14px !important;
  box-shadow: var(--shadow-lg) !important; overflow: hidden; margin-top: 6px !important;
}
.nt-head { display: flex; align-items: baseline; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.nt-head b { font-size: 15px; }
.nt-sub { color: var(--ink-muted); font-size: 12px; }
.nt-list { max-height: 420px; overflow-y: auto; padding: 6px; }
.nt-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px; border-radius: 10px; color: var(--ink) !important; position: relative; }
.nt-item:hover, .nt-item:focus { background: #f4f6f9; text-decoration: none; }
.nt-item.is-new { background: #f5fbfe; }
.nt-icon { flex: 0 0 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.nt-primary .nt-icon { background: var(--brand-soft); color: var(--primary); }
.nt-warning .nt-icon { background: #fffbeb; color: #b45309; }
.nt-danger .nt-icon { background: #fef2f2; color: #b91c1c; }
.nt-neutral .nt-icon { background: #f3f4f6; color: #4b5563; }
.nt-text { flex: 1 1 auto; min-width: 0; white-space: normal; }
.nt-text b { display: block; font-size: 13.5px; line-height: 1.35; }
.nt-text small { display: block; color: var(--ink-muted); font-size: 12px; margin-top: 2px; line-height: 1.4; }
.nt-dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-top: 6px; }
.nt-empty { text-align: center; padding: 26px 16px; color: var(--ink-muted); font-size: 13px; }
.nt-empty .fa-check-circle { display: block; font-size: 26px; color: #15924a; margin-bottom: 8px; }
.nt-empty b { display: block; color: var(--ink); font-size: 14px; }
.nt-foot { display: block; text-align: center; padding: 11px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 600; background: #fafbfc; }
.nt-foot:hover { background: #f4f6f9; text-decoration: none; }

.navbar-nav > .user-menu > a:before {
  content: "\f007";
  font-family: FontAwesome;
  display: inline-block;
  width: 28px; height: 28px; line-height: 28px;
  margin: -4px 8px -4px 0;
  border-radius: 50%;
  text-align: center;
  background: var(--brand-soft);
  color: var(--primary);
}
.navbar-nav > .user-menu > .dropdown-menu {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  padding: 0;
}
.skin-blue .navbar-nav > .user-menu > .dropdown-menu > li.user-header {
  background: linear-gradient(135deg, var(--brand), var(--primary));
  height: auto !important;
  padding: 18px 12px;
}
.navbar-nav > .user-menu > .dropdown-menu > li.user-header > p { margin-top: 0; font-weight: 600; }
.navbar-nav > .user-menu > .dropdown-menu > .user-footer { background: #fff; border-top: 1px solid var(--line); }

/* ---- Sidebar (light) ----------------------------------------------------- */
.skin-blue .wrapper,
.skin-blue .main-sidebar,
.skin-blue .left-side {
  background: #fff;
}
.skin-blue .main-sidebar { border-right: 1px solid var(--line); box-shadow: none; }
.skin-blue .user-panel {
  border-bottom: 1px solid var(--line);
  margin: 0 8px 6px;
}
.skin-blue .user-panel > .info,
.skin-blue .user-panel > .info > a { color: var(--ink); }
.skin-blue .user-panel > .info > p { font-weight: 600; font-size: 13px; }
.skin-blue .user-panel > .info > small { color: var(--ink-muted); }
.skin-blue .sidebar-menu > li.header { background: transparent; color: var(--ink-muted); }
.skin-blue .sidebar-menu > li > a {
  color: #374151;
  border-left: 0;
  margin: 2px 8px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  padding: 10px 12px;
}
.skin-blue .sidebar-menu > li > a > .fa,
.skin-blue .sidebar-menu > li > a > .glyphicon,
.skin-blue .sidebar-menu > li > a > .ion { color: #9ca3af; width: 22px; }
.skin-blue .sidebar-menu > li:hover > a { background: var(--page); color: var(--ink); border-left-color: transparent; }
.skin-blue .sidebar-menu > li.active > a {
  background: var(--brand-soft);
  color: var(--primary);
  border-left-color: transparent;
  font-weight: 600;
}
.skin-blue .sidebar-menu > li.active > a > .fa,
.skin-blue .sidebar-menu > li:hover > a > .fa { color: var(--primary); }
.skin-blue .sidebar-menu > li > .treeview-menu {
  background: transparent;
  margin: 0 8px 4px;
  padding-left: 0;
}
.skin-blue .treeview-menu > li > a {
  color: var(--ink-muted);
  border-radius: var(--radius-sm);
  padding: 7px 12px 7px 36px;
  font-size: 13.5px;
}
.skin-blue .treeview-menu > li > a > .fa-circle-o { font-size: 7px; vertical-align: middle; margin-right: 4px; }
.skin-blue .treeview-menu > li > a:hover { color: var(--ink); background: var(--page); }
.skin-blue .treeview-menu > li.active > a { color: var(--primary); font-weight: 600; }
/* collapsed (mini) sidebar flyouts */
.sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > a > span:not(.pull-right),
.sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > .treeview-menu {
  background: #fff;
  box-shadow: var(--shadow-lg);
}
.sidebar-mini.sidebar-collapse .sidebar-menu > li > a { margin: 2px 4px; }

/* ---- Page header --------------------------------------------------------- */
.content-header { padding: 22px 20px 4px; }
.content-header > h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ink);
}
.content-header > h1 > small { color: var(--ink-muted); font-weight: 400; }
.content-header > div { color: var(--ink-muted); }
.content-header > .breadcrumb {
  background: transparent;
  top: 18px;
  right: 20px;
  padding: 0;
  border-radius: 0;
}

/*
 | Page action toolbar. Older pages put their buttons in .content-header > .breadcrumb,
 | absolutely positioned top-right. When that "breadcrumb" holds buttons, lay the header
 | out as title + note on the left and a toolbar on the right (wrapping below on narrow
 | screens), and give the buttons a hierarchy by what they do (read from their icon):
 |   Save / Add / New  -> solid primary, last        Print, Show … List -> outlined
 |   Reset             -> quiet text button          Delete             -> red outline, first
 | Pages are unchanged; :has() needs a 2023+ browser, older ones keep the plain row.
 */
.content-header:has(> .breadcrumb .btn) {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  column-gap: 32px;
  row-gap: 4px;
  align-items: start;
  padding-top: 24px;
  padding-bottom: 10px;
}
.content-header:has(> .breadcrumb .btn) > :not(.breadcrumb) { grid-column: 1; }
.content-header:has(> .breadcrumb .btn) > h1 { margin: 0; line-height: 1.25; }
.content-header > .breadcrumb:has(.btn) {
  grid-column: 2; grid-row: 1 / span 4;
  position: static; float: none;
  display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px;
  margin: 0 !important;
}
.content-header > .breadcrumb:has(.btn) > li { display: contents; }
.content-header > .breadcrumb:has(.btn) > li + li:before { display: none; }
.content-header > .breadcrumb:has(.btn) .btn {
  margin: 0 !important;
  height: 36px; padding: 0 14px;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 600; white-space: nowrap;
  order: 2;
}
.content-header > .breadcrumb:has(.btn) .btn .fa { font-size: 13px; }

/* secondary: navigation and printing (outlined) */
.content-header > .breadcrumb:has(.btn) .btn:has(> .fa-tasks),
.content-header > .breadcrumb:has(.btn) .btn:has(> .fa-list),
.content-header > .breadcrumb:has(.btn) .btn:has(> .fa-calendar),
.content-header > .breadcrumb:has(.btn) .btn:has(> .fa-book),
.content-header > .breadcrumb:has(.btn) .btn:has(> .fa-backward),
.content-header > .breadcrumb:has(.btn) .btn:has(> .fa-print),
.content-header > .breadcrumb:has(.btn) .btn:has(> .fa-file-excel-o) {
  background: #fff !important; border-color: #d1d5db !important; color: var(--ink) !important;
}
.content-header > .breadcrumb:has(.btn) .btn:has(> .fa-tasks):hover,
.content-header > .breadcrumb:has(.btn) .btn:has(> .fa-list):hover,
.content-header > .breadcrumb:has(.btn) .btn:has(> .fa-calendar):hover,
.content-header > .breadcrumb:has(.btn) .btn:has(> .fa-book):hover,
.content-header > .breadcrumb:has(.btn) .btn:has(> .fa-backward):hover,
.content-header > .breadcrumb:has(.btn) .btn:has(> .fa-print):hover,
.content-header > .breadcrumb:has(.btn) .btn:has(> .fa-file-excel-o):hover {
  background: var(--page) !important; border-color: #c4c9d1 !important;
}
.content-header > .breadcrumb:has(.btn) .btn > .fa-tasks,
.content-header > .breadcrumb:has(.btn) .btn > .fa-list,
.content-header > .breadcrumb:has(.btn) .btn > .fa-print { color: var(--ink-muted); }

/* quiet: reset / undo */
.content-header > .breadcrumb:has(.btn) .btn:has(> .fa-refresh),
.content-header > .breadcrumb:has(.btn) .btn:has(> .fa-undo) {
  background: transparent !important; border-color: transparent !important;
  color: var(--ink-muted) !important; padding: 0 10px;
  order: 1;
}
.content-header > .breadcrumb:has(.btn) .btn:has(> .fa-refresh):hover,
.content-header > .breadcrumb:has(.btn) .btn:has(> .fa-undo):hover {
  background: #eef0f3 !important; color: var(--ink) !important;
}

/* primary: save / add / new (solid, last) */
.content-header > .breadcrumb:has(.btn) .btn:has(> .fa-save),
.content-header > .breadcrumb:has(.btn) .btn:has(> .fa-plus),
.content-header > .breadcrumb:has(.btn) .btn:has(> .fa-user-plus) {
  background: var(--primary) !important; border-color: var(--primary) !important; color: #fff !important;
  box-shadow: 0 1px 2px rgba(11, 125, 181, .3);
  order: 3;
}
.content-header > .breadcrumb:has(.btn) .btn:has(> .fa-save):hover,
.content-header > .breadcrumb:has(.btn) .btn:has(> .fa-plus):hover,
.content-header > .breadcrumb:has(.btn) .btn:has(> .fa-user-plus):hover {
  background: var(--primary-hover) !important; border-color: var(--primary-hover) !important;
}

/* destructive: delete (first, set apart by a divider) */
.content-header > .breadcrumb:has(.btn) .btn:has(> .fa-trash) {
  background: #fff !important; border-color: #fca5a5 !important; color: var(--danger) !important;
  order: 0; margin-right: 10px !important; position: relative;
}
.content-header > .breadcrumb:has(.btn) .btn:has(> .fa-trash):after {
  content: ""; position: absolute; right: -11px; top: 6px; bottom: 6px; width: 1px; background: var(--line);
}
.content-header > .breadcrumb:has(.btn) .btn:has(> .fa-trash):hover {
  background: var(--danger) !important; border-color: var(--danger) !important; color: #fff !important;
}

@media (max-width: 991px) {
  .content-header:has(> .breadcrumb .btn) { grid-template-columns: 1fr; }
  .content-header > .breadcrumb:has(.btn) {
    grid-column: 1; grid-row: auto;
    justify-content: flex-start; margin-top: 14px !important; max-width: none;
  }
}
.content { padding: 16px 20px 24px; }

/* ---- Cards (boxes, tabs, callouts) ---------------------------------------- */
.box,
.nav-tabs-custom,
.small-box,
.info-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--card);
}
.box { border-top: 1px solid var(--line); }
.box.box-primary, .box.box-info, .box.box-success,
.box.box-warning, .box.box-danger, .box.box-default { border-top-color: var(--line); }
.box-header { padding: 14px 16px; }
.box-header.with-border { border-bottom: 1px solid var(--line); }
.box-header .box-title,
.box-title { font-size: 15px; font-weight: 600; color: var(--ink); }
.box-body { padding: 16px; }
.box-footer { background: #fafbfc; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); }
.nav-tabs-custom > .tab-content { padding: 16px; border-radius: 0 0 var(--radius) var(--radius); }
.nav-tabs-custom > .nav-tabs { border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.nav-tabs-custom > .nav-tabs > li { border-top: 0; margin-bottom: -1px; }
.nav-tabs-custom > .nav-tabs > li > a { color: var(--ink-muted); font-weight: 500; }
.nav-tabs-custom > .nav-tabs > li.active { border-top: 0; }
.nav-tabs-custom > .nav-tabs > li.active > a {
  color: var(--primary);
  border-color: transparent;
  box-shadow: inset 0 -2px 0 var(--primary);
}
.callout {
  border-radius: var(--radius);
  border-left-width: 4px;
  box-shadow: none;
}
.callout.callout-info {
  background: var(--brand-soft) !important;
  border-color: var(--brand) !important;
  color: #0c4a6e !important;
}
.callout.callout-info h4 { color: #075985; font-weight: 600; }
.callout.callout-info code { background: #fff; color: #0c4a6e; border: 1px solid #bae6fd; }
.callout.callout-success { background: #ecfdf3 !important; border-color: var(--success) !important; color: #14532d !important; }
.callout.callout-warning { background: #fffbeb !important; border-color: var(--warning) !important; color: #78350f !important; }
.callout.callout-danger { background: #fef2f2 !important; border-color: var(--danger) !important; color: #7f1d1d !important; }
.small-box { overflow: hidden; }

/* ---- Buttons --------------------------------------------------------------- */
.btn {
  border-radius: var(--radius-sm);
  font-weight: 500;
  box-shadow: none;
  transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.btn.btn-flat { border-radius: var(--radius-sm); }
.btn:focus, .btn.focus { outline: none; box-shadow: 0 0 0 3px rgba(11, 125, 181, .25); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-default { background: #fff; border-color: #d1d5db; color: var(--ink); }
.btn-default:hover, .btn-default:focus, .btn-default:active { background: var(--page); border-color: #c4c9d1; color: var(--ink); }
.btn-primary, .btn-info { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active,
.btn-info:hover, .btn-info:focus, .btn-info:active { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover, .btn-success:focus, .btn-success:active { background: #117a3d; border-color: #117a3d; color: #fff; }
/* !important: many legacy pages set style="color:white" on warning buttons (e.g. Reset Page) */
.btn-warning { background: #fff; border-color: #fcd34d; color: #92400e !important; }
.btn-warning:hover, .btn-warning:focus, .btn-warning:active { background: #fffbeb; border-color: #f59e0b; color: #78350f !important; }
.btn-danger { background: #fff; border-color: #fca5a5; color: var(--danger); }
.btn-danger:hover, .btn-danger:focus, .btn-danger:active { background: var(--danger); border-color: var(--danger); color: #fff; }

/* ---- Forms --------------------------------------------------------------- */
.form-control {
  border-radius: var(--radius-sm);
  border-color: #d1d5db;
  box-shadow: none;
  height: 38px;
  color: var(--ink);
}
textarea.form-control { height: auto; }
select.form-control { padding-top: 6px; padding-bottom: 6px; }
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11, 125, 181, .15);
}
.form-control[readonly], .form-control[disabled] { background: #f9fafb; }
.form-group label, label { font-weight: 600; color: #374151; font-size: 13px; }
.input-group .input-group-addon {
  border-color: #d1d5db;
  background: #f9fafb;
  color: var(--ink-muted);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}
.input-group .form-control:first-child,
.input-group-addon:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group .form-control:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.input-group .form-control:first-child:not(:last-child) { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group-btn:last-child > .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; height: 38px; }

/* ---- Tables & DataTables ----------------------------------------------- */
.table > thead > tr > th {
  background: #f9fafb;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1px solid var(--line) !important;
  padding: 11px 12px;
}
.table > tbody > tr > td { padding: 11px 12px; vertical-align: middle; border-top: 1px solid #f0f1f3; }
.table-bordered,
.table-bordered > thead > tr > th,
.table-bordered > tbody > tr > td { border-color: #eef0f2; }
.table-bordered { border-radius: var(--radius-sm); }
.table-striped > tbody > tr:nth-of-type(odd) { background: #fcfcfd; }
.table-hover > tbody > tr:hover { background: #f2f9fd; }
.box > table.table,
.box > .table-responsive > table.table,
.box .dataTables_wrapper { margin-bottom: 0; }
.dataTables_wrapper { padding: 12px 16px 16px; }
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  border: 1px solid #d1d5db;
  border-radius: var(--radius-sm);
  height: 34px;
  padding: 4px 10px;
  margin-left: 6px;
}
.dataTables_wrapper .dataTables_filter input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(11, 125, 181, .15); }
.dataTables_wrapper .dataTables_info { color: var(--ink-muted); font-size: 13px; }
.pagination > li > a,
.pagination > li > span { border-color: var(--line); color: var(--ink); margin-left: 4px; border-radius: var(--radius-sm) !important; }
.pagination > .active > a,
.pagination > .active > a:hover,
.pagination > .active > span { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination > .disabled > a { color: #c0c4cc; }
/* small icon buttons inside table rows */
.table .btn.custom-sm, .table td .btn-sm { padding: 5px 9px; }

/* ---- Feedback ------------------------------------------------------------ */
.alert { border-radius: var(--radius); border: 1px solid transparent; box-shadow: var(--shadow); }
.alert-success { background: #ecfdf3 !important; border-color: #a7f3d0 !important; color: #14532d !important; }
.alert-danger,
.alert-error { background: #fef2f2 !important; border-color: #fecaca !important; color: #7f1d1d !important; }
.alert-warning { background: #fffbeb !important; border-color: #fde68a !important; color: #78350f !important; }
.alert-info { background: var(--brand-soft) !important; border-color: #bae6fd !important; color: #0c4a6e !important; }
.alert .close { color: inherit; opacity: .5; }
.label { border-radius: 999px; font-weight: 600; padding: .3em .7em; }
.bg-green { background-color: var(--success) !important; }
.bg-red { background-color: var(--danger) !important; }
.bg-yellow { background-color: var(--warning) !important; }

/* ---- Modals ------------------------------------------------------------- */
.modal-content {
  border: 0;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.modal-header { border-bottom: 1px solid var(--line); padding: 16px 20px; }
.modal-title { font-weight: 600; }
.modal-footer { border-top: 1px solid var(--line); background: #fafbfc; }
.modal-backdrop.in { opacity: .35; }

/* ---- Footer --------------------------------------------------------------- */
.main-footer {
  background: #fff;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 13px;
}

/* ---- Rich-text editor (consultation / medical certificate) ------------- */
.rich-text-page .note-editor.note-frame { border-radius: var(--radius); overflow: hidden; border-color: var(--line); }
.rich-text-page .note-editor .note-toolbar { background: #f9fafb; border-bottom-color: var(--line); }
.rich-text-page .note-editor .note-editing-area { background: #eef1f5; }
.rich-text-page .note-btn { border-radius: 6px !important; }

/* ---- Login page ----------------------------------------------------------- */
.login-box { width: 400px; margin-top: 9vh; }
.login-box form > div[style*="background-color:white"] {
  border-radius: 16px !important;
  padding: 32px !important;
  box-shadow: 0 20px 50px rgba(16, 24, 40, .25) !important;
  background: rgba(255, 255, 255, .96) !important;
}
.login-box .login-logo img { border-radius: 10px; }
.login-box .login-box-msg { color: var(--ink) !important; font-weight: 600 !important; padding: 6px 0 18px; }
.login-box .form-control { height: 44px; }
.login-box .has-feedback .form-control-feedback { line-height: 44px; height: 44px; color: #9ca3af; }
.login-box .btn-sign-in { height: 44px; font-weight: 600; width: 100%; }
.login-box .col-xs-5.pull-right { width: 100%; float: none !important; }
@media (max-width: 767px) {
  .login-box { width: 92%; }
  .content-header > .breadcrumb { position: static; margin-top: 10px; }
}

/* ---- person avatars: patient / staff photo, or initials when there is none ---- */
.pa {
  flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
  display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
  background: linear-gradient(135deg, #e6f6fd, #c9ebfb); color: var(--primary);
  font-size: 12.5px; font-weight: 700; letter-spacing: .02em; line-height: 1;
}
.pa.pa-xs { flex-basis: 22px; width: 22px; height: 22px; font-size: 9px; margin: -3px 2px 0; }
.pa.pa-sm { flex-basis: 30px; width: 30px; height: 30px; font-size: 11px; }
.pa.pa-lg { flex-basis: 54px; width: 54px; height: 54px; font-size: 18px; box-shadow: 0 0 0 3px #fff, 0 2px 8px rgba(16, 24, 40, .12); }
.pa-name { display: inline-flex; align-items: center; gap: 8px; }
/* avatar with a small record-type badge (dashboard recent activity) */
.pa.pa-badged { position: relative; flex-basis: 38px; width: 38px; height: 38px; }
.pa.pa-badged.has-photo > img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.pa-badge {
  position: absolute; right: -4px; bottom: -4px; width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary); color: #fff; font-size: 9.5px; box-shadow: 0 0 0 2px #fff;
}
/* existing avatar styles also take photos */
img.rl-avatar { width: 38px; object-fit: cover; }
img.pp-avatar { width: 30px; object-fit: cover; }
img.st-avatar { width: 42px; object-fit: cover; }
img.mm-avatar { width: 38px; object-fit: cover; }
img.dash-avatar { width: 36px; object-fit: cover; }
img.pt-avatar, img.pd-avatar { object-fit: cover; }

/* patient profile: photo menu */
.pp-photo .mp-camera { color: var(--primary); }
.pp-photo-menu { top: 92px; left: 0; min-width: 170px; }
.pp-photo-menu > li > a { padding: 8px 14px; }
.pp-photo.is-busy .pp-hero-avatar { opacity: .5; }
.pp-hero .pp-photo [hidden] { display: none !important; }
