/* MedChronic Labs — Brand Styles */
:root {
  --blue: #1e4fd6;
  --blue-dark: #163aa8;
  --blue-light: #e8efff;
  --blue-mid: #3b6ef5;
  --red: #c41e3a;
  --red-soft: #fde8ec;
  --teal: #0d9488;
  --ink: #0f1b33;
  --muted: #5a6a85;
  --line: #d7e0f0;
  --bg: #f4f7fc;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(22, 58, 168, 0.12);
  --radius: 18px;
  --font-display: "Libre Baskerville", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }

.container {
  width: min(1140px, calc(100% - 2rem));
  margin: 0 auto;
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(30,79,214,0.08);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
}

.brand img {
  height: 56px;
  width: auto;
}

.menu-toggle {
  display: none;
  border: 0;
  background: var(--blue-light);
  color: var(--blue);
  width: 46px;
  height: 46px;
  border-radius: 12px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 0;
  position: relative;
  z-index: 120;
}

.menu-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--blue);
  border-radius: 2px;
  transition: 0.25s ease;
}

.menu-toggle.is-open .menu-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-open .menu-toggle-bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open .menu-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

body.nav-open {
  overflow: hidden;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--ink);
  font-weight: 600;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  transition: 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--blue-light);
  color: var(--blue);
}

.nav-links .btn-nav {
  background: var(--blue);
  color: #fff !important;
  margin-left: 0.4rem;
}

.nav-links .btn-nav:hover {
  background: var(--blue-dark);
}

/* —— Hero —— */
.hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 84px);
  display: flex;
  align-items: center;
  background:
    radial-gradient(ellipse 80% 60% at 85% 20%, rgba(59,110,245,0.28), transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(196,30,58,0.08), transparent 50%),
    linear-gradient(160deg, #ffffff 0%, #eef3ff 45%, #f7f9fc 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(30,79,214,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30,79,214,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
  padding: 3.5rem 0 4.5rem;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 1rem;
}

.hero-eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--red);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  color: var(--ink);
}

.hero h1 em {
  font-style: normal;
  color: var(--blue);
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 34rem;
  margin: 0 0 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-logo-card {
  background: #fff;
  border-radius: 28px;
  padding: 2.5rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(30,79,214,0.08);
  animation: floatY 5s ease-in-out infinite;
}

.hero-logo-card img {
  width: min(340px, 100%);
  height: auto;
}

.hero-badge {
  position: absolute;
  bottom: -12px;
  left: -8px;
  background: var(--blue);
  color: #fff;
  padding: 0.75rem 1.1rem;
  border-radius: 14px;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(30,79,214,0.35);
  animation: fadeUp 0.8s ease both 0.3s;
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeUp 0.7s ease both;
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1.45rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: 0.2s ease;
  font-family: inherit;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}

.btn-primary:hover {
  background: var(--blue-dark);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border-color: var(--blue);
  color: var(--blue);
}

.btn-outline:hover {
  background: var(--blue);
  color: #fff;
}

.btn-danger {
  background: var(--red);
  color: #fff;
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
}

/* —— Sections —— */
.section {
  padding: 4.5rem 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: 2.5rem;
}

.section-head .label {
  color: var(--blue);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin: 0.4rem 0 0.75rem;
  line-height: 1.25;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.feature:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--blue-light);
  color: var(--blue);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

.feature h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* —— Product cards —— */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
}

