/**
 * dashboards.css - Dual Lighting Mode & Professional Medical Components
 * Dr. Abdullah Al-Hawas Veterinary Clinic (عيادة الدكتور عبدالله الحواس البيطرية)
 */

/* Dashboard Header */
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}

.dashboard-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
}

.dashboard-subtitle {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  margin-top: 3px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Metrics Bar */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  clear: both;
}

.metric-card {
  padding: 14px 18px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  min-height: 76px;
  max-height: 96px;
  height: auto;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
}

body.theme-high-sunlight .metric-card {
  border: 2px solid #000000;
}

.metric-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.icon-blue { background: #e0f2fe; color: #0284c7; border: 1px solid #bae6fd; }
.icon-amber { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.icon-red { background: #fee2e2; color: #be123c; border: 1px solid #fca5a5; }
.icon-emerald { background: #ccfbf1; color: #0f766e; border: 1px solid #99f6e4; }
.icon-purple { background: #f3e8ff; color: #7e22ce; border: 1px solid #d8b4fe; }

.metric-info {
  display: flex;
  flex-direction: column;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-main);
}

.metric-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 3px;
}

/* Housing Identifiers Tags */
.housing-tags-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.housing-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-main);
  font-family: monospace;
}

.housing-pill strong {
  color: var(--accent-primary);
  font-weight: 700;
}

/* Filter Bar & View Toggle */
.filter-bar {
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

body.theme-high-sunlight .filter-bar {
  border: 2px solid #000000;
}

.filter-left-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
}

.search-box {
  min-width: 240px;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0 10px;
}

body.theme-high-sunlight .search-box {
  border: 2px solid #000000;
}

.search-box:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.search-icon {
  font-size: 1rem;
  color: var(--text-muted);
}

.search-box .input-control {
  border: none;
  background: transparent;
  padding: 8px 10px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: none;
}

.search-box .input-control:focus {
  box-shadow: none;
}

.view-toggle-group {
  display: flex;
  background: #f1f5f9;
  border: 1px solid var(--border-subtle);
  padding: 3px;
  border-radius: var(--radius-sm);
  gap: 3px;
}

.view-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 6px 12px;
  font-size: 0.825rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.view-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(15, 118, 110, 0.3);
}

/* Patient Table List View */
.patient-table-card {
  padding: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

body.theme-high-sunlight .patient-table-card {
  border: 2px solid #000000;
}

.clean-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.clean-table th {
  text-align: right;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1.5px solid var(--border-subtle);
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.85rem;
}

.clean-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text-main);
  vertical-align: middle;
}

.clean-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.clean-table tbody tr:hover {
  background: #f1f5f9;
}

.patient-identity-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.species-avatar-mini {
  font-size: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.patient-avatar-photo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--border-subtle);
  display: inline-block;
  flex-shrink: 0;
}

.patient-hero-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-primary);
  display: inline-block;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.patient-card-photo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-subtle);
  display: inline-block;
  flex-shrink: 0;
}

.table-actions-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Checklist View & Smart Task Cards */
.checklist-subtabs-bar {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

body.theme-high-sunlight .checklist-subtabs-bar {
  border: 2px solid #000000;
}

.task-checklist-card {
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}

body.theme-high-sunlight .task-checklist-card {
  border: 2px solid #000000;
}

.task-checklist-card:hover {
  border-color: #94a3b8;
  box-shadow: var(--shadow-md);
}

.task-checklist-card.task-due {
  border-color: #f59e0b;
  background: #fffbeb;
}

.task-checklist-card.task-done {
  border-color: #0f766e;
  background: #f0fdfa;
}

/* Reception Action Buttons Grid & Segmented Tabs */
.reception-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}

.segmented-tabs-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: #ffffff;
  padding: 5px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-subtle);
  width: 100%;
  box-shadow: var(--shadow-sm);
}

body.theme-high-sunlight .segmented-tabs-nav {
  border: 2px solid #000000;
}

.segmented-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 12px 18px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  width: 100%;
  white-space: nowrap;
}

.segmented-tab-btn:hover {
  color: var(--text-main);
  background: #f1f5f9;
}

.segmented-tab-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.35);
}

/* Treatment Plan Builder & Dynamic Rows */
.treatment-plan-builder-box {
  background: #f8fafc;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 14px;
  margin-bottom: 24px;
}

body.theme-high-sunlight .treatment-plan-builder-box {
  border: 2px solid #000000;
}

.builder-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1.5px solid #e2e8f0;
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.dynamic-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dynamic-presc-row {
  display: grid;
  grid-template-columns: 120px 1.2fr 1fr 90px 100px 80px 160px 36px;
  gap: 8px;
  align-items: center;
  background: #ffffff;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease;
}

body.theme-high-sunlight .dynamic-presc-row {
  border: 2px solid #000000;
}

.dynamic-presc-row:hover {
  border-color: var(--border-focus);
}

.dynamic-presc-row.row-med { border-right: 4px solid #0f766e; }
.dynamic-presc-row.row-fluid { border-right: 4px solid #0284c7; }
.dynamic-presc-row.row-procedure { border-right: 4px solid #b45309; }

/* Camera Verification Viewfinder */
.camera-verification-box {
  background: #f8fafc;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 16px;
}

body.theme-high-sunlight .camera-verification-box {
  border: 2px solid #000000;
}

.camera-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.camera-box-header h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.camera-viewfinder-wrap {
  width: 100%;
  height: 260px;
  background: #0f172a;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--border-card);
}

.camera-video-element {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-snapshot-preview {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-snapshot-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.camera-controls-bottom {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

/* Owner Portal Story Cards */
.mobile-owner-app {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 8px 30px;
}

.story-card {
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

body.theme-high-sunlight .story-card {
  border: 2px solid #000000;
}

.story-photo-box {
  width: 100%;
  max-height: 300px;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  margin: 10px 0;
  border: 1.5px solid var(--border-subtle);
  background: #f1f5f9;
  cursor: pointer;
}

.story-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-proof-tag {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.story-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1.5px solid #e2e8f0;
  padding-top: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

/* Messages & Case Chat */
.messages-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  overflow-y: auto;
}

.chat-bubble-wrap {
  display: flex;
  width: 100%;
}

.chat-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  box-shadow: var(--shadow-sm);
}

.bubble-clinic .chat-bubble {
  background: var(--accent-primary);
  color: #ffffff;
  border-bottom-left-radius: 4px;
}

.bubble-owner .chat-bubble {
  background: #ffffff;
  color: #0f172a;
  border: 1.5px solid #cbd5e1;
  border-bottom-right-radius: 4px;
}

.chat-input-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #ffffff;
  border-top: 1.5px solid var(--border-subtle);
}

/* Responsive Media Queries for Tablet & Mobile */
@media (max-width: 960px) {
  .metrics-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    margin-top: 12px !important;
    margin-bottom: 16px !important;
  }

  .metric-card, .metrics-grid > .glass-panel {
    padding: 12px 14px !important;
  }

  .metric-value, .metrics-grid > .glass-panel div[style*="font-size"] {
    font-size: 1.35rem !important;
  }

  .metric-label, .metrics-grid > .glass-panel span {
    font-size: 0.75rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .dynamic-presc-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding: 12px !important;
    position: relative !important;
    border-radius: 8px !important;
  }

  .dynamic-presc-row .presc-type { flex: 1 1 120px !important; }
  .dynamic-presc-row .presc-name { flex: 2 1 180px !important; }
  .dynamic-presc-row .presc-dose { flex: 1 1 130px !important; }
  .dynamic-presc-row .presc-route { flex: 1 1 110px !important; }
  .dynamic-presc-row .presc-freq { flex: 1 1 110px !important; }
  .dynamic-presc-row .presc-days { flex: 1 1 80px !important; }
  .dynamic-presc-row .presc-assigned-vet { flex: 2 1 160px !important; }

  .dynamic-presc-row .btn-remove-row {
    width: 100% !important;
    height: 38px !important;
    margin-top: 4px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 6px !important;
  }
}

@media (max-width: 768px) {
  .dashboard-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .header-actions .btn {
    flex: 1;
    justify-content: center;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    gap: 10px;
  }

  .filter-left-controls {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 8px;
  }

  .scope-toggle-group {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px;
    display: flex;
    gap: 4px;
    background: #f1f5f9 !important;
    border: 1.5px solid #cbd5e1 !important;
  }

  .scope-toggle-group .btn {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 0.78rem;
  }

  .search-box {
    width: 100%;
    min-width: 0;
  }

  .view-toggle-group {
    width: 100%;
    display: flex;
    justify-content: space-between;
  }

  .view-toggle-group .view-btn {
    flex: 1;
    text-align: center;
    padding: 8px 4px;
    font-size: 0.78rem;
  }

  .checklist-subtabs-bar {
    flex-direction: column;
    align-items: stretch !important;
    gap: 8px;
    padding: 10px !important;
  }

  .checklist-subtabs-bar > div {
    display: flex;
    width: 100%;
    gap: 6px;
  }

  .checklist-subtabs-bar .btn-checklist-subtab {
    flex: 1;
    justify-content: center;
    min-height: 40px;
  }

  .checklist-tasks-grid {
    grid-template-columns: 1fr !important;
  }

  .patient-cards-grid {
    grid-template-columns: 1fr !important;
  }

  .camera-viewfinder-wrap {
    height: 220px;
  }
}

@media (max-width: 640px) {
  .mobile-owner-app {
    padding: 0 4px 20px 4px;
  }

  .story-card {
    padding: 14px;
    margin-bottom: 14px;
  }

  .story-photo-box {
    max-height: 220px;
  }

  .story-card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .story-seen-action {
    width: 100%;
  }

  .story-seen-action .btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }

  .chat-input-bar {
    padding: 8px;
    gap: 6px;
  }
}

/* Floating Doctor Chat FAB Action Button */
.btn-floating-chat {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-primary, #0f766e);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 50px;
  border: 2px solid #ffffff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease, background 0.2s ease;
}

.btn-floating-chat:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  background: #0d9488;
}

.btn-floating-chat:active {
  transform: scale(0.96);
}

body.theme-high-sunlight .btn-floating-chat {
  background: #000000;
  color: #ffffff;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

@media (max-width: 640px) {
  .btn-floating-chat {
    bottom: 16px;
    left: 16px;
    padding: 10px 16px;
    font-size: 0.88rem;
  }
}

/* =========================================================
   VIP CAMEL & PET OWNER PORTAL LUXURY REDESIGN (بوابة المالك المطورة)
   ========================================================= */
.vip-owner-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 8px 12px 90px;
}

/* 1. VIP Owner Top Welcome Header */
.vip-owner-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.vip-owner-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vip-owner-avatar-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0f766e, #065f46);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  border: 2px solid #34d399;
  box-shadow: 0 4px 10px rgba(15, 118, 110, 0.25);
}

.vip-owner-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}

