/* ============================================================
   TeleMedicine â€” Modern Healthcare UI  |  style.css
   Design: Clean clinical light theme with teal/blue palette
   ============================================================ */

/* â”€â”€ Google Fonts â”€â”€ */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Lora:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap");

/* â”€â”€ CSS Variables â”€â”€ */
:root {
  /* Brand Colors */
  --primary: #0d9488; /* teal-600 */
  --primary-dark: #0f766e; /* teal-700 */
  --primary-light: #ccfbf1; /* teal-100 */
  --primary-soft: #f0fdfa; /* teal-50  */
  --accent: #0ea5e9; /* sky-500  */
  --accent-soft: #e0f2fe; /* sky-100  */
  --success: #10b981; /* emerald-500 */
  --success-soft: #d1fae5;
  --warning: #f59e0b; /* amber-500 */
  --warning-soft: #fef3c7;
  --danger: #ef4444;
  --danger-soft: #fee2e2;
  --violet: #8b5cf6;
  --violet-soft: #ede9fe;

  /* Neutrals */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --border: #e2e8f0;
  --border-light: #f1f5f9;

  /* Text */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-white: #ffffff;

  /* Layout */
  --sidebar-w: 260px;
  --header-h: 68px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 6px rgba(0, 0, 0, 0.07);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);

  /* Typography */
  --font-sans: "Plus Jakarta Sans", sans-serif;
  --font-serif: "Lora", serif;
  --font-mono: "JetBrains Mono", monospace;
}

/* â”€â”€ Reset & Base â”€â”€ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}
ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
img {
  display: block;
  max-width: 100%;
}

/* ============================================================
   LAYOUT SHELL
   ============================================================ */
.admin-wrapper {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--header-h) 1fr;
  grid-template-areas:
    "sidebar header"
    "sidebar main";
  min-height: 100vh;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  grid-area: sidebar;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 200;
}

/* Brand */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-light);
  min-height: var(--header-h);
}

.sidebar-brand-logo {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.35);
}

.sidebar-brand-name {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}
.sidebar-brand-name span {
  color: var(--primary);
}

/* Nav */
.sidebar-nav {
  flex: 1;
  padding: 16px 0;
}

.nav-section-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 14px 20px 6px;
}

.nav-item {
  margin: 2px 10px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.18s ease;
  cursor: pointer;
  position: relative;
}
.nav-link:hover {
  background: var(--primary-soft);
  color: var(--primary);
}
.nav-link.active {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 700;
}
.nav-link.active::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 22px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}

.nav-icon {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--border-light);
  font-size: 14px;
  flex-shrink: 0;
  transition: background 0.18s;
}
.nav-link:hover .nav-icon,
.nav-link.active .nav-icon {
  background: var(--primary-soft);
  color: var(--primary);
}

.nav-badge {
  margin-left: auto;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
}
.nav-badge.new {
  background: var(--success-soft);
  color: var(--success);
}

/* Logout red */
.nav-link[data-bs-target="#logoutModal"] {
  color: var(--danger);
}
.nav-link[data-bs-target="#logoutModal"]:hover {
  background: var(--danger-soft);
}
.nav-link[data-bs-target="#logoutModal"] .nav-icon {
  color: var(--danger);
}

/* Sidebar user footer */
.sidebar-footer {
  border-top: 1px solid var(--border-light);
  padding: 14px 16px;
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  transition: background 0.18s;
}
.sidebar-user:hover {
  background: var(--bg-page);
}
.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-light);
}
.sidebar-user-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
}
.sidebar-user-role {
  font-size: 11px;
  color: var(--text-muted);
}

/* ============================================================
   HEADER / NAVBAR
   ============================================================ */
.header {
  grid-area: header;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 150;
  box-shadow: var(--shadow-xs);
}

.header-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}
.header-title span {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 13px;
  margin-left: 4px;
}

.header-search {
  flex: 1;
  max-width: 340px;
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.header-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}
.search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  font-size: 14px;
}
.header-search input {
  border: none;
  background: transparent;
  padding: 9px 12px 9px 36px;
  font-size: 13.5px;
  width: 100%;
  color: var(--text-primary);
  outline: none;
  font-family: var(--font-sans);
}
.header-search input::placeholder {
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.header-btn {
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 17px;
  cursor: pointer;
  position: relative;
  transition:
    background 0.18s,
    color 0.18s;
}
.header-btn:hover {
  background: var(--bg-page);
  color: var(--primary);
}

.badge-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--bg-card);
}

