/* ==========================================================================
   CytoVance – Enterprise Blood Bank Management System Design System
   Color Palette: Primary #B71C1C | Background #F7F9FC | Cards #FFFFFF
   Typography: Inter / Segoe UI Variable | Border Radius: 16px - 20px
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Core Colors */
  --cv-primary: #B71C1C;
  --cv-primary-dark: #880E4F;
  --cv-primary-light: #FF1744;
  --cv-primary-subtle: rgba(183, 28, 28, 0.06);

  --cv-bg: #F7F9FC;
  --cv-card-bg: #FFFFFF;
  --cv-text-main: #0F172A;
  --cv-text-muted: #64748B;
  --cv-border-light: #E2E8F0;

  /* Accents */
  --cv-accent-green: #10B981;
  --cv-accent-green-subtle: rgba(16, 185, 129, 0.08);

  --cv-accent-blue: #3B82F6;
  --cv-accent-blue-subtle: rgba(59, 130, 246, 0.08);

  --cv-accent-orange: #F59E0B;
  --cv-accent-orange-subtle: rgba(245, 158, 11, 0.08);

  --cv-accent-purple: #8B5CF6;
  --cv-accent-purple-subtle: rgba(139, 92, 246, 0.08);

  --cv-accent-red: #EF4444;
  --cv-accent-red-subtle: rgba(239, 68, 68, 0.08);

  /* Radius & Shadows */
  --cv-radius: 16px;
  --cv-radius-lg: 20px;
  --cv-radius-sm: 10px;

  --cv-shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.02), 0 1px 2px rgba(15, 23, 42, 0.03);
  --cv-shadow-md: 0 10px 30px rgba(15, 23, 42, 0.04), 0 2px 8px rgba(15, 23, 42, 0.02);
  --cv-shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.03);
  --cv-shadow-hover: 0 14px 36px rgba(183, 28, 28, 0.08), 0 4px 12px rgba(15, 23, 42, 0.04);
}

/* Global resets & typography */
body.bbmis-body,
body.bbmis-theme {
  background-color: var(--cv-bg) !important;
  color: var(--cv-text-main);
  font-family: 'Inter', 'Segoe UI Variable', 'Segoe UI', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Header / Topbar */
.bbmis-topbar {
  position: fixed;
  top: 0;
  left: 260px;
  right: 0;
  width: calc(100% - 260px);
  height: 64px;
  background: #FFFFFF !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  border-bottom: 1px solid var(--cv-border-light);
  z-index: 1030;
  padding: 0 20px;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bbmis-topbar .form-control {
  background: #F1F5F9;
  border: 1px solid transparent;
  color: var(--cv-text-main);
  transition: all 0.2s ease;
}

.bbmis-topbar .form-control:focus {
  background: #FFFFFF;
  border-color: var(--cv-primary);
  box-shadow: 0 0 0 3px var(--cv-primary-subtle);
}

  padding: 4px 10px;
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.badge-live-pulse .pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10B981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-ring 1.8s infinite;
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Sidebar */
.bbmis-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 260px;
  min-width: 260px;
  height: 100vh;
  background: linear-gradient(180deg, #900C22 0%, #B71C1C 40%, #7F0000 100%) !important;
  color: #FFFFFF;
  padding-bottom: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 0 20px rgba(15, 23, 42, 0.03);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  z-index: 1035;
}

.bbmis-sidebar .sidebar-header {
  background: #FFFFFF !important;
  border-bottom: 1px solid var(--cv-border-light) !important;
  padding: 14px 18px;
}

.bbmis-sidebar .list-group-item {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 500;
  transition: all 0.2s ease;
  border-radius: 12px;
  margin: 2px 10px;
}

.bbmis-sidebar .list-group-item:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  transform: translateX(3px);
}

.bbmis-sidebar .list-group-item.active,
.bbmis-sidebar .list-group-item:active {
  background: #FFFFFF !important;
  color: var(--cv-primary) !important;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.bbmis-sidebar .list-group-item.active i,
.bbmis-sidebar .list-group-item:active i {
  color: var(--cv-primary) !important;
}

.bbmis-sidebar.collapsed {
  width: 72px;
  min-width: 72px;
}

.bbmis-sidebar.collapsed .sidebar-text,
.bbmis-sidebar.collapsed .sidebar-chevron,
.bbmis-sidebar.collapsed .collapse {
  display: none !important;
}

.bbmis-sidebar.collapsed .sidebar-header {
  justify-content: center !important;
  padding: 14px 6px !important;
}

body.sidebar-collapsed .bbmis-topbar {
  left: 72px !important;
  width: calc(100% - 72px) !important;
}

body.sidebar-collapsed .cv-main-content {
  margin-left: 72px !important;
  width: calc(100% - 72px) !important;
}

/* Main Content Wrapper */
.cv-main-content {
  margin-left: 260px;
  margin-top: 64px;
  width: calc(100% - 260px);
  min-height: calc(100vh - 64px);
  padding: 24px;
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Premium Healthcare Cards */
.cv-card {
  background: var(--cv-card-bg);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--cv-radius);
  box-shadow: var(--cv-shadow-md);
  padding: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.cv-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--cv-shadow-hover);
  border-color: rgba(183, 28, 28, 0.15);
}

/* Accent Borders for Cards */
.cv-card.accent-red::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--cv-primary);
}

