/*
 * Medville Admin Dashboard theme
 * Reskins the shared admin shell (sidebar/header) and dashboard widgets to match
 * the Figma "Admin Dashboard" design, on top of the existing AdminLTE/Bootstrap
 * markup used by the rest of the admin module. Scoped under .mv-* classes so it
 * does not affect pages that have not been migrated to the new shell yet.
 */

@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --mv-primary: #2393d5;
  --mv-primary-hover: #1c7fb8;
  --mv-primary-mid: #4fa9dd;
  --mv-primary-soft: #a7d4ee;
  --mv-primary-softer: #d3e9f7;
  --mv-bg: #f7f7f7;
  --mv-surface: #ffffff;
  --mv-surface-muted: #f7f7f7;
  --mv-border: rgba(191, 191, 191, 0.24);
  --mv-text: #313131;
  --mv-text-strong: #1c1c1c;
  --mv-text-heading: #292d32;
  --mv-muted: #5e5e5e;
  --mv-muted-light: #7e7e7e;
  --mv-row-alt: rgba(49, 49, 49, 0.03);
  --mv-row-alt-2: rgba(218, 218, 218, 0.06);
  --mv-radius-sm: 8px;
  --mv-radius-md: 12px;
  --mv-radius-lg: 14px;
  --mv-radius-xl: 20px;
  --mv-shell-gap: 20px;
  --mv-sidebar-width: 250px;
  --mv-header-height: 76px;
  --mv-font: 'Poppins', 'Source Sans Pro', Helvetica, Arial, sans-serif;
}

body.mv-shell-active {
  background: var(--mv-bg);
  font-family: var(--mv-font);
}

.mv-shell-active .wrapper {
  background: var(--mv-bg);
  min-height: 100vh;
}

/*
 * The legacy template head has a global `a:visited { color: #0254EB }` rule.
 * Element+pseudo-class (0,0,1,1) outranks a single class selector like
 * `.mv-nav-link` (0,0,1,0), so any shell link the browser's history marks as
 * visited would fall back to that old blue. Reasserting each color under
 * `:visited` too (class+pseudo-class = (0,0,2,0)) wins the cascade properly.
 */
.mv-nav-link:visited {
  color: var(--mv-text-heading);
}

.mv-sidebar__nav li.active .mv-nav-link:visited {
  color: #ffffff;
}

.mv-treeview-menu li a:visited {
  color: var(--mv-muted);
}

.mv-treeview-menu li.active a:visited {
  color: var(--mv-primary);
}

.mv-sidebar__logout:visited {
  color: #ffffff;
}

.mv-header__icon-btn:visited {
  color: var(--mv-text);
}

.mv-btn-primary:visited {
  color: #ffffff;
}

/* ---------- Layout ---------- */

.mv-shell {
  display: flex;
  align-items: flex-start;
  gap: var(--mv-shell-gap);
  padding: var(--mv-shell-gap);
  min-height: 100vh;
  box-sizing: border-box;
}

.mv-shell * {
  box-sizing: border-box;
}

.mv-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--mv-shell-gap);
}

/* ---------- Sidebar ---------- */

.mv-sidebar {
  flex: 0 0 var(--mv-sidebar-width);
  width: var(--mv-sidebar-width);
  background: var(--mv-surface);
  border-radius: var(--mv-radius-lg);
  box-shadow: 0 0 40px 0 rgba(0, 0, 0, 0.04);
  padding: 28px 16px;
  position: sticky;
  top: var(--mv-shell-gap);
  max-height: calc(100vh - (var(--mv-shell-gap) * 2));
  display: flex;
  flex-direction: column;
  transition: flex-basis 0.2s ease, width 0.2s ease, padding 0.2s ease;
}

.mv-sidebar__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 0 24px;
}

.mv-sidebar__logo img {
  width: 28px;
  height: 28px;
}

.mv-sidebar__logo span {
  font-family: var(--mv-font);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 1.6px;
  color: var(--mv-primary);
}

.mv-sidebar__nav {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
  overflow-y: auto;
}

.mv-sidebar__nav li {
  margin: 0 0 6px;
}

.mv-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--mv-radius-sm);
  color: var(--mv-text-heading);
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.mv-nav-link:hover,
.mv-nav-link:focus {
  background: var(--mv-surface-muted);
  color: var(--mv-primary);
  text-decoration: none;
}

.mv-nav-link .mv-nav-icon {
  flex: 0 0 20px;
  width: 20px;
  text-align: center;
  font-size: 16px;
  color: inherit;
}