/* Profile pill */
.header-profile {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 10px 5px 5px;
  border-radius: 40px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition:
    background 0.18s,
    border-color 0.18s;
  background: var(--bg-card);
}
.header-profile:hover {
  background: var(--bg-page);
  border-color: var(--primary);
}
.header-profile img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.header-profile-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.header-profile-role {
  font-size: 10.5px;
  color: var(--text-muted);
}
.header-chevron {
  font-size: 12px;
  color: var(--text-muted);
  transition: transform 0.2s;
}

/* Profile dropdown */
.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 300;
}
.profile-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item-custom {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s;
}
.dropdown-item-custom:hover {
  background: var(--bg-page);
  color: var(--primary);
}
.dropdown-item-custom.danger {
  color: var(--danger);
}
.dropdown-item-custom.danger:hover {
  background: var(--danger-soft);
}
.dropdown-divider-custom {
  height: 1px;
  background: var(--border-light);
  margin: 4px 0;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  grid-area: main;
  padding: 28px 28px 40px;
  overflow-y: auto;
}

/* ============================================================
   PAGE HEADERS (shared pattern)
   ============================================================ */
.page-hero {
  margin-bottom: 28px;
}
.page-hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 6px;
}
.page-hero h1 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.4px;
  margin: 0 0 4px;
}
.page-hero p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

.page-actions {
  display: flex;
  gap: 10px;
  margin-left: auto;
  align-items: center;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary-hc {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.18s,
    box-shadow 0.18s;
  font-family: var(--font-sans);
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.3);
}
.btn-primary-hc:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.4);
}

.btn-ghost-hc {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s;
  font-family: var(--font-sans);
}
.btn-ghost-hc:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.btn-danger-hc {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--danger);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s;
  font-family: var(--font-sans);
}
.btn-danger-hc:hover {
  background: #dc2626;
}

/* Bootstrap btn overrides */
.btn-success {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  font-weight: 600;
  border-radius: var(--radius-sm) !important;
  font-family: var(--font-sans);
}
.btn-success:hover {
  background: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
}

.btn-primary {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  font-weight: 600;
  border-radius: var(--radius-sm) !important;
  font-family: var(--font-sans);
}

/* ============================================================
   CARDS
   ============================================================ */
.hc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.hc-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 22px 0;
  gap: 12px;
}
.hc-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}
.hc-card-subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.hc-card-body {
  padding: 20px 22px 22px;
}

.hc-card-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  border: none;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.18s;
  font-family: var(--font-sans);
}
.hc-card-action:hover {
  background: var(--primary-light);
}

/* Bootstrap card override */
.card {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-sm) !important;
  background: var(--bg-card) !important;
}
.card-body {
  padding: 22px !important;
}

/* ============================================================
   STAT CARDS (dashboard)
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition:
    box-shadow 0.2s,
    transform 0.2s;
}
.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.stat-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.stat-card.accent::after {
  background: var(--primary);
}
.stat-card.cyan::after {
  background: var(--accent);
}
.stat-card.amber::after {
  background: var(--warning);
}
.stat-card.green::after {
  background: var(--success);
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.stat-icon.accent {
  background: var(--primary-soft);
  color: var(--primary);
}
.stat-icon.cyan {
  background: var(--accent-soft);
  color: var(--accent);
}
.stat-icon.amber {
  background: var(--warning-soft);
  color: var(--warning);
}
.stat-icon.green {
  background: var(--success-soft);
  color: var(--success);
}

.stat-trend {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 1px;
}
.stat-trend.up {
  color: var(--success);
  background: var(--success-soft);
  padding: 3px 8px;
  border-radius: 20px;
}
.stat-trend.down {
  color: var(--danger);
  background: var(--danger-soft);
  padding: 3px 8px;
  border-radius: 20px;
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ============================================================
   QUICK STAT STRIP
   ============================================================ */
.quick-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.quick-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-xs);
}
.quick-stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}
.quick-stat-label {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.quick-stat-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}
.quick-stat-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* ============================================================
   CONTENT GRID (2 col cards)
   ============================================================ */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