.cv-card.accent-blue::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--cv-accent-blue);
}

.cv-card.accent-green::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--cv-accent-green);
}

.cv-card.accent-orange::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--cv-accent-orange);
}

.cv-card.accent-purple::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--cv-accent-purple);
}

/* KPI Cards */
.kpi-card-v2 {
  background: #FFFFFF;
  border-radius: var(--cv-radius);
  box-shadow: var(--cv-shadow-md);
  padding: 18px 20px;
  border: 1px solid var(--cv-border-light);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.kpi-card-v2:hover {
  transform: translateY(-3px);
  box-shadow: var(--cv-shadow-hover);
}

.kpi-icon-bubble {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  transition: transform 0.3s ease;
}

.kpi-card-v2:hover .kpi-icon-bubble {
  transform: scale(1.1) rotate(4deg);
}

/* Blood Group Cards Grid */
.blood-group-card {
  border-radius: 14px;
  padding: 14px;
  border: 1px solid var(--cv-border-light);
  background: #FFFFFF;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.blood-group-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.bg-badge-Oplus {
  background: var(--cv-accent-red-subtle);
  color: #B71C1C;
}

.bg-badge-Ominus {
  background: rgba(136, 14, 79, 0.08);
  color: #880E4F;
}

.bg-badge-Aplus {
  background: var(--cv-accent-blue-subtle);
  color: #1D4ED8;
}

.bg-badge-Aminus {
  background: rgba(30, 64, 175, 0.08);
  color: #1E40AF;
}

.bg-badge-Bplus {
  background: var(--cv-accent-green-subtle);
  color: #047857;
}

.bg-badge-Bminus {
  background: rgba(6, 78, 59, 0.08);
  color: #064E3B;
}

.bg-badge-ABplus {
  background: var(--cv-accent-purple-subtle);
  color: #6D28D9;
}

.bg-badge-ABminus {
  background: rgba(76, 29, 149, 0.08);
  color: #4C1D95;
}

/* Workflow Stage Path */
.workflow-step-node {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 0.9rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  transition: all 0.3s ease;
}

.workflow-step-node:hover {
  transform: scale(1.15);
}

/* Quick Action Toolbar Buttons */
.btn-quick-action {
  background: #FFFFFF;
  border: 1px solid var(--cv-border-light);
  color: var(--cv-text-main);
  font-weight: 600;
  font-size: 0.82rem;
  border-radius: 12px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--cv-shadow-sm);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.btn-quick-action:hover {
  background: #FFFFFF;
  color: var(--cv-primary);
  border-color: var(--cv-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(183, 28, 28, 0.1);
}

.btn-quick-action i {
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.btn-quick-action:hover i {
  transform: scale(1.15);
}

/* Cold Storage Progress Bars */
.cold-progress {
  height: 6px;
  border-radius: 4px;
  background-color: #E2E8F0;
  overflow: hidden;
}

.cold-progress-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

/* Tables */
.cv-table-container {
  background: #FFFFFF;
  border-radius: var(--cv-radius);
  box-shadow: var(--cv-shadow-md);
  border: 1px solid var(--cv-border-light);
  overflow: hidden;
}

.cv-table {
  width: 100%;
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.cv-table th {
  background-color: #F8FAFC;
  color: var(--cv-text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--cv-border-light);
}

.cv-table td {
  padding: 14px 16px;
  font-size: 0.85rem;
  color: var(--cv-text-main);
  border-bottom: 1px solid #F1F5F9;
  vertical-align: middle;
}

.cv-table tbody tr:hover {
  background-color: var(--cv-primary-subtle);
}

/* Badge styles */
.badge-cv {
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* Toast Notifications */
#bbmisToasts {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1060;
}

.toast.bbmis-success {
  background: var(--cv-accent-green);
  color: #FFFFFF;
}

.toast.bbmis-error {
  background: var(--cv-primary);
  color: #FFFFFF;
}

.toast.bbmis-warning {
  background: var(--cv-accent-orange);
  color: #0F172A;
}

.toast.bbmis-info {
  background: var(--cv-accent-blue);
  color: #FFFFFF;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
  .bbmis-sidebar {
    transform: translateX(-110%);
    position: fixed;
    left: 0;
    top: 64px;
    z-index: 1040;
  }

  .bbmis-sidebar.show {
    transform: translateX(0);
  }

  .login-left-panel {
    display: none !important;
  }
  .login-right-panel {
    flex: 1 !important;
    width: 100% !important;
    padding: 20px !important;
  }
}

/* ==========================================================================
   CYTOVANCE ENTERPRISE LOGIN PAGE STYLES (EXACT FIGMA SPECIFICATION)
   ========================================================================== */

.cytovance-login-page {
  background-color: #F8FAFC !important;
  min-height: 100vh;
  width: 100vw;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.cytovance-login-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
  position: relative;
}

/* Left Hero Panel */
.login-left-panel {
  flex: 1.15;
  position: relative;
  background-color: #FFFFFF;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 60px;
  z-index: 2;
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.02);
  overflow: hidden;
}

/* Red blood cell background decoration on left hero with soft radial light overlay */
.blood-cells-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 48% 50%, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.8) 50%, rgba(136, 14, 79, 0.25) 100%),
    url('/images/login_blood_cells_bg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 1;
  pointer-events: none;
}

.left-panel-arc-svg {
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 100%;
  z-index: 4;
  pointer-events: none;
}

.left-panel-content {
  position: relative;
  z-index: 3;
  max-width: 500px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Brand logo & titles */
.login-brand-logo {
  width: 110px;
  height: 110px;
  filter: drop-shadow(0 6px 12px rgba(183, 28, 28, 0.2));
  margin-bottom: 12px;
}

.login-brand-title {
  font-family: 'Inter', sans-serif;
  font-size: 2.5rem;
  font-weight: 900;
  color: #1E293B;
  letter-spacing: 4px;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 6px;
}

.login-brand-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748B;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.login-pulse-divider {
  width: 200px;
  height: 20px;
  margin-bottom: 16px;
}

.login-slogan {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.login-slogan-dark {
  color: #1E293B;
}

.login-slogan-red {
  color: #B71C1C;
}

.login-description {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.6;
  max-width: 440px;
  margin-bottom: 35px;
}

/* 4 Pillars */
.login-pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 480px;
}

.pillar-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 14px;
  padding: 14px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  transition: all 0.25s ease;
}

.pillar-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(183, 28, 28, 0.1);
  border-color: rgba(183, 28, 28, 0.25);
}