.mv-sidebar__nav li.active .mv-nav-link {
  background: var(--mv-primary);
  color: #ffffff;
  font-weight: 600;
}

.mv-sidebar__nav li.treeview > .mv-nav-link .mv-nav-caret {
  margin-left: auto;
  font-size: 11px;
  transition: transform 0.15s ease;
}

.mv-sidebar__nav li.treeview.active > .mv-nav-link .mv-nav-caret,
.mv-sidebar__nav li.treeview.menu-open > .mv-nav-link .mv-nav-caret {
  transform: rotate(90deg);
}

.mv-treeview-menu {
  list-style: none;
  margin: 2px 0 6px 32px;
  padding: 0;
  display: none;
}

.mv-sidebar__nav li.treeview.active .mv-treeview-menu,
.mv-sidebar__nav li.treeview.menu-open .mv-treeview-menu {
  display: block;
}

.mv-treeview-menu li a {
  display: block;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--mv-muted);
  text-decoration: none;
  border-radius: var(--mv-radius-sm);
}

.mv-treeview-menu li.active a,
.mv-treeview-menu li a:hover {
  color: var(--mv-primary);
  background: var(--mv-surface-muted);
  text-decoration: none;
}

.mv-sidebar__profile {
  margin-top: 16px;
  background: var(--mv-primary);
  border-radius: var(--mv-radius-lg);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: #ffffff;
}

.mv-sidebar__profile img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  object-fit: cover;
  flex: 0 0 38px;
}

.mv-sidebar__profile-info {
  flex: 1 1 auto;
  min-width: 0;
}

.mv-sidebar__profile-info strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mv-sidebar__profile-info small {
  font-size: 10px;
  opacity: 0.85;
}

.mv-sidebar__profile-divider {
  flex-basis: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.25);
  margin: 4px 0;
}

.mv-sidebar__logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ffffff;
  font-size: 11px;
  text-decoration: none;
  opacity: 0.9;
}

.mv-sidebar__logout:hover {
  opacity: 1;
  color: #ffffff;
  text-decoration: none;
}

/* ---------- Header ---------- */

.mv-header {
  background: var(--mv-surface);
  border-radius: var(--mv-radius-lg);
  min-height: var(--mv-header-height);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 0 40px 0 rgba(0, 0, 0, 0.04);
}

.mv-header__toggle {
  display: none;
  border: none;
  background: var(--mv-surface-muted);
  border-radius: var(--mv-radius-sm);
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  color: var(--mv-text);
  font-size: 16px;
  flex: 0 0 auto;
}

.mv-header__title {
  font-family: var(--mv-font);
  font-weight: 500;
  font-size: 20px;
  color: var(--mv-text);
  margin: 0;
  flex: 0 0 auto;
  white-space: nowrap;
}

.mv-header__search {
  flex: 1 1 auto;
  max-width: 320px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(147, 147, 147, 0.05);
  border: 1px solid var(--mv-border);
  border-radius: var(--mv-radius-sm);
  padding: 12px 16px;
  color: var(--mv-muted-light);
}

.mv-header__search i {
  color: var(--mv-primary);
}

.mv-header__search input {
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--mv-font);
  font-size: 14px;
  color: var(--mv-text);
  width: 100%;
}

.mv-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.mv-header__icon-btn {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: var(--mv-radius-md);
  background: rgba(147, 147, 147, 0.05);
  border: 1px solid var(--mv-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mv-text);
  font-size: 17px;
  text-decoration: none;
}

.mv-header__icon-btn:hover {
  color: var(--mv-primary);
  text-decoration: none;
}

.mv-header__icon-btn .mv-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff5c5c;
}

.mv-header__avatar {
  display: block;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: var(--mv-radius-md);
  overflow: hidden;
  border: 1px solid var(--mv-border);
}

.mv-header__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/*
 * The profile dropdown panel (user-header/user-footer) reuses AdminLTE's
 * markup, but AdminLTE's own CSS for it is scoped to
 * `.navbar-nav > .user-menu > .dropdown-menu` — an ancestor chain that only
 * existed in the old `.main-header .navbar` shell. In the new header that
 * chain is gone, so none of AdminLTE's sizing ever applied (hence the
 * unconstrained 90px avatar blowing up the panel). Owning it here instead.
 */
.mv-header__actions .dropdown-menu {
  min-width: 260px;
  padding: 0;
  border: 1px solid var(--mv-border);
  border-radius: var(--mv-radius-lg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  margin-top: 8px;
}

.mv-header__actions .dropdown-menu .user-header {
  padding: 20px 16px 16px;
  text-align: center;
  background: var(--mv-surface);
  height: auto;
}

.mv-header__actions .dropdown-menu .user-header img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 10px;
  display: block;
  border: 1px solid var(--mv-border);
}