@media (max-width: 1100px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   CHART
   ============================================================ */
.chart-area {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 160px;
  padding-bottom: 0;
}
.chart-bar-group {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  flex: 1;
}
.chart-bar {
  flex: 1;
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  transition: opacity 0.2s;
}
.chart-bar.primary {
  background: var(--primary);
}
.chart-bar.secondary {
  background: var(--primary-light);
}
.chart-bar:hover {
  opacity: 0.8;
}
.chart-labels {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.chart-label {
  flex: 1;
  text-align: center;
  font-size: 10px;
  color: var(--text-muted);
}

/* ============================================================
   ACTIVITY FEED
   ============================================================ */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}
.activity-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.activity-info {
  flex: 1;
}
.activity-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.activity-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 1px;
}
.activity-time {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ============================================================
   TABLES
   ============================================================ */
.table-hc {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.table-hc thead th {
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-page);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table-hc tbody tr {
  transition: background 0.15s;
}
.table-hc tbody tr:hover {
  background: var(--primary-soft);
  cursor: pointer;
}
.table-hc td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  vertical-align: middle;
}
.table-hc tr:last-child td {
  border-bottom: none;
}

/* Bootstrap table override */
.table {
  font-size: 13.5px;
}
.table thead th {
  background: var(--bg-page) !important;
  color: var(--text-muted) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border) !important;
  padding: 10px 14px !important;
}
.table-dark {
  background: var(--bg-page) !important;
}
.table-bordered {
  border: none !important;
}
.table-bordered td,
.table-bordered th {
  border: none !important;
  border-bottom: 1px solid var(--border-light) !important;
}
.table-striped > tbody > tr:nth-of-type(odd) > * {
  background: rgba(13, 148, 136, 0.03) !important;
}
.table tbody td {
  padding: 12px 14px;
  color: var(--text-secondary);
  vertical-align: middle;
}
.table tbody tr:hover {
  background: var(--primary-soft) !important;
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-cell img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.user-cell-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.user-cell-email {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* ============================================================
   BADGES / STATUS
   ============================================================ */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
}
.badge-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.badge-status.active {
  background: var(--success-soft);
  color: #059669;
}
.badge-status.active::before {
  background: #059669;
}
.badge-status.pending {
  background: var(--warning-soft);
  color: #d97706;
}
.badge-status.pending::before {
  background: #d97706;
}
.badge-status.inactive {
  background: var(--danger-soft);
  color: var(--danger);
}
.badge-status.inactive::before {
  background: var(--danger);
}

/* Bootstrap badge override */
.badge.bg-success {
  background: var(--success-soft) !important;
  color: #059669 !important;
  font-weight: 600;
  border-radius: 20px !important;
  padding: 4px 10px !important;
}
.badge.bg-warning {
  background: var(--warning-soft) !important;
  color: #d97706 !important;
  font-weight: 600;
  border-radius: 20px !important;
  padding: 4px 10px !important;
}
.badge.bg-danger {
  background: var(--danger-soft) !important;
  color: var(--danger) !important;
  font-weight: 600;
  border-radius: 20px !important;
  padding: 4px 10px !important;
}
.text-dark {
  color: var(--text-primary) !important;
}

/* ============================================================
   PROGRESS BARS
   ============================================================ */
.progress-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.progress-item-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}
.progress-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.progress-item-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}
.progress-track {
  height: 6px;
  background: var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 10px;
  transition: width 0.8s ease;
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-control,
.form-select {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  font-family: var(--font-sans) !important;
  font-size: 13.5px !important;
  color: var(--text-primary) !important;
  background: var(--bg-card) !important;
  padding: 10px 14px !important;
  transition:
    border-color 0.18s,
    box-shadow 0.18s !important;
}
.form-control:focus,
.form-select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12) !important;
  outline: none !important;
}
.form-control::placeholder {
  color: var(--text-muted) !important;
}

/* Floating label */
.form-floating > label {
  font-size: 13px !important;
  color: var(--text-muted) !important;
  padding-left: 14px !important;
}
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select ~ label {
  color: var(--primary) !important;
}
.form-floating > .form-control {
  padding-top: 22px !important;
  padding-bottom: 8px !important;
}

label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  display: block;
}
.text-muted {
  color: var(--text-muted) !important;
}
small.text-muted {
  font-size: 11.5px !important;
}

.form-control.bg-light {
  background: var(--bg-page) !important;
  color: var(--text-secondary) !important;
}