.pillar-icon-box {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  color: #B71C1C;
}

.pillar-title-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
  color: #1E293B;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  line-height: 1.2;
}

/* Right Form Area */
.login-right-panel {
  flex: 1;
  background-color: #F8FAFC;
  background-image: 
    radial-gradient(#E2E8F0 1px, transparent 1px),
    radial-gradient(#E2E8F0 1px, #F8FAFC 1px);
  background-size: 40px 40px;
  background-position: 0 0, 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  position: relative;
}

/* Faint background ECG line on right side */
.login-right-panel::before {
  content: '';
  position: absolute;
  right: 0;
  top: 35%;
  width: 220px;
  height: 220px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M0,50 L30,50 L40,10 L50,90 L60,50 L70,65 L80,50 L100,50' fill='none' stroke='%23e2e8f0' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  opacity: 0.6;
  pointer-events: none;
}

/* Main Form Card */
.floating-login-card {
  background: #FFFFFF;
  border-radius: 24px;
  padding: 40px 36px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.02);
  border: 1px solid rgba(226, 232, 240, 0.7);
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-card-icon-bubble {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #FFF1F2;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.login-card-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 4px;
  text-align: center;
}

.login-card-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  color: #64748B;
  margin-bottom: 28px;
  text-align: center;
}

/* Input Fields */
.login-field-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
  display: block;
}

.login-input-group {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.login-input-icon-left {
  position: absolute;
  left: 16px;
  color: #94A3B8;
  font-size: 0.95rem;
  pointer-events: none;
}

.login-input-icon-right {
  position: absolute;
  right: 16px;
  color: #94A3B8;
  font-size: 0.95rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.login-form-input {
  width: 100%;
  height: 48px;
  padding: 10px 16px 10px 46px;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: #0F172A;
  background-color: #FFFFFF;
  transition: all 0.2s ease;
}

.login-form-input:focus {
  outline: none;
  border-color: #B71C1C;
  box-shadow: 0 0 0 3px rgba(183, 28, 28, 0.1);
}

.login-form-input::placeholder {
  color: #94A3B8;
}

/* Buttons */
.btn-login-primary {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, #B71C1C 0%, #900C22 100%);
  border: none;
  border-radius: 12px;
  color: #FFFFFF;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 20px rgba(183, 28, 28, 0.25);
  transition: all 0.25s ease;
  cursor: pointer;
}

.btn-login-primary:hover {
  background: linear-gradient(135deg, #D32F2F 0%, #B71C1C 100%);
  box-shadow: 0 8px 25px rgba(183, 28, 28, 0.35);
  transform: translateY(-1px);
}

.btn-login-biometric {
  width: 100%;
  height: 48px;
  background: #FFFFFF;
  border: 1.5px solid #B71C1C;
  border-radius: 12px;
  color: #B71C1C;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.25s ease;
  cursor: pointer;
}

.btn-login-biometric:hover {
  background: rgba(183, 28, 28, 0.04);
  border-color: #900C22;
  color: #900C22;
  transform: translateY(-1px);
}

/* Login Footer */
.login-footer-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: #64748B;
  text-align: center;
  margin-top: 24px;
  line-height: 1.5;
  font-weight: 500;
}