.mv-header__actions .dropdown-menu .user-header p {
  margin: 0;
  font-family: var(--mv-font);
  font-weight: 600;
  color: var(--mv-text);
  font-size: 14px;
}

.mv-header__actions .dropdown-menu .user-header p small {
  display: block;
  margin-top: 2px;
  font-weight: 400;
  color: var(--mv-muted);
  font-size: 11px;
}

.mv-header__actions .dropdown-menu .user-footer {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--mv-border);
  background: var(--mv-surface);
}

.mv-header__actions .dropdown-menu .user-footer > div {
  flex: 1 1 0;
  float: none;
}

.mv-header__actions .dropdown-menu .user-footer .btn {
  display: block;
  width: 100%;
  margin: 0;
  border-radius: var(--mv-radius-sm);
  font-family: var(--mv-font);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 10px;
  text-align: center;
  border: 1px solid var(--mv-border);
  background: var(--mv-surface-muted);
  color: var(--mv-text);
}

.mv-header__actions .dropdown-menu .user-footer .pull-right .btn {
  background: var(--mv-primary);
  border-color: var(--mv-primary);
  color: #ffffff;
}

/* ---------- Content ---------- */

.mv-content {
  display: flex;
  flex-direction: column;
  gap: var(--mv-shell-gap);
}

.mv-panel {
  background: var(--mv-surface);
  border-radius: var(--mv-radius-xl);
  box-shadow: 0 0 40px 0 rgba(0, 0, 0, 0.04);
  padding: 24px;
}

.mv-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.mv-panel__title {
  font-family: var(--mv-font);
  font-weight: 700;
  font-size: 20px;
  color: var(--mv-text);
  margin: 0;
}

.mv-panel__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mv-pill-select {
  border: none;
  background: var(--mv-surface-muted);
  border-radius: var(--mv-radius-sm);
  padding: 9px 14px;
  font-family: var(--mv-font);
  font-size: 12px;
  font-weight: 500;
  color: var(--mv-text);
}

.mv-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--mv-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--mv-radius-sm);
  padding: 8px 16px;
  font-family: var(--mv-font);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.mv-btn-primary:hover,
.mv-btn-primary:focus {
  background: var(--mv-primary-hover);
  color: #ffffff;
  text-decoration: none;
}

/* ---------- Stat cards ---------- */

.mv-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--mv-shell-gap);
}

.mv-stat-card {
  background: var(--mv-surface);
  border-radius: var(--mv-radius-xl);
  box-shadow: 0 0 40px 0 rgba(0, 0, 0, 0.04);
  padding: 22px;
}

.mv-stat-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.mv-stat-card__icon {
  width: 62px;
  height: 62px;
  border-radius: var(--mv-radius-sm);
  background: var(--mv-surface-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--mv-primary);
  flex: 0 0 auto;
}

.mv-stat-card__label {
  font-family: var(--mv-font);
  font-weight: 500;
  font-size: 16px;
  color: var(--mv-text);
}

.mv-stat-card__value-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.mv-stat-card__value {
  font-family: var(--mv-font);
  font-weight: 700;
  font-size: 32px;
  color: var(--mv-text);
}

.mv-stat-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--mv-surface-muted);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 10px;
  color: #272727;
}

.mv-stat-card__badge i {
  color: var(--mv-primary);
  font-size: 9px;
}

.mv-stat-card__bar {
  height: 4px;
  border-radius: 4px;
  background: var(--mv-primary-softer);
  overflow: hidden;
  margin-bottom: 10px;
}

.mv-stat-card__bar span {
  display: block;
  height: 100%;
  background: var(--mv-primary);
  border-radius: 4px;
}

.mv-stat-card__caption {
  font-size: 11px;
  color: var(--mv-muted);
}

/* ---------- Dashboard grid ---------- */

.mv-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--mv-shell-gap);
  align-items: start;
}

.mv-row--split {
  grid-template-columns: 1fr 2fr;
}

/* ---------- Upcoming appointments ---------- */

.mv-calendar__caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 8px;
  flex-wrap: wrap;
}

.mv-calendar__month {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mv-font);
  font-weight: 700;
  font-size: 13px;
  color: var(--mv-text);
}

.mv-calendar__month i {
  color: var(--mv-muted-light);
  font-size: 11px;
  cursor: pointer;
}

.mv-calendar__range {
  background: var(--mv-primary);
  color: #ffffff;
  border-radius: 20px;
  font-size: 12px;
  padding: 6px 12px;
  border: none;
}