/* Section cards inside forms */
.section-card {
  background: var(--primary-soft);
  border: 1px solid var(--primary-light);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.section-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.logistics-box {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-top: 24px;
}

.timezone-box {
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid var(--primary);
}

/* ============================================================
   MEETING DETAIL CARDS
   ============================================================ */
.detail-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.detail-section-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.detail-section-icon.primary {
  background: var(--primary-soft);
  color: var(--primary);
}
.detail-section-icon.blue {
  background: var(--accent-soft);
  color: var(--accent);
}
.detail-section-icon.green {
  background: var(--success-soft);
  color: var(--success);
}

.detail-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}
.detail-row:last-child {
  border-bottom: none;
}
.detail-row-icon {
  color: var(--text-muted);
  font-size: 15px;
  margin-top: 2px;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
}
.detail-row-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.detail-row-value {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ============================================================
   MEET LINK BUTTONS
   ============================================================ */
.meet-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.18s;
  border: none;
  cursor: pointer;
}
.meet-link-btn.doctor {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
}
.meet-link-btn.patient {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}
.meet-link-btn.upload {
  background: var(--warning);
  color: #fff;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}
.meet-link-btn.view {
  background: var(--violet);
  color: #fff;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}
.meet-link-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* ============================================================
   PUBLIC PAGES (login, upload, join, enterPin, viewDocuments)
   ============================================================ */

/* Top header bar for public pages */
.top-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  box-shadow: var(--shadow-xs);
}
.brand-icon {
  font-size: 22px;
  color: var(--primary);
}
.brand-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}
.user-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Public page app-main */
.app-main {
  min-height: calc(100vh - 58px);
}
.app-content {
  padding: 32px 0;
}

/* â”€â”€ LOGIN PAGE â”€â”€ */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #f0fdfa 0%, #e0f2fe 50%, #f8fafc 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 44px 40px;
  width: 100%;
  max-width: 420px;
}
.login-logo {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  box-shadow: 0 6px 24px rgba(13, 148, 136, 0.35);
  font-size: 30px;
  color: #fff;
}
.login-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  text-align: center;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}
.login-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 32px;
}

/* â”€â”€ UPLOAD CARD â”€â”€ */
.upload-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 560px;
  margin: 0 auto;
  box-shadow: var(--shadow-md);
}
.upload-box {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  text-align: center;
  background: var(--primary-soft);
  transition: border-color 0.2s;
}
.upload-box:hover {
  border-color: var(--primary);
}
.upload-icon {
  width: 64px;
  height: 64px;
  background: var(--primary-light);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 28px;
  color: var(--primary);
}
.upload-box h5 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

/* â”€â”€ PIN CARD â”€â”€ */
.pin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px;
  max-width: 400px;
  margin: 0 auto;
  box-shadow: var(--shadow-md);
  text-align: center;
}
.pin-icon {
  width: 64px;
  height: 64px;
  background: var(--primary-soft);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 28px;
  color: var(--primary);
}
.pin-input-wrapper {
  max-width: 200px;
  margin: 0 auto;
}
.pin-input-wrapper .form-control {
  font-size: 22px !important;
  font-weight: 700 !important;
  letter-spacing: 0.25em;
  text-align: center;
  font-family: var(--font-mono) !important;
}

/* â”€â”€ DOCUMENT CARD â”€â”€ */
.document-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  /* width: 700px; */
  /* max-width: 900px; */
  /* margin: 0 auto; */
  box-shadow: var(--shadow-md);
}
.doc-item {
  background: var(--primary-soft);
  border: 1px solid var(--primary-light);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition:
    box-shadow 0.2s,
    transform 0.2s;
  text-align: center;
}
.doc-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.doc-icon {
  width: 52px;
  height: 52px;
  background: var(--primary-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 22px;
  color: var(--primary);
}
.doc-item h6 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}
.doc-type {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.empty-state {
  padding: 48px 24px;
}
.empty-state i {
  font-size: 48px;
  color: var(--border);
  display: block;
  margin-bottom: 14px;
}
.empty-state h5 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

/* â”€â”€ JOIN / VIDEO PAGE â”€â”€ */
.meet-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  box-shadow: var(--shadow-xs);
}
.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo-section {
  display: flex;
  align-items: center;
  gap: 12px;
}
.modern-logo {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
}
.brand-text {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
}

.meeting-info-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 13px;
  color: var(--text-secondary);
}
.meeting-id-badge {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  font-family: var(--font-mono);
}
.copy-icon {
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.18s;
}
.copy-icon:hover {
  color: var(--primary);
}

.participant-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--success-soft);
  border: 1px solid #a7f3d0;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #059669;
}
.avatar {
  width: 28px;
  height: 28px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 14px;
}