.product-card-media {
  aspect-ratio: 4/3;
  background: linear-gradient(145deg, #eef3ff, #ffffff);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow: hidden;
}

.product-card-media img {
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.product-card:hover .product-card-media img {
  transform: scale(1.05);
}

.product-card-body {
  padding: 1.25rem 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card .rx {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--red);
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}

.product-card h3 {
  font-family: var(--font-display);
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  color: var(--ink);
}

.product-card .generic {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 1rem;
  flex: 1;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.chip {
  background: var(--blue-light);
  color: var(--blue-dark);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
}

/* —— Single product —— */
.product-hero {
  background:
    linear-gradient(135deg, #163aa8 0%, #1e4fd6 45%, #3b6ef5 100%);
  color: #fff;
  padding: 2.5rem 0 3rem;
  position: relative;
  overflow: hidden;
}

.product-hero::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: 40px solid rgba(255,255,255,0.08);
}

.product-hero .breadcrumb {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.product-hero .breadcrumb a { color: #fff; }

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 2rem;
  margin-top: -3rem;
  position: relative;
  z-index: 2;
  padding-bottom: 4rem;
}

.product-gallery {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.product-gallery img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  margin: 0 auto;
}

.product-info-panel {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.product-info-panel h1 {
  font-family: var(--font-display);
  margin: 0.25rem 0 0.5rem;
  font-size: 2rem;
  color: var(--ink);
}

.schedule-box {
  background: var(--red-soft);
  border: 2px solid var(--red);
  color: var(--red);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font-weight: 700;
  font-size: 0.9rem;
  margin: 1rem 0;
}

.detail-list {
  display: grid;
  gap: 0.85rem;
  margin: 1.25rem 0;
}

.detail-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.75rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}

.detail-row dt {
  font-weight: 700;
  color: var(--muted);
  font-size: 0.88rem;
}

.detail-row dd {
  margin: 0;
  font-size: 0.95rem;
}

.qr-box {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--bg);
  border-radius: 14px;
  text-align: center;
  border: 1px dashed var(--line);
}

.qr-box img {
  width: 160px;
  height: 160px;
  margin: 0.75rem auto;
}

/* —— About / Contact —— */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.panel {
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--line);
  box-shadow: 0 8px 30px rgba(15,27,51,0.05);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.contact-card h3 {
  margin: 0 0 0.5rem;
  color: var(--blue);
}

.contact-card p {
  margin: 0;
  color: var(--muted);
}

/* —— Footer —— */
.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: auto;
  color: rgba(255,255,255,0.82);
  padding: 0 0 1.75rem;
  background:
    linear-gradient(180deg, #0a1428 0%, #0d1b3a 45%, #122552 100%);
  border-top: 1px solid rgba(59,110,245,0.25);
}

.footer-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 12% 0%, rgba(59,110,245,0.28), transparent 55%),
    radial-gradient(ellipse 45% 40% at 92% 18%, rgba(196,30,58,0.12), transparent 50%),
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: auto, auto, 42px 42px, 42px 42px;
  mask-image: linear-gradient(180deg, black 0%, transparent 85%);
}

.site-footer .container {
  position: relative;
  z-index: 1;
}

.footer-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin: 2.25rem 0 2.5rem;
  padding: 1.5rem 1.75rem;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(30,79,214,0.35), rgba(22,58,168,0.2));
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 16px 40px rgba(0,0,0,0.22);
}

.footer-cta-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9db4ff;
  margin-bottom: 0.4rem;
}

.footer-cta h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  color: #fff;
  line-height: 1.3;
}

.footer-cta p {
  margin: 0;
  color: rgba(255,255,255,0.72);
  max-width: 36rem;
  font-size: 0.95rem;
}

.footer-cta-btn {
  flex-shrink: 0;
  box-shadow: 0 10px 24px rgba(30,79,214,0.4);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.45fr 0.85fr 0.85fr 1.15fr;
  gap: 2rem 1.75rem;
  margin-bottom: 2.25rem;
}

.footer-logo {
  display: inline-flex;
  background: #fff;
  border-radius: 14px;
  padding: 0.55rem 0.75rem;
  margin-bottom: 1rem;
  box-shadow: 0 10px 28px rgba(0,0,0,0.2);
  transition: transform 0.25s ease;
}

.footer-logo:hover { transform: translateY(-3px); }

.footer-logo img {
  height: 48px;
  width: auto;
}

.footer-tagline {
  margin: 0 0 1.1rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.72);
  max-width: 22rem;
  font-size: 0.95rem;
}

.footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.footer-badges span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c9d7ff;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
}

.site-footer h4 {
  color: #fff;
  margin: 0 0 1.1rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  position: relative;
  padding-bottom: 0.65rem;
}

.site-footer h4::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 28px;
  height: 2px;
  background: linear-gradient(90deg, var(--blue-mid), transparent);
  border-radius: 2px;
}

