* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #2a76c6;
  --primary-dark: #1f5ea2;
  --light: #f5f8ff;
  --gray: #6f7a8a;
  --border: #e4e9f2;
  --shadow: 0 10px 24px rgba(21, 68, 125, 0.12);
  --radius-soft-sm: 14px;
  --radius-soft-md: 20px;
  --radius-soft-lg: 26px;
  --radius-soft-xl: 32px;
  --radius-pill: 999px;
  --soft-border: #dfe9f5;
  --soft-shadow: 0 14px 34px rgba(21, 68, 125, 0.08);
  --sidebar-width: 300px;
}

body {
  font-family: "Poppins", sans-serif;
  color: #1c2430;
  background: #ffffff;
}

.page-dashboard {
  font-size: 16px;
}

img {
  max-width: 100%;
  display: block;
}

.btn {
  border: none;
  background: none;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  padding: 12px 28px;
  border-radius: 12px;
  font-weight: 500;
}

.btn-pharmassist {
  border: 1px solid #4da3ff !important;
  color: #4da3ff !important;
  padding: 12px 28px;
  border-radius: 10px !important;
  font-weight: 400;
  background: #fff;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-pharmassist:hover {
  background: #f0f7ff;
  border-color: #3b82f6 !important;
  color: #3b82f6 !important;
}

.btn-block {
  width: 100%;
  margin-top: 18px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
}

.page-login .topbar {
  display: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  height: 70px;
}


.landing {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr);
  gap: 48px;
  padding: 30px 64px 60px;
  align-items: center;
}

.landing-copy h1 {
  font-family: "Cinzel", "Times New Roman", serif;
  font-size: clamp(44px, 5vw, 58px);
  letter-spacing: 3px;
  line-height: 1.05;
  font-weight: 700;
  color: #163b61;
  text-wrap: balance;
  margin-bottom: 14px;
}

.landing-copy p {
  color: var(--gray);
  font-size: 20px;
  line-height: 1.6;
  max-width: 620px;
  margin-bottom: 24px;
}

.landing-actions {
  display: flex;
  gap: 16px;
}

.landing-visual {
  height: 480px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #fff;
}

.landing-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.2);
  /* Zoom in more to hide black borders from original image */
}

.login-logo-link {
  display: inline-block;
}

.login {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  background: #f8fbff;
}

.login-card {
  background: #fff;
  width: min(480px, 90vw);
  padding: 28px 32px 36px;
  border-radius: 24px;
  box-shadow: var(--shadow);
  border: 2px solid #d9e7f7;
  text-align: center;
}

.login-logo {
  width: 220px;
  height: auto;
  margin: 0 auto 16px;
}

.login-card h1 {
  font-size: 22px;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.login-card label {
  display: block;
  text-align: left;
  font-size: 14px;
  margin-bottom: 14px;
  color: #2b3341;
}

.login-card input {
  width: 100%;
  margin-top: 6px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid #cfd8e6;
  outline: none;
  font-family: inherit;
}

.password-field {
  position: relative;
}

.login-card .password-field input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  top: 6px;
  right: 0;
  width: 44px;
  height: calc(100% - 6px);
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #66788f;
  cursor: pointer;
}

.password-toggle svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle-eye {
  display: none;
}

.password-toggle-eye-off {
  display: block;
}

.password-toggle[aria-pressed="true"] .password-toggle-eye {
  display: block;
}

.password-toggle[aria-pressed="true"] .password-toggle-eye-off {
  display: none;
}