.vip-owner-phone-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  margin-top: 2px;
}

.vip-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-vip-admin-return {
  background: #1e293b;
  color: #ffffff;
  font-weight: 700;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.8rem;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.btn-vip-admin-return:hover {
  background: #334155;
  transform: translateY(-1px);
}

.btn-vip-logout {
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 700;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 0.8rem;
  border: 1px solid #fecaca;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.btn-vip-logout:hover {
  background: #fca5a5;
}

/* 2. VIP Camel Hero Card */
.vip-camel-hero-card {
  background: linear-gradient(135deg, #064e3b 0%, #0f766e 65%, #115e59 100%);
  border-radius: 20px;
  padding: 20px;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(6, 78, 59, 0.35);
  border: 1.5px solid rgba(52, 211, 153, 0.3);
  margin-bottom: 16px;
}

.vip-camel-hero-card::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.vip-hero-top-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.vip-live-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.25);
  border: 1px solid #34d399;
  color: #ecfdf5;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 30px;
  backdrop-filter: blur(8px);
}

.vip-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
  animation: pulseGreen 1.5s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px #34d399; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.vip-case-number-badge {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
}

.vip-hero-main-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.vip-hero-photo-wrap {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 3px solid #fbbf24;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  background: #064e3b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  flex-shrink: 0;
  overflow: hidden;
}

.vip-hero-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vip-hero-text-wrap {
  flex: 1;
}

.vip-camel-name {
  font-size: 1.45rem;
  font-weight: 900;
  margin: 0 0 4px;
  letter-spacing: -0.5px;
}

.vip-camel-meta {
  font-size: 0.82rem;
  opacity: 0.9;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.vip-hero-diagnosis-box {
  margin-top: 14px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.85rem;
  line-height: 1.4;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 3. Structured Camel Vitals & Housing Grid */
.vip-vitals-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.vip-vital-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}

.vip-vital-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

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

.vip-vital-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: block;
}

.vip-vital-value {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

/* 4. Elegant Segmented Pill Navigation Bar */
.vip-pill-navigation {
  display: flex;
  background: var(--bg-surface);
  padding: 5px;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  margin-bottom: 16px;
  gap: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.vip-nav-pill-btn {
  flex: 1;
  min-width: 120px;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.vip-nav-pill-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.35);
  font-weight: 800;
}

.vip-nav-pill-btn:not(.active):hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-main);
}

/* 5. Sleek Floating Action Button */
.vip-floating-action-fab {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 1050;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #0f766e, #0d9488);
  color: #ffffff;
  padding: 14px 22px;
  border-radius: 50px;
  border: 2px solid #ffffff;
  box-shadow: 0 8px 25px rgba(15, 118, 110, 0.45);
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.vip-floating-action-fab:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.55);
  background: linear-gradient(135deg, #0d9488, #14b8a6);
}

.vip-floating-action-fab:active {
  transform: scale(0.96);
}

@media (max-width: 640px) {
  .vip-owner-container {
    padding: 6px 8px 80px;
  }

  .vip-camel-name {
    font-size: 1.25rem;
  }

  .vip-vitals-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .vip-vital-card {
    padding: 10px;
  }

  .vip-floating-action-fab {
    bottom: 16px;
    left: 16px;
    padding: 12px 18px;
    font-size: 0.88rem;
  }
}

/* =========================================================
   STEP 1: MULTI-CAMEL PATIENT SELECTOR VIEW (قائمة الحلال المنوم)
   ========================================================= */
.vip-selector-header-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.vip-selector-title-wrap h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 4px;
}

.vip-selector-title-wrap p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0;
}

.vip-camels-selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.vip-camel-select-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.vip-camel-select-card:hover {
  transform: translateY(-4px);
  border-color: #10b981;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.18);
}

.vip-camel-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.vip-card-avatar-wrap {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #f0fdf4;
  border: 2.5px solid #fbbf24;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.vip-card-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vip-card-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 800;
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.vip-camel-card-info {
  margin-bottom: 14px;
}

.vip-card-camel-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 4px;
}

.vip-card-case-badge {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: inline-block;
  margin-bottom: 8px;
}

.vip-card-housing-strip {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.vip-card-diagnosis-line {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.btn-open-camel-details {
  width: 100%;
  background: linear-gradient(135deg, #0f766e, #0d9488);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  margin-top: 10px;
}

.btn-open-camel-details:hover {
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.3);
}

/* Back to Selector Navigation Button */
.btn-back-to-selector {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  color: var(--text-main);
  border: 1.5px solid var(--border-subtle);
  border-radius: 30px;
  padding: 8px 18px;
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.btn-back-to-selector:hover {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.25);
}

/* Uploaded Reports & Attachments Card Styles */
.vip-uploaded-report-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.vip-uploaded-report-card:hover {
  border-color: #0f766e;
  box-shadow: 0 6px 18px rgba(15, 118, 110, 0.15);
}

.vip-report-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.vip-report-icon-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vip-report-type-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #f0fdf4;
  color: #0f766e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border: 1.5px solid #bbf7d0;
  flex-shrink: 0;
}

.vip-report-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}

.vip-report-meta-text {
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.vip-report-preview-box {
  width: 100%;
  max-height: 220px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  margin: 10px 0;
  border: 1.5px solid var(--border-subtle);
  background: #f8fafc;
  cursor: pointer;
}

.vip-report-preview-img {
  width: 100%;
  height: 100%;
  max-height: 220px;
  object-fit: cover;
  display: block;
}

.vip-report-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.btn-report-preview-action {
  background: #0f766e;
  color: #ffffff;
  font-weight: 700;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.825rem;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-report-preview-action:hover {
  background: #0d9488;
}

.btn-report-download-action {
  background: var(--bg-surface);
  color: var(--text-main);
  font-weight: 700;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.825rem;
  border: 1.5px solid var(--border-subtle);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-report-download-action:hover {
  background: #e2e8f0;
}

/* ==========================================================================
   DAILY VET STATUS BULLETIN & DISCHARGE READINESS STYLES
   ========================================================================== */

.vip-bulletin-card {
  background: #ffffff;
  border-radius: 16px;
  border: 2px solid #0f766e;
  box-shadow: 0 4px 20px rgba(15, 118, 110, 0.08);
  margin-bottom: 16px;
  overflow: hidden;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.vip-bulletin-card.ready-discharge-active {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2), 0 8px 24px rgba(16, 185, 129, 0.12);
}

/* 1. Discharge Readiness Celebration Banner */
.vip-discharge-ready-banner {
  background: linear-gradient(135deg, #064e3b, #047857);
  color: #ffffff;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  animation: pulseGlow 3s infinite alternate;
}

@keyframes pulseGlow {
  0% { background: linear-gradient(135deg, #064e3b, #047857); }
  100% { background: linear-gradient(135deg, #065f46, #059669); }
}

.vip-discharge-text-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vip-discharge-icon {
  font-size: 32px;
  animation: bounceCelebration 2s infinite ease-in-out;
}

@keyframes bounceCelebration {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.1); }
}

.vip-discharge-title {
  margin: 0 0 2px 0;
  font-size: 1.05rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.vip-discharge-desc {
  margin: 0;
  font-size: 0.8rem;
  color: #d1fae5;
  line-height: 1.4;
}

.vip-btn-discharge-contact {
  background: #25d366;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 8px 18px;
  border-radius: 24px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.vip-btn-discharge-contact:hover {
  background: #22c35e;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.45);
}

/* 2. Main Bulletin Inner Content */
.vip-bulletin-inner {
  padding: 16px 18px;
}

.vip-bulletin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.vip-bulletin-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vip-bulletin-badge-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(15, 118, 110, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #0f766e;
}

.vip-bulletin-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
}

.vip-bulletin-author {
  font-size: 0.78rem;
  font-weight: 700;
  color: #0f766e;
}

.vip-bulletin-time {
  font-size: 0.78rem;
  color: #64748b;
  background: #f1f5f9;
  padding: 4px 10px;
  border-radius: 14px;
}

.vip-bulletin-body {
  background: #f8fafc;
  border-right: 4px solid #0f766e;
  border-radius: 0 10px 10px 0;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.vip-bulletin-text {
  margin: 0;
  font-size: 0.925rem;
  line-height: 1.6;
  color: #1e293b;
  font-weight: 600;
}

/* 3. History Drawer & Accordion */
.vip-bulletin-history-container {
  margin-top: 10px;
  border-top: 1px dashed #e2e8f0;
  padding-top: 10px;
}

.btn-toggle-bulletin-history {
  background: transparent;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-toggle-bulletin-history:hover {
  background: #f1f5f9;
  color: #0f766e;
  border-color: #0f766e;
}

.history-chevron {
  font-size: 0.65rem;
  transition: transform 0.2s ease;
}

.vip-bulletin-history-drawer {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding: 4px;
}

.vip-history-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.85rem;
}

.vip-history-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.vip-history-item-text {
  margin: 0;
  color: #334155;
  line-height: 1.4;
}

/* ==========================================================================
   LABORATORY SPECIALIST PORTAL STYLES
   ========================================================================== */

.lab-portal-wrapper {
  animation: fadeIn 0.3s ease-in-out;
}

.lab-order-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lab-order-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.chip-lab:hover {
  background: #ede9fe !important;
  border-color: #c4b5fd !important;
}

.user-badge-role.lab {
  background: rgba(109, 40, 217, 0.18);
  color: #8b5cf6;
  border: 1px solid rgba(139, 92, 246, 0.4);
}

/* ==========================================================================
   CHRONOLOGICAL VIDEO TIMELINE & MEDIA ARCHIVE STYLES
   ========================================================================== */

.vip-video-timeline-section {
  animation: fadeIn 0.3s ease-in-out;
}

.vip-video-timeline-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vip-video-timeline-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.vip-video-player-wrapper video {
  width: 100%;
  max-height: 380px;
  background: #000000;
  border-radius: 12px;
}

.video-log-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.video-log-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.09);
}

.video-log-card video {
  width: 100%;
  max-height: 240px;
  background: #000000;
  border-radius: 10px;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* ==========================================================================
   ATTENDING VET PROFILE BADGE & RE-ASSIGNMENT MODAL STYLES
   ========================================================================== */

.vet-profile-clickable-badge {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.vet-profile-clickable-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  filter: brightness(0.97);
}

.vet-supervisor-badge {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.vet-supervisor-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
  filter: brightness(0.96);
}

.vet-dose-admin-badge {
  transition: all 0.2s ease;
}

.vet-reassign-option {
  transition: all 0.2s ease;
}

.vet-reassign-option:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Video Modal Instant Autocomplete Suggestions */
.video-suggestion-item {
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-suggestion-item:hover {
  background: #f0fdf4 !important;
  border-color: #4ade80 !important;
  transform: translateX(-2px);
  box-shadow: 0 3px 10px rgba(22, 163, 74, 0.12);
}

#video-search-suggestions::-webkit-scrollbar,
#video-search-results-list::-webkit-scrollbar {
  width: 6px;
}

#video-search-suggestions::-webkit-scrollbar-track,
#video-search-results-list::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 6px;
}

#video-search-suggestions::-webkit-scrollbar-thumb,
#video-search-results-list::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 6px;
}

#video-search-suggestions::-webkit-scrollbar-thumb:hover,
#video-search-results-list::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

#video-search-results-list .cursor-pointer:hover {
  background-color: #f0fdf4 !important;
}

/* Camel Owner Video Request & Reception/Vet Alert Badges */
.btn-request-video-recording {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
}

.btn-request-video-recording:hover:not(:disabled):not(.is-pending-req) {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35) !important;
}

.pending-video-requests-alert {
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.18);
  animation: slideDown 0.3s ease-out;
}

.btn-video-req-alert {
  transition: all 0.2s ease;
}

.btn-video-req-alert:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.45);
}