.mv-calendar {
  background: var(--mv-surface-muted);
  border-radius: var(--mv-radius-lg);
  padding: 12px 8px;
}

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

.mv-calendar th,
.mv-calendar td {
  text-align: center;
  font-family: var(--mv-font);
  font-size: 13px;
  color: var(--mv-text);
  padding: 6px 2px;
}

.mv-calendar th {
  font-weight: 600;
  opacity: 0.5;
  font-size: 11px;
}

.mv-calendar td span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.mv-calendar td.mv-today span {
  background: var(--mv-primary);
  color: #ffffff;
}

.mv-appointments {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mv-appointment {
  position: relative;
  background: var(--mv-surface-muted);
  border-radius: var(--mv-radius-lg);
  padding: 12px 16px 12px 20px;
}

.mv-appointment::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 4px;
  background: var(--mv-primary);
}

.mv-appointment__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.mv-appointment__top strong {
  font-family: var(--mv-font);
  font-size: 13px;
  color: var(--mv-text-strong);
}

.mv-badge-status {
  background: var(--mv-primary);
  color: #ffffff;
  border-radius: 40px;
  font-size: 10px;
  padding: 4px 10px;
  white-space: nowrap;
}

.mv-appointment__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  font-size: 12px;
  color: var(--mv-text-strong);
}

.mv-appointment__empty {
  font-size: 12px;
  color: var(--mv-muted);
  text-align: center;
  padding: 20px 0;
}

/* ---------- Chart wrappers ---------- */

.mv-chart-wrap {
  position: relative;
  height: 300px;
}

.mv-donut-wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.mv-donut-canvas {
  position: relative;
  width: 220px;
  height: 220px;
  flex: 0 0 auto;
}

.mv-donut-canvas canvas,
.mv-chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

.mv-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mv-legend li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--mv-text);
}

.mv-legend .mv-dot-swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex: 0 0 auto;
}

/* ---------- Profile page ---------- */

.mv-profile-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.mv-profile-header__identity {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mv-profile-header__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  border: 1px solid var(--mv-border);
}

.mv-profile-header__name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mv-font);
  font-weight: 700;
  font-size: 20px;
  color: var(--mv-text);
}

.mv-profile-header__role {
  font-size: 14px;
  color: var(--mv-muted);
  margin-top: 2px;
}

.mv-badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--mv-primary);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 40px;
  padding: 3px 10px;
}

.mv-badge-unverified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--mv-surface-muted);
  color: var(--mv-muted);
  font-size: 11px;
  font-weight: 600;
  border-radius: 40px;
  padding: 3px 10px;
}

.mv-profile-header__stats {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.mv-profile-header__stat {
  text-align: left;
}

.mv-profile-header__stat strong {
  display: block;
  font-family: var(--mv-font);
  font-weight: 700;
  font-size: 14px;
  color: var(--mv-text);
}

.mv-profile-header__stat span {
  font-size: 11px;
  color: var(--mv-muted);
}

.mv-profile-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mv-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--mv-surface);
  color: var(--mv-text);
  border: 1px solid var(--mv-border);
  border-radius: var(--mv-radius-sm);
  padding: 9px 14px;
  font-family: var(--mv-font);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.mv-btn-outline:hover,
.mv-btn-outline:focus {
  border-color: var(--mv-primary);
  color: var(--mv-primary);
  text-decoration: none;
}

.mv-btn-outline--danger:hover {
  border-color: #e05252;
  color: #e05252;
}

/* Label/value grids used across Basic Information, License, Clinic cards */
.mv-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px 24px;
}

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

.mv-info-item {
  min-width: 0;
}

.mv-info-item--full {
  grid-column: 1 / -1;
}

.mv-info-label {
  display: block;
  font-family: var(--mv-font);
  font-weight: 600;
  font-size: 13px;
  color: var(--mv-text);
  margin-bottom: 4px;
}

.mv-info-label small {
  font-weight: 400;
  color: var(--mv-muted);
}

.mv-info-value {
  font-size: 14px;
  color: var(--mv-text);
  line-height: 1.5;
  word-break: break-word;
}

.mv-tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mv-tag {
  display: inline-flex;
  align-items: center;
  background: var(--mv-surface-muted);
  color: var(--mv-text);
  border: 1px solid var(--mv-border);
  border-radius: var(--mv-radius-sm);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
}

.mv-tag--accent {
  background: rgba(35, 147, 213, 0.08);
  border-color: rgba(35, 147, 213, 0.3);
  color: var(--mv-primary);
}