.password-toggle:hover {
  color: var(--pharmacy-blue, #0b84d8);
}

.password-toggle:focus-visible {
  color: var(--pharmacy-blue, #0b84d8);
  outline: 2px solid var(--pharmacy-blue, #0b84d8);
  outline-offset: -5px;
  border-radius: 10px;
}

.login-help-row {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 14px;
}

.forgot-password-link {
  border: none;
  background: transparent;
  color: var(--pharmacy-blue-dark, #075f9b);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}

.forgot-password-link:hover,
.forgot-password-link:focus-visible {
  color: var(--pharmacy-blue, #0b84d8);
  text-decoration: underline;
  outline: none;
}

.forgot-password-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 32, 51, 0.44);
  backdrop-filter: blur(5px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.forgot-password-modal.active {
  opacity: 1;
  visibility: visible;
}

.forgot-password-card {
  position: relative;
  width: min(430px, 100%);
  padding: 28px;
  border: 1px solid var(--pharmacy-line, #cfe5f7);
  border-top: 3px solid rgba(11, 132, 216, 0.32);
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: var(--pharmacy-shadow-hover, 0 20px 46px rgba(11, 132, 216, 0.16));
  text-align: left;
  transform: translateY(14px) scale(0.98);
  transition: transform 0.25s ease;
}

.forgot-password-modal.active .forgot-password-card {
  transform: translateY(0) scale(1);
}

.forgot-password-close {
  position: absolute;
  top: 14px;
  right: 16px;
  border: none;
  background: transparent;
  color: #7a8ca3;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.forgot-password-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 18px;
  background: var(--pharmacy-blue-soft, #eaf7ff);
  border: 1px solid var(--pharmacy-line, #cfe5f7);
}

.forgot-password-icon img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.forgot-password-card h2 {
  color: var(--pharmacy-blue-dark, #075f9b);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.forgot-password-card p {
  color: var(--pharmacy-muted, #66788f);
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 18px;
}

.forgot-password-card label {
  display: block;
  color: #2b3341;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 18px;
}

.forgot-password-card input {
  width: 100%;
  margin-top: 7px;
  padding: 11px 14px;
  border: 1.5px solid var(--pharmacy-line, #cfe5f7);
  border-radius: 14px;
  background: #ffffff;
  color: var(--pharmacy-text, #102033);
  font-family: inherit;
  outline: none;
}

.forgot-password-card input:focus {
  border-color: var(--pharmacy-blue, #0b84d8);
  box-shadow: 0 0 0 4px rgba(11, 132, 216, 0.12);
}

.forgot-password-message {
  display: none;
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
}

.forgot-password-message.error,
.forgot-password-message.success {
  display: block;
}

.forgot-password-message.error {
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.forgot-password-message.success {
  color: #116b3a;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
}

.forgot-password-actions {
  display: flex;
  gap: 12px;
}

.forgot-password-cancel,
.forgot-password-submit {
  flex: 1;
  min-height: 42px;
  border-radius: 14px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.forgot-password-cancel {
  color: var(--pharmacy-blue-dark, #075f9b);
  background: #ffffff;
  border: 1px solid var(--pharmacy-line, #cfe5f7);
}

.forgot-password-submit {
  color: #ffffff;
  background: linear-gradient(135deg, var(--pharmacy-blue, #0b84d8), var(--pharmacy-blue-dark, #075f9b));
  border: none;
  box-shadow: 0 12px 24px rgba(11, 132, 216, 0.18);
}

.forgot-password-cancel:hover,
.forgot-password-submit:hover {
  transform: translateY(-2px);
}

.forgot-password-cancel:hover {
  background: var(--pharmacy-blue-soft, #eaf7ff);
}

.forgot-password-submit:hover {
  box-shadow: 0 16px 30px rgba(11, 132, 216, 0.24);
}

.login-captcha {
  margin: 6px 0 18px;
  display: flex;
  justify-content: center;
}

.captcha-row {
  display: grid;
  grid-template-columns: 58px 18px 58px 18px 58px;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.login-card .captcha-number,
.login-card .captcha-answer {
  margin-top: 0;
  text-align: center;
  font-weight: 700;
  color: #102033;
  border-color: #cfe5f7;
  background: #f5fbff;
}

.login-card .captcha-answer {
  background: #ffffff;
}

.captcha-row .captcha-number,
.captcha-row .captcha-answer,
.captcha-row .captcha-symbol {
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease,
    box-shadow 0.2s ease;
}

.captcha-row.is-correct .captcha-number,
.captcha-row.is-correct .captcha-answer {
  color: #116b3a;
  border-color: #22c55e;
  background: #ecfdf5;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.14);
}

.captcha-row.is-correct .captcha-symbol {
  color: #16a34a;
}

.captcha-row.is-wrong .captcha-number,
.captcha-row.is-wrong .captcha-answer {
  color: #991b1b;
  border-color: #ef4444;
  background: #fef2f2;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14);
}

.captcha-row.is-wrong .captcha-symbol {
  color: #dc2626;
}

.login-card .captcha-answer::-webkit-outer-spin-button,
.login-card .captcha-answer::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.login-card .captcha-answer {
  appearance: textfield;
  -moz-appearance: textfield;
}

.captcha-symbol {
  color: #075f9b;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
}

@media (max-width: 420px) {
  .captcha-row {
    grid-template-columns: 48px 16px 48px 16px 48px;
    gap: 6px;
  }
}

.dashboard {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  height: 100vh;
  overflow: hidden;
  background: #f9fbff;
}

.sidebar {
  background: #fff;
  border-right: 1px solid #e2e8f0;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 8px; /* Reduced gap to move text left slightly */
  padding: 0 4px 24px; /* Slightly tighter brand spacing */
  border-bottom: 1px solid #f1f5f9;
}

.sidebar-brand img {
  width: 72px; /* Slightly smaller logo */
}

.sidebar-brand-text {
  font-size: 13px; /* Reduced font size as requested */
  font-weight: 700;
  color: #0ea5e9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 7px;
  flex: 1;
  padding-top: 34px;
  padding-bottom: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 14px;
  position: relative;
  border-radius: 10px;
  text-decoration: none;
  color: #1e293b;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease,
    transform 0.2s ease;
  text-align: center;
}

.nav-item:hover {
  background: #f8fafc;
  color: #0ea5e9;
  transform: translateY(-1px);
}

.nav-item.active {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0369a1;
  box-shadow: 0 8px 18px rgba(14, 165, 233, 0.12);
}

.nav-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
}

.nav-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #bae6fd;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0369a1;
  font-weight: 700;
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.user-role {
  font-size: 11px;
  color: #64748b;
}

.btn-signout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #cfd8e6;
  background: #fff;
  color: #1c2430;
  font-weight: 500;
  text-decoration: none;
  font-size: 15px;
  width: 100%;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-signout:hover {
  background: #f0f6fd;
  border-color: #b8d2f1;
  transform: translateX(4px);
}
 

.nav-icon img {
  width: 20px;
  height: 20px;
  display: block;
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid #d8e2f1;
  padding-top: 16px;
}

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

.user .name {
  font-size: 13px;
  font-weight: 600;
}

.user .role {
  font-size: 11px;
  color: #8a96a6;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e4edf9;
  display: grid;
  place-items: center;
  color: #1b63aa;
  font-weight: 600;
}

.signout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 6px 10px;
  background: #fff;
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  width: fit-content;
}

.signout-icon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  background: transparent;
}

.signout-icon img {
  width: 14px;
  height: 14px;
  display: block;
}

.content {
  padding: 18px 32px;
  height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.content-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 0;
  flex-shrink: 0;
}

.content-top h1 {
  font-size: 18px; /* Smaller title */
  font-weight: 600;
}

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

.bell img {
  width: 20px;
  height: 20px;
  display: block;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px; /* Further reduced gap */
  flex-shrink: 0;
  margin-bottom: 16px; /* Further reduced margin */
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 10px; /* Reduced gap */
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px; /* Smaller radius */
  padding: 12px; /* Reduced padding */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
}

.stat-icon {
  width: 40px; /* Smaller icon container */
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon.sale {
  background: #f0f7ff;
}

.stat-icon.product {
  background: #f5f3ff;
}

.stat-icon.alert, .stat-icon.status-alert, .stat-icon.expiry {
  background: #fffaf0;
}

.stat-icon.staff {
  background: #eef2ff;
}

.stat-icon img {
  width: 24px !important; /* Smaller icon */
  height: 24px !important;
}

.stat-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-title {
  font-size: 13px; /* Smaller title */
  color: #64748b;
  font-weight: 500;
}

.stat-value {
  font-weight: 700;
  font-size: 20px; /* Smaller value */
  color: #0f172a;
}

.stat-note {
  font-size: 11px; /* Smaller note */
  color: #94a3b8;
}

.charts-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
  transition: all 0.5s ease;
}

.chart-card-full {
  background: #fff;
  border-radius: 10px;
  padding: 10px; /* Further reduced padding */
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  border: 1.2px solid #eef2f8;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  transform: translateY(0);
}

.chart-card-full:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  border-color: #0080d1;
}

.charts-grid.switching .chart-card-full {
  opacity: 0;
  transform: translateY(10px);
}

.revenue-card {
  flex: 1 1 calc(60% - 16px);
  min-width: 300px;
}

.trend-card {
  flex: 1 1 calc(40% - 16px);
  min-width: 250px;
}

.sales-pie-card {
  flex: 1 1 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Weekly Layout */
.layout-weekly .revenue-card {
  order: 1;
}

.layout-weekly .trend-card {
  order: 2;
}

.layout-weekly .sales-pie-card {
  order: 3;
}

/* Monthly Layout */
.layout-monthly .sales-pie-card {
  order: 1;
}

.layout-monthly .revenue-card {
  order: 2;
  flex: 1 1 calc(50% - 16px);
}

.layout-monthly .trend-card {
  order: 3;
  flex: 1 1 calc(50% - 16px);
}

/* Yearly Layout */
.layout-yearly .trend-card {
  order: 1;
}

.layout-yearly .revenue-card {
  order: 2;
}

.layout-yearly .sales-pie-card {
  order: 3;
}

.chart-header {
  margin-bottom: 8px; /* Reduced margin */
}

.chart-title {
  font-size: 13px; /* Smaller title */
  font-weight: 600;
  color: #1a1a1a;
}

.chart-container {
  width: 100%;
  height: 180px; /* Reduced height */
  position: relative;
}

.pie-container {
  height: 250px; /* Increased height */
  width: 100%;
  max-width: 500px; /* Increased max-width */
}

.pie-canvas-wrap {
  width: 100%;
  height: 100%;
  position: relative;
}

.pie-legend-column {
  display: none;
}

.pie-legend-group {
  display: none;
}

.pie-container.split-legend {
  max-width: 100%;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
}

.pie-container.split-legend .pie-canvas-wrap {
  flex: 0 0 260px;
  width: 260px;
  height: 260px;
}

.pie-container.split-legend .pie-legend-group {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  transform: translateX(-18px);
  gap: 18px;
}

.pie-container.split-legend .pie-legend-column {
  display: flex;
  flex: 0 0 90px;
  justify-content: center;
}

.pie-container.single-legend {
  max-width: 100%;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.pie-container.single-legend .pie-canvas-wrap {
  flex: 0 0 280px;
  width: 280px;
  height: 280px;
}

.pie-container.single-legend .pie-legend-group {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
}

.pie-container.single-legend .pie-legend-right {
  display: flex;
  flex: 1;
  justify-content: center;
}

.pie-container.single-legend .pie-legend-right .pie-legend-list {
  align-items: center;
}

.pie-container.single-legend .pie-legend-right .pie-legend-item {
  justify-content: center;
  text-align: center;
  gap: 14px;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

.pie-container.single-legend .pie-legend-swatch {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  flex: 0 0 20px;
}

.pie-legend-column .pie-legend-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.pie-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #334155;
  line-height: 1.2;
}

.pie-legend-left .pie-legend-item {
  justify-content: center;
  text-align: center;
}

.pie-legend-right .pie-legend-item {
  justify-content: center;
  text-align: center;
}

.pie-legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 10px;
}

@media (max-width: 768px) {
  .pie-container.split-legend {
    height: auto;
    flex-wrap: wrap;
    gap: 12px;
  }

  .pie-container.split-legend .pie-canvas-wrap {
    order: 1;
    flex: 0 0 220px;
    width: 220px;
    height: 220px;
  }

  .pie-container.split-legend .pie-legend-group {
    order: 2;
    width: 100%;
    justify-content: center;
    transform: none;
    gap: 12px;
  }

  .pie-container.split-legend .pie-legend-column {
    flex: 1 1 calc(50% - 6px);
    min-width: calc(50% - 6px);
  }

  .pie-container.single-legend {
    height: auto;
    flex-wrap: wrap;
    gap: 16px;
  }

  .pie-container.single-legend .pie-canvas-wrap {
    flex: 0 0 220px;
    width: 220px;
    height: 220px;
  }

  .pie-container.single-legend .pie-legend-group,
  .pie-container.single-legend .pie-legend-right {
    width: 100%;
    justify-content: center;
  }

  .pie-container.single-legend .pie-legend-right .pie-legend-list {
    align-items: center;
  }

  .pie-container.single-legend .pie-legend-right .pie-legend-item {
    justify-content: center;
    text-align: center;
  }
}

.filter-section {
  margin-top: 12px;
  margin-bottom: 8px;
  display: flex;
  justify-content: flex-start;
}

.period-select {
  padding: 6px 12px; /* Smaller padding */
  font-size: 13px; /* Smaller font */
  border-radius: 8px; /* Smaller radius */
  border: 1px solid #eef2f8;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #1a1a1a;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.page-dashboard .stats-grid {
  margin-top: 16px;
}

.page-dashboard .content {
  padding: 12px 20px; /* More compact padding */
}

.page-dashboard h1 {
  font-size: 20px; /* Smaller title */
  font-weight: 700;
  color: #0f172a;
}

.period-select:hover {
  border-color: #2a76c6;
}

.table-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.page-dashboard .table-card {
  width: 100%;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px; 
  padding: 0 0 24px 0; /* Added bottom padding to make it "fatter" at the bottom */
  margin: 12px 0; 
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02); 
  flex: none;
  height: auto;
  min-height: auto;
  overflow: hidden; 
}

.page-dashboard .table-title {
  font-size: 14px; /* Slightly smaller title */
  font-weight: 700;
  color: #0f172a;
  margin: 12px 0 8px 16px; /* Reduced margins significantly */
}

.page-dashboard table {
  width: 100%;
  font-size: 13px; /* Slightly smaller base font */
}

.page-dashboard th {
  padding: 6px 14px; /* Very slim header */
  font-weight: 700;
  color: #000;
  text-transform: uppercase;
  font-size: 11px; /* Smaller font */
  border-bottom: 1.2px solid #e2e8f0;
  text-align: left;
}

.page-dashboard th:nth-child(3) {
  text-align: center; 
}

.page-dashboard td {
  padding: 8px 14px; /* Very slim rows */
  color: #0f172a;
  border-bottom: 1px solid #f1f5f9;
  text-align: left;
  font-size: 12px; /* Smaller font */
}

.page-dashboard td:nth-child(3) {
  text-align: center; /* Center ITEMS content */
  font-weight: 600;
  color: #000;
}

.page-dashboard tr:last-child td {
  border-bottom: none;
}

.page-dashboard td:last-child {
  font-weight: 700;
  text-align: right;
}

.page-dashboard th:last-child {
  text-align: right;
}



th {
  color: #1a1a1a;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.3px;
}

td {
  color: #1a1a1a;
  font-weight: 600;
}

.clickable-row:hover {
  background: #f8fafc;
}

/* Low Stock Reminder Dashboard Styles */
.low-stock-reminder {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  padding: 20px; /* Increased padding */
  margin: 20px 0; /* Increased margin */
}

.reminder-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px; /* Increased margin */
}

.reminder-header .alert-icon {
  width: 24px; /* Increased icon size */
  height: 24px;
  object-fit: contain;
}

.reminder-header h2 {
  font-size: 16px; /* Increased header font size */
  font-weight: 700;
  color: #0369a1;
  margin: 0;
}

.reminder-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px; /* Increased gap */
}

.reminder-item {
  background: #fff;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  padding: 14px 20px; /* Increased padding */
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.reminder-item:hover {
  transform: translateY(-3px);
  border-color: #2a76c6;
  box-shadow: 0 8px 18px rgba(42, 118, 198, 0.12);
}

.item-info {
  display: flex;
  flex-direction: column;
  gap: 4px; /* Increased gap */
}

.item-info strong {
  font-size: 15px; /* Increased font size */
  font-weight: 600;
  color: #0369a1;
}

.item-info span {
  font-size: 13px; /* Increased font size */
  color: #0ea5e9;
}

.stock-left {
  font-size: 13px; /* Increased font size */
  color: #0369a1;
  font-weight: 600;
}

.recent-transactions {
  margin-top: 16px;
}

.notifications {
  padding: 24px 64px 40px;
  background: #f5f8ff;
  min-height: calc(100vh - 80px);
}

.notifications-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 18px;
}

.notifications-header h1 {
  font-size: 22px;
}

.unread {
  color: var(--gray);
  font-size: 12px;
}

.notifications-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
}

.notification {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #f7fbff;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 10px;
}

.notification:last-child {
  margin-bottom: 0;
}

.notification.unread {
  background: #eaf4ff;
}

.notification .title {
  font-size: 14px;
}

.notification .time {
  font-size: 12px;
  color: #7d8898;
}

.icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  background: #fff0d6;
  color: #be7c2d;
}

.icon.clock {
  background: #e9f2ff;
  color: #3a76c6;
}

.dot {
  width: 8px;
  height: 8px;
  background: #2a76c6;
  border-radius: 50%;
  margin-left: auto;
}

.inventory-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.search-wrapper {
  position: relative;
  width: 300px;
}

.search-wrapper .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  object-fit: contain;
  opacity: 0.6;
}

.search-wrapper input {
  width: 100%;
  padding: 10px 12px 10px 40px;
  border: 1.5px solid #e2e8f0;
  border-radius: 20px;
  outline: none;
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.2s;
}

.search-wrapper input:focus {
  border-color: #3b82f6;
}

/* Filter Controls Styles */
.filter-controls {
  display: flex;
  gap: 12px;
  align-items: center;
}

.filter-select {
  padding: 8px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  background: white;
  font-family: inherit;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

.filter-select:focus {
  border-color: #3b82f6;
}

.filter-select:hover {
  border-color: #9ca3af;
}

.btn-add-product {
  background: #0080d1;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.2s;
}

.btn-add-product:hover {
  background: #006bb1;
}

.inventory-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.inventory-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 30px;
}

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

.inventory-header .icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inventory-header .inventory-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.inventory-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

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

.inventory-table th {
  text-align: left;
  padding: 12px 16px;
  color: #64748b;
  font-weight: 500;
  font-size: 13px;
  border-bottom: 1px solid #f1f5f9;
  text-transform: none;
  letter-spacing: normal;
}

.inventory-table td {
  padding: 16px;
  color: #1e293b;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid #f1f5f9;
}

.inventory-table tr:last-child td {
  border-bottom: none;
}

.inventory-table .actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.inventory-table .action-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.inventory-table .action-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.inventory-table .action-btn img {
  width: 16px;
  height: 16px;
}

.inventory-table .btn-card-archive {
  margin-top: 0;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inventory-table .btn-card-archive img {
  width: 16px;
  height: 16px;
}

/* Inventory Modal Styles */
.inventory-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  /* Increased to ensure it's above everything */
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.inventory-modal.active {
  opacity: 1;
  visibility: visible;
  display: flex !important;
}

.inventory-modal-content {
  background: #fff;
  width: min(500px, 90vw);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.inventory-modal.active .inventory-modal-content {
  transform: translateY(0);
}

.inventory-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.inventory-modal-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
}

.inventory-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #64748b;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  margin-bottom: 6px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
}

.inventory-modal-footer {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.inventory-modal-footer button {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.btn-cancel {
  background: #f1f5f9;
  border: none;
  color: #64748b;
}

.btn-save {
  background: #0080d1;
  color: white;
  border: none;
  transition: background 0.2s;
}

.btn-save:hover {
  background: #006bb1;
}

/* Floating Success Popup Styles */
.success-floating-overlay {
  position: fixed;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  /* Allow clicks through overlay */
}

.success-floating-card {
  background: #10b981;
  /* Solid green background */
  padding: 12px 28px;
  border-radius: 50px;
  /* Pill shape */
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  border: none;

  /* Entry Animation */
  opacity: 0;
  transform: translateY(-20px) scale(0.9);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-floating-card.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.success-floating-content {
  text-align: center;
}

.success-floating-title {
  display: none;
  /* Removed title for a cleaner single-message look */
}

.success-floating-message {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  /* White text on green background */
  white-space: nowrap;
}

/* Floating Error Popup Styles */
.error-floating-overlay {
  position: fixed;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.error-floating-card {
  background: #ef4444; /* Solid red background */
  padding: 12px 28px;
  border-radius: 50px;
  box-shadow: 0 10px 25px rgba(239, 68, 68, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  border: none;
  opacity: 0;
  transform: translateY(-20px) scale(0.9);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.error-floating-card.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.error-floating-message {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
}

/* Modern Confirmation Modal Styles */
.confirm-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  /* Darker transparent overlay */
  backdrop-filter: blur(4px);
  /* Modern blur effect */
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.confirm-modal-overlay.active {
  display: flex;
  opacity: 1;
}

.confirm-modal-card {
  background: #ffffff;
  width: min(420px, 90vw);
  border-radius: 16px;
  padding: 32px 24px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  transform: scale(0.95);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
}

.confirm-modal-overlay.active .confirm-modal-card {
  transform: scale(1);
}

.confirm-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 12px;
}

.confirm-modal-message {
  font-size: 15px;
  color: #64748b;
  margin-bottom: 28px;
  line-height: 1.6;
}

.confirm-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.confirm-modal-actions button {
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  min-width: 120px;
}

/* Gray Neutral Button */
.btn-confirm-no {
  background: #f1f5f9;
  color: #64748b;
}

.btn-confirm-no:hover {
  background: #e2e8f0;
  color: #475569;
}

/* Red Danger Button */
.btn-confirm-yes {
  background: var(--primary);
  color: #ffffff;
}

.btn-confirm-yes:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(42, 118, 198, 0.2);
}

/* Green Success Button */
.btn-confirm-ok {
  background: #10b981;
  color: #ffffff;
  min-width: 160px !important;
}

.btn-confirm-ok:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--primary); /* Get Started color */
  color: #fff;
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 8px;
  border: 1.5px solid #fff;
  font-weight: 700;
}

.mark-read {
  border: none;
  background: none;
  font-weight: 600;
  color: #1c2430;
  cursor: pointer;
}

.search-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.search-input {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
}

.search-input .search-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  opacity: 0.6;
}

.search-input input {
  border: none;
  outline: none;
  width: 100%;
  font-family: inherit;
  font-size: 13px;
}

.btn-small {
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 500;
}

.pharmassist-card {
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  height: 85%;
  width: 95%;
  margin: 0 auto;
  border: 1px solid #c9e0f5 !important;
  overflow: hidden;
  border-radius: 12px;
}

.page-pharmassist .content {
  min-height: 100vh;
}

.page-pharmassist .pharmassist-card {
  position: relative;
  display: flex;
  width: min(1100px, 100%);
  height: min(720px, calc(100vh - 150px));
  min-height: 550px;
  margin: 0 auto;
  padding: 0 !important;
  overflow: hidden;
  background: #fff;
}

.chat-main {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
}

.chat-history-panel {
  position: absolute;
  z-index: 5;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: min(300px, 86%);
  flex-direction: column;
  padding: 20px;
  border-right: 1px solid #dce9f5;
  background: #fff;
  box-shadow: 16px 0 30px rgba(32, 74, 111, 0.12);
  transform: translateX(-105%);
  transition: transform 0.22s ease;
}

.chat-history-panel.is-open {
  transform: translateX(0);
}

.chat-history-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.chat-history-heading h2 {
  margin: 0;
  color: var(--pharmacy-blue-dark, #075f9b);
  font-size: 16px;
  font-weight: 700;
}

.history-close {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #52637a;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.chat-search {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
  padding: 9px 11px;
  border: 1px solid #cfe5f7;
  border-radius: 10px;
  background: #f8fbff;
}

.chat-search svg,
.previous-chats-btn svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
}

.chat-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #21354a;
  font: inherit;
  font-size: 13px;
}

.chat-history-list {
  display: grid;
  gap: 7px;
  overflow-y: auto;
}

.chat-history-item {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 11px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #31465c;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.chat-history-item strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-history-item span {
  color: #7b8da1;
  font-size: 11px;
}

.chat-history-item:hover,
.chat-history-item.active {
  border-color: #c6e4f8;
  background: #edf8ff;
  color: var(--pharmacy-blue-dark, #075f9b);
}

.pharmassist-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid #eef2f9;
}

.bot-logo-header {
  width: 32px;
  height: 32px;
}

.pharmassist-header .table-title {
  margin-bottom: 0;
  font-size: 16px;
  font-weight: 700;
}

.page-pharmassist .pharmassist-header {
  min-height: 76px;
  padding: 14px 20px;
  border-bottom-color: #dce9f5;
}

.page-pharmassist .bot-logo-header {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: #eaf7ff;
}

.bot-logo-header img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.page-pharmassist .pharmassist-header p {
  margin: 1px 0 0;
  color: #718399;
  font-size: 12px;
}

.previous-chats-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  padding: 8px 11px;
  border: 1px solid #cfe5f7;
  border-radius: 10px;
  background: #fff;
  color: var(--pharmacy-blue-dark, #075f9b);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.previous-chats-btn:hover,
.previous-chats-btn[aria-expanded="true"] {
  border-color: #9dd4f5;
  background: #eaf7ff;
}

.chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 24px;
}

.page-pharmassist .chat-container {
  min-height: 0;
  padding: 22px 26px;
}

.chat-log {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.message {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 85%;
}

.message.ai {
  background: transparent;
  border: none;
  padding: 0;
}

.message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
  background: #0080d1;
  color: #fff;
  border: none;
  border-radius: 14px 14px 0 14px;
  padding: 10px 16px;
}

.message .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f0f4f9;
  border: 1px solid #eef2f9;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  padding: 4px;
}

.message .avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.message.user .avatar {
  background: #fff;
}

.message-body {
  background: #eef7ff;
  padding: 12px 18px;
  border-radius: 14px 14px 14px 0;
  font-size: 14px;
  line-height: 1.5;
  color: #1a1a1a;
}

.page-pharmassist .message-body {
  max-width: 560px;
}

.typing-dots {
  display: inline-flex;
  gap: 2px;
}

.typing-dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #666;
  animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0s;
}

@keyframes typing {

  0%,
  80%,
  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }

  40% {
    transform: scale(1.2);
    opacity: 1;
  }
}

.bottom-controls {
  position: sticky;
  bottom: 0;
  background: #fff;
  padding-top: 16px;
  border-top: 1px solid #e4e9f2;
  margin-top: 0;
}

.chips {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.chip {
  background: #eef7ff;
  color: #1a1a1a;
  border: 1px solid #c9e0f5;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.chip:hover {
  background: #d9edff;
}

.chat-input {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 24px;
  padding: 6px 6px 6px 18px;
}

.chat-input input {
  flex: 1;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 14px;
}

.page-pharmassist .chat-input {
  min-height: 48px;
  border-radius: 12px;
}

.page-pharmassist .icon-btn.primary {
  width: 35px;
  height: 35px;
  border-radius: 9px;
  background: var(--pharmacy-blue, #0b84d8);
  color: #fff;
}

.page-pharmassist .icon-btn.primary svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 700px) {
  .page-pharmassist .pharmassist-card {
    min-height: 520px;
    height: calc(100vh - 120px);
  }

  .page-pharmassist .chat-container {
    padding: 16px;
  }

  .previous-chats-btn {
    padding: 8px;
    font-size: 0;
  }

  .previous-chats-btn svg {
    width: 19px;
    height: 19px;
  }

  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .chip {
    flex: 0 0 auto;
  }
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s;
  padding: 8px;
}

.icon-btn img {
  width: 20px;
  height: 20px;
}

.icon-btn.secondary {
  background: #eef2ff;
}

.icon-btn.primary {
  background: #d1d9ff;
}

.actions {
  display: flex;
  gap: 10px;
}

.action-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: #f7fbff;
}

.staffs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 16px;
  margin-bottom: 20px; /* Added margin to push away from bottom border */
}

.staff-card {
  background: #fff;
  border: 1px solid #c9e0f5;
  border-radius: 14px;
  padding: 18px;
  position: relative;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

.staff-card .header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.staff-card .avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #4a6fa5;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
  overflow: hidden;
}

.staff-card .staff-avatar {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}


.staff-card .name {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.2;
}

.staff-card .email {
  font-size: 13px;
  color: #666;
  text-decoration: underline;
  margin-top: 2px;
}

.staff-card .role-tag {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
  margin-top: 16px;
  display: block;
}

.status-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  background: #54c5eb;
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.card-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.staff-card .card-actions {
  justify-content: space-between;
  align-items: center;
  background: transparent;
  padding: 4px 0;
  border-radius: 0;
  margin-top: 12px;
  gap: 12px;
}

.btn-card-archive {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #4da3ff;
  background: #fff;
  color: #4da3ff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-card-archive:hover {
  background: #f0f7ff;
  color: #3b82f6;
  border-color: #3b82f6;
  transform: scale(1.05);
}


.btn-outline-danger {
  flex: 1;
  border: 1px solid #dcdcdc;
  color: #ef4f4f;
  background: #fdf2f2;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
}

.btn-danger {
  flex: 1;
  background: #fdf2f2;
  border: 1px solid #dcdcdc;
  color: #ef4f4f;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
}

.btn-outline-danger:hover,
.btn-danger:hover {
  background: #fde8e8;
}

.btn-outline-blue {
  flex: 1;
  border: 1px solid #1976d2;
  color: #1976d2;
  background: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
}

.btn-blue {
  flex: 1;
  background: #1976d2;
  border: 1px solid #1976d2;
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
}

.btn-outline-blue:hover,
.btn-blue:hover {
  background: #1565c0;
  color: #fff;
}

.search-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.search-input {
  display: flex;
  align-items: center;
  gap: 8px;
  /* Slightly reduced gap */
  background: #fff;
  border: 0.5px solid #e2e8f0;
  /* Thinner and lighter border */
  border-radius: 20px;
  padding: 6px 14px;
  /* More compact padding */
  width: 220px;
  /* Even smaller width */
  flex: none; /* Prevent stretching in flex containers */
}

.search-input input {
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 14px;
  width: 100%;
}

.btn-primary.btn-small {
  padding: 10px 24px;
  border-radius: 12px;
  font-size: 14px;
  background: #0080d1;
}

.table-card {
  background: #fff;
  border: 1px solid #c9e0f5;
  border-radius: 16px;
  padding: 18px 18px 100px 18px; /* Greatly increased bottom padding */
  margin-bottom: 50px; /* Increased bottom margin */
  height: auto;
  min-height: 80vh; /* Make the background card much longer */
}

.staff-list-container {
  border: 1px solid #2a76c6;
  /* Reduced thickness */
  border-radius: 16px;
  padding: 20px 20px 60px 20px; /* Increased bottom padding */
  margin-top: 20px;
  height: auto;
  min-height: 60vh; /* Make the inner container longer too */
  display: flex;
  flex-direction: column;
}

.table-title {
  display: flex;
  align-items: center;
  font-size: 18px;
  font-weight: 700;
  color: #1c2430;
  margin-bottom: 20px;
  padding-bottom: 10px;
}

.title-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-archive {
  background: #2a76c6;
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: auto;
  /* This pushes the button to the far right */
}

.btn-archive:hover {
  background: #1f5ea2;
  transform: translateY(-1px);
}

.btn-restore {
  border: 1px solid #4da3ff !important;
  color: #4da3ff !important;
  background: #fff;
  padding: 4px 10px; /* Slimmer padding */
  border-radius: 4px; /* Slightly sharper corners for slim look */
  font-size: 11px; /* Smaller font */
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px; /* Tighter gap */
}

.btn-restore:hover {
  background: #f0f7ff;
  border-color: #3b82f6 !important;
  color: #3b82f6 !important;
  transform: translateY(-1px);
}

.archive-box {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 32px;
  background: #fff;
  max-width: 1000px;
  margin: 20px auto 0 auto; /* Reduced margin-top */
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.search-row.in-archive {
  max-width: 1000px;
  margin: 40px auto 0 auto; /* Moved search row down slightly */
  padding-left: 0;
  display: flex;
  justify-content: flex-start; /* Left aligned as requested previously */
}

.search-row.in-archive .search-input {
  width: 220px;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.archive-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
  padding-left: 8px;
}

.btn-back {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-back img {
  width: 24px; /* Smaller back icon */
  height: 24px;
}

.archive-title {
  display: flex;
  align-items: center;
  gap: 12px; /* Tighter gap */
  font-size: 16px; /* Smaller font for title */
  font-weight: 400;
  color: #000;
}

.archive-title img {
  width: 24px; /* Smaller archive icon */
  height: 24px;
  object-fit: contain;
}

.archived-table-container {
  border: 1px solid #bae6fd; /* Light blue border */
  border-radius: 12px;
  overflow: hidden;
  width: 100%;
}

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

.archived-table th {
  padding: 10px 16px; /* Slimmer header padding */
  font-size: 14px; /* Slightly smaller font for slim look */
  font-weight: 500;
  color: #0369a1;
  border-bottom: 1px solid #bae6fd;
  text-align: center;
  background: #f0f9ff;
}

.archived-table td {
  padding: 10px 16px; /* Slimmer cell padding */
  font-size: 14px; /* Slightly smaller font */
  font-weight: 300;
  color: #4b5563;
  border-bottom: 1px solid #e2e8f0;
  text-align: center;
}

.archived-table tr:last-child td {
  border-bottom: none;
}

.btn-restore {
  border: 1px solid #4da3ff !important;
  color: #4da3ff !important;
  background: #fff;
  padding: 4px 10px; /* Slimmer padding */
  border-radius: 4px; /* Slightly sharper corners */
  font-size: 11px; /* Smaller font */
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px; /* Tighter gap */
  margin: 0 auto;
}

.btn-restore:hover {
  background: #f0f7ff;
  border-color: #3b82f6 !important;
  color: #3b82f6 !important;
  transform: translateY(-1px);
}

.page-inventory .table-title::before {
  background-image: url('images/total products.png');
}

.manage-user-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.page-manage-user .table-title::before {
  content: '';
  background: none;
  width: auto;
  height: auto;
}

.page-manage-user .table-card {
  display: flex;
  flex-direction: column;
  min-height: auto;
  margin-bottom: 0;
  padding-bottom: 18px;
}

.page-manage-user #activeStaffView {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.page-manage-user .staff-list-container {
  flex: 1;
  min-height: auto;
  height: auto;
  margin-top: 16px;
  padding-bottom: 20px;
}

.page-manage-user .staffs-grid {
  margin-bottom: 0;
}

.page-notifications .table-title::before {
  content: '🔔';
  background: none;
  width: auto;
  height: auto;
}

.pharmassist-header .table-title::before {
  content: none;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
  display: flex !important;
}

.modal-card {
  background: #fff;
  width: 100%;
  max-width: 400px;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transform: translateY(-20px);
  transition: all 0.3s ease;
}

.modal-overlay.active .modal-card {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
}

.close-modal {
  background: none;
  border: none;
  font-size: 24px;
  color: #8592a3;
  cursor: pointer;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 6px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.btn-cancel {
  flex: 1;
  padding: 10px;
  border: 1px solid #ccc;
  background: #f8fafc;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

.btn-submit {
  flex: 1;
  padding: 10px;
  background: #0080d1;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

.btn-submit:hover {
  background: #006eb3;
}

.header-left {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.unread-count {
  font-size: 14px;
  color: #8592a3;
  font-weight: 400;
}

.mark-all-read {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 600;
  color: #1c2430;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.2s;
}

.mark-all-read:hover {
  background: #f0f4f8;
}

.check-icon {
  font-size: 18px;
  font-weight: 700;
}

.notifications-list-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.notification-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: #f4f7f9;
  border-radius: 12px;
  position: relative;
  transition: background 0.2s;
}

.notification-item.unread {
  background: #eaf4ff;
}

.notif-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 18px;
  background: #fff;
  border: 1px solid #dee5ed;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.notif-icon.warn {
  background: #fff3d7;
  color: #c3892b;
  border: none;
}

/* Toggle Switch Styles */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked+.slider {
  background-color: #1976d2;
}

input:checked+.slider:before {
  transform: translateX(20px);
}

/* Status Indicator Pulse Animation */
.status-indicator.active-pulse {
  box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4);
  }

  70% {
    box-shadow: 0 0 0 6px rgba(76, 175, 80, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
  }
}


.notif-icon.time {
  background: #eef5ff;
  color: #5b6fd8;
  border: none;
}

/* Quick Sell Page Styles */
.page-quick-sell .content {
  padding: 24px 32px;
}

.page-quick-sell .quick-sell-container {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  margin-top: 24px;
}

.page-quick-sell .search-input {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border: 1.5px solid #cfd8e6;
  border-radius: 25px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.page-quick-sell .search-input input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 16px;
  color: #1a1a1a;
}

.page-quick-sell .product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.page-quick-sell .product-item {
  background: #fff;
  border: 1.5px solid #cfd8e6;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.page-quick-sell .product-item:hover {
  border-color: #1976d2;
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.08);
  transform: translateY(-2px);
}

.page-quick-sell .product-avatar {
  width: 48px;
  height: 48px;
  background: #e3f2fd;
  color: #1976d2;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
}

.page-quick-sell .product-info {
  flex-grow: 1;
}

.page-quick-sell .product-info h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 2px 0;
  color: #1a1a1a;
}

.page-quick-sell .product-info p {
  font-size: 12px;
  color: #8592a3;
  margin: 0 0 4px 0;
}

.page-quick-sell .product-info .supplier {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 4px;
}

.page-quick-sell .product-info .stock {
  font-size: 11px;
  color: #cfd8e6;
  font-weight: 500;
}

.page-quick-sell .product-price {
  font-size: 15px;
  font-weight: 600;
  color: #1976d2;
  white-space: nowrap;
}

.page-quick-sell .cart-section {
  background: #fff;
  border: 1.5px solid #cfd8e6;
  border-radius: 20px;
  height: fit-content;
  overflow: hidden;
}

.page-quick-sell .cart-header {
  padding: 20px 24px;
  border-bottom: 1.5px solid #f0f4f8;
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-quick-sell .cart-header h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

.page-quick-sell .cart-empty {
  padding: 60px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #8592a3;
}

.page-quick-sell .cart-empty img {
  width: 48px;
  height: 48px;
  opacity: 0.3;
  margin-bottom: 20px;
}

.page-quick-sell .cart-empty p:first-of-type {
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 4px;
}

.page-quick-sell .cart-empty p:last-of-type {
  font-size: 14px;
}

.notif-content {
  flex: 1;
}

.notif-title {
  font-size: 16px;
  font-weight: 500;
  color: #1a1a1a;
  margin-bottom: 2px;
}

.notif-time {
  font-size: 13px;
  color: #7a869a;
}

.unread-dot {
  width: 10px;
  height: 10px;
  background: #0080d1;
  border-radius: 50%;
  flex-shrink: 0;
  margin-left: 12px;
}

@media (max-width: 980px) {
  .landing {
    grid-template-columns: 1fr;
  }

  .dashboard {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .charts {
    grid-template-columns: 1fr;
  }
}

/* --- Bootstrap Image Visibility Fixes --- */
/* Ensure icons stay visible and sized correctly after Bootstrap integration */
.bell img,
.notif-bell img,
.stat-icon img,
.status-alert img {
  display: block !important;
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  max-width: none !important;
  visibility: visible !important;
  opacity: 1 !important;
  object-fit: contain !important;
}

.bell img {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
}

.bell {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 32px;
  height: 32px;
  background: #f1f5f9;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.bell:hover {
  background: #e2e8f0;
}

/* Ensure the alert icon and bell specifically are correctly rendered */
img[src*="alert.png"],
img[src*="bell.png"] {
  display: block !important;
  width: 22px !important;
  height: 22px !important;
  max-width: none !important;
  object-fit: contain !important;
}

.bell img[src*="bell.png"] {
  width: 20px !important;
  height: 20px !important;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  width: auto;
  min-width: 320px;
  max-width: 90vw;
}

.toast {
  background: #fff;
  color: #1a1a1a;
  padding: 18px 24px;
  border-radius: 16px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 14px;
  border-left: 6px solid #2a76c6;
  animation: toast-in-center 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  pointer-events: auto;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.toast.success {
  border-left-color: #10b981;
  background: #f0fdf4;
  /* Very light green background */
}

.toast.error {
  border-left-color: #ef4444;
  background: #fef2f2;
  /* Light red */
}

.toast.error .toast-message {
  color: #ef4444;
  font-weight: 600;
}

.toast.warning {
  border-left-color: #f59e0b;
  background: #fffbeb;
  /* Light yellow */
}

.toast-icon {
  font-size: 22px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-message {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: #1e293b;
}

@keyframes toast-in-center {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes toast-out-center {
  from {
    transform: translateY(0);
    opacity: 1;
  }

  to {
    transform: translateY(-100%);
    opacity: 0;
  }
}

.toast.hiding {
  animation: toast-out-center 0.4s ease forwards;
}

/* Rounded design refresh for admin and staff screens */
.dashboard {
  background: linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
}

.dashboard .sidebar {
  border-radius: 0 var(--radius-soft-xl) var(--radius-soft-xl) 0;
  border-right: 1px solid #e7eef7;
  box-shadow: 12px 0 28px rgba(21, 68, 125, 0.08);
}

.dashboard .sidebar-brand {
  margin: 4px 2px 24px;
  padding: 12px 10px 22px;
  border-radius: var(--radius-soft-lg);
  background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
  border: 1px solid #edf4fb;
}

.dashboard .sidebar-footer {
  padding: 14px 8px 0;
  border-radius: var(--radius-soft-lg);
}

.staff-sidebar .sidebar-nav {
  justify-content: flex-start;
  gap: 7px;
}

.dashboard .nav-item {
  border-radius: 14px;
}

.dashboard .btn-signout,
.dashboard .signout,
.dashboard .period-select,
.dashboard .mark-all-read,
.dashboard .btn-primary.btn-small,
.dashboard .btn-archive,
.dashboard .btn-restore,
.dashboard .btn-card-archive,
.dashboard .btn-outline-danger,
.dashboard .btn-danger,
.dashboard .btn-outline-blue,
.dashboard .btn-blue,
.dashboard .btn-cancel,
.dashboard .btn-submit,
.dashboard .action-btn {
  border-radius: var(--radius-soft-md);
}

.dashboard .search-input,
.page-quick-sell .search-input,
.page-pharmassist .chat-input {
  border-radius: var(--radius-pill);
}

.dashboard .bell {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-soft-sm);
  background: #eef5fc;
}

.dashboard .stat-card,
.dashboard .chart-card-full,
.dashboard .table-card,
.dashboard .staff-card,
.dashboard .archive-box,
.dashboard .notifications-list-card,
.page-quick-sell .product-item,
.page-quick-sell .cart-section,
.modal-card {
  border-radius: var(--radius-soft-lg);
  border-color: var(--soft-border);
  box-shadow: var(--soft-shadow);
}

.dashboard .stat-icon,
.dashboard .notif-icon,
.page-quick-sell .product-avatar {
  border-radius: var(--radius-soft-md);
}

.dashboard .staff-list-container,
.dashboard .archived-table-container,
.dashboard .notification-item {
  border-radius: var(--radius-soft-lg);
}

.page-pharmassist .message.user {
  border-radius: 20px 20px 8px 20px;
}

.page-pharmassist .message-body {
  border-radius: 20px 20px 20px 8px;
}

.page-pharmassist .chip {
  border-radius: var(--radius-pill);
}

/* Admin UI refresh */
:root {
  --admin-bg: #f4f8fc;
  --surface: #ffffff;
  --surface-muted: #f8fbff;
  --text-strong: #102033;
  --text-muted: #64748b;
  --line-soft: #dce8f4;
  --brand-blue: #0d83cf;
  --brand-blue-dark: #075f9b;
  --brand-blue-soft: #e9f6ff;
  --brand-red: #e25358;
  --admin-shadow: 0 18px 42px rgba(21, 68, 125, 0.1);
  --admin-shadow-hover: 0 24px 54px rgba(21, 68, 125, 0.16);
}

body {
  color: var(--text-strong);
  background: var(--admin-bg);
}

.dashboard {
  background:
    radial-gradient(circle at top right, rgba(13, 131, 207, 0.1), transparent 34rem),
    linear-gradient(180deg, #f9fcff 0%, #eef5fb 100%);
}

.dashboard .sidebar {
  background: rgba(255, 255, 255, 0.94);
  border-right: 1px solid rgba(220, 232, 244, 0.9);
  box-shadow: 16px 0 38px rgba(21, 68, 125, 0.1);
}

.dashboard .sidebar-brand {
  gap: 10px;
  background: linear-gradient(145deg, #ffffff 0%, #eff8ff 100%);
  border: 1px solid var(--line-soft);
  box-shadow: 0 10px 24px rgba(21, 68, 125, 0.06);
}

.dashboard .sidebar-brand img {
  width: 68px;
}

.dashboard .sidebar-brand-text {
  color: var(--brand-blue-dark);
  line-height: 1.25;
}

.dashboard .sidebar-nav {
  gap: 10px;
  padding-top: 16px;
}

.dashboard .nav-item {
  justify-content: flex-start;
  min-height: 48px;
  padding: 12px 14px;
  overflow: hidden;
  color: #334155;
  background: transparent;
  border: 1px solid transparent;
  isolation: isolate;
  transition:
    color 0.22s ease,
    background 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.22s ease;
}

.dashboard .nav-item::before {
  content: "";
  position: absolute;
  inset: 7px auto 7px 7px;
  width: 4px;
  border-radius: 999px;
  background: var(--brand-blue);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform 0.22s ease;
}

.dashboard .nav-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(13, 131, 207, 0.14), rgba(24, 167, 106, 0.06));
  opacity: 0;
  transform: translateX(-18px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: -1;
}

.dashboard .nav-item:hover,
.dashboard .nav-item:focus-visible,
.dashboard .nav-item.active,
.dashboard .nav-item.is-pressing {
  color: var(--brand-blue-dark);
  background: var(--brand-blue-soft);
  border-color: #bfe5fb;
  box-shadow: 0 12px 24px rgba(13, 131, 207, 0.12);
}

.dashboard .nav-item:hover,
.dashboard .nav-item:focus-visible {
  transform: translateX(4px);
}

.dashboard .nav-item:active,
.dashboard .nav-item.is-pressing {
  transform: translateX(4px) scale(0.98);
}

.dashboard .nav-item.active::before,
.dashboard .nav-item:hover::before,
.dashboard .nav-item:focus-visible::before,
.dashboard .nav-item.is-pressing::before {
  transform: scaleY(1);
}

.dashboard .nav-item.active::after,
.dashboard .nav-item:hover::after,
.dashboard .nav-item:focus-visible::after,
.dashboard .nav-item.is-pressing::after {
  opacity: 1;
  transform: translateX(0);
}

.dashboard .nav-icon {
  width: 22px;
  height: 22px;
  flex-basis: 22px;
  padding: 2px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.dashboard .nav-icon img {
  width: 18px;
  height: 18px;
}

.dashboard .content {
  padding: 24px 30px;
  gap: 18px;
}

.dashboard .content-top {
  min-height: 52px;
}

.dashboard .content-top h1,
.page-dashboard h1 {
  margin: 0;
  color: var(--text-strong);
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 700;
}

.dashboard .bell {
  width: 42px;
  height: 42px;
  background: #ffffff;
  border: 1px solid var(--line-soft);
  box-shadow: 0 10px 24px rgba(21, 68, 125, 0.08);
}

.dashboard .bell:hover {
  background: var(--brand-blue-soft);
  border-color: #bfe5fb;
  transform: translateY(-2px);
}

.badge {
  background: var(--brand-red) !important;
}

.stats-grid,
.page-dashboard .stats-grid {
  gap: 16px;
  margin: 4px 0 6px;
}

.dashboard .stat-card {
  min-height: 118px;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line-soft);
  box-shadow: var(--admin-shadow);
}

.dashboard .stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--admin-shadow-hover);
  border-color: #bddcf2;
}

.dashboard .stat-icon {
  width: 50px;
  height: 50px;
}

.dashboard .stat-icon.sale {
  background: #eaf7ff;
}

.dashboard .stat-icon.product,
.dashboard .stat-icon.staff {
  background: #eef6ff;
}

.dashboard .stat-icon.alert,
.dashboard .stat-icon.status-alert,
.dashboard .stat-icon.expiry {
  background: #fff7e8;
}

.dashboard .stat-title {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}

.dashboard .stat-value {
  color: var(--text-strong);
  font-size: 25px;
  line-height: 1.15;
}

.dashboard .stat-note {
  color: #8a99aa;
  font-size: 12px;
}

.filter-section {
  margin: 0;
}

.period-select,
.filter-select,
.search-wrapper input,
.form-group input,
.form-group select {
  min-height: 42px;
  border: 1px solid var(--line-soft);
  background: #ffffff;
  color: var(--text-strong);
  box-shadow: 0 6px 16px rgba(21, 68, 125, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.period-select:hover,
.period-select:focus,
.filter-select:hover,
.filter-select:focus,
.search-wrapper input:focus,
.form-group input:focus,
.form-group select:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 4px rgba(13, 131, 207, 0.12);
  outline: none;
}

.charts-grid {
  gap: 18px;
  margin-top: 0;
}

.dashboard .chart-card-full,
.inventory-card,
.archive-box,
.dashboard .table-card,
.notifications-list-card,
.staff-card {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--line-soft);
  box-shadow: var(--admin-shadow);
}

.dashboard .chart-card-full {
  padding: 18px;
}

.dashboard .chart-card-full:hover,
.inventory-card:hover {
  transform: translateY(-4px);
  border-color: #bddcf2;
  box-shadow: var(--admin-shadow-hover);
}

.chart-header {
  margin-bottom: 12px;
}

.chart-title,
.table-title,
.inventory-header h2 {
  color: var(--text-strong);
  font-weight: 700;
}

.chart-container {
  height: 220px;
}

.pie-container.single-legend,
.pie-container.split-legend {
  min-height: 300px;
}

.inventory-controls {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.search-wrapper {
  width: 100%;
}

.search-wrapper input {
  border-radius: 14px;
}

.filter-controls {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.filter-select {
  border-radius: 12px;
}

.btn-add-product,
.btn-save,
.btn-submit,
.btn-primary.btn-small {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-dark));
  box-shadow: 0 12px 24px rgba(13, 131, 207, 0.18);
}

.btn-add-product {
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 14px;
  white-space: nowrap;
}

.btn-add-product:hover,
.btn-save:hover,
.btn-submit:hover,
.btn-primary.btn-small:hover {
  background: linear-gradient(135deg, #0f92df, #075f9b);
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(13, 131, 207, 0.24);
}

.inventory-card {
  padding: 20px;
  overflow: hidden;
}

.inventory-header {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #edf3f8;
}

.inventory-table,
.archived-table {
  overflow: hidden;
}

.inventory-table th,
.archived-table th,
.page-dashboard th {
  background: #f6faff;
  color: #52637a;
  font-weight: 700;
}

.inventory-table td,
.archived-table td,
.page-dashboard td {
  vertical-align: middle;
}

.inventory-table tbody tr,
.archived-table tbody tr,
.page-dashboard tbody tr {
  transition: background 0.18s ease, transform 0.18s ease;
}

.inventory-table tbody tr:hover,
.archived-table tbody tr:hover,
.page-dashboard tbody tr:hover {
  background: #f8fbff;
}

.inventory-table .action-btn:hover,
.dashboard .action-btn:hover {
  background: var(--brand-blue-soft);
  border-color: #bfe5fb;
  transform: translateY(-2px);
}

.btn-signout:hover {
  color: var(--brand-blue-dark);
  background: var(--brand-blue-soft);
  border-color: #bfe5fb;
}

.inventory-modal {
  backdrop-filter: blur(4px);
  background: rgba(15, 32, 51, 0.38);
}

.inventory-modal-content {
  border: 1px solid var(--line-soft);
  box-shadow: 0 26px 70px rgba(15, 32, 51, 0.24);
}

@media (max-width: 1180px) {
  .inventory-controls {
    grid-template-columns: 1fr;
  }

  .filter-controls {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .dashboard .content {
    padding: 18px;
  }

  .stats-grid,
  .page-dashboard .stats-grid {
    grid-template-columns: 1fr;
  }

  .filter-controls {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .btn-add-product {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard .nav-item,
  .dashboard .nav-item::before,
  .dashboard .nav-item::after,
  .dashboard .stat-card,
  .dashboard .chart-card-full,
  .inventory-card,
  .btn-add-product {
    transition: none;
  }
}

/* Dashboard graph alignment and compact bottom spacing */
.page-dashboard .content {
  padding-bottom: 12px;
  gap: 12px;
}

.page-dashboard .charts-grid,
.page-dashboard .charts-grid.layout-daily,
.page-dashboard .charts-grid.layout-weekly,
.page-dashboard .charts-grid.layout-monthly,
.page-dashboard .charts-grid.layout-yearly {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 0;
  padding-bottom: 4px;
}

.page-dashboard .revenue-card,
.page-dashboard .trend-card,
.page-dashboard .sales-pie-card,
.page-dashboard .layout-monthly .revenue-card,
.page-dashboard .layout-monthly .trend-card {
  flex: initial;
  min-width: 0;
}

.page-dashboard .revenue-card {
  order: 1;
}

.page-dashboard .trend-card {
  order: 2;
}

.page-dashboard .sales-pie-card {
  order: 3;
  grid-column: 1 / -1;
}

.page-dashboard .chart-card-full,
.page-dashboard .stat-card,
.page-dashboard .table-card,
.page-manage-user .table-card,
.page-manage-user .staff-card,
.page-manage-user .archive-box {
  position: relative;
  overflow: hidden;
  border: 1px solid #c9e0f5;
}

.page-dashboard .chart-card-full::before,
.page-dashboard .stat-card::before,
.page-dashboard .table-card::before,
.page-manage-user .table-card::before,
.page-manage-user .staff-card::before,
.page-manage-user .archive-box::before {
  content: none;
}

.page-dashboard .chart-card-full {
  padding: 16px 16px 14px 18px;
}

.page-dashboard .chart-container {
  height: 205px;
}

.page-dashboard .pie-container,
.page-dashboard .pie-container.single-legend,
.page-dashboard .pie-container.split-legend {
  height: 230px;
  min-height: 230px;
  max-width: 100%;
}

.page-dashboard .pie-container.split-legend .pie-canvas-wrap,
.page-dashboard .pie-container.single-legend .pie-canvas-wrap {
  flex: 0 0 230px;
  width: 230px;
  height: 230px;
}

.page-dashboard .stats-grid {
  margin-bottom: 0;
}

@media (max-width: 980px) {
  .page-dashboard .charts-grid,
  .page-dashboard .charts-grid.layout-daily,
  .page-dashboard .charts-grid.layout-weekly,
  .page-dashboard .charts-grid.layout-monthly,
  .page-dashboard .charts-grid.layout-yearly {
    grid-template-columns: 1fr;
  }

  .page-dashboard .sales-pie-card {
    grid-column: auto;
  }
}

.form-group input,
.form-group select,
.toast {
  border-radius: var(--radius-soft-md);
}

/* Simple blue and white pharmacy theme */
:root {
  --pharmacy-blue: #0b84d8;
  --pharmacy-blue-dark: #075f9b;
  --pharmacy-blue-soft: #eaf7ff;
  --pharmacy-blue-pale: #f5fbff;
  --pharmacy-line: #cfe5f7;
  --pharmacy-text: #102033;
  --pharmacy-muted: #66788f;
  --pharmacy-shadow: 0 14px 34px rgba(11, 132, 216, 0.1);
  --pharmacy-shadow-hover: 0 20px 46px rgba(11, 132, 216, 0.16);
}

.dashboard {
  background:
    radial-gradient(circle at 86% 6%, rgba(11, 132, 216, 0.14), transparent 28rem),
    radial-gradient(circle at 30% 100%, rgba(84, 182, 239, 0.1), transparent 26rem),
    linear-gradient(180deg, #ffffff 0%, #f3f9fe 58%, #edf6fd 100%);
}

.dashboard .sidebar {
  background: linear-gradient(180deg, #ffffff 0%, #f8fcff 100%);
  border-right: 1px solid var(--pharmacy-line);
}

.dashboard .sidebar-brand {
  background: linear-gradient(135deg, #ffffff 0%, var(--pharmacy-blue-soft) 100%);
  border-color: var(--pharmacy-line);
}

.dashboard .sidebar-brand-text,
.dashboard .content-top h1,
.page-dashboard h1 {
  color: var(--pharmacy-blue-dark);
}

.dashboard .nav-item {
  color: #2d4258;
}

.dashboard .nav-item:hover,
.dashboard .nav-item:focus-visible,
.dashboard .nav-item.active,
.dashboard .nav-item.is-pressing {
  color: var(--pharmacy-blue-dark);
  background: linear-gradient(90deg, #edf9ff 0%, #ffffff 100%);
  border-color: #b9def5;
}

.dashboard .nav-icon,
.user-avatar,
.dashboard .bell {
  background: var(--pharmacy-blue-soft);
}

.dashboard .stat-card,
.dashboard .chart-card-full,
.dashboard .table-card,
.inventory-card,
.archive-box,
.notifications-list-card,
.staff-card,
.modal-card,
.page-quick-sell .product-item,
.page-quick-sell .cart-section {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border: 1px solid var(--pharmacy-line);
  border-top: 3px solid rgba(11, 132, 216, 0.22);
  box-shadow: var(--pharmacy-shadow);
}

.dashboard .stat-card:hover,
.dashboard .chart-card-full:hover,
.inventory-card:hover,
.staff-card:hover,
.notifications-list-card:hover,
.page-quick-sell .product-item:hover {
  border-color: #a9d8f4;
  border-top-color: rgba(11, 132, 216, 0.48);
  box-shadow: var(--pharmacy-shadow-hover);
}

.dashboard .stat-icon.sale,
.dashboard .stat-icon.product,
.dashboard .stat-icon.staff,
.dashboard .stat-icon.alert,
.dashboard .stat-icon.status-alert,
.dashboard .stat-icon.expiry,
.inventory-header .inventory-logo,
.manage-user-logo {
  background: var(--pharmacy-blue-soft);
}

.dashboard .stat-icon {
  box-shadow: inset 0 0 0 1px rgba(11, 132, 216, 0.12);
}

.stat-title,
.stat-note,
.dashboard .table-card td,
.inventory-table td,
.archived-table td,
.notification-message {
  color: var(--pharmacy-muted);
}

.stat-value,
.chart-title,
.table-title,
.inventory-header h2,
.notification-title,
.staff-card .name {
  color: var(--pharmacy-text);
}

.inventory-table th,
.archived-table th,
.page-dashboard th {
  background: linear-gradient(180deg, #f4fbff 0%, #eaf7ff 100%);
  color: var(--pharmacy-blue-dark);
  border-bottom: 1px solid var(--pharmacy-line);
}

.inventory-table tbody tr:hover,
.archived-table tbody tr:hover,
.page-dashboard tbody tr:hover,
.notification-item:hover {
  background: var(--pharmacy-blue-pale);
}

.period-select,
.filter-select,
.search-wrapper input,
.search-input,
.form-group input,
.form-group select,
.page-pharmassist .chat-input {
  background: #ffffff;
  border: 1px solid var(--pharmacy-line);
  box-shadow: 0 8px 18px rgba(11, 132, 216, 0.06);
}

.period-select:hover,
.period-select:focus,
.filter-select:hover,
.filter-select:focus,
.search-wrapper input:focus,
.search-input:focus-within,
.form-group input:focus,
.form-group select:focus,
.page-pharmassist .chat-input:focus-within {
  border-color: var(--pharmacy-blue);
  box-shadow: 0 0 0 4px rgba(11, 132, 216, 0.12);
}

.btn-add-product,
.btn-save,
.btn-submit,
.btn-blue,
.btn-primary,
.btn-primary.btn-small,
.page-manage-user .btn-archive {
  background: linear-gradient(135deg, var(--pharmacy-blue), var(--pharmacy-blue-dark)) !important;
  border-color: var(--pharmacy-blue) !important;
  color: #ffffff !important;
}

.btn-add-product:hover,
.btn-save:hover,
.btn-submit:hover,
.btn-blue:hover,
.btn-primary:hover,
.btn-primary.btn-small:hover,
.page-manage-user .btn-archive:hover {
  background: linear-gradient(135deg, #1496ec, var(--pharmacy-blue-dark)) !important;
  color: #ffffff !important;
}

.btn-archive,
.btn-restore,
.btn-outline-blue,
.btn-signout,
.btn-cancel,
.btn-outline-danger,
.dashboard .action-btn,
.inventory-table .action-btn {
  background: #ffffff;
  border-color: var(--pharmacy-line);
  color: var(--pharmacy-blue-dark);
}

.btn-archive:hover,
.btn-restore:hover,
.btn-outline-blue:hover,
.btn-signout:hover,
.btn-cancel:hover,
.dashboard .action-btn:hover,
.inventory-table .action-btn:hover {
  background: var(--pharmacy-blue-soft);
  border-color: #acd7f2;
  color: var(--pharmacy-blue-dark);
}

.badge,
.dashboard .bell .badge {
  background: var(--pharmacy-blue) !important;
}

.inventory-modal-content,
.modal-card {
  background: #ffffff;
  border-color: var(--pharmacy-line);
}

@media (max-width: 640px) {
  .landing-copy h1 {
    letter-spacing: 2px;
  }
}

/* Manage User needs the content column to own scrolling, while cards grow naturally. */
.page-manage-user .content {
  min-height: 0;
  overflow-y: auto;
}

.page-manage-user .table-card {
  flex: 0 0 auto;
  min-height: calc(100vh - 92px);
  overflow: visible;
  margin-bottom: 24px;
}

.page-manage-user #activeStaffView,
.page-manage-user #archivedStaffView {
  min-height: 0;
}

.page-manage-user .staff-list-container,
.page-manage-user .archive-box {
  overflow: visible;
}

.page-manage-user .staffs-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.page-manage-user .archived-table-container {
  overflow-x: auto;
}

.page-inventory .inventory-card,
.page-inventory .archived-table-container {
  overflow-x: auto;
}

.page-inventory .inventory-table,
.page-inventory .archived-table {
  min-width: 980px;
}

.page-inventory.staff-inventory-view .btn-add-product,
.page-inventory.staff-inventory-view #viewInventoryArchiveBtn,
.page-inventory.staff-inventory-view .inventory-table th:nth-child(8),
.page-inventory.staff-inventory-view .inventory-table td:nth-child(8) {
  display: none;
}