@keyframes pulseSlow {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.03);
  }
}

.animate-pulse {
  animation: pulseSlow 2s infinite ease-in-out;
}

/* Owner Onboarding & Interactive User Guide */
.owner-guide-card {
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.3s ease;
}

.guide-item-card {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.guide-item-card:hover {
  transform: translateY(-2px);
  border-color: #10b981 !important;
  box-shadow: 0 6px 14px rgba(16, 185, 129, 0.12) !important;
}

.btn-toggle-owner-guide:hover {
  background: rgba(13, 148, 136, 0.22) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(13, 148, 136, 0.2) !important;
}

#btn-close-owner-guide:hover {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #dc2626 !important;
  transform: rotate(90deg);
}

@media (max-width: 640px) {
  .owner-guide-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ==========================================================================
   GLOBAL STRICT MOBILE VIEWPORT & HORIZONTAL OVERFLOW PREVENTION
   ========================================================================== */

/* 1. Global Viewport Boundary Rules */
html, body {
  max-width: 100vw !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

*, *::before, *::after {
  box-sizing: border-box !important;
}

.app-container {
  max-width: 100vw !important;
  width: 100% !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

.role-container, #reception-view, #vet-view, #owner-view, #admin-view, #lab-view, .dashboard-container {
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
  overflow-x: hidden !important;
}

/* 2. Desktop & Mobile Switching Rules */
.reception-desktop-table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.reception-mobile-cards-list {
  display: none;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Base Styles for Mobile Patient Cards */
.rec-mobile-patient-card {
  background: var(--bg-card, #ffffff);
  border: 1.5px solid var(--border-subtle, #cbd5e1);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.rec-mobile-patient-card.is-video-requested {
  background: #fffbeb !important;
  border-right: 5px solid #f59e0b !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.18) !important;
}

.rec-mobile-patient-card.is-ready-discharge {
  background: #f0fdf4 !important;
  border-right: 5px solid #10b981 !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.18) !important;
}

.rec-mob-header {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  border-bottom: 1px dashed var(--border-subtle, #cbd5e1);
  padding-bottom: 10px;
  width: 100%;
  box-sizing: border-box;
}

.rec-mob-avatar-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg-surface, #f1f5f9);
  border: 1px solid var(--border-subtle, #cbd5e1);
}

.rec-mob-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rec-mob-avatar-emoji {
  font-size: 22px;
}

.rec-mob-title-box {
  flex: 1;
  min-width: 0;
}

.rec-mob-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.rec-mob-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main, #0f172a);
}

.rec-mob-status-tag {
  flex-shrink: 0;
}

.rec-mob-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.88rem;
  width: 100%;
  box-sizing: border-box;
}

.rec-mob-info-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

.rec-mob-label {
  font-weight: 700;
  color: var(--text-secondary, #475569);
  font-size: 0.82rem;
  flex-shrink: 0;
  min-width: 65px;
}

.rec-mob-owner-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.rec-mob-contacts {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.rec-mob-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.rec-mob-contact-btn.btn-call {
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #cbd5e1;
}

.rec-mob-contact-btn.btn-wa {
  background: #25d366;
  color: #ffffff;
  border: none;
  box-shadow: 0 2px 6px rgba(37, 211, 102, 0.3);
}

.vet-supervisor-badge-mob {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #0f766e;
  max-width: 100%;
}

.rec-mob-footer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle, #cbd5e1);
  width: 100%;
  box-sizing: border-box;
}

.rec-mob-footer-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 8px 6px;
  border-radius: 8px;
  min-height: 42px;
  text-align: center;
}

/* 3. Strict Comprehensive Media Query for Screens <= 768px */
@media (max-width: 768px) {
  /* =========================================================================
     A. GLOBAL MOBILE CONTAINER & VIEWPORT BOUNDARIES
     ========================================================================= */
  html, body {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .role-container, 
  .dashboard-container,
  #reception-view, 
  #vet-view, 
  #owner-view, 
  #admin-view, 
  #lab-view,
  .vip-owner-container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 8px 10px 90px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  /* Fluid Dashboard Header */
  .dashboard-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-bottom: 14px !important;
  }

  .dashboard-header > * {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .dashboard-header .dashboard-title {
    font-size: 1.15rem !important;
    white-space: normal !important;
    width: 100% !important;
    word-break: break-word;
  }

  .dashboard-header .dashboard-subtitle {
    font-size: 0.8rem !important;
    white-space: normal !important;
    width: 100% !important;
  }

  .dashboard-header .header-actions {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 8px !important;
  }

  .dashboard-header .header-actions .btn {
    width: 100% !important;
    min-height: 48px !important;
    justify-content: center !important;
  }

  /* =========================================================================
     B. METRICS & STATS GRIDS
     ========================================================================= */
  .metrics-grid, .stats-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-bottom: 14px !important;
  }

  .metric-card, .stat-card {
    padding: 12px 10px !important;
    gap: 10px !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .metric-icon {
    width: 38px !important;
    height: 38px !important;
    font-size: 18px !important;
    flex-shrink: 0 !important;
  }

  .metric-value, .stat-value {
    font-size: 1.35rem !important;
    line-height: 1.1 !important;
  }

  .metric-label {
    font-size: 0.72rem !important;
  }

  /* =========================================================================
     C. FILTER BARS, RECEPTION SEARCH & DROPDOWNS
     ========================================================================= */
  .filter-bar {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 10px 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-bottom: 12px !important;
  }

  .filter-left-controls {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 8px !important;
  }

  .search-box {
    width: 100% !important;
    min-width: 100% !important;
    min-height: 44px !important;
    height: 44px !important;
    box-sizing: border-box !important;
    padding: 0 10px !important;
  }

  .search-box .input-control {
    font-size: 15px !important;
    min-height: 40px !important;
    height: 40px !important;
  }

  .view-toggle-group {
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
  }

  .view-btn {
    flex: 1 !important;
    min-height: 40px !important;
    height: 40px !important;
    justify-content: center !important;
    font-size: 0.85rem !important;
  }

  /* Full-width wrapping for Reception Search & Species Dropdowns */
  .reception-search-strip {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
    padding: 10px 12px !important;
    box-sizing: border-box !important;
    margin-bottom: 12px !important;
  }

  .reception-search-input-wrap,
  .reception-species-filter-wrap {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
    box-sizing: border-box !important;
  }

  #reception-search-input,
  #reception-species-filter {
    width: 100% !important;
    min-height: 44px !important;
    height: 44px !important;
    font-size: 15px !important;
    box-sizing: border-box !important;
    border-radius: 8px !important;
  }

  /* =========================================================================
     D. OWNER / CLIENT PORTAL MOBILE OVERHAUL
     ========================================================================= */
  .vip-owner-container {
    padding: 6px 8px 90px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .vip-owner-topbar {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 12px 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .vip-owner-profile {
    width: 100% !important;
    gap: 10px !important;
  }

  .vip-topbar-actions {
    display: flex !important;
    flex-direction: row !important;
    width: 100% !important;
    gap: 8px !important;
    justify-content: space-between !important;
  }

  .btn-toggle-owner-guide,
  .btn-vip-logout {
    flex: 1 1 auto !important;
    min-height: 48px !important;
    justify-content: center !important;
    font-size: 0.88rem !important;
    border-radius: 12px !important;
  }

  .owner-guide-card {
    padding: 14px 12px !important;
    margin: 8px 0 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .owner-guide-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    width: 100% !important;
  }

  /* Step 1: Camel Selector Grid */
  .vip-selector-header-banner {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 14px 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .vip-selector-filter-nav {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 8px !important;
  }

  .btn-owner-filter {
    width: 100% !important;
    min-height: 48px !important;
    justify-content: center !important;
    font-size: 0.9rem !important;
  }

  .vip-camels-selection-grid {
    grid-template-columns: 1fr !important;
    width: 100% !important;
    gap: 12px !important;
    box-sizing: border-box !important;
  }

  .vip-camel-select-card {
    width: 100% !important;
    padding: 16px 14px !important;
    border-radius: 16px !important;
    box-sizing: border-box !important;
  }

  .btn-open-camel-details {
    width: 100% !important;
    min-height: 48px !important;
    font-size: 0.95rem !important;
    justify-content: center !important;
    border-radius: 12px !important;
  }

  /* Step 2: Camel Detailed View */
  .btn-back-to-selector {
    width: 100% !important;
    min-height: 48px !important;
    justify-content: center !important;
    font-size: 0.9rem !important;
    border-radius: 12px !important;
    margin-bottom: 12px !important;
  }

  .vip-camel-hero-card {
    width: 100% !important;
    padding: 16px 14px !important;
    border-radius: 16px !important;
    box-sizing: border-box !important;
    margin-bottom: 12px !important;
  }

  .vip-hero-photo-wrap {
    width: 62px !important;
    height: 62px !important;
    font-size: 32px !important;
    flex-shrink: 0 !important;
  }

  .vip-camel-name {
    font-size: 1.25rem !important;
  }

  .vip-hero-video-request-strip {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .btn-request-video-recording {
    width: 100% !important;
    min-height: 48px !important;
    justify-content: center !important;
    font-size: 0.92rem !important;
    border-radius: 10px !important;
  }

  .vip-bulletin-card {
    width: 100% !important;
    box-sizing: border-box !important;
    margin-bottom: 12px !important;
  }

  .vip-discharge-ready-banner {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 14px 12px !important;
    width: 100% !important;
  }

  .vip-btn-discharge-contact {
    width: 100% !important;
    min-height: 48px !important;
    justify-content: center !important;
    font-size: 0.92rem !important;
  }

  .vip-vitals-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-bottom: 12px !important;
  }

  .vip-vital-card {
    padding: 10px 10px !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .vip-vital-icon {
    width: 32px !important;
    height: 32px !important;
    font-size: 16px !important;
  }

  .vip-vital-label {
    font-size: 0.72rem !important;
  }

  .vip-vital-value {
    font-size: 0.82rem !important;
  }

  /* Segmented Pill Navigation */
  .vip-pill-navigation {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 6px !important;
    padding: 4px 2px 8px !important;
    margin-bottom: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    scrollbar-width: none;
  }

  .vip-pill-navigation::-webkit-scrollbar {
    display: none;
  }

  .vip-nav-pill-btn {
    flex: 0 0 auto !important;
    min-height: 48px !important;
    padding: 10px 16px !important;
    font-size: 0.88rem !important;
    border-radius: 12px !important;
    white-space: nowrap !important;
  }

  /* Filter Chips in Feed Tab */
  .feed-filter-chips {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 6px !important;
    padding: 2px 2px 8px !important;
    width: 100% !important;
    scrollbar-width: none;
  }

  .feed-filter-chips::-webkit-scrollbar {
    display: none;
  }

  .filter-chip {
    flex: 0 0 auto !important;
    min-height: 42px !important;
    padding: 8px 14px !important;
    font-size: 0.82rem !important;
    white-space: nowrap !important;
  }

  /* Video Timeline & Story Cards */
  .vip-video-timeline-card,
  .feed-story-card,
  .vip-uploaded-report-card,
  .lab-result-card {
    width: 100% !important;
    padding: 14px 12px !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
  }

  .vip-video-player-wrapper video {
    max-height: 280px !important;
    width: 100% !important;
  }

  .story-photo-box img {
    height: 220px !important;
    width: 100% !important;
  }

  .vip-video-actions {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 8px !important;
  }

  .vip-video-actions .btn,
  .vip-video-actions a {
    width: 100% !important;
    min-height: 48px !important;
    justify-content: center !important;
    font-size: 0.88rem !important;
  }

  .vip-report-actions-grid {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 8px !important;
  }

  .btn-report-preview-action,
  .btn-report-download-action {
    width: 100% !important;
    min-height: 48px !important;
    justify-content: center !important;
    font-size: 0.88rem !important;
  }

  /* Chat Box */
  #mobile-chat-form {
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
    padding: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  #mobile-chat-input {
    min-height: 48px !important;
    font-size: 16px !important;
  }

  #mobile-chat-form button[type="submit"] {
    min-height: 48px !important;
    padding: 10px 18px !important;
    font-size: 0.9rem !important;
  }

  /* Floating Action Button */
  .vip-floating-action-fab {
    bottom: 16px !important;
    left: 16px !important;
    padding: 12px 18px !important;
    font-size: 0.88rem !important;
    min-height: 48px !important;
    z-index: 1050 !important;
  }

  /* =========================================================================
     E. RECEPTION & ADMISSION PORTAL MOBILE RULES
     ========================================================================= */
  .reception-desktop-table {
    display: none !important;
  }

  .reception-mobile-cards-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .rec-mobile-patient-card {
    width: 100% !important;
    max-width: 100% !important;
    padding: 14px 12px !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
  }

  /* Sleek, Compact & Comfortable Reception Action Buttons */
  .reception-actions-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    width: 100% !important;
    gap: 8px !important;
    box-sizing: border-box !important;
    margin-bottom: 12px !important;
  }

  .reception-actions-grid .btn {
    width: 100% !important;
    min-height: 42px !important;
    height: 42px !important;
    padding: 8px 10px !important;
    font-size: 0.86rem !important;
    font-weight: 700 !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    border-radius: 10px !important;
    white-space: nowrap !important;
    gap: 5px !important;
  }

  .segmented-tabs-nav.reception-tabs-nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 6px !important;
    padding: 4px 2px 8px !important;
    margin-bottom: 14px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    scrollbar-width: none;
  }

  .segmented-tabs-nav.reception-tabs-nav::-webkit-scrollbar {
    display: none;
  }

  .segmented-tabs-nav.reception-tabs-nav .segmented-tab-btn {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    padding: 8px 14px !important;
    font-size: 0.84rem !important;
    min-height: 40px !important;
    border-radius: 9999px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
  }

  .rec-mob-footer-actions {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 6px !important;
  }

  .rec-mob-footer-actions .btn {
    width: 100% !important;
    min-height: 42px !important;
    justify-content: center !important;
    font-size: 0.85rem !important;
    padding: 8px 10px !important;
  }

  .pending-video-requests-alert {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 12px 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .pending-video-requests-alert button,
  .pending-video-requests-alert .btn {
    width: 100% !important;
    min-height: 42px !important;
    justify-content: center !important;
    font-size: 0.88rem !important;
  }

  /* =========================================================================
     F. VET & CLINICAL PORTAL MOBILE RULES
     ========================================================================= */
  .task-checklist-card {
    width: 100% !important;
    padding: 14px 12px !important;
    box-sizing: border-box !important;
  }

  .task-checklist-card .btn {
    min-height: 44px !important;
    font-size: 0.88rem !important;
    width: 100% !important;
  }

  .patient-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .patient-card .btn {
    min-height: 44px !important;
  }

  /* =========================================================================
     G. VIDEO GALLERY & LAB PORTAL MOBILE RULES
     ========================================================================= */
  .video-gallery-layout {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .video-player-sidebar {
    position: static !important;
    order: -1;
    margin-bottom: 14px;
    width: 100% !important;
  }

  .video-thumbnails-grid {
    grid-template-columns: 1fr !important;
    width: 100% !important;
    gap: 10px !important;
  }

  .video-archive-grid {
    grid-template-columns: 1fr !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  #video-camera-stream,
  #video-preview-player {
    width: 100% !important;
    max-height: 240px !important;
    object-fit: cover !important;
    border-radius: 10px !important;
  }

  #video-search-results-list {
    max-height: 180px !important;
  }

  /* =========================================================================
     H. STRICT HORIZONTAL SCROLL ISOLATION FOR ALL DATA TABLES
     ========================================================================= */
  .table-responsive, 
  .patient-table-card, 
  .table-card,
  div:has(> table) {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    display: block !important;
    box-sizing: border-box !important;
    border-radius: 12px !important;
    scrollbar-width: thin;
    margin-bottom: 12px !important;
  }

  .clean-table, .data-table, table {
    min-width: 680px !important;
    width: 100% !important;
    border-collapse: collapse !important;
  }

  .clean-table th, .clean-table td {
    padding: 10px 12px !important;
    font-size: 0.84rem !important;
    white-space: nowrap !important;
  }

  .table-actions-cell {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 4px !important;
    align-items: center !important;
  }
}

/* ==========================================================================
   DYNAMIC CSS CLASSES (NO INLINE FIXED STYLES)
   ========================================================================== */
.stat-card-emerald { border-right: 4px solid #0f766e; background: var(--bg-card); }
.stat-card-green { border-right: 4px solid #10b981; background: var(--bg-card); }
.stat-card-green.is-highlighted-ready { background: #ecfdf5; }
.stat-card-teal { border-right: 4px solid #0d9488; background: var(--bg-card); }
.stat-card-amber { border-right: 4px solid #b45309; background: var(--bg-card); }

.stat-value { font-size: 1.6rem; font-weight: 800; margin-top: 4px; }
.text-emerald { color: #0f766e; }
.text-green { color: #047857; }
.text-teal { color: #0d9488; }
.text-amber { color: #b45309; }

.reception-search-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

.reception-search-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 200px;
  min-width: 0;
  width: 100%;
}

.reception-species-filter-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.pending-video-requests-alert {
  background: linear-gradient(135deg, #fef3c7, #fef08a);
  border: 2px solid #f59e0b;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
}

.pending-video-req-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pending-video-req-bell {
  font-size: 1.5rem;
  animation: pulse 2s infinite;
}

.pending-video-req-title {
  color: #92400e;
  font-size: 0.98rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pending-video-req-list {
  color: #78350f;
  font-size: 0.84rem;
  margin-top: 3px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pending-video-req-item {
  background: rgba(245, 158, 11, 0.2);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #f59e0b;
}

.btn-pending-video-action {
  background: #d97706 !important;
  color: #ffffff !important;
  border: none !important;
  font-weight: 800 !important;
  border-radius: 8px !important;
  padding: 7px 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.35) !important;
  cursor: pointer !important;
}

/* Owner Login & Activation Sub-Tabs */
.owner-auth-subtoggle {
  display: flex;
  background: var(--bg-surface, #f1f5f9);
  border: 1px solid var(--border-subtle, #cbd5e1);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 18px;
  gap: 4px;
}

.owner-auth-subtoggle .subtab-btn {
  flex: 1;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  background: transparent;
  color: #64748b;
  transition: all 0.2s ease;
}

.owner-auth-subtoggle .subtab-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ==========================================================================
   INTERACTIVE VIDEO GALLERY & SIDE PLAYER LAYOUT
   ========================================================================== */
.video-gallery-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  align-items: start;
  width: 100%;
}

.video-thumbnails-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}

.video-thumb-card {
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.video-thumb-card:hover {
  border-color: #10b981;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.15);
}

.video-thumb-card.is-active {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3), 0 8px 20px rgba(16, 185, 129, 0.15) !important;
  background: rgba(16, 185, 129, 0.02) !important;
}

.video-thumb-viewfinder {
  position: relative;
  height: 125px;
  background: linear-gradient(135deg, #0b132b, #1c2541);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.video-thumb-play-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: transform 0.2s ease, background 0.2s ease;
}

.video-thumb-card:hover .video-thumb-play-btn {
  transform: scale(1.15);
  background: #10b981;
}

.video-player-sidebar {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ==========================================================================
   EXECUTIVE ADMIN COMMAND CENTER & KPI STYLES
   ========================================================================== */
.admin-command-center {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 1200px) {
  .admin-kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .admin-kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
}

.admin-kpi-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.admin-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-focus);
}

.admin-kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3.5px;
  background: var(--accent-primary);
}

.admin-kpi-card.kpi-inpatients::before { background: linear-gradient(90deg, #0f766e, #14b8a6); }
.admin-kpi-card.kpi-treatments::before { background: linear-gradient(90deg, #10b981, #34d399); }
.admin-kpi-card.kpi-staff::before { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.admin-kpi-card.kpi-media::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.admin-kpi-card.kpi-lab::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

.kpi-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.kpi-icon-pill {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.kpi-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.kpi-val {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  margin: 4px 0 6px;
  font-family: var(--font-sans);
}

.kpi-subtext {
  font-size: 0.72rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.kpi-progress-bar {
  width: 100%;
  height: 5px;
  background: var(--bg-surface);
  border-radius: 9999px;
  overflow: hidden;
  margin-top: 6px;
}

.kpi-progress-fill {
  height: 100%;
  background: #10b981;
  border-radius: 9999px;
  transition: width 0.3s ease;
}

/* Staff Activity & Live Audit Feed */
.admin-audit-feed-panel {
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}

.audit-feed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.audit-feed-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.audit-feed-chip {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 700;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.audit-feed-chip.active,
.audit-feed-chip:hover {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

.audit-feed-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 290px;
  overflow-y: auto;
  padding-right: 4px;
}

.audit-feed-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  transition: all 0.15s ease;
}

.audit-feed-item:hover {
  background: #ffffff;
  border-color: var(--border-focus);
}

body.theme-high-sunlight .audit-feed-item:hover {
  background: #f8fafc;
}

.audit-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.audit-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.audit-item-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.audit-item-title {
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audit-item-details {
  font-size: 0.73rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audit-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.audit-item-time {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

/* Admin Modern Pill Navigation */
.admin-pill-nav {
  display: flex;
  gap: 6px;
  background: var(--bg-card);
  padding: 6px;
  border-radius: 14px;
  border: 1.5px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.admin-pill-nav::-webkit-scrollbar {
  display: none;
}

.admin-pill-btn {
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.15s ease;
  flex: 0 0 auto;
}

.admin-pill-btn:hover {
  background: var(--bg-surface);
  color: var(--text-main);
}

.admin-pill-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.3);
}

/* Staff Cards Grid */
.staff-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
  width: 100%;
}

.staff-member-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.staff-member-card:hover {
  border-color: var(--border-focus);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.staff-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

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

.staff-avatar-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  flex-shrink: 0;
}

.staff-name-box h4 {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-main);
}

.staff-name-box span {
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.staff-metrics-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: var(--bg-surface);
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
}

.staff-metric-stat {
  display: flex;
  flex-direction: column;
}

.staff-metric-stat .stat-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.staff-metric-stat .stat-val {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
}

.staff-card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.staff-card-actions .btn {
  flex: 1 1 auto;
  justify-content: center;
  font-size: 0.78rem;
  padding: 6px 8px;
  border-radius: 8px;
}

/* Media & Video Center Grid */
.admin-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  width: 100%;
}

.admin-media-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.admin-media-card:hover {
  border-color: #10b981;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.15);
  transform: translateY(-2px);
}

.admin-media-thumb {
  position: relative;
  height: 150px;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
}

.admin-media-play-overlay {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.9);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: transform 0.2s ease;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}

.admin-media-thumb:hover .admin-media-play-overlay {
  transform: scale(1.15);
  background: #10b981;
}

.admin-media-verify-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(16, 185, 129, 0.9);
  color: #ffffff;
  backdrop-filter: blur(4px);
}

.admin-media-duration-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  font-family: var(--font-mono);
}

.admin-media-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
}

.admin-media-patient-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-media-caption {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.admin-media-actions {
  display: flex;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.admin-media-actions .btn {
  flex: 1 1 auto;
  font-size: 0.76rem;
  padding: 6px 8px;
  border-radius: 6px;
  justify-content: center;
}

/* ==========================================================================
   WARD & PEN MANAGEMENT STYLES
   ========================================================================== */
.ward-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  width: 100%;
}

.ward-manage-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.ward-manage-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-focus);
}

.ward-manage-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: var(--accent-primary);
}

.ward-manage-card.status-available::before { background: linear-gradient(90deg, #10b981, #34d399); }
.ward-manage-card.status-maintenance::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.ward-manage-card.status-maintenance {
  border-color: rgba(245, 158, 11, 0.4);
  background: linear-gradient(180deg, var(--bg-card), rgba(245, 158, 11, 0.03));
}

.ward-manage-card.status-full::before { background: linear-gradient(90deg, #dc2626, #ef4444); }
.ward-manage-card.status-full {
  border-color: #dc2626 !important;
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.15) !important;
  background: linear-gradient(180deg, var(--bg-card), rgba(220, 38, 38, 0.04)) !important;
}

.ward-manage-card.status-full .ward-icon-box {
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.3);
  color: #dc2626;
}

.ward-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.ward-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ward-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.ward-title-text h4 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-main);
}

.ward-title-text span {
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.ward-occupancy-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ward-occupancy-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
}

.ward-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border-subtle);
  border-radius: 9999px;
  overflow: hidden;
}

.ward-progress-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.3s ease;
}

.ward-progress-fill.fill-green { background: #10b981; }
.ward-progress-fill.fill-yellow { background: #f59e0b; }
.ward-progress-fill.fill-red { background: #ef4444; }

.ward-patients-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 140px;
  overflow-y: auto;
}

.ward-patient-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.78rem;
}

.ward-card-actions {
  display: flex;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.ward-card-actions .btn {
  flex: 1 1 auto;
  font-size: 0.78rem;
  padding: 6px 10px;
  border-radius: 8px;
  justify-content: center;
}

/* ==========================================================================
   RECEPTION DASHBOARD OVERHAUL STYLES
   ========================================================================== */
.reception-unified-dashboard-container {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .reception-unified-dashboard-container {
    padding: 12px;
    gap: 14px;
    border-radius: 14px;
  }
}

/* 1. Reception Search Isolated Section */
.reception-primary-search-section {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.reception-primary-search-section:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.reception-main-search-input-wrap {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.reception-main-search-icon {
  position: absolute;
  right: 14px;
  font-size: 1.15rem;
  color: var(--text-secondary);
  pointer-events: none;
}

.reception-main-search-input {
  width: 100%;
  padding: 12px 42px 12px 14px;
  font-size: 0.95rem;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-main);
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.reception-main-search-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: #ffffff;
}

/* 2. Modernized Main Action Cards */
.reception-modern-action-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  width: 100%;
}

.reception-action-card-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  min-height: 60px;
  text-align: right;
  position: relative;
  overflow: hidden;
}

.reception-action-card-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.reception-action-card-btn:active {
  transform: translateY(0);
}

.reception-action-card-btn.btn-admit-primary {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ffffff;
}

.reception-action-card-btn.btn-admit-primary:hover {
  background: linear-gradient(135deg, #047857, #059669);
}

.reception-action-card-btn.btn-client-primary {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
}

.reception-action-card-btn.btn-client-primary:hover {
  background: linear-gradient(135deg, #0369a1, #1d4ed8);
}

.reception-action-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  backdrop-filter: blur(4px);
}

.reception-action-card-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.reception-action-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.2;
}

.reception-action-card-desc {
  font-size: 0.78rem;
  opacity: 0.9;
}

/* 3. Restructured Summary Status Cards */
.reception-summary-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
  gap: 12px !important;
  width: 100% !important;
  margin-bottom: 16px !important;
  box-sizing: border-box !important;
  position: relative !important;
  clear: both !important;
  align-items: stretch !important;
}

.reception-stat-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  cursor: pointer;
  min-height: 76px !important;
  max-height: 96px !important;
  height: auto !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  position: relative !important;
  flex-shrink: 0 !important;
}

.reception-stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
}

.reception-stat-card.active-filter-card {
  border-color: var(--accent-primary);
  background: rgba(15, 118, 110, 0.05);
  box-shadow: 0 0 0 2px var(--accent-primary);
}

.reception-stat-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.reception-stat-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  flex: 1;
}

.reception-stat-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.reception-stat-count {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-main);
  line-height: 1.1;
  margin-top: 2px;
}

/* 4. Modern Filter Widgets Bar */
.reception-filter-widgets-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: flex-end;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 10px 14px;
  width: 100%;
  box-sizing: border-box;
  box-shadow: var(--shadow-sm);
  position: relative !important;
  clear: both !important;
  margin-bottom: 16px !important;
  z-index: 2 !important;
}

@media (max-width: 900px) {
  .reception-filter-widgets-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  .reception-filter-actions {
    grid-column: span 2;
  }
  .btn-clear-reception-filters {
    width: 100%;
  }
}

@media (max-width: 540px) {
  .reception-filter-widgets-bar {
    grid-template-columns: 1fr;
  }
  .reception-filter-actions {
    grid-column: span 1;
  }
}

.reception-filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  justify-content: flex-end;
}

.reception-filter-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  height: 18px;
  line-height: 18px;
  margin: 0;
}

.reception-filter-select {
  width: 100%;
  height: 36px;
  line-height: 36px;
  padding: 0 8px;
  font-size: 0.80rem;
  font-weight: 600;
  border-radius: 7px;
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-main);
  cursor: pointer;
  box-sizing: border-box;
  margin: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.reception-filter-select:hover {
  border-color: var(--accent-primary);
}

.reception-filter-select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.reception-filter-actions {
  display: flex;
  align-items: flex-end;
  height: 100%;
  margin: 0;
  padding: 0;
}

.btn-clear-reception-filters {
  height: 36px;
  line-height: 36px;
  padding: 0 12px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 7px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
  margin: 0;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* 5. Enhanced Clean Table Styling & Row Formatting (#inpatient-table) */
#inpatient-table,
.reception-enhanced-table {
  width: 100% !important;
  max-width: 100% !important;
  table-layout: auto !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card);
  box-sizing: border-box !important;
}

#inpatient-table thead th,
.reception-enhanced-table thead th {
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  padding: 7px 6px !important;
  border-bottom: 2px solid var(--border-subtle);
  text-align: right;
  vertical-align: middle !important;
  white-space: nowrap !important;
  min-width: 0 !important;
  line-height: 1.2 !important;
}

#inpatient-table thead th.th-center,
.reception-enhanced-table thead th.th-center {
  text-align: center !important;
}

/* Column Proportions Override to Prevent Horizontal Overflow */
#inpatient-table thead th:nth-child(1),
#inpatient-table tbody td:nth-child(1) {
  min-width: 110px !important;
}

#inpatient-table thead th:nth-child(2),
#inpatient-table tbody td:nth-child(2) {
  width: 80px !important;
  min-width: 75px !important;
  text-align: center !important;
}

#inpatient-table thead th:nth-child(3),
#inpatient-table tbody td:nth-child(3) {
  min-width: 80px !important;
}

#inpatient-table thead th:nth-child(4),
#inpatient-table tbody td:nth-child(4) {
  min-width: 95px !important;
}

#inpatient-table thead th:nth-child(5),
#inpatient-table tbody td:nth-child(5) {
  min-width: 110px !important;
  max-width: 135px !important;
}