.site-footer a {
  color: rgba(255,255,255,0.78);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.site-footer a:hover { color: #fff; }

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li { margin-bottom: 0.65rem; }

.footer-links a {
  display: inline-block;
  font-weight: 600;
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: #9db4ff;
  padding-left: 4px;
}

.footer-contact-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.footer-contact-item:last-child { margin-bottom: 0; }

.footer-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(145deg, var(--blue-mid), var(--blue-dark));
  border: 1px solid rgba(255,255,255,0.15);
}

.footer-contact-item strong {
  display: block;
  color: #fff;
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
}

.footer-contact-item p {
  margin: 0;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.68);
  line-height: 1.45;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.25rem;
  font-size: 0.86rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  color: rgba(255,255,255,0.58);
}

.footer-caution {
  color: #ffb4c0;
  font-weight: 600;
  font-size: 0.82rem;
}

/* —— Alerts —— */
.alert {
  padding: 0.9rem 1.1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  font-weight: 600;
}

.alert-success { background: #e8f8ef; color: #0f7a3e; }
.alert-error { background: var(--red-soft); color: var(--red); }
.alert-info { background: var(--blue-light); color: var(--blue-dark); }

/* —— Page banner —— */
.page-banner {
  background: linear-gradient(135deg, #163aa8, #1e4fd6);
  color: #fff;
  padding: 3rem 0;
}

.page-banner h1 {
  font-family: var(--font-display);
  margin: 0 0 0.4rem;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.page-banner p {
  margin: 0;
  opacity: 0.85;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
  background: #fff;
  border-radius: var(--radius);
  border: 1px dashed var(--line);
}

/* —— Admin —— */
.admin-body {
  background: #e8eef8;
  min-height: 100vh;
}

.admin-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  color: #fff;
  background:
    radial-gradient(ellipse 80% 40% at 20% 0%, rgba(59,110,245,0.35), transparent 55%),
    linear-gradient(180deg, #0a1428 0%, #0f1c3d 55%, #122552 100%);
  border-right: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
}

.admin-sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.25rem 1rem 1rem;
  position: relative;
  z-index: 1;
}

.brand-mini {
  display: flex;
  justify-content: center;
  padding: 0.5rem 0.5rem 1.25rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.brand-mini-logo {
  display: inline-flex;
  background: #fff;
  border-radius: 14px;
  padding: 0.55rem 0.85rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  transition: transform 0.2s ease;
}

.brand-mini-logo:hover {
  transform: translateY(-2px);
}

.brand-mini-logo img {
  height: 52px;
  width: auto;
  display: block;
}

.admin-nav-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  padding: 0.85rem 0.75rem 0.45rem;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255,255,255,0.82);
  padding: 0.7rem 0.75rem;
  border-radius: 12px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: 0.2s ease;
}

.admin-nav a:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}

.admin-nav a.active {
  background: linear-gradient(135deg, rgba(30,79,214,0.55), rgba(59,110,245,0.28));
  border-color: rgba(157,180,255,0.35);
  color: #fff;
  box-shadow: 0 10px 24px rgba(30,79,214,0.25);
}

.nav-ico {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  color: #c9d7ff;
}

.admin-nav a.active .nav-ico {
  background: rgba(255,255,255,0.16);
  color: #fff;
}

.nav-txt {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}

.nav-txt strong {
  font-size: 0.92rem;
}

.nav-txt small {
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255,255,255,0.45);
  margin-top: 0.15rem;
}

.admin-nav a.active .nav-txt small,
.admin-nav a:hover .nav-txt small {
  color: rgba(255,255,255,0.7);
}

.admin-nav-secondary {
  margin-top: 0.15rem;
}

.nav-logout:hover {
  background: rgba(196,30,58,0.18) !important;
  border-color: rgba(255,180,192,0.2);
}

.nav-logout:hover .nav-ico {
  background: rgba(196,30,58,0.35);
  color: #ffd0d8;
}

.admin-sidebar-foot {
  margin-top: auto;
  padding-top: 1rem;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}