.mv-doc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--mv-surface-muted);
  border: 1px solid var(--mv-border);
  border-radius: var(--mv-radius-sm);
  padding: 8px 12px;
  font-size: 12px;
  color: var(--mv-text);
  text-decoration: none;
}

.mv-doc-chip i {
  color: var(--mv-primary);
}

.mv-doc-chip:hover {
  border-color: var(--mv-primary);
  color: var(--mv-primary);
  text-decoration: none;
}

.mv-availability {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.mv-day-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--mv-text);
}

.mv-day-pill .mv-day-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mv-primary);
  flex: 0 0 auto;
}

.mv-day-pill--inactive {
  color: var(--mv-muted-light);
}

.mv-day-pill--inactive .mv-day-dot {
  background: transparent;
  border: 1px solid var(--mv-border);
}

.mv-panel__section-title {
  font-family: var(--mv-font);
  font-weight: 700;
  font-size: 18px;
  color: var(--mv-text);
  margin: 0 0 16px;
}

@media (max-width: 900px) {
  .mv-info-grid,
  .mv-info-grid--2 {
    grid-template-columns: 1fr;
  }

  .mv-profile-header {
    flex-direction: column;
  }
}

/* ---------- Table ---------- */

.mv-table-wrap {
  overflow-x: auto;
}

.mv-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.mv-table thead th {
  background: var(--mv-primary);
  color: #ffffff;
  font-family: var(--mv-font);
  font-weight: 600;
  font-size: 14px;
  text-align: left;
  padding: 14px 20px;
  white-space: nowrap;
}

.mv-table thead th:first-child {
  border-top-left-radius: var(--mv-radius-md);
}

.mv-table thead th:last-child {
  border-top-right-radius: var(--mv-radius-md);
}

.mv-table tbody td {
  padding: 16px 20px;
  font-size: 14px;
  color: var(--mv-text);
  white-space: nowrap;
}

.mv-table tbody tr:nth-child(odd) {
  background: var(--mv-row-alt);
}

.mv-table tbody tr:nth-child(even) {
  background: var(--mv-row-alt-2);
}

.mv-table tbody td:first-child {
  font-weight: 500;
}

.mv-table-empty {
  padding: 24px;
  text-align: center;
  color: var(--mv-muted);
  font-size: 13px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1400px) {
  .mv-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mv-row,
  .mv-row--split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 992px) {
  .mv-shell {
    flex-direction: column;
  }

  .mv-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1030;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  body.mv-sidebar-open .mv-sidebar {
    transform: translateX(0);
  }

  .mv-main {
    width: 100%;
  }

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

  .mv-header__search {
    display: none;
  }
}

/*
 * Pages not yet migrated to the new shell still render their original
 * Bootstrap 3 / AdminLTE `.box` + DataTables markup inside `.mv-content`.
 * Give those tables a horizontal scroller instead of letting narrow
 * viewports crush every column unreadably.
 */
.mv-content .box-body,
.mv-content .dataTables_wrapper {
  overflow-x: auto;
}

/*
 * DataTables' own stylesheet sets `margin: 0 auto` on table.dataTable and
 * JS `autoWidth` (on by default) then sizes the table to its content via an
 * inline width. In the old cramped AdminLTE layout that rarely mattered; in
 * the new full-width white panel a short table (few columns/no rows yet)
 * ends up narrower than the panel and visibly centered with gutters on both
 * sides. Force it to fill the panel instead.
 */
.mv-content table.dataTable {
  width: 100% !important;
  margin: 0 !important;
}

@media (max-width: 768px) {
  .mv-content table.table {
    min-width: 600px;
  }
}

@media (max-width: 640px) {
  .mv-shell {
    padding: 12px;
    gap: 12px;
  }

  .mv-stats {
    grid-template-columns: 1fr;
  }

  .mv-header {
    padding: 10px 14px;
    flex-wrap: wrap;
  }

  .mv-header__actions {
    gap: 8px;
  }

  .mv-header__icon-btn,
  .mv-header__avatar {
    width: 40px;
    height: 40px;
  }

  .mv-panel {
    padding: 16px;
  }

  .mv-donut-wrap {
    flex-direction: column;
    align-items: flex-start;
  }
}

body.mv-sidebar-open::after {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1020;
}

@media (min-width: 993px) {
  body.mv-sidebar-open::after {
    display: none;
  }
}

/* =========================================================================
 * Global restyle for legacy Bootstrap 3 modals + SweetAlert dialogs.
 * Scoped so it applies everywhere these components are used across the
 * admin (add/edit forms, confirmation dialogs) without touching each
 * view's markup — matches the "Edit Doctor" modal spec pulled from Figma
 * (node 1042:7636 in the Medville Admin Dashboard file).
 * ========================================================================= */