#inpatient-table thead th:nth-child(6),
#inpatient-table tbody td:nth-child(6) {
  min-width: 95px !important;
}

#inpatient-table thead th:nth-child(7),
#inpatient-table tbody td:nth-child(7) {
  width: 70px !important;
  min-width: 65px !important;
  white-space: nowrap !important;
  text-align: center !important;
}

#inpatient-table thead th:nth-child(8),
#inpatient-table tbody td:nth-child(8) {
  width: 1% !important;
  min-width: 130px !important;
  white-space: nowrap !important;
  text-align: center !important;
}

#inpatient-table tbody tr,
.reception-enhanced-table tbody tr {
  transition: background-color 0.15s ease;
}

#inpatient-table tbody tr:nth-child(even),
.reception-enhanced-table tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.015);
}

#inpatient-table tbody tr:hover,
.reception-enhanced-table tbody tr:hover {
  background: rgba(15, 118, 110, 0.045) !important;
}

#inpatient-table tbody td,
.reception-enhanced-table tbody td {
  padding: 6px 6px !important;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.79rem !important;
  line-height: 1.25 !important;
  vertical-align: middle !important;
  text-align: right;
}

#inpatient-table tbody td.td-center,
.reception-enhanced-table tbody td.td-center {
  text-align: center !important;
}

