:root{
  --mf-primary:#7c3aed;
  --mf-accent:#ec4899;
  --mf-bg:#f8fafc;
  --mf-dark:#0f172a;
}
html,body{font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;background:var(--mf-bg);color:#1f2937}
a{color:var(--mf-primary)}
.hero{
  background:linear-gradient(135deg,#fff 0%,#f5f3ff 60%,#fdf2f8 100%);
  border-radius:24px;padding:2rem;box-shadow:0 10px 30px rgba(15,23,42,.08)
}
.card-soft,.panel{
  border:0;border-radius:20px;background:white;box-shadow:0 10px 30px rgba(15,23,42,.08)
}
.form-card{max-width:720px}
.login-page-shell{position:relative;min-height:100vh;display:grid;place-items:center;overflow:hidden;padding:1.5rem;background:#14213d}
.login-background{position:absolute;inset:-24px;background:linear-gradient(135deg,rgba(15,23,42,.42),rgba(88,28,135,.34)),url("images/login-background.png") center/cover no-repeat;filter:blur(14px);transform:scale(1.05);z-index:0}
.login-page-shell::after{content:"";position:absolute;inset:0;background:radial-gradient(circle at 50% 45%,rgba(255,255,255,.28),rgba(15,23,42,.38) 58%,rgba(15,23,42,.66));z-index:1}
.login-panel{position:relative;z-index:2;width:min(100%,440px);border:1px solid rgba(255,255,255,.36);border-radius:8px;background:rgba(255,255,255,.9);box-shadow:0 28px 80px rgba(15,23,42,.35);backdrop-filter:blur(18px);padding:2rem}
.login-brand{display:flex;justify-content:center;margin-bottom:1.5rem}
.login-brand img{height:52px;width:auto}
.login-copy{text-align:center;margin-bottom:1.5rem}
.login-copy h1{font-size:1.75rem;font-weight:800;color:#111827;margin-bottom:.5rem}
.login-copy p{margin:0;color:#64748b}
.login-form{display:grid;gap:1rem}
.login-form .form-label{font-weight:700;color:#334155}
.product-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:1rem}
.product-thumb{aspect-ratio:1/1;object-fit:cover;border-radius:18px}
.page-shell{padding:1.2rem 0 3rem}
.badge-soft{background:#ede9fe;color:#5b21b6}
.navbar-brand{font-weight:800;letter-spacing:.03em}
.sidebar{min-height:calc(100vh - 56px);background:#fff;border-radius:20px;padding:1rem;box-shadow:0 10px 30px rgba(15,23,42,.08)}
.sidebar a{display:block;padding:.75rem 1rem;border-radius:14px;color:#334155;text-decoration:none;margin-bottom:.35rem}
.sidebar a:hover,.sidebar a.active{background:#f5f3ff;color:#5b21b6}
.kpi{padding:1rem;border-radius:18px;background:white;box-shadow:0 10px 30px rgba(15,23,42,.08)}
.upload-zone{border:2px dashed #cbd5e1;border-radius:18px;padding:1.5rem;background:#fff}
.classification-tree{display:grid;gap:.55rem}
.classification-node{width:100%;display:flex;align-items:center;gap:.65rem;border:1px solid #e2e8f0;border-left-width:4px;border-radius:8px;background:#fff;padding:.7rem;text-align:left;color:#1f2937;transition:background .15s,border-color .15s,box-shadow .15s}
.classification-node:hover{background:#f8fafc;border-color:#cbd5e1}
.classification-node.active{background:#eef2ff;border-color:#7c3aed;box-shadow:0 8px 18px rgba(124,58,237,.14)}
.classification-node-catalog{border-left-color:#7c3aed}
.classification-node-category{border-left-color:#0284c7}
.classification-node-subcategory{border-left-color:#16a34a}
.classification-node-rail{flex:0 0 auto;align-self:stretch;border-right:1px solid #e2e8f0}
.classification-node-icon{width:32px;height:32px;display:grid;place-items:center;border-radius:8px;background:#f1f5f9;color:#475569;flex:0 0 32px}
.classification-node-catalog .classification-node-icon{background:#ede9fe;color:#6d28d9}
.classification-node-category .classification-node-icon{background:#e0f2fe;color:#0369a1}
.classification-node-subcategory .classification-node-icon{background:#dcfce7;color:#15803d}
.classification-node-main{min-width:0;display:grid;gap:.12rem;flex:1}
.classification-node-title{display:flex;flex-wrap:wrap;align-items:center;gap:.45rem;line-height:1.2}
.classification-node-path{font-size:.78rem;color:#64748b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.classification-node-meta{display:flex;flex-wrap:wrap;gap:.35rem;color:#64748b;font-size:.72rem}
.classification-node-meta span{border-radius:999px;background:#f1f5f9;padding:.1rem .4rem}
.classification-level-badge{display:inline-flex;align-items:center;border-radius:999px;background:#f8fafc;border:1px solid #e2e8f0;color:#334155;font-size:.72rem;font-weight:700;padding:.12rem .45rem;white-space:nowrap}
.classification-node-image{width:42px;height:42px;border-radius:8px;border:1px solid #e2e8f0;background:#f8fafc;color:#94a3b8;display:grid;place-items:center;overflow:hidden;flex:0 0 42px}
.classification-node-image img{width:100%;height:100%;object-fit:cover}
.classification-legend{display:flex;flex-wrap:wrap;gap:.75rem;color:#64748b;font-size:.82rem}
.classification-legend span{display:inline-flex;align-items:center;gap:.3rem}
.classification-dot{width:10px;height:10px;border-radius:50%;display:inline-block}
.classification-dot.catalog{background:#7c3aed}
.classification-dot.category{background:#0284c7}
.classification-dot.subcategory{background:#16a34a}
.classification-selection{display:flex;justify-content:space-between;gap:1rem;align-items:center;border:1px solid #e2e8f0;border-radius:8px;background:#fff;box-shadow:0 10px 30px rgba(15,23,42,.08)}
.classification-selection-stats{display:flex;flex-wrap:wrap;gap:.6rem}
.classification-selection-stats span{border-radius:8px;background:#f8fafc;border:1px solid #e2e8f0;padding:.45rem .65rem;color:#475569}
.footer{color:#64748b;font-size:.95rem;padding:1rem 0}
.table thead th{font-size:.85rem;text-transform:uppercase;color:#64748b}
.btn-primary{background:var(--mf-primary);border-color:var(--mf-primary)}
.btn-outline-primary{color:var(--mf-primary);border-color:var(--mf-primary)}
.btn-outline-primary:hover{background:var(--mf-primary);border-color:var(--mf-primary)}
.order-status-panel{border:1px solid #e5e7eb;border-radius:8px;background:#fff;padding:1rem}
.order-status-panel.is-cancelled{border-color:#fecaca;background:#fff7f7}
.order-status-badge{font-size:.9rem;padding:.45rem .65rem}
.status-actions{display:flex;flex-wrap:wrap;gap:.5rem;justify-content:flex-start}
.order-status-stepper{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:0;overflow-x:auto;overflow-y:hidden}
.order-status-step{position:relative;display:flex;flex-direction:column;align-items:center;text-align:center;min-width:0;padding:0 .35rem;color:#64748b}
.order-status-step::before{content:"";position:absolute;top:16px;left:0;right:50%;height:2px;background:#e5e7eb;z-index:0}
.order-status-step::after{content:"";position:absolute;top:16px;left:50%;right:0;height:2px;background:#e5e7eb;z-index:0}
.order-status-step:first-child::before,.order-status-step:last-child::after{display:none}
.order-status-step.completed::before,.order-status-step.completed::after,.order-status-step.active::before{background:#16a34a}
.step-marker{position:relative;z-index:1;width:34px;height:34px;border-radius:50%;border:2px solid #cbd5e1;background:#fff;margin-bottom:.55rem}
.order-status-step.completed .step-marker{background:#16a34a;border-color:#16a34a}
.order-status-step.completed .step-marker::after{content:"";position:absolute;left:10px;top:6px;width:9px;height:15px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg)}
.order-status-step.active .step-marker{border-color:var(--mf-primary);box-shadow:0 0 0 5px #ede9fe}
.order-status-step.active .step-marker::after{content:"";position:absolute;inset:8px;border-radius:50%;background:var(--mf-primary)}
.step-title{font-weight:700;color:#334155;font-size:.82rem;line-height:1.15}
.order-status-step.active .step-title{color:var(--mf-primary)}
.order-status-step.completed .step-title{color:#166534}
.step-description{font-size:.72rem;line-height:1.2;margin-top:.15rem}
@media (max-width: 767.98px){
  .login-page-shell{padding:1rem}
  .login-panel{padding:1.5rem}
  .order-status-stepper{display:flex;flex-direction:column;gap:0}
  .order-status-step{align-items:flex-start;text-align:left;min-height:58px;padding:0 0 1rem 3rem}
  .order-status-step::before{top:0;bottom:50%;left:16px;right:auto;width:2px;height:auto}
  .order-status-step::after{top:18px;bottom:0;left:16px;right:auto;width:2px;height:auto}
  .step-marker{position:absolute;left:0;top:0;margin-bottom:0}
  .status-actions{width:100%}
  .classification-selection{align-items:flex-start;flex-direction:column}
  .classification-node{gap:.5rem}
  .classification-node-rail{display:none}
}