.mv-shell-active .modal-content {
  border: none;
  border-radius: var(--mv-radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  font-family: var(--mv-font);
  overflow: hidden;
}

.mv-shell-active .modal-dialog {
  max-width: 800px;
  margin: 40px auto;
}

.mv-shell-active .modal-header {
  border-bottom: none;
  padding: 24px 28px 12px;
}

.mv-shell-active .modal-header .close {
  font-family: var(--mv-font);
  opacity: 0.4;
}

.mv-shell-active .modal-title {
  font-family: var(--mv-font);
  font-weight: 700;
  font-size: 20px;
  color: var(--mv-text);
}

.mv-shell-active .modal-body {
  padding: 12px 28px 24px;
}

.mv-shell-active .modal-body .form-group {
  margin-bottom: 18px;
}

.mv-shell-active .modal-body label {
  font-family: var(--mv-font);
  font-weight: 600;
  font-size: 13px;
  color: var(--mv-text);
  margin-bottom: 6px;
  text-transform: capitalize;
}

.mv-shell-active .modal-body .form-control,
.mv-shell-active .modal-body select.form-control,
.mv-shell-active .modal-body textarea.form-control {
  background: rgba(147, 147, 147, 0.05);
  border: 1px solid var(--mv-border);
  border-radius: var(--mv-radius-sm);
  box-shadow: 0 2px 7px 0 rgba(143, 143, 143, 0.04);
  height: 46px;
  padding: 10px 14px;
  font-family: var(--mv-font);
  font-size: 14px;
  color: var(--mv-text);
}

.mv-shell-active .modal-body textarea.form-control {
  height: auto;
  min-height: 84px;
}

.mv-shell-active .modal-body .form-control:focus {
  border-color: var(--mv-primary);
  box-shadow: 0 0 0 3px rgba(35, 147, 213, 0.12);
  outline: none;
}

.mv-shell-active .modal-footer {
  border-top: none;
  padding: 4px 28px 28px;
  display: flex;
  gap: 12px;
}

.mv-shell-active .modal-footer > * {
  flex: 1 1 0;
  margin: 0 !important;
}

.mv-shell-active .modal-footer .btn {
  height: 48px;
  border-radius: var(--mv-radius-sm);
  font-family: var(--mv-font);
  font-weight: 500;
  font-size: 15px;
  border: none;
}

.mv-shell-active .modal-footer .btn-primary,
.mv-shell-active .modal-footer .btn-success,
.mv-shell-active .modal-footer button[type="submit"] {
  background: var(--mv-primary);
  color: #ffffff;
}

.mv-shell-active .modal-footer .btn-primary:hover,
.mv-shell-active .modal-footer .btn-success:hover,
.mv-shell-active .modal-footer button[type="submit"]:hover {
  background: var(--mv-primary-hover);
}

.mv-shell-active .modal-footer .btn-default,
.mv-shell-active .modal-footer [data-dismiss="modal"] {
  background: var(--mv-text-strong);
  color: #ffffff;
}

.mv-shell-active .modal-footer .btn-default:hover,
.mv-shell-active .modal-footer [data-dismiss="modal"]:hover {
  background: #000000;
  color: #ffffff;
}

.mv-shell-active .modal-backdrop {
  background: #000000;
}

.mv-shell-active .modal-backdrop.in {
  opacity: 0.35;
}

/* SweetAlert confirmation dialogs (the "sweetalert" npm package: .swal-* classes) */

.swal-modal {
  border-radius: var(--mv-radius-lg) !important;
  font-family: var(--mv-font) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2) !important;
  padding-bottom: 8px !important;
}

.swal-title {
  font-family: var(--mv-font) !important;
  font-weight: 700 !important;
  color: var(--mv-text) !important;
  font-size: 20px !important;
}

.swal-text {
  font-family: var(--mv-font) !important;
  color: var(--mv-muted) !important;
  font-size: 14px !important;
  text-align: center !important;
}

.swal-icon--warning__body,
.swal-icon--warning__dot {
  background-color: var(--mv-primary) !important;
}

.swal-icon--warning {
  border-color: var(--mv-primary) !important;
}

.swal-footer {
  text-align: center !important;
  padding-top: 20px !important;
}

.swal-button-container {
  margin: 0 6px !important;
}