#inpatient-table tbody tr:last-child td,
.reception-enhanced-table tbody tr:last-child td {
  border-bottom: none;
}

/* Compact Patient ID & Microchip Cell */
.patient-id-cell,
#inpatient-table .patient-id-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

#inpatient-table .patient-id-cell .badge {
  font-size: 0.70rem !important;
  padding: 2px 5px !important;
}

.patient-microchip-tag,
#inpatient-table .patient-microchip-tag {
  font-size: 0.62rem !important;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0 4px !important;
  border-radius: 4px;
  white-space: nowrap;
}

/* Compact Patient Identity Cell */
#inpatient-table .patient-identity-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

#inpatient-table .patient-avatar-photo {
  width: 28px !important;
  height: 28px !important;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

#inpatient-table .species-avatar-mini {
  font-size: 18px !important;
  flex-shrink: 0;
}

#inpatient-table .housing-tags-strip {
  display: flex;
  flex-direction: column;
  gap: 2px !important;
  align-items: flex-start;
}

#inpatient-table .housing-pill {
  padding: 1px 4px !important;
  font-size: 0.68rem !important;
  border-radius: 4px;
}

/* Compact Vet Medical Team Box */
.compact-vet-team-box,
#inpatient-table .compact-vet-team-box {
  display: flex;
  flex-direction: column;
  gap: 2px !important;
  max-width: 130px !important;
}