.sidebar-user strong {
  display: block;
  font-size: 0.88rem;
}

.sidebar-user small {
  color: rgba(255,255,255,0.5);
  font-size: 0.75rem;
}

.sidebar-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(145deg, var(--blue-mid), var(--blue-dark));
  border: 1px solid rgba(255,255,255,0.2);
  flex-shrink: 0;
}

.sidebar-avatar.sm {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 0.72rem;
}

.admin-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

.admin-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.75rem;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(30,79,214,0.1);
  box-shadow: 0 8px 24px rgba(15,27,51,0.04);
}

.admin-header-left h1 {
  margin: 0.2rem 0 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  color: var(--ink);
  line-height: 1.2;
}

.admin-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.admin-breadcrumb .sep { opacity: 0.5; }

.admin-breadcrumb .current {
  color: var(--blue);
}

.admin-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.admin-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: var(--blue-light);
  color: var(--blue-dark) !important;
  font-weight: 700;
  font-size: 0.85rem;
  border: 1px solid rgba(30,79,214,0.12);
  transition: 0.2s ease;
}

.admin-chip:hover {
  background: var(--blue);
  color: #fff !important;
}

.admin-user-pill {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.75rem 0.35rem 0.35rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(15,27,51,0.04);
}

.admin-user-pill strong {
  display: block;
  font-size: 0.88rem;
  line-height: 1.15;
  color: var(--ink);
}

.admin-user-pill small {
  font-size: 0.72rem;
  color: var(--muted);
}

.admin-main {
  flex: 1;
  padding: 1.5rem 1.75rem 2rem;
}

.admin-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-top h1,
.admin-top h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink);
}

.admin-footer {
  margin-top: auto;
  border-top: 1px solid rgba(30,79,214,0.1);
  background:
    linear-gradient(180deg, #ffffff 0%, #f3f6fc 100%);
  padding: 1.1rem 1.75rem;
}

.admin-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-footer-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.admin-footer-brand img {
  height: 34px;
  width: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px;
}

.admin-footer-brand strong {
  display: block;
  font-size: 0.9rem;
  color: var(--ink);
}

.admin-footer-brand span {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
}

.admin-footer-links {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.admin-footer-links a {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--blue-dark);
  background: var(--blue-light);
}

.admin-footer-links a:hover {
  background: var(--blue);
  color: #fff;
}

.admin-footer-meta {
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.admin-footer-meta .dot {
  opacity: 0.5;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.35rem;
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(15,27,51,0.04);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--blue-mid));
}

.stat-card .num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--blue);
  line-height: 1;
}

.stat-card .lbl {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.35rem;
}

/* Dashboard */
.dash-hero {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding: 1.6rem 1.75rem;
  border-radius: 22px;
  color: #fff;
  background:
    radial-gradient(ellipse 50% 80% at 90% 20%, rgba(255,255,255,0.16), transparent 55%),
    linear-gradient(135deg, #163aa8 0%, #1e4fd6 48%, #3b6ef5 100%);
  box-shadow: 0 18px 40px rgba(30,79,214,0.28);
  overflow: hidden;
  position: relative;
}

.dash-hero::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  border: 28px solid rgba(255,255,255,0.08);
  border-radius: 50%;
  right: -40px;
  bottom: -60px;
}

.dash-hero-copy,
.dash-hero-aside {
  position: relative;
  z-index: 1;
}

.dash-hero-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  margin-bottom: 0.45rem;
}

.dash-hero h2 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.5vw, 1.9rem);
  line-height: 1.2;
}

.dash-hero p {
  margin: 0 0 1.15rem;
  max-width: 36rem;
  color: rgba(255,255,255,0.82);
  font-size: 0.98rem;
}

.dash-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.dash-btn-light {
  border-color: rgba(255,255,255,0.55) !important;
  color: #fff !important;
  background: transparent;
}

.dash-btn-light:hover {
  background: #fff !important;
  color: var(--blue-dark) !important;
}

.dash-hero-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.85rem;
}

.dash-hero-logo {
  background: #fff;
  border-radius: 16px;
  padding: 0.75rem 1rem;
  box-shadow: 0 12px 28px rgba(0,0,0,0.18);
}