.swal-button {
  border-radius: var(--mv-radius-sm) !important;
  font-family: var(--mv-font) !important;
  font-weight: 500 !important;
  font-size: 14px !important;
  padding: 12px 24px !important;
  box-shadow: none !important;
}

.swal-button--confirm,
.swal-button--danger {
  background: var(--mv-primary) !important;
}

.swal-button--confirm:hover,
.swal-button--danger:hover {
  background: var(--mv-primary-hover) !important;
}

.swal-button--cancel {
  background: var(--mv-text-strong) !important;
  color: #ffffff !important;
}

.swal-button--cancel:hover {
  background: #000000 !important;
}

.swal-button:focus {
  box-shadow: 0 0 0 3px rgba(35, 147, 213, 0.25) !important;
}

/* =========================================================================
 * DataTables pagination + page-level toolbar shared by every legacy list
 * page (pill numbers with a dark active state, matching the "All Doctors"
 * table pagination in Figma).
 * ========================================================================= */

.mv-content .dataTables_paginate {
  display: flex;
  align-items: center;
  gap: 6px;
  float: right;
  padding: 0;
}

.mv-content .dataTables_paginate .paginate_button {
  font-family: var(--mv-font);
  font-size: 13px;
  font-weight: 500;
  color: var(--mv-text) !important;
  border: none !important;
  border-radius: 360px !important;
  padding: 8px 14px !important;
  margin: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.mv-content .dataTables_paginate .paginate_button.current {
  background: var(--mv-text-strong) !important;
  color: #ffffff !important;
}

.mv-content .dataTables_paginate .paginate_button:hover {
  background: var(--mv-surface-muted) !important;
  color: var(--mv-primary) !important;
}

.mv-content .dataTables_paginate .paginate_button.disabled {
  opacity: 0.35;
}

.mv-content .dataTables_info {
  font-family: var(--mv-font);
  font-size: 13px;
  color: var(--mv-muted);
}

.mv-content .dataTables_length,
.mv-content .dataTables_filter {
  font-family: var(--mv-font);
  font-size: 13px;
  color: var(--mv-text);
}

.mv-content .dataTables_length select,
.mv-content .dataTables_filter input {
  border: 1px solid var(--mv-border);
  border-radius: var(--mv-radius-sm);
  height: 34px;
  padding: 4px 10px;
}

/* DataTables' export toolbar buttons (Copy/CSV/PDF/Print) */
.mv-content .dt-buttons .btn,
.mv-content .buttons-copy,
.mv-content .buttons-csv,
.mv-content .buttons-pdf,
.mv-content .buttons-print {
  font-family: var(--mv-font);
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--mv-radius-sm) !important;
  border: 1px solid var(--mv-border) !important;
  background: var(--mv-surface-muted) !important;
  color: var(--mv-text) !important;
  box-shadow: none !important;
  padding: 8px 14px !important;
}

.mv-content .dt-buttons .btn:hover,
.mv-content .buttons-copy:hover,
.mv-content .buttons-csv:hover,
.mv-content .buttons-pdf:hover,
.mv-content .buttons-print:hover {
  border-color: var(--mv-primary) !important;
  color: var(--mv-primary) !important;
}

/* Page-level "All X" title + toolbar used above legacy list tables */
.mv-page-title {
  font-family: var(--mv-font);
  font-weight: 700;
  font-size: 24px;
  color: var(--mv-text);
  margin: 0 0 16px;
}

.mv-content .box {
  border-top: none;
  border-radius: var(--mv-radius-xl);
  box-shadow: 0 0 40px 0 rgba(0, 0, 0, 0.04);
  border: none;
}

.mv-content .box-header {
  border-bottom: 1px solid var(--mv-border);
  padding: 18px 20px;
}

.mv-content .box-header .box-title {
  font-family: var(--mv-font);
  font-weight: 700;
  font-size: 18px;
  color: var(--mv-text);
}

.mv-content .box .btn-success,
.mv-content .box .btn-primary {
  background: var(--mv-primary);
  border-color: var(--mv-primary);
  border-radius: var(--mv-radius-sm);
  font-family: var(--mv-font);
  font-weight: 500;
}

.mv-content .box .btn-success:hover,
.mv-content .box .btn-primary:hover {
  background: var(--mv-primary-hover);
  border-color: var(--mv-primary-hover);
}

@media (max-width: 640px) {
  .mv-shell-active .modal-dialog {
    margin: 16px;
    max-width: calc(100% - 32px);
  }

  .mv-shell-active .modal-footer {
    flex-direction: column;
  }
}