.compact-vet-supervisor-badge,
#inpatient-table .compact-vet-supervisor-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  background: rgba(15, 118, 110, 0.08);
  border: 1px solid rgba(15, 118, 110, 0.22);
  padding: 2px 4px !important;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.compact-vet-supervisor-badge:hover,
#inpatient-table .compact-vet-supervisor-badge:hover {
  background: rgba(15, 118, 110, 0.16);
  border-color: rgba(15, 118, 110, 0.45);
  transform: translateY(-1px);
}

.compact-vet-supervisor-info,
#inpatient-table .compact-vet-supervisor-info {
  display: flex;
  align-items: center;
  gap: 3px;
  overflow: hidden;
}

.compact-vet-supervisor-name,
#inpatient-table .compact-vet-supervisor-name {
  font-size: 0.72rem !important;
  font-weight: 800;
  color: #0f766e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compact-vet-edit-icon,
#inpatient-table .compact-vet-edit-icon {
  font-size: 0.62rem !important;
  color: #0f766e;
  opacity: 0.75;
}

.compact-vet-admin-row,
#inpatient-table .compact-vet-admin-row {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.67rem !important;
  color: var(--text-secondary);
  padding: 0 2px !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compact-admin-text,
#inpatient-table .compact-admin-text {
  font-weight: 600;
}

/* Compact Table Action Buttons */
.table-actions-cell,
#inpatient-table .table-actions-cell {
  display: flex !important;
  align-items: center !important;
  gap: 3px !important;
  justify-content: center !important;
  flex-wrap: nowrap !important;
}

.btn-table-action,
#inpatient-table .btn-table-action {
  height: 26px !important;
  padding: 0 6px !important;
  font-size: 0.70rem !important;
  font-weight: 700 !important;
  border-radius: 5px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-xs);
  cursor: pointer;
}

.btn-table-action:hover,
#inpatient-table .btn-table-action:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-table-action:active,
#inpatient-table .btn-table-action:active {
  transform: scale(0.97);
}

/* ==========================================================================
   MOBILE & OPERATIONAL WORKFLOW STYLING (Dr. Abdullah Al-Hawas Clinic)
   - Due Doses Today Widget
   - Medication Administration Vertical Timeline
   - Active Client In-App Notification Banners
   - Mobile-Friendly Touch Targets & Lightbox Video Players
   ========================================================================== */

.due-doses-today-widget {
  transition: all 0.3s ease;
}

.due-dose-card {
  position: relative;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
}

.due-dose-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(2, 132, 199, 0.15) !important;
}

.btn-quick-administer {
  transition: all 0.18s ease;
}

.btn-quick-administer:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-quick-administer:active {
  transform: scale(0.97);
}

/* Timeline Vertical Steps */
.timeline-vertical-steps {
  margin-right: 10px;
}

.timeline-step-item {
  transition: all 0.2s ease;
}

.timeline-step-item:hover {
  border-color: #10b981 !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.15) !important;
}

/* Client Notification Banner */
.client-active-notification-banner {
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.client-active-notification-banner.is-unread-banner {
  animation: bannerGlow 2.5s infinite alternate ease-in-out;
}

@keyframes bannerGlow {
  0% {
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.25);
  }
  100% {
    box-shadow: 0 6px 28px rgba(5, 150, 105, 0.55);
  }
}

/* Lab Result Card */
.lab-result-card {
  transition: all 0.2s ease;
}

.lab-result-card:hover {
  box-shadow: 0 6px 18px rgba(139, 92, 246, 0.12) !important;
}

/* ==========================================================================
   MOBILE SCREEN RESPONSIVENESS (< 768px & < 480px)
   ========================================================================== */