.dash-hero-logo img {
  height: 56px;
  width: auto;
}

.dash-hero-meta {
  text-align: right;
}

.dash-hero-meta span {
  display: block;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
}

.dash-hero-meta strong {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.92rem;
}

.dash-stats {
  grid-template-columns: repeat(4, 1fr);
}

.dash-stat .num {
  margin-top: 0.85rem;
  font-size: 2.15rem;
}

.dash-stat-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.dash-stat-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: var(--blue-light);
  color: var(--blue-dark);
}

.dash-stat-tag {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.dash-stat.accent-green::before { background: linear-gradient(90deg, #0f7a3e, #2bb673); }
.dash-stat.accent-green .num { color: #0f7a3e; }
.dash-stat.accent-green .dash-stat-ico { background: #e8f8ef; color: #0f7a3e; }

.dash-stat.accent-blue::before { background: linear-gradient(90deg, #163aa8, #3b6ef5); }

.dash-stat.accent-muted::before { background: linear-gradient(90deg, #7a8699, #aeb6c4); }
.dash-stat.accent-muted .num { color: #5a6a85; }
.dash-stat.accent-muted .dash-stat-ico { background: #eef1f6; color: #5a6a85; }

.dash-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.dash-action {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.1rem 1.2rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(15,27,51,0.04);
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.dash-action:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(30,79,214,0.25);
  color: inherit;
}

.dash-action-ico {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 800;
  background: linear-gradient(145deg, var(--blue-mid), var(--blue-dark));
  color: #fff;
  flex-shrink: 0;
}

.dash-action strong {
  display: block;
  font-size: 0.98rem;
  color: var(--ink);
}

.dash-action small {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.dash-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.35rem;
  box-shadow: 0 8px 24px rgba(15,27,51,0.04);
}

.dash-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.dash-panel-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.dash-panel-head p {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.dash-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--muted);
}

.dash-empty strong {
  display: block;
  color: var(--ink);
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.dash-empty .btn {
  margin-top: 1rem;
}

.dash-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.dash-product-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #fafcff;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dash-product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  background: #fff;
}

.dash-product-media {
  position: relative;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem;
  background: linear-gradient(160deg, #eef3ff, #ffffff);
}

.dash-product-media img {
  max-height: 100%;
  object-fit: contain;
}

.dash-product-media .status-active,
.dash-product-media .status-inactive {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
}

.dash-product-body {
  padding: 1rem 1.05rem 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.dash-rx {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.3rem;
}

.dash-product-body h3 {
  margin: 0 0 0.3rem;
  font-size: 1.05rem;
  font-family: var(--font-display);
}

.dash-product-body > p {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.86rem;
  flex: 1;
}

.dash-product-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.9rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.dash-product-qr {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}

.dash-product-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dash-product-qr span {
  font-size: 0.65rem;
  color: var(--muted);
  font-weight: 700;
}

.table-wrap {
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--line);
  overflow: auto;
  box-shadow: 0 8px 24px rgba(15,27,51,0.04);
}

table.data {
  width: 100%;
  border-collapse: collapse;
}

table.data th,
table.data td {
  padding: 0.9rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

table.data th {
  background: #f7f9fc;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

table.data tr:last-child td { border-bottom: 0; }

.thumb {
  width: 52px;
  height: 52px;
  object-fit: contain;
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--line);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.form-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 1.5rem;
  max-width: 900px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group.full { grid-column: 1 / -1; }

.form-group label {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  background: #fff;
}

.form-group textarea { min-height: 90px; resize: vertical; }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: 2px solid rgba(30,79,214,0.25);
  border-color: var(--blue);
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at top right, rgba(59,110,245,0.25), transparent 50%),
    linear-gradient(160deg, #0b1630, #163aa8);
  padding: 1.5rem;
}

.login-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.login-card .logo {
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-card .logo img {
  height: 64px;
  margin: 0 auto 0.75rem;
}

.login-card h1 {
  margin: 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.login-card .sub {
  text-align: center;
  color: var(--muted);
  margin: 0.35rem 0 1.5rem;
}

.status-active {
  background: #e8f8ef;
  color: #0f7a3e;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.status-inactive {
  background: #f0f0f0;
  color: #666;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.qr-preview {
  width: 90px;
  height: 90px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.qr-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

/* —— Responsive —— */
@media (max-width: 1100px) {
  .footer-grid {
    grid-template-columns: 1.3fr 1fr 1fr;
  }

  .footer-contact {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .container {
    width: min(1140px, calc(100% - 1.25rem));
  }

  .hero-grid,
  .product-detail,
  .split,
  .features,
  .contact-grid,
  .footer-grid,
  .stats,
  .form-grid,
  .admin-layout,
  .dash-actions {
    grid-template-columns: 1fr;
  }

  .dash-stats {
    grid-template-columns: 1fr 1fr;
  }

  .dash-hero-aside {
    align-items: flex-start;
  }

  .dash-hero-meta {
    text-align: left;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-wrap {
    position: relative;
    padding: 0.7rem 0;
  }

  .brand img {
    height: 48px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 50%;
    transform: translateX(-50%);
    width: min(1140px, calc(100vw - 1.25rem));
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    padding: 0.85rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    z-index: 110;
    animation: menuDrop 0.22s ease;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    font-size: 1rem;
  }

  .nav-links .btn-nav {
    margin-left: 0;
    text-align: center;
  }

  .hero {
    min-height: auto;
  }

  .hero-grid {
    gap: 1.75rem;
    padding: 2rem 0 2.5rem;
    text-align: center;
  }

  .hero-eyebrow {
    justify-content: center;
  }

  .hero h1 {
    font-size: clamp(1.85rem, 8vw, 2.5rem);
  }

  .hero-lead {
    margin-left: auto;
    margin-right: auto;
    font-size: 1.02rem;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-actions .btn {
    flex: 1 1 140px;
    min-height: 48px;
  }

  .hero-visual {
    order: -1;
  }

  .hero-logo-card {
    padding: 1.35rem;
    border-radius: 22px;
    max-width: 280px;
    margin: 0 auto;
  }

  .hero-badge {
    left: 50%;
    transform: translateX(-50%);
    bottom: -10px;
    white-space: nowrap;
    font-size: 0.78rem;
  }

  .section {
    padding: 2.75rem 0;
  }

  .section-head {
    margin-bottom: 1.5rem;
    text-align: center;
  }

  .section-head h2 {
    font-size: clamp(1.45rem, 6vw, 2rem);
  }

  .feature {
    padding: 1.25rem;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .product-card-body {
    padding: 1.1rem 1.15rem 1.25rem;
  }

  .page-banner {
    padding: 2rem 0;
    text-align: center;
  }

  .product-hero {
    padding: 1.75rem 0 2.25rem;
    text-align: center;
  }

  .product-hero .breadcrumb {
    font-size: 0.82rem;
  }

  .product-detail {
    margin-top: -2rem;
    gap: 1rem;
    padding-bottom: 2.5rem;
  }

  .product-gallery,
  .product-info-panel {
    padding: 1.15rem;
    border-radius: 16px;
  }

  .product-info-panel h1 {
    font-size: 1.55rem;
  }

  .detail-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .qr-box img {
    width: 140px;
    height: 140px;
  }

  .footer-cta {
    padding: 1.25rem;
    margin: 1.5rem 0 1.75rem;
  }

  .footer-cta-btn {
    width: 100%;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }

  .btn {
    min-height: 44px;
  }

  .admin-sidebar {
    position: relative;
    height: auto;
    z-index: 20;
  }

  .admin-sidebar-foot {
    display: none;
  }

  .admin-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .admin-nav a {
    flex: 1 1 160px;
  }

  .admin-header,
  .admin-main,
  .admin-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .admin-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-user-pill small {
    display: none;
  }
}

@media (max-width: 560px) {
  .dash-stats {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .contact-grid {
    gap: 0.85rem;
  }

  .panel {
    padding: 1.25rem;
  }

  .schedule-box {
    font-size: 0.82rem;
  }
}

@keyframes menuDrop {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}