.main-container {
  padding: 16px 24px 24px;
  /* Fill the remaining viewport height below the header */
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
}
.participant-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-xs);
  flex-shrink: 0;
}
.participant-details {
  display: flex;
  gap: 32px;
}
.detail-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.detail-icon {
  width: 36px;
  height: 36px;
  background: var(--primary-soft);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}
.detail-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.detail-value {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
}
.role-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 700;
}

.video-wrapper {
  background: #0f172a;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* ── Join page: full-viewport flex column so meet-split fills exactly
   what remains below the header — no calc() magic numbers needed.
   Scoped to body:has(.main-container) so it only applies on join.ejs.
──────────────────────────────────────────────────────────────────── */
body:has(.main-container) {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}

body:has(.main-container) .meet-header {
  flex-shrink: 0;
}

/* ── Mobile: join.css owns the meeting layout entirely ──
   Scoped to pages that have .main-container (the Jitsi join page).
   Without this scope the overflow:hidden bleeds onto post-call screens
   and makes them un-scrollable on mobile.
── */
@media (max-width: 600px) {
  body:has(.main-container) {
    overflow: hidden !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
  }
  .main-container {
    padding: 0 !important;
    margin: 0 !important;
    min-height: 0 !important;
    max-height: none !important;
  }
  #jitsi-container,
  #jitsi-container iframe {
    min-height: 0 !important;
    height: 100% !important;
  }
  .video-wrapper {
    border-radius: 0 !important;
    box-shadow: none !important;
    min-height: 0 !important;
  }
  /* Kill the desktop #jitsi-container min-height */
  #jitsi-container { min-height: 0 !important; }
}

.toast-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--text-primary);
  color: #fff;
  border-radius: 40px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 9999;
}
.toast-notification.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-content {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-lg) !important;
  background: var(--bg-card) !important;
}
.modal-header {
  border-bottom: 1px solid var(--border-light) !important;
  padding: 18px 22px !important;
}
.modal-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-body {
  padding: 20px 22px !important;
  font-size: 14px;
  color: var(--text-secondary);
}
.modal-footer {
  border-top: 1px solid var(--border-light) !important;
  padding: 14px 22px !important;
  display: flex;
  gap: 10px;
}
.btn-close {
  opacity: 0.5;
}

/* â”€â”€ Logout modal buttons â”€â”€ */
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all 0.18s;
}
.btn-ghost:hover {
  border-color: var(--text-secondary);
}
.btn-danger-custom {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--danger);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-sans);
  transition: background 0.18s;
}
.btn-danger-custom:hover {
  background: #dc2626;
  color: #fff;
}

/* ============================================================
   PAGE HEADER (dashboard)
   ============================================================ */
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}
.page-greeting {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 500;
}
.page-header h1 {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  margin: 0;
}
.page-header h1 span {
  color: var(--primary);
}
.page-header-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.btn-primary-custom {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
  transition: background 0.18s;
}
.btn-primary-custom:hover {
  background: var(--primary-dark);
}
.btn-secondary-custom {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
  text-decoration: none;
  transition: all 0.18s;
}
.btn-secondary-custom:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

/* "card-modern" aliases for backward compat */
.card-modern {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header-modern {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 22px 0;
  gap: 12px;
}
.card-title-modern {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}
.card-subtitle-modern {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.card-body-modern {
  padding: 16px 22px 22px;
}
.card-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  border: none;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.18s;
  font-family: var(--font-sans);
}
.card-action-btn:hover {
  background: var(--primary-light);
}

.table-modern {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.table-modern thead th {
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-page);
  border-bottom: 1px solid var(--border);
}
.table-modern tbody tr {
  transition: background 0.15s;
}
.table-modern tbody tr:hover {
  background: var(--primary-soft);
  cursor: pointer;
}
.table-modern td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  vertical-align: middle;
}
.table-modern tr:last-child td {
  border-bottom: none;
}
.action-btn-table {
  border: none;
  background: var(--bg-page);
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s;
  font-size: 14px;
}
.action-btn-table:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

/* ============================================================
   SETTINGS PAGE
   ============================================================ */
.setting-preview-img {
  max-height: 100px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  padding: 8px;
  background: var(--bg-page);
}

/* ============================================================
   FOOTER (admin)
   ============================================================ */
footer {
  background: var(--bg-card) !important;
  border-top: 1px solid var(--border) !important;
  padding: 14px 24px !important;
  font-size: 12.5px !important;
  color: var(--text-muted) !important;
  text-align: center;
}