@media (max-width: 768px) {
  /* Touch target optimization (42px+ min height for interactive items) */
  .btn, 
  .btn-quick-administer,
  .btn-nav-pill,
  .vip-nav-pill-btn,
  .btn-request-video-recording,
  .btn-open-admission-pass,
  .btn-view-medical-report {
    min-height: 42px;
  }

  .due-doses-grid {
    grid-template-columns: 1fr !important;
  }

  .vip-camel-detailed-view {
    padding: 6px 4px !important;
  }

  .vip-camel-hero-card {
    padding: 16px 14px !important;
    border-radius: 16px !important;
  }

  .vip-hero-main-info {
    flex-direction: column !important;
    text-align: center;
  }

  .vip-hero-photo-wrap {
    margin: 0 auto 10px auto;
  }

  .vip-vitals-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  .vip-pill-navigation {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .vip-pill-navigation::-webkit-scrollbar {
    height: 4px;
  }

  .vip-pill-navigation::-webkit-scrollbar-thumb {
    background: rgba(15, 118, 110, 0.3);
    border-radius: 4px;
  }

  .client-active-notification-banner {
    flex-direction: column;
    align-items: stretch !important;
  }

  .client-active-notification-banner > div:last-child {
    justify-content: flex-end;
    margin-top: 6px;
  }

  .timeline-vertical-steps {
    border-right-width: 2px !important;
    padding-right: 12px !important;
    margin-right: 4px !important;
  }
}

@media (max-width: 480px) {
  .vip-vitals-grid {
    grid-template-columns: 1fr !important;
  }

  .vip-hero-video-request-strip {
    flex-direction: column;
    align-items: stretch !important;
  }

  .btn-request-video-recording {
    width: 100% !important;
    justify-content: center;
  }

  .vip-report-actions-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ==========================================================================
   INPATIENT DASHBOARD LAYOUT STABILITY & OVERFLOW FIXES
   - Proper fixed height / flex-row layout for stat cards
   - Filter bars sit properly below top stats without overlap
   - Table container sits cleanly below filters with clear separation
   - Reset overflow-y and remove conflicting position: absolute or extreme heights
   ========================================================================== */

#reception-view,
#vet-view,
#owner-view,
#lab-view,
#admin-view,
.dashboard-container,
.dashboard-content-area,
.tab-content-root {
  position: relative !important;
  clear: both !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow-y: visible !important;
  height: auto !important;
  max-height: none !important;
}

/* Stat Cards Container & Item Boundaries */
.metrics-grid,
.reception-summary-grid,
.stats-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
  gap: 12px !important;
  width: 100% !important;
  margin-bottom: 16px !important;
  box-sizing: border-box !important;
  position: relative !important;
  clear: both !important;
  align-items: stretch !important;
  max-height: none !important;
}

.metric-card,
.reception-stat-card,
.stat-card {
  min-height: 76px !important;
  max-height: 96px !important;
  height: auto !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 12px 16px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  position: relative !important;
  flex-shrink: 0 !important;
}

/* Filters Container: Sits Cleanly Below Stats */
.filter-bar,
.reception-filter-widgets-bar,
.reception-search-strip {
  position: relative !important;
  clear: both !important;
  width: 100% !important;
  margin-top: 0 !important;
  margin-bottom: 16px !important;
  box-sizing: border-box !important;
  z-index: 2 !important;
  overflow: visible !important;
}

/* Inpatient Table Card & Container */
.table-card,
.patient-table-card {
  position: relative !important;
  clear: both !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-top: 0 !important;
  margin-bottom: 24px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  border-radius: 14px !important;
}

.table-responsive,
.reception-desktop-table {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  -webkit-overflow-scrolling: touch !important;
  position: relative !important;
  display: block !important;
}

/* ==========================================================================
   MOBILE APP EXPERIENCE & PWA RESPONSIVE DESIGN (<= 768px & <= 480px)
   ========================================================================== */

/* 1. Doctor Mobile Bottom Navigation Bar */
.doctor-mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 64px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-subtle);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  justify-content: space-around;
  align-items: center;
  padding: 0 8px;
  box-sizing: border-box;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

body.theme-high-sunlight .doctor-mobile-bottom-bar {
  background: #ffffff;
  border-top: 2px solid #000000;
}

@media (max-width: 768px) {
  .doctor-mobile-bottom-bar {
    display: flex !important;
  }
  
  /* Ensure page content has bottom clearance so it is not obstructed by bottom bar */
  #vet-view,
  .app-container {
    padding-bottom: 74px !important;
  }
}

.doc-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 10px;
  position: relative;
  min-width: 58px;
  min-height: 48px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
}

.doc-bottom-nav-item:active {
  transform: scale(0.92);
}

.doc-bottom-nav-item.active {
  color: var(--accent-primary);
}

.doc-bottom-nav-item.active .doc-nav-icon {
  transform: translateY(-2px);
}

.doc-nav-icon {
  font-size: 20px;
  line-height: 1;
  margin-bottom: 2px;
  transition: transform 0.2s ease;
}

.doc-nav-label {
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}

.doc-nav-badge {
  position: absolute;
  top: 4px;
  right: 12px;
  background: #0284c7;
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.doc-nav-badge-warn {
  background: #d97706;
  animation: pulse 2s infinite;
}

/* Center Floating Action Button (FAB) */
.doc-nav-action-center {
  margin-top: -18px;
}

.doc-nav-fab {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0f766e, #047857);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: bold;
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.4);
  border: 3px solid #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.doc-nav-action-center:active .doc-nav-fab {
  transform: scale(0.92);
}

/* 2. Mobile Action Bottom Sheet */
.mobile-action-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.mobile-action-sheet {
  width: 100%;
  max-width: 500px;
  background: var(--bg-surface);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  padding: 16px 20px 24px;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  animation: slideUpSheet 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

@keyframes slideUpSheet {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.mobile-sheet-pill {
  width: 40px;
  height: 4px;
  background: #cbd5e1;
  border-radius: 2px;
  margin: 0 auto 10px;
}

.mobile-sheet-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 14px;
}

.mobile-sheet-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1.5px solid var(--border-subtle);
  background: #ffffff;
  color: var(--text-main);
  cursor: pointer;
  text-align: right;
  min-height: 52px;
  transition: all 0.15s ease;
  width: 100%;
  box-sizing: border-box;
}

.mobile-sheet-btn:active {
  transform: scale(0.98);
}