/* =========================================================================
 * Legacy "add/edit/view" boxes across the admin (Doctors, Patients,
 * Specialities, Blogs, Notifications, Reports, Backend Users) are toggled
 * with jQuery .show('slow')/.hide('slow') and pushed inline into the page
 * flow — not real modals, which is why they didn't match Figma's centered
 * overlay dialog. Converting them into floating centered dialogs purely
 * via CSS (position:fixed + a box-shadow backdrop) needs no JS changes in
 * any of those view files, since jQuery only ever toggles `display`.
 * ========================================================================= */

.mv-content .box[class*="edit_"],
.mv-content .box[class*="add_"],
.mv-content .box[class*="view_"] {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1050;
  width: 90%;
  max-width: 820px;
  max-height: 85vh;
  overflow-y: auto;
  margin: 0;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45), 0 20px 60px rgba(0, 0, 0, 0.25);
}

/* Inside the pseudo-modal add/edit/view boxes specifically, a "Cancel"
 * button conventionally reuses .btn-danger/.btn-default in the existing
 * markup — restyle those to the dark Cancel look from Figma, scoped so it
 * doesn't touch legitimate red delete buttons in table rows elsewhere. */
.mv-content .box[class*="edit_"] .btn-danger,
.mv-content .box[class*="add_"] .btn-danger,
.mv-content .box[class*="view_"] .btn-danger,
.mv-content .box[class*="edit_"] .btn-default,
.mv-content .box[class*="add_"] .btn-default,
.mv-content .box[class*="view_"] .btn-default {
  background: var(--mv-text-strong);
  border-color: var(--mv-text-strong);
  color: #ffffff;
  border-radius: var(--mv-radius-sm);
  font-family: var(--mv-font);
  font-weight: 500;
}

.mv-content .box[class*="edit_"] .btn-danger:hover,
.mv-content .box[class*="add_"] .btn-danger:hover,
.mv-content .box[class*="view_"] .btn-danger:hover,
.mv-content .box[class*="edit_"] .btn-default:hover,
.mv-content .box[class*="add_"] .btn-default:hover,
.mv-content .box[class*="view_"] .btn-default:hover {
  background: #000000;
  border-color: #000000;
  color: #ffffff;
}

.mv-content .box[class*="edit_"] .form-control,
.mv-content .box[class*="add_"] .form-control,
.mv-content .box[class*="view_"] .form-control {
  background: rgba(147, 147, 147, 0.05);
  border: 1px solid var(--mv-border);
  border-radius: var(--mv-radius-sm);
  box-shadow: none;
  height: 44px;
}

.mv-content .box[class*="edit_"] textarea.form-control,
.mv-content .box[class*="add_"] textarea.form-control,
.mv-content .box[class*="view_"] textarea.form-control {
  height: auto;
}

.mv-content .box[class*="edit_"] label,
.mv-content .box[class*="add_"] label,
.mv-content .box[class*="view_"] label {
  font-family: var(--mv-font);
  font-weight: 600;
  font-size: 13px;
  color: var(--mv-text);
}

/* ---------- Document cards (Patient/Doctor profile "Documents" grid) ---------- */

.mv-doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.mv-doc-card {
  position: relative;
  background: var(--mv-surface-muted);
  border: 1px solid var(--mv-border);
  border-radius: var(--mv-radius-md);
  padding: 20px 16px;
  text-align: center;
}

.mv-doc-card__icon {
  font-size: 28px;
  color: var(--mv-primary);
  margin-bottom: 10px;
}

.mv-doc-card__name {
  font-family: var(--mv-font);
  font-weight: 600;
  font-size: 13px;
  color: var(--mv-text);
  word-break: break-word;
}

.mv-doc-card__meta {
  font-size: 11px;
  color: var(--mv-muted);
  margin-top: 4px;
}

.mv-doc-card__action {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--mv-surface);
  border: 1px solid var(--mv-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mv-text);
}

.mv-doc-card__action:hover {
  color: var(--mv-primary);
  border-color: var(--mv-primary);
}

/* =========================================================================
 * Legacy AdminLTE sets `.content { margin-left: auto; margin-right: auto }`
 * (originally meant to center content under an old fixed-width layout).
 * `.mv-content` is a column flex container, and per the flexbox spec, an
 * `auto` margin on either side of a flex item's cross axis DISABLES
 * `align-items: stretch` for that item and centers it at its shrink-to-fit
 * width instead — which is exactly why `.content` (and anything else that
 * inherits this old centering trick) renders narrower than the panel with
 * visible side gutters instead of filling it. Neutralize it here.
 * ========================================================================= */
.mv-content > .content,
.mv-content .content {
  margin-left: 0;
  margin-right: 0;
  width: 100%;
}
