:root {
  --trdl-purple-950: #24102f;
  --trdl-purple-900: #321342;
  --trdl-purple-800: #46175f;
  --trdl-purple-700: #5a2376;
  --trdl-gold-500: #d7ae31;
  --trdl-gold-400: #e5c45e;
  --trdl-ink: #211b25;
  --trdl-muted: #716a75;
  --trdl-canvas: #f6f4f7;
  --trdl-surface: #ffffff;
  --trdl-line: #e8e2eb;
  --trdl-success: #1d7a50;
  --trdl-danger: #b42335;
  --trdl-sidebar: 272px;
  --trdl-topbar: 72px;
  --trdl-radius: 18px;
  --trdl-shadow: 0 12px 34px rgba(42, 18, 54, .08);
}

body.trdl-shell-ready {
  margin: 0 !important;
  padding: 0 !important;
  min-height: 100vh;
  background: var(--trdl-canvas) !important;
  color: var(--trdl-ink);
}

.trdl-admin-shell, .trdl-admin-shell * { box-sizing: border-box; }
.trdl-admin-shell { min-height: 100vh; }
.trdl-skip-link { position: fixed; left: 12px; top: -60px; z-index: 9999; padding: 10px 14px; border-radius: 10px; background: #fff; color: var(--trdl-purple-900); font-weight: 800; }
.trdl-skip-link:focus { top: 10px; }

.trdl-sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 1100; width: var(--trdl-sidebar);
  display: flex; flex-direction: column; overflow-y: auto; color: #fff;
  background:
    radial-gradient(circle at 30% 0, rgba(215,174,49,.20), transparent 25%),
    linear-gradient(180deg, var(--trdl-purple-950), var(--trdl-purple-800));
  box-shadow: 10px 0 30px rgba(36,16,47,.12);
}
.trdl-brand { display: flex; align-items: center; gap: 12px; padding: 22px 20px 18px; color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.10); }
.trdl-brand-mark { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 14px; background: linear-gradient(145deg, var(--trdl-gold-400), var(--trdl-gold-500)); color: var(--trdl-purple-950); font-size: 18px; font-weight: 900; box-shadow: 0 7px 18px rgba(0,0,0,.18); }
.trdl-brand-copy strong { display: block; font-size: 17px; line-height: 1.15; letter-spacing: -.02em; }
.trdl-brand-copy span { display: block; margin-top: 3px; color: rgba(255,255,255,.64); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.trdl-sidebar-nav { padding: 16px 12px 22px; }
.trdl-nav-label { padding: 15px 12px 7px; color: rgba(255,255,255,.45); font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.trdl-nav-link { position: relative; display: flex; align-items: center; gap: 12px; min-height: 43px; margin: 3px 0; padding: 10px 12px; border-radius: 12px; color: rgba(255,255,255,.78); text-decoration: none; font-size: 14px; font-weight: 700; transition: background .16s ease, color .16s ease, transform .16s ease; }
.trdl-nav-link:hover { color: #fff; background: rgba(255,255,255,.09); transform: translateX(2px); }
.trdl-nav-link.active { color: #fff; background: linear-gradient(90deg, rgba(215,174,49,.24), rgba(255,255,255,.10)); box-shadow: inset 3px 0 0 var(--trdl-gold-400); }
.trdl-nav-link.active .trdl-nav-icon { color: var(--trdl-gold-400); }
.trdl-nav-icon { display: grid; place-items: center; width: 20px; height: 20px; flex: 0 0 20px; color: rgba(255,255,255,.68); }
.trdl-nav-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.trdl-sidebar-foot { margin-top: auto; padding: 14px 12px 18px; border-top: 1px solid rgba(255,255,255,.09); }

.trdl-workspace { min-height: 100vh; margin-left: var(--trdl-sidebar); }
.trdl-topbar { position: sticky; top: 0; z-index: 900; height: var(--trdl-topbar); display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 28px; border-bottom: 1px solid rgba(70,23,95,.10); background: rgba(255,255,255,.90); backdrop-filter: blur(16px); }
.trdl-topbar-left, .trdl-topbar-actions { display: flex; align-items: center; gap: 12px; min-width: 0; }
.trdl-menu-button, .trdl-icon-button { display: inline-grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--trdl-line); border-radius: 12px; background: #fff; color: var(--trdl-purple-900); cursor: pointer; }
.trdl-menu-button { display: none; }
.trdl-menu-button svg, .trdl-icon-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.trdl-page-heading { min-width: 0; }
.trdl-page-heading h1 { margin: 0; overflow: hidden; color: var(--trdl-purple-950); font-size: 19px; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.trdl-page-heading p { margin: 3px 0 0; color: var(--trdl-muted); font-size: 12px; }
.trdl-search-button { display: flex; align-items: center; gap: 10px; min-width: 240px; padding: 10px 12px; border: 1px solid var(--trdl-line); border-radius: 12px; background: #faf9fb; color: var(--trdl-muted); cursor: pointer; text-align: left; }
.trdl-search-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; }
.trdl-search-button kbd { margin-left: auto; padding: 2px 6px; border: 1px solid #ddd5e0; border-radius: 6px; background: #fff; color: #807787; font: 11px Arial,sans-serif; }
.trdl-view-store { display: inline-flex; align-items: center; gap: 7px; padding: 10px 13px; border-radius: 11px; background: var(--trdl-purple-900); color: #fff; text-decoration: none; font-size: 13px; font-weight: 800; }
.trdl-content { min-width: 0; padding: 26px 28px 50px; }
.trdl-content > .wrap, .trdl-content > .container { width: 100% !important; max-width: 1540px !important; margin: 0 auto !important; padding: 0 !important; }

body.trdl-shell-ready .trdl-legacy-nav { display: none !important; }
body.trdl-shell-ready > .navbar, body.trdl-shell-ready .trdl-content > .navbar { display: none !important; }
body.trdl-shell-ready .hero { margin-top: 0; border-radius: var(--trdl-radius); box-shadow: var(--trdl-shadow); }
body.trdl-shell-ready .hero h1 { font-size: clamp(28px, 3vw, 40px); }
body.trdl-shell-ready .card, body.trdl-shell-ready .panel, body.trdl-shell-ready .stat { border-color: var(--trdl-line); box-shadow: var(--trdl-shadow); }
body.trdl-shell-ready table { background: #fff; }
body.trdl-shell-ready .table-wrap { max-width: 100%; overflow-x: auto; }
body.trdl-shell-ready input:focus, body.trdl-shell-ready select:focus, body.trdl-shell-ready textarea:focus { outline: 3px solid rgba(90,35,118,.13); border-color: var(--trdl-purple-700); }

.trdl-overlay { position: fixed; inset: 0; z-index: 1040; visibility: hidden; background: rgba(22,10,28,.48); opacity: 0; transition: opacity .2s ease, visibility .2s ease; }
.trdl-command { position: fixed; inset: 0; z-index: 2000; display: none; align-items: flex-start; justify-content: center; padding: min(14vh,120px) 18px 18px; background: rgba(24,10,31,.50); backdrop-filter: blur(4px); }
.trdl-command.open { display: flex; }
.trdl-command-box { width: min(620px,100%); overflow: hidden; border: 1px solid var(--trdl-line); border-radius: 18px; background: #fff; box-shadow: 0 30px 80px rgba(25,8,33,.28); }
.trdl-command-input { width: 100%; padding: 18px 20px !important; border: 0 !important; border-bottom: 1px solid var(--trdl-line) !important; border-radius: 0 !important; font-size: 17px; }
.trdl-command-list { max-height: 390px; overflow-y: auto; padding: 8px; }
.trdl-command-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 13px; border-radius: 11px; color: var(--trdl-ink); text-decoration: none; font-weight: 700; }
.trdl-command-item:hover, .trdl-command-item:focus { background: #f3eef6; color: var(--trdl-purple-800); outline: none; }
.trdl-command-item span:last-child { color: var(--trdl-muted); font-size: 12px; font-weight: 500; }
.trdl-command-empty { padding: 24px; color: var(--trdl-muted); text-align: center; }

body.trdl-login-page { display: grid; min-height: 100vh; place-items: center; padding: 24px !important; background: radial-gradient(circle at 10% 0, rgba(215,174,49,.17), transparent 28%), linear-gradient(140deg,var(--trdl-purple-950),var(--trdl-purple-800)) !important; }
body.trdl-login-page .card, body.trdl-login-page .login-card { border: 1px solid rgba(255,255,255,.55); border-radius: 22px; box-shadow: 0 30px 70px rgba(20,7,26,.30); }

@media (max-width: 1120px) {
  .trdl-search-button { min-width: 0; width: 44px; padding: 11px 12px; }
  .trdl-search-button span, .trdl-search-button kbd { display: none; }
}
@media (max-width: 960px) {
  .trdl-sidebar { transform: translateX(-102%); transition: transform .22s ease; }
  .trdl-sidebar.open { transform: translateX(0); }
  .trdl-overlay.open { visibility: visible; opacity: 1; }
  .trdl-workspace { margin-left: 0; }
  .trdl-menu-button { display: inline-grid; }
  .trdl-content { padding: 20px 18px 40px; }
  .trdl-topbar { padding: 0 18px; }
  body.trdl-nav-open { overflow: hidden; }
}
@media (max-width: 640px) {
  .trdl-topbar { height: 64px; padding: 0 12px; }
  .trdl-page-heading p, .trdl-view-store { display: none; }
  .trdl-content { padding: 15px 12px 32px; }
  body.trdl-shell-ready .hero { padding: 20px !important; }
  body.trdl-shell-ready .hero h1 { font-size: 28px !important; }
  body.trdl-shell-ready .card { border-radius: 15px; }
}
@media print {
  .trdl-sidebar, .trdl-topbar, .trdl-overlay, .trdl-command { display: none !important; }
  .trdl-workspace { margin: 0; }
  .trdl-content { padding: 0; }
}
