:root {
  --navy: #0d1b34;
  --navy-light: #16233f;
  --blue: #1f6fd6;
  --green: #22b06b;
  --grad: linear-gradient(90deg, var(--blue), var(--green));
  --text-dark: #1e293b;
  --text-grey: #64748b;
  --border: #e5e9f0;
  --bg: #f4f6fb;
  --danger: #dc2626;
  --warn: #d97706;
  --success: #16a34a;
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text-dark);
  margin: 0;
}

a { text-decoration: none; color: inherit; }

/* ---------------- Layout ---------------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 250px;
  background: var(--navy);
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  z-index: 100;
}

.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.brand-logo {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 18px;
  flex-shrink: 0;
}

.brand-text .brand-title { font-weight: 700; font-size: 15px; color: #fff; line-height: 1.2; }
.brand-text .brand-sub { font-size: 10.5px; color: #94a3b8; }

.sidebar nav { flex: 1; padding: 14px 10px; overflow-y: auto; }

.sidebar nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 8px;
  font-size: 13.5px; color: #cbd5e1;
  margin-bottom: 2px;
}
.sidebar nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar nav a.active { background: var(--grad); color: #fff; font-weight: 600; }
.sidebar nav a .ico { width: 18px; text-align: center; }

.sidebar .help-box {
  margin: 14px; padding: 14px;
  background: rgba(255,255,255,0.06);
  border-radius: 12px; text-align: center;
}
.sidebar .help-box .icon-circle {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--grad); display: flex; align-items: center; justify-content: center;
  margin: 0 auto 8px; color: #fff; font-size: 16px;
}
.sidebar .help-box p { font-size: 11.5px; color: #94a3b8; margin: 0 0 8px; }
.sidebar .help-box .btn-support {
  display: inline-block; width: 100%; padding: 7px;
  background: rgba(255,255,255,0.1); color: #fff; border-radius: 8px; font-size: 12px;
}

.main {
  margin-left: 250px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

.topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 14px 26px;
  display: flex; align-items: center; justify-content: space-between;
}
.topbar .page-title { font-size: 19px; font-weight: 700; color: var(--text-dark); }
.topbar .breadcrumb { font-size: 12px; color: var(--text-grey); }
.topbar .right { display: flex; align-items: center; gap: 18px; }
.topbar .bell { position: relative; font-size: 18px; color: var(--text-grey); }
.topbar .bell .dot {
  position: absolute; top: -4px; right: -6px; background: var(--danger); color: #fff;
  font-size: 9px; padding: 1px 5px; border-radius: 8px;
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: #ede9fe;
  color: #7c3aed; display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.user-block { display: flex; align-items: center; gap: 8px; }
.user-block .name { font-size: 13px; font-weight: 600; }
.user-block .role { font-size: 10.5px; color: var(--text-grey); }

.content { padding: 22px 26px; flex: 1; min-width: 0; }

footer.copyright {
  text-align: center; font-size: 12px; color: var(--text-grey);
  padding: 16px; border-top: 1px solid var(--border); background: #fff;
}

/* ---------------- Cards / widgets ---------------- */
.card {
  background: #fff; border-radius: 14px; border: 1px solid var(--border);
  padding: 18px 20px; box-shadow: 0 1px 2px rgba(16,24,40,.04);
}

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
@media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }

.stat-card { display: flex; gap: 14px; align-items: flex-start; }
.stat-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 19px; flex-shrink: 0;
}
.stat-icon.blue { background: #dbeafe; color: #1d4ed8; }
.stat-icon.green { background: #dcfce7; color: #15803d; }
.stat-icon.purple { background: #ede9fe; color: #7c3aed; }
.stat-icon.orange { background: #ffedd5; color: #c2410c; }
.stat-card .num { font-size: 24px; font-weight: 800; color: var(--text-dark); }
.stat-card .label { font-size: 12.5px; color: var(--text-grey); margin-bottom: 2px; }
.stat-card .link { font-size: 11.5px; color: var(--blue); font-weight: 600; }

.section-title { font-size: 15px; font-weight: 700; margin: 0 0 14px; }

.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
@media (max-width: 1000px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ---------------- Table ---------------- */
table.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data-table th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; color: var(--text-grey);
  padding: 10px 12px; border-bottom: 1px solid var(--border); background: #fafbfc;
}
table.data-table td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data-table tr:hover td { background: #fafbfe; }

.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700;
}
.badge.green { background: #dcfce7; color: #15803d; }
.badge.blue { background: #dbeafe; color: #1d4ed8; }
.badge.red { background: #fee2e2; color: #b91c1c; }
.badge.orange { background: #fef3c7; color: #b45309; }
.badge.grey { background: #f1f5f9; color: #475569; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: 9px; font-size: 13px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; background: #fff;
}
.btn-primary { background: var(--grad); color: #fff; }
.btn-outline { border-color: var(--border); color: var(--text-dark); }
.btn-outline:hover { background: #f8fafc; }
.btn-danger { background: #fee2e2; color: var(--danger); }
.btn-purple { background: #ede9fe; color: #7c3aed; }
.btn-green { background: #16a34a; color: #fff; }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 6px 11px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------------- Forms ---------------- */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; color: var(--text-dark); }
.form-control {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px;
  font-size: 13.5px; background: #fff;
}
.form-control:focus { outline: none; border-color: var(--blue); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 700px) { .form-row { grid-template-columns: 1fr; } }

.upload-zone {
  border: 2px dashed #c7d2e5; border-radius: 12px; padding: 34px; text-align: center; background: #f8fafc;
}
.upload-zone .icon { font-size: 30px; color: var(--blue); margin-bottom: 10px; }

/* ---------------- Steps ---------------- */
.steps { display: flex; align-items: center; margin-bottom: 22px; }
.step { display: flex; flex-direction: column; align-items: center; flex: 1; position: relative; }
.step .circle {
  width: 34px; height: 34px; border-radius: 50%; background: #e2e8f0; color: #64748b;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; z-index: 2;
}
.step.done .circle { background: var(--success); color: #fff; }
.step.active .circle { background: var(--blue); color: #fff; }
.step .label { font-size: 12px; font-weight: 700; margin-top: 6px; }
.step .sub { font-size: 10.5px; color: var(--text-grey); }
.step:not(:last-child)::after {
  content: ''; position: absolute; top: 17px; left: 55%; width: 90%; height: 2px; background: #e2e8f0; z-index: 1;
}
.step.done:not(:last-child)::after { background: var(--success); }

/* ---------------- Login page ---------------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #eef4ff, #eafff3);
  position: relative;
  overflow: hidden;
}

/* Background decorations */
.bg-dec {
  position: absolute;
  z-index: 1;
  pointer-events: none;
}
.bg-dec circle {
  animation: pulseNode 5s infinite ease-in-out;
  transform-origin: center;
  transform-box: fill-box;
}
.bg-dec circle:nth-child(2n) {
  animation-delay: 1.5s;
}
.bg-dec circle:nth-child(3n) {
  animation-delay: 3s;
}
@keyframes pulseNode {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.35); opacity: 0.85; }
}

.dec-top-left {
  top: 5%;
  left: 2%;
  animation: floatDec 8s ease-in-out infinite alternate;
}
.dec-bottom-right {
  bottom: 5%;
  right: 2%;
  animation: floatDec 8s ease-in-out infinite alternate-reverse;
}
@keyframes floatDec {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(15px) rotate(5deg); }
}
@media (max-width: 768px) {
  .bg-dec { display: none; }
}

.bottom-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 1;
  pointer-events: none;
  line-height: 0;
}
.bottom-wave svg {
  width: 100%;
  height: auto;
}

.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
  width: 100%;
}

/* Card Entrance Animations */
.login-card {
  display: flex; width: 920px; max-width: 95vw; background: #fff; border-radius: 20px;
  overflow: hidden; box-shadow: 0 20px 60px rgba(20,40,80,.12);
  border: 1px solid rgba(255,255,255,0.8);
  animation: cardEntrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  opacity: 0;
  transform: translateY(30px);
}

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

.login-left {
  flex: 1;
  padding: 46px 40px;
  background: linear-gradient(160deg, #eaf2ff, #eafff4);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--border);
}

/* Sequential cascading fade-in for left panel */
.login-left > * {
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInUp 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}
.login-left .login-logo-img { animation-delay: 0.15s; }
.login-left .kannada-title { animation-delay: 0.25s; }
.login-left .english-title { animation-delay: 0.3s; }
.login-left .tagline { animation-delay: 0.35s; }
.login-left .system-title { animation-delay: 0.4s; }
.login-left .system-desc { animation-delay: 0.45s; }
.login-left .illustration-container { animation-delay: 0.5s; }

.login-logo-img {
  width: 96px;
  height: auto;
  margin-bottom: 12px;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.05));
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.login-logo-img:hover {
  transform: scale(1.08) rotate(3deg);
}

.kannada-title {
  color: #0d9488;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 2px;
  letter-spacing: 0.5px;
}

.english-title {
  color: #0f172a;
  font-weight: 800;
  font-size: 26px;
  margin: 0 0 2px;
  letter-spacing: -0.5px;
}

.tagline {
  color: var(--text-grey);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 24px;
}

.system-title {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 6px;
}

.system-desc {
  color: var(--text-grey);
  font-size: 12.5px;
  line-height: 1.5;
  margin: 0 0 20px;
}

.illustration-container {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 280 / 180;
  display: flex;
  justify-content: center;
  margin-top: 10px;
}
.illustration-container svg {
  width: 100%;
  height: auto;
  animation: floatIllustration 4s ease-in-out infinite alternate;
}

@keyframes floatIllustration {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

/* SVG Vector Art Animations */
@keyframes floatBubble {
  0% { transform: translateY(0) scale(0.8); opacity: 0; }
  50% { opacity: 0.8; }
  100% { transform: translateY(-16px) scale(1.1); opacity: 0; }
}
.bubble {
  animation: floatBubble 3s infinite ease-in-out;
  transform-origin: center;
}
.bubble-1 { animation-delay: 0s; animation-duration: 2.2s; }
.bubble-2 { animation-delay: 0.7s; animation-duration: 2.8s; }
.bubble-3 { animation-delay: 1.4s; animation-duration: 2s; }

@keyframes lineDraw {
  from { stroke-dasharray: 80; stroke-dashoffset: 80; }
  to { stroke-dasharray: 80; stroke-dashoffset: 0; }
}
.doc-line {
  animation: lineDraw 1.2s forwards cubic-bezier(0.4, 0, 0.2, 1);
}
.line-1 { animation-delay: 0.6s; }
.line-2 { animation-delay: 0.65s; }
.line-3 { animation-delay: 0.7s; }
.line-4 { animation-delay: 0.75s; }
.line-5 { animation-delay: 0.8s; }
.line-6 { animation-delay: 0.85s; }

.microscope-knob {
  transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
  transform-origin: 232px 130px;
}
.illustration-container:hover .microscope-knob {
  transform: rotate(180deg);
}

@keyframes pulseCheckCircle {
  0% { transform: scale(1); filter: drop-shadow(0 2px 4px rgba(34, 176, 107, 0.15)); }
  100% { transform: scale(1.06); filter: drop-shadow(0 4px 10px rgba(34, 176, 107, 0.35)); }
}
.illustration-container circle[fill="#22b06b"] {
  animation: pulseCheckCircle 2s infinite alternate ease-in-out;
  transform-origin: 165px 115px;
}

.login-right {
  flex: 1;
  padding: 46px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Sequential cascading fade-in for right panel */
.login-right > * {
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInUp 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}
.login-right .login-header { animation-delay: 0.2s; }
.login-right form { animation-delay: 0.35s; }
.login-right .divider { animation-delay: 0.5s; }
.login-right p { animation-delay: 0.6s; }

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

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-header h2 {
  font-weight: 800;
  font-size: 24px;
  color: #0f172a;
  margin: 0 0 6px;
  letter-spacing: -0.5px;
}

.login-header p {
  color: var(--text-grey);
  font-size: 13px;
  margin: 0;
}

.form-group label {
  font-weight: 600;
  color: #334155;
  transition: color 0.3s;
}
.form-group:focus-within label {
  color: var(--blue);
}

.form-control {
  border: 1px solid #d8e2f0;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  font-family: inherit;
}
.form-control:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(31, 111, 214, 0.12);
}

/* Redesigned Premium Button */
.btn.btn-primary.btn-login {
  position: relative;
  overflow: hidden;
  padding: 12px;
  font-size: 14px;
  border-radius: 9px;
  font-weight: 600;
  border: none;
  color: #fff;
  background: var(--grad);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 1;
}
.btn.btn-primary.btn-login::after {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  transition: 0.75s;
  opacity: 0;
  z-index: -1;
}
.btn.btn-primary.btn-login:hover::after {
  left: 125%;
  opacity: 1;
}
.btn.btn-primary.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(31, 111, 214, 0.3);
  opacity: 1;
}
.btn.btn-primary.btn-login:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(31, 111, 214, 0.2);
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 22px 0 10px;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}
.divider::before {
  margin-right: 12px;
}
.divider::after {
  margin-left: 12px;
}
.divider-content {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-grey);
  font-size: 12px;
  font-weight: 500;
}
@keyframes pulseShield {
  0% { transform: scale(1); opacity: 0.9; }
  100% { transform: scale(1.15); opacity: 1; color: var(--green); filter: drop-shadow(0 0 2px rgba(22, 163, 74, 0.4)); }
}
.divider-content i {
  animation: pulseShield 1.5s infinite alternate ease-in-out;
}

.login-footer {
  margin-top: 24px;
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
  transition: color 0.3s;
}
.login-footer:hover {
  color: var(--text-grey);
}

@media (max-width: 900px) {
  .login-card {
    flex-direction: column;
    max-width: 520px;
    width: 90%;
    margin: 40px auto;
  }
  .login-left {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 40px 30px;
  }
  .login-right {
    padding: 40px 30px;
  }
}

@media (max-width: 480px) {
  .login-card {
    width: 95%;
    margin: 20px auto;
  }
  .login-left {
    padding: 30px 20px;
  }
  .login-right {
    padding: 30px 20px;
  }
  .english-title {
    font-size: 22px;
  }
  .kannada-title {
    font-size: 13px;
  }
  .system-title {
    font-size: 15px;
  }
  .system-desc {
    font-size: 11.5px;
  }
  .login-header h2 {
    font-size: 20px;
  }
  .btn.btn-primary.btn-login {
    padding: 10px;
    font-size: 13px;
  }
}

/* ---------------- Split preview ---------------- */
.preview-split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.preview-pane { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #fff; }
.preview-pane .pane-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 700; }
.preview-pane iframe { width: 100%; height: 560px; border: none; }

.checklist-item { display: flex; justify-content: space-between; font-size: 12.5px; padding: 4px 0; }
.checklist-item .ok { color: var(--success); font-weight: 700; }

.progress-bar-outer { background: #e2e8f0; border-radius: 20px; height: 8px; overflow: hidden; }
.progress-bar-inner { background: var(--grad); height: 100%; transition: width .4s ease; }

.process-step-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f1f5f9; font-size: 13px; }
.process-step-row .status { margin-left: auto; font-size: 11.5px; font-weight: 700; }
.process-step-row .status.done { color: var(--success); }
.process-step-row .status.progress { color: var(--blue); }
.process-step-row .status.pending { color: #94a3b8; }

.share-option {
  display: flex; align-items: center; justify-content: space-between; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: 12px; margin-bottom: 12px;
}
.share-option .left { display: flex; gap: 12px; align-items: center; }
.share-option .icon-box { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 17px; }

.flash { padding: 10px 14px; border-radius: 9px; margin-bottom: 14px; font-size: 13px; }
.flash.error { background: #fee2e2; color: #b91c1c; }
.flash.success { background: #dcfce7; color: #15803d; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.toolbar input, .toolbar select { padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; }

/* ---------------- Icon inputs (login) ---------------- */
.input-icon {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon .form-control {
  padding-left: 38px;
}
.input-icon i.left-ico {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 14px;
  transition: color 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}
.input-icon .form-control:focus ~ i.left-ico {
  color: var(--blue);
  transform: translateY(-50%) scale(1.15);
}
.input-icon i.toggle-eye {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.3s ease;
}
.input-icon i.toggle-eye:hover {
  color: var(--blue);
  transform: translateY(-50%) scale(1.15);
}

/* ---------------- Need Help & Sidebar adjustments ---------------- */
.sidebar .help-box {
  margin: auto 15px 15px; /* Pushes to the bottom */
  padding: 16px;
  background: #0d1627;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.04);
  text-align: left;
}
.help-icon-circle {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(31, 111, 214, 0.15); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.help-title { font-weight: 700; font-size: 13px; color: #fff; }
.help-sub { font-size: 10.5px; color: #94a3b8; }
.btn-support {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 8px; background: rgba(255,255,255,0.06);
  color: #fff; border-radius: 8px; font-size: 12px; font-weight: 600;
  transition: background 0.3s;
}
.btn-support:hover {
  background: rgba(255,255,255,0.12);
}

/* ---------------- Quick Actions list cards ---------------- */
.quick-action-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 10px;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid transparent;
}
.quick-action-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.04);
}
.quick-action-item .left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.quick-action-item .action-icon-box {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.quick-action-item .action-info {
  display: flex;
  flex-direction: column;
}
.quick-action-item .action-title {
  font-size: 12.5px;
  font-weight: 700;
}
.quick-action-item .action-desc {
  font-size: 10.5px;
  color: var(--text-grey);
}
.quick-action-item .chevron {
  font-size: 12px;
}

/* Green Color Variant */
.quick-action-item.green-var {
  background: #f0fdf4; border-color: #dcfce7; color: #15803d;
}
.quick-action-item.green-var .action-icon-box { background: #dcfce7; color: #15803d; }
.quick-action-item.green-var .action-desc { color: #166534; opacity: 0.8; }

/* Blue Color Variant */
.quick-action-item.blue-var {
  background: #eff6ff; border-color: #dbeafe; color: #1d4ed8;
}
.quick-action-item.blue-var .action-icon-box { background: #dbeafe; color: #1d4ed8; }
.quick-action-item.blue-var .action-desc { color: #1e40af; opacity: 0.8; }

/* Purple Color Variant */
.quick-action-item.purple-var {
  background: #faf5ff; border-color: #ede9fe; color: #7c3aed;
}
.quick-action-item.purple-var .action-icon-box { background: #ede9fe; color: #7c3aed; }
.quick-action-item.purple-var .action-desc { color: #6b21a8; opacity: 0.8; }

/* Orange Color Variant */
.quick-action-item.orange-var {
  background: #fffbeb; border-color: #fef3c7; color: #b45309;
}
.quick-action-item.orange-var .action-icon-box { background: #fef3c7; color: #b45309; }
.quick-action-item.orange-var .action-desc { color: #92400e; opacity: 0.8; }

/* ---------------- Recent Activity ---------------- */
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
}
.activity-item:last-child {
  border-bottom: none;
}
.activity-item .activity-icon-box {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
.activity-item .activity-info {
  flex: 1;
}
.activity-item .activity-text {
  font-size: 12.5px;
  color: var(--text-dark);
  font-weight: 500;
}
.activity-item .activity-desc {
  font-size: 11px;
  color: var(--text-grey);
  margin-top: 1px;
}
.activity-item .activity-time {
  font-size: 11px;
  color: var(--text-grey);
  flex-shrink: 0;
}

/* ---------------- Table Pagination ---------------- */
.page-btn {
  width: 28px; height: 28px;
  border: 1px solid var(--border);
  border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-dark);
  font-weight: 500;
  transition: all 0.2s;
}
.page-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
.page-btn.active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
  font-weight: 600;
}

/* ---------------- Responsiveness layouts ---------------- */
@media (max-width: 1000px) {
  .mid-grid-responsive, .bottom-grid-responsive {
    grid-template-columns: 1fr !important;
  }
}

/* ---------------- System Flow ---------------- */
.system-flow-wrapper::-webkit-scrollbar {
  height: 6px;
}
.system-flow-wrapper::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 10px;
}
.system-flow-wrapper::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}
.system-flow-wrapper::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.flow-step {
  flex: 1;
  min-width: 140px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 10px;
  text-align: center;
  position: relative;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.flow-step:hover {
  transform: translateY(-4px);
  border-color: var(--blue);
  box-shadow: 0 8px 16px rgba(31,111,214,0.08);
  background: #fff;
}
.flow-step .step-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(31,111,214,0.08);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 10px;
  font-size: 20px;
  transition: all 0.3s ease;
}
.flow-step:hover .step-icon {
  background: var(--grad);
  color: #fff;
  transform: scale(1.08);
}
.flow-step .step-number {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-grey);
  margin-bottom: 3px;
  letter-spacing: 0.5px;
}
.flow-step .step-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.35;
}
.flow-arrow {
  color: #94a3b8;
  font-size: 14px;
  animation: pulseArrow 1.5s infinite alternate ease-in-out;
}
@keyframes pulseArrow {
  0% { transform: translateX(0); opacity: 0.5; }
  100% { transform: translateX(3px); opacity: 1; }
}

/* topbar hamburger */
.hamburger { font-size: 18px; color: var(--text-grey); cursor: pointer; margin-right: 14px; }
.topbar .left-group { display: flex; align-items: center; }

/* ---------------- Dashboard Sequential Page Load Animations ---------------- */
.stat-grid > * {
  opacity: 0;
  transform: translateY(18px);
  animation: fadeInUp 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}
.stat-grid > *:nth-child(1) { animation-delay: 0.05s; }
.stat-grid > *:nth-child(2) { animation-delay: 0.12s; }
.stat-grid > *:nth-child(3) { animation-delay: 0.19s; }
.stat-grid > *:nth-child(4) { animation-delay: 0.26s; }

.card:has(.system-flow-container) {
  opacity: 0;
  transform: translateY(18px);
  animation: fadeInUp 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  animation-delay: 0.35s;
}

.mid-grid-responsive > * {
  opacity: 0;
  transform: translateY(18px);
  animation: fadeInUp 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}
.mid-grid-responsive > *:nth-child(1) { animation-delay: 0.45s; }
.mid-grid-responsive > *:nth-child(2) { animation-delay: 0.55s; }
.mid-grid-responsive > *:nth-child(3) { animation-delay: 0.65s; }

.bottom-grid-responsive > * {
  opacity: 0;
  transform: translateY(18px);
  animation: fadeInUp 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}
.bottom-grid-responsive > *:nth-child(1) { animation-delay: 0.75s; }
.bottom-grid-responsive > *:nth-child(2) { animation-delay: 0.85s; }

/* ---------------- Mobile Sidebar Drawer Responsiveness ---------------- */
.hamburger {
  display: none;
}

@media (max-width: 768px) {
  .hamburger {
    display: block !important;
  }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main {
    margin-left: 0 !important;
  }
  
  /* Translucent overlay for mobile sidebar clickaway */
  .sidebar-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(2px);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 480px) {
  .stat-grid {
    grid-template-columns: 1fr !important;
  }
  .topbar {
    padding: 10px 16px;
  }
  .topbar .breadcrumb {
    display: none;
  }
  .lab-chart-flex {
    flex-direction: column;
    align-items: center;
  }
}