.sheet-btn-icon {
  font-size: 26px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sheet-btn-camera { border-color: #38bdf8; }
.sheet-btn-camera .sheet-btn-icon { background: #e0f2fe; color: #0284c7; }

.sheet-btn-dose { border-color: #a7f3d0; }
.sheet-btn-dose .sheet-btn-icon { background: #ecfdf5; color: #059669; }

.sheet-btn-lab { border-color: #c4b5fd; }
.sheet-btn-lab .sheet-btn-icon { background: #f3e8ff; color: #7c3aed; }

.sheet-btn-vitals { border-color: #fde68a; }
.sheet-btn-vitals .sheet-btn-icon { background: #fef3c7; color: #b45309; }

.sheet-btn-info {
  display: flex;
  flex-direction: column;
}

.sheet-btn-info strong {
  font-size: 0.95rem;
  color: var(--text-main);
  font-weight: 800;
}

.sheet-btn-info span {
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-top: 1px;
}

/* 3. Global Mobile Responsive & Touch Optimizations */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    width: 100vw !important;
    position: relative !important;
  }

  .app-container {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    padding: 8px !important;
    box-sizing: border-box !important;
  }

  /* Tap Target Compliance (Minimum 44px) */
  .btn,
  button,
  .input-control,
  select {
    min-height: 44px !important;
    touch-action: manipulation;
  }

  .btn-xs {
    min-height: 36px !important;
  }

  .header-actions {
    width: 100% !important;
    overflow-x: auto !important;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  /* Due Doses Mobile Cards */
  .due-doses-grid {
    grid-template-columns: 1fr !important;
  }

  .due-dose-card {
    padding: 12px !important;
  }

  /* Inpatient Cards Grid on Mobile */
  .patient-cards-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* Owner Portal Mobile Timeline */
  .vip-pill-navigation {
    overflow-x: auto !important;
    white-space: nowrap !important;
    padding: 4px !important;
    gap: 4px !important;
    -webkit-overflow-scrolling: touch;
  }

  .vip-nav-pill-btn {
    min-height: 44px !important;
    padding: 8px 14px !important;
    font-size: 0.85rem !important;
  }

  .vip-hero-video-box video {
    max-height: 240px !important;
  }
}

/* ==========================================================================
   ULTRA-LUXURY BRAND IDENTITY: LOGIN PAGE & NAVBAR REDESIGN
   ========================================================================== */

/* 1. Page Background: Soft Luxury Warm Cream */
html,
body,
body.rtl-mode,
.app-container,
.main-content {
  background-color: #F8F5EE !important;
}

/* Perfect Viewport Centering for Login Screen */
body.is-logged-out {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100vh !important;
  background-color: #F8F5EE !important;
}

body.is-logged-out .app-container {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100vh !important;
  flex: 1 1 auto !important;
  background-color: #F8F5EE !important;
}

body.is-logged-out .main-content {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 1 1 auto !important;
  min-height: calc(100vh - 80px) !important;
  padding: 20px 16px !important;
  box-sizing: border-box !important;
}

/* Hide Experimental Toggles on Login Screen */
body.is-logged-out #btn-toggle-antigravity,
body.is-logged-out #btn-toggle-offline-sim,
body.is-logged-out #sync-pending-badge,
body.is-logged-out .network-pill,
body.is-logged-out #main-role-nav,
body.is-logged-out #header-user-profile {
  display: none !important;
}

/* 2. Top Navbar / Header & Logo Scaling */
.app-header {
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-bottom: 1px solid #E7DCC3 !important;
  padding: 10px 24px !important;
  box-shadow: 0 4px 20px rgba(23, 48, 42, 0.03) !important;
}

.brand-section {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  flex-shrink: 0 !important;
}

.brand-logo-wrap {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  border-radius: 10px !important;
  background: transparent !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  overflow: visible !important;
  padding: 0 !important;
  box-shadow: none !important;
}

.app-brand-logo-img {
  width: 40px !important;
  height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
  object-fit: contain !important;
  filter: drop-shadow(0 2px 6px rgba(23, 48, 42, 0.15)) !important;
  display: block !important;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.brand-logo-wrap:hover .app-brand-logo-img {
  transform: scale(1.05) !important;
}

.brand-text h1 {
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  color: #17302A !important;
  letter-spacing: -0.01em !important;
  margin: 0 !important;
  white-space: nowrap !important;
}

.brand-text p {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  color: #A9784B !important;
  margin: 0 !important;
  white-space: nowrap !important;
  letter-spacing: 1.2px !important;
}

/* Header Action Buttons: Minimalist Luxury Badges */
.network-pill,
#btn-toggle-antigravity,
.lighting-toggle-btn,
.lang-toggle-btn {
  background: #F8F5EE !important;
  border: 1px solid #E7DCC3 !important;
  border-radius: 9999px !important;
  color: #17302A !important;
  padding: 6px 14px !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  box-shadow: 0 1px 3px rgba(23, 48, 42, 0.03) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.network-pill:hover,
#btn-toggle-antigravity:hover,
.lighting-toggle-btn:hover,
.lang-toggle-btn:hover {
  background: #FFFFFF !important;
  border-color: #C9A876 !important;
  color: #17302A !important;
  box-shadow: 0 3px 8px rgba(23, 48, 42, 0.08) !important;
  transform: translateY(-1px) !important;
}

/* 3. Luxury Floating Login Card */
.luxury-login-wrapper,
.login-page-wrapper {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  margin: auto !important;
  padding: 24px 16px !important;
  background-color: transparent !important;
  box-sizing: border-box !important;
}

.luxury-login-card,
.clean-login-card,
.login-card-minimal {
  width: 100% !important;
  max-width: 440px !important;
  background: #FFFFFF !important;
  border-radius: 20px !important;
  border: 1px solid rgba(231, 220, 195, 0.85) !important;
  box-shadow: 0 20px 40px rgba(23, 48, 42, 0.08) !important;
  padding: 48px 32px 32px !important;
  box-sizing: border-box !important;
  position: relative !important;
  overflow: visible !important;
  margin: 0 auto !important;
  transition: all 0.3s ease !important;
}

/* Brand Header Inside Card */
.login-brand-top,
.login-brand-header {
  text-align: center !important;
  margin-bottom: 24px !important;
  background: transparent !important;
  padding: 4px 0 0 0 !important;
  border: none !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.login-logo-container,
.clinic-logo-emblem {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  margin: 0 auto 1.25rem auto !important;
  background: transparent !important;
  overflow: visible !important;
}

.login-emblem-img,
.auth-brand-logo {
  width: 76px !important;
  height: 76px !important;
  max-width: 76px !important;
  max-height: 76px !important;
  object-fit: contain !important;
  filter: drop-shadow(0 4px 14px rgba(23, 48, 42, 0.14)) !important;
  display: block !important;
  margin: 0 auto !important;
}

.login-clinic-title {
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  color: #17302A !important;
  margin: 0 0 5px 0 !important;
  letter-spacing: -0.01em !important;
  line-height: 1.35 !important;
}

.login-clinic-subtitle {
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  color: #A9784B !important;
  margin: 0 0 16px 0 !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
}

.login-gold-divider {
  width: 50px !important;
  height: 2.5px !important;
  background: #C9A876 !important;
  border-radius: 2px !important;
  margin: 0 auto 20px auto !important;
  opacity: 0.85 !important;
}

/* Minimalist Pill Toggle for Role Switching */
.login-pill-toggle,
.login-tabs-nav {
  display: flex !important;
  background: #F3EFE6 !important;
  padding: 4px !important;
  border-radius: 9999px !important;
  border: 1px solid #E7DCC3 !important;
  margin-bottom: 22px !important;
  gap: 4px !important;
}

.role-pill-btn,
.tab-btn {
  flex: 1 !important;
  padding: 9px 14px !important;
  border: none !important;
  border-radius: 9999px !important;
  font-weight: 700 !important;
  font-size: 0.88rem !important;
  cursor: pointer !important;
  background: transparent !important;
  color: #8C867A !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: none !important;
}

.role-pill-btn.active,
.tab-btn.active {
  background: #17302A !important;
  color: #C9A876 !important;
  box-shadow: 0 3px 10px rgba(23, 48, 42, 0.25) !important;
  font-weight: 800 !important;
}

/* Forms, Labels, Inputs */
.luxury-form .form-group {
  margin-bottom: 16px !important;
}

.luxury-label,
.form-label {
  font-weight: 700 !important;
  font-size: 0.84rem !important;
  color: #17302A !important;
  margin-bottom: 6px !important;
  display: block !important;
}

.luxury-label-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 6px !important;
}

.luxury-text-link {
  background: none !important;
  border: none !important;
  cursor: pointer !important;
  text-decoration: underline !important;
  font-weight: 700 !important;
  color: #8B6A45 !important;
  font-size: 0.76rem !important;
  transition: color 0.15s ease !important;
}

.luxury-text-link:hover {
  color: #17302A !important;
}

/* Crisp White Inputs with Warm Beige Border */
.luxury-input,
.input-control {
  width: 100% !important;
  padding: 12px 14px !important;
  background: #FFFFFF !important;
  border: 1.5px solid #E7DCC3 !important;
  border-radius: 12px !important;
  font-size: 0.95rem !important;
  color: #17302A !important;
  font-family: inherit !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
  box-shadow: 0 1px 2px rgba(23, 48, 42, 0.02) !important;
}

.luxury-input:focus,
.input-control:focus {
  background: #FFFFFF !important;
  border-color: #17302A !important;
  box-shadow: 0 0 0 3px rgba(201, 168, 118, 0.25) !important;
  outline: none !important;
}

.luxury-input::placeholder,
.input-control::placeholder {
  color: #94A3B8 !important;
  font-size: 0.88rem !important;
}

/* Notice Box */
.luxury-notice-box {
  background: #F4F8F6 !important;
  border: 1px solid #C4DCD3 !important;
  border-radius: 10px !important;
  padding: 10px 14px !important;
  margin-bottom: 16px !important;
  font-size: 0.8rem !important;
  color: #17302A !important;
  line-height: 1.5 !important;
}

.luxury-notice-box strong {
  display: block !important;
  color: #17302A !important;
  margin-bottom: 2px !important;
}

/* Luxury Primary Action Button */
.luxury-btn-primary,
.clean-login-card button[type="submit"] {
  width: 100% !important;
  padding: 13px 20px !important;
  background: #17302A !important;
  color: #FFFFFF !important;
  font-weight: 800 !important;
  font-size: 0.96rem !important;
  border-radius: 12px !important;
  border: none !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 4px 14px rgba(23, 48, 42, 0.18) !important;
  margin-top: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}

.luxury-btn-primary:hover,
.clean-login-card button[type="submit"]:hover {
  background: #0f241f !important;
  color: #C9A876 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 18px rgba(23, 48, 42, 0.28) !important;
}

.luxury-btn-primary:active,
.clean-login-card button[type="submit"]:active {
  transform: translateY(0) !important;
}

/* Alert Notification */
.luxury-login-alert,
.login-alert-danger {
  background: #FDF2F2 !important;
  border: 1px solid #F87171 !important;
  color: #991B1B !important;
  padding: 10px 14px !important;
  border-radius: 10px !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  margin-bottom: 16px !important;
}

/* Quick Demo Chips */
.luxury-quick-box,
.quick-credentials-box {
  margin-top: 22px !important;
  border-top: 1px dashed #E7DCC3 !important;
  padding-top: 16px !important;
}

.luxury-quick-title,
.quick-cred-title {
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  color: #8B6A45 !important;
  display: block !important;
  margin-bottom: 10px !important;
}

.luxury-quick-grid,
.quick-cred-buttons {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
}

.luxury-chip-btn,
.btn-cred-chip {
  padding: 8px 10px !important;
  border-radius: 10px !important;
  border: 1px solid #E7DCC3 !important;
  background: #FAF9F5 !important;
  cursor: pointer !important;
  text-align: right !important;
  transition: all 0.2s ease !important;
}

.luxury-chip-btn strong {
  display: block !important;
  font-size: 0.82rem !important;
  color: #17302A !important;
}

.luxury-chip-btn span {
  font-size: 0.72rem !important;
  color: #8C867A !important;
}

.luxury-chip-btn:hover,
.btn-cred-chip:hover {
  background: #FFFFFF !important;
  border-color: #C9A876 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 3px 8px rgba(23, 48, 42, 0.06) !important;
}

/* ==========================================
 * FAST LOADER & SPINNER OPTIMIZATIONS
 * ========================================== */
.luxury-btn-spinner {
  display: inline-block !important;
  width: 18px !important;
  height: 18px !important;
  border: 2.5px solid rgba(201, 168, 118, 0.3) !important;
  border-top-color: #C9A876 !important;
  border-radius: 50% !important;
  animation: luxurySpin 0.65s linear infinite !important;
  vertical-align: middle !important;
  margin-left: 6px !important;
}

@keyframes luxurySpin {
  to { transform: rotate(360deg); }
}

.luxury-btn-primary.is-loading,
.role-pill-btn.is-loading {
  pointer-events: none !important;
  opacity: 0.85 !important;
  cursor: wait !important;
}

#fast-top-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #17302A, #C9A876, #10b981);
  z-index: 9999999;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  pointer-events: none;
}

#fast-top-loader.loading {
  animation: fastTopLoaderAnim 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes fastTopLoaderAnim {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(0); }
  100% { transform: translateX(100%); }
}

/* ==========================================================================
   OUTER CONTAINER HEIGHT & SCROLL FIX (حل مشكلة التمرير والقص السفلي للواجهات)
   ========================================================================== */
html,
body {
  min-height: 100vh !important;
  height: auto !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}

.min-h-screen {
  min-height: 100vh !important;
}

.flex {
  display: flex !important;
}

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

.w-full {
  width: 100% !important;
}

.bg-cream {
  background: var(--bg-primary, #F8F5EE) !important;
}

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

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

.app-container,
.main-content,
#owner-view,
.role-container,
.vip-owner-container,
.vip-camel-detailed-view,
.vip-tab-content-root,
.treatment-plan-tab-wrapper,
.labs-tab-wrapper,
.feed-tab-wrapper,
.doctor-chat-tab-wrapper {
  min-height: 100% !important;
  height: auto !important;
  max-height: none !important;
  overflow-y: visible !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

/* Ensure padding at the bottom of the owner view so fixed FAB does not obscure content */
.vip-camel-detailed-view {
  padding-bottom: 80px !important;
}

/* Owner Portal Error Boundary & Empty State Cards */
.owner-error-boundary-box {
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  background: var(--bg-card, #ffffff);
  border: 2px dashed var(--border-subtle, #E7DCC3);
  border-radius: 20px;
  box-shadow: var(--shadow-md, 0 8px 20px rgba(0,0,0,0.06));
  margin: 20px auto;
  max-width: 650px;
}

.owner-fallback-card {
  background: var(--bg-card, #ffffff);
  border: 1.5px solid var(--border-subtle, #E7DCC3);
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm, 0 2px 5px rgba(0,0,0,0.04));
  margin: 12px 0;
}