/* ============================================================
   SIDEBAR OVERLAY (mobile)
   ============================================================ */
@media (max-width: 991px) {
  .admin-wrapper {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "main";
  }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-w);
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    padding: 20px 16px 32px;
  }
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ============================================================
   UTILITY
   ============================================================ */
.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md) !important;
  transition: all 0.2s;
}
.text-700 {
  font-weight: 700;
}
.text-primary-hc {
  color: var(--primary) !important;
}
.gap-12 {
  gap: 12px;
}
.app-content .container-fluid {
  max-width: 1400px;
}

/* ── Toast Container ── */
#toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

/* ── Toast Base ── */
.mm-toast {
  pointer-events: all;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  min-width: 320px;
  max-width: 400px;
  padding: 15px 16px 18px;
  border-radius: 16px;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  animation: toast-in 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.mm-toast.toast-hiding {
  animation: toast-out 0.28s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}

/* ── Success Variant — deep forest green background ── */
.mm-toast.toast-success {
  background: #0d5c3a;
  border-color: rgba(52, 211, 153, 0.35);
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.25),
    0 16px 40px -4px rgba(5, 150, 105, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ── Error Variant — deep crimson background ── */
.mm-toast.toast-error {
  background: #5c0d0d;
  border-color: rgba(248, 113, 113, 0.35);
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.25),
    0 16px 40px -4px rgba(220, 38, 38, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ── Icon Bubble ── */
.mm-toast-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  position: relative;
  top: 1px;
}

.toast-success .mm-toast-icon {
  background: rgba(52, 211, 153, 0.2);
  color: #6ee7b7;
}

.toast-error .mm-toast-icon {
  background: rgba(248, 113, 113, 0.2);
  color: #fca5a5;
}

/* ── Body ── */
.mm-toast-body {
  flex: 1;
  min-width: 0;
}

/* Label: "SUCCESS" / "ERROR" */
.mm-toast-label {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.toast-success .mm-toast-label {
  color: #6ee7b7;
}

.toast-error .mm-toast-label {
  color: #fca5a5;
}

/* ── Main message — always solid white for max readability ── */
.mm-toast-msg {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.5;
  color: #ffffff !important;
  word-break: break-word;
  opacity: 1 !important;
}

/* ── Close Button ── */
.mm-toast-close {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.65);
  transition:
    color 0.15s,
    background 0.15s;
  padding: 0;
}

.mm-toast-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.22);
}

.mm-toast-close i {
  font-size: 12px;
}

/* ── Progress Bar ── */
.mm-toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  border-radius: 0 0 16px 16px;
  transform-origin: left;
  animation: toast-progress var(--toast-duration, 4000ms) linear forwards;
}

.toast-success .mm-toast-progress {
  background: linear-gradient(90deg, #059669, #6ee7b7);
}

.toast-error .mm-toast-progress {
  background: linear-gradient(90deg, #dc2626, #fca5a5);
}

/* ── Keyframes ── */
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(calc(100% + 32px)) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
    max-height: 120px;
    margin-bottom: 0;
    padding-top: 15px;
    padding-bottom: 18px;
  }
  to {
    opacity: 0;
    transform: translateX(calc(100% + 32px)) scale(0.88);
    max-height: 0;
    margin-bottom: -12px;
    padding-top: 0;
    padding-bottom: 0;
  }
}

@keyframes toast-progress {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}



<!-- ── Customer Theme ── -->
<% const _theme = customerSettings?.theme || 'light' %>

  <% if (_theme === 'dark') { %>
  :root {
    --bg-page:    #0f172a;
    --bg-card:    #1e293b;
    /* --bg-subtle:  #1e293b; */
    --bg-subtle:  #fff;
    --border:     #334155;
    --border-light: #334155;
    --text-primary:   #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted:     #64748b;
    --primary:        #0d9488;
    --primary-dark:   #0f766e;
    --primary-light:  #134e4a;
    --primary-soft:   #0f2b28;
    --accent:         #0ea5e9;
    --accent-soft:    #0c2a3a;
  }
  body { background: #0f172a; color: #f1f5f9; }
  <% } else if (_theme === 'blue') { %>
  :root {
    --primary:       #2563eb;
    --primary-dark:  #1d4ed8;
    --primary-light: #bfdbfe;
    --primary-soft:  #eff6ff;
    --accent:        #0ea5e9;
    --accent-soft:   #e0f2fe;
  }
  <% } %>
