/* Shared shell colors; layout controls remain in site.css. */
.app-body {
  --primary: #6545bc;
  --primary-hover: #503299;
  --primary-soft: #f0eafc;
  --border: #e8e4ef;
  --muted: #716c7e;
  --text: #292333;
  background: #f7f6fa;
}
.sidebar {
  background: #503295;
  border-color: transparent;
  color: white;
}
.sidebar nav { scrollbar-color: #9982be transparent; }
.sidebar .brand, .sidebar .brand-copy strong, .sidebar .drawer-close { color: white; }
.sidebar .brand-mark { background: #fff; color: #553991; }
.sidebar .brand-mark span { color: #a78ecf; }
.sidebar .brand-copy small, .sidebar .nav-label, .sidebar .sidebar-foot { color: #e0d4f1; }
.sidebar .nav-link { color: #f2ebff; }
.sidebar .nav-link:hover, .sidebar .drawer-close:hover { background: #ffffff1c; color: white; }
.sidebar .nav-link.is-active { background: #f4edff; color: #4e2e94; }
.sidebar .sidebar-foot { border-color: #ffffff2b; }
.sidebar .status-dot { background: #b9a1e5; }
.header-sale { white-space: nowrap; }
.header-date { color: var(--muted); font-size: 12px; }
#module-search nav { display: grid; max-height: 44vh; overflow: auto; margin-top: 12px; }
#module-search nav a { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 8px; }
#module-search nav a:hover { background: var(--primary-soft); }
@media (min-width: 1024px) {
  .sidebar-compact .sidebar { inset: 10px auto 10px 9px; width: 63px; border-radius: 17px; padding: 17px 7px; box-shadow: 0 5px 16px #48306c24; }
  .sidebar-compact .sidebar .brand { padding: 0 6px 14px; }
  .sidebar-compact .nav-group { margin: 5px 0; border-top: 1px solid #ffffff25; padding-top: 5px; }
  .sidebar-compact .nav-link { margin: 3px 1px; padding: 8px; min-height: 36px; }
}

.executive { display: grid; gap: 18px; }
.executive h2, .executive h3 { letter-spacing: -.045em; margin: 0; }
.executive h2 { font-size: 20px; }
.executive h3 { font-size: 16px; }
.welcome {
  display: flex; align-items: center; gap: 18px; position: relative;
  padding: 22px 26px; border: 1px solid #e1d9ec; border-radius: 18px;
  background: #f0eafa; min-height: 127px;
}
.welcome > div:first-child { flex: 1; }
.welcome-date { color: #645770; font-size: 12px; }
.welcome-date:first-letter { text-transform: uppercase; }
.welcome h1 { font-size: clamp(28px, 3vw, 43px); letter-spacing: -.055em; margin: 5px 0 6px; line-height: 1.12; }
.welcome p { color: #625969; margin: 0; font-size: 13px; }
.swatch-art { width: clamp(100px, 12vw, 170px); height: auto; }
.shortcuts { display: flex; flex-wrap: wrap; gap: 7px; }
.shortcuts a { display: grid; gap: 7px; justify-items: center; align-content: center; min-width: 68px; padding: 13px 9px; background: #fffc; border: 1px solid #e4dcec; border-radius: 11px; color: #41364c; font-size: 11px; font-weight: 600; }
.shortcuts .icon { color: var(--primary); }
.shortcuts a:hover { background: #fff; border-color: #b6a2ce; }
.overview-head, .sheet header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.period-picker { position: relative; z-index: 5; }
.period-picker summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12px; font-weight: 600; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border); background: white; }
.period-picker summary .icon { width: 14px; height: 14px; }
.period-picker form { position: absolute; right: 0; top: 100%; margin: 5px 0; padding: 15px; width: min(330px, 88vw); background: white; box-shadow: 0 8px 25px #30213e20; border: 1px solid var(--border); border-radius: 12px; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(135px,1fr)); gap: 12px; }
.metric, .sheet { background: white; border: 1px solid var(--border); border-radius: 13px; box-shadow: 0 2px 5px #3e295905; min-width: 0; }
.metric { padding: 15px 14px; transition: border-color 180ms, transform 180ms; }
.metric:hover { border-color: #c5b3de; transform: translateY(-2px); }
.metric-name { display: flex; gap: 7px; align-items: center; font-size: 12px; font-weight: 600; color: #554b61; }
.metric-name i, .activity-symbol { display: inline-grid; place-items: center; background: #eee8f9; color: #6c4ba6; border-radius: 8px; }
.metric-name i { flex: none; width: 28px; height: 28px; }
.metric-name .icon { width: 16px; height: 16px; }
.metric:nth-child(3n + 2) i { color: #527f74; background: #e6f1ed; }
.metric:nth-child(3n) i { color: #976232; background: #fbefdc; }
.metric > strong { display: block; font-size: clamp(20px, 1.8vw, 29px); white-space: normal; overflow-wrap: anywhere; margin: 11px 0 1px; }
.metric > small { font-size: 11px; color: var(--muted); margin-top: 0; }
.metric .delta { margin-top: 4px; color: #62517a; }
.insights, .secondary { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(0,1fr); gap: 16px; }
.sheet { padding: 20px; }
.sheet header { margin-bottom: 15px; flex-wrap: wrap; }
.sheet header > .icon { color: #8c76ac; }
.sheet header a, .stock-alerts a { font-size: 12px; }
.sheet-label { font-size: 11px; color: var(--muted); }
.chart-total { font-size: 24px; letter-spacing: -.045em; }
.plot svg { width: 100%; max-height: 190px; display: block; overflow: visible; }
.guide { fill: none; stroke: #e7e2ee; stroke-dasharray: 3 4; }
.curve { fill: none; stroke: #7954c4; stroke-width: 2.7; stroke-linejoin: round; }
.area { fill: #f3eefa; }
.plot circle { fill: #fff; stroke: #7954c4; stroke-width: 2; cursor: crosshair; }
.plot circle:focus, .plot circle:hover { fill: #7954c4; }
.axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }
.axis span:nth-child(2) { color: #7254ab; }
.switches { display: flex; padding: 3px; gap: 2px; background: #f3f0f7; border-radius: 8px; }
.switches button { border: 0; color: #645a70; background: transparent; padding: 6px 9px; font-size: 11px; font-weight: 600; border-radius: 6px; }
.switches button[aria-pressed=true] { color: #5a399a; background: #fff; box-shadow: 0 1px 3px #3d27421c; }
.pay-layout { display: grid; justify-items: center; gap: 8px; }
.donut { width: 140px; position: relative; }
.donut svg { display: block; width: 100%; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 10px; }
.ring-base { stroke: #f0edf5; }
.ring-piece { stroke: var(--mark); cursor: pointer; }
.donut > div { position: absolute; inset: 0; display: grid; align-content: center; text-align: center; pointer-events: none; }
.donut small { color: var(--muted); font-size: 11px; }
.donut b { font-size: 16px; }
.pay-legend { width: 100%; }
.pay-legend > div, .stock-legend > div { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 12px; }
.pay-legend b, .stock-legend b { margin-left: auto; }
.pay-legend i, .stock-legend i { background: var(--mark); width: 9px; height: 9px; border-radius: 3px; }
.rank { display: grid; grid-template-columns: 1fr auto; gap: 5px 10px; padding: 6px 0; font-size: 12px; }
.rank i { grid-column: 1/-1; background: #f2eff7; height: 7px; border-radius: 4px; overflow: hidden; }
.rank em { display: block; height: 100%; background: #9678ce; border-radius: 4px; }
.stock-band { display: flex; gap: 2px; height: 12px; background: #f1edf5; border-radius: 6px; overflow: hidden; margin: 12px 0; }
[data-stock="Disponible"] { --mark: #609d8c; }
[data-stock="Stock bajo"] { --mark: #dbab66; }
[data-stock="Agotado"] { --mark: #bd7387; }
.stock-band i { background: var(--mark); }
.stock-alerts { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 9px; }
.stock-alerts summary { cursor: pointer; font-size: 12px; font-weight: 600; }
.stock-alerts a, .stock-alerts small { display: block; padding-top: 5px; }
.graph-tooltip { position: fixed; z-index: 70; max-width: min(320px,90vw); pointer-events: none; background: #30253e; color: white; font-size: 12px; padding: 6px 10px; border-radius: 7px; }
.executive .activity-row { color: var(--text); }
.executive .activity-row:hover { color: var(--primary); background: #faf8fd; }
.executive .activity-grid { gap: 16px; }
@media (max-width: 1200px) {
  .metric-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .swatch-art { width: 112px; }
}
@media (max-width: 800px) {
  .swatch-art { display: none; }
  .welcome { flex-wrap: wrap; }
  .insights, .secondary { grid-template-columns: 1fr; }
  .pay-layout { grid-template-columns: minmax(100px,150px) 1fr; align-items: center; gap: 20px; }
  .header-date { display: none; }
}
@media (max-width: 560px) {
  .welcome { padding: 16px; display: grid; gap: 14px; }
  .shortcuts { display: grid; grid-template-columns: repeat(4,1fr); gap: 5px; }
  .shortcuts a { min-width: 0; font-size: 10px; padding: 9px 4px; }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .metric { padding: 12px; }
  .metric-name { font-size: 11px; }
  .overview-head { align-items: start; flex-wrap: wrap; }
  .period-picker form { right: auto; left: 0; }
  .period-picker { position: static; }
  .overview-head { position: relative; }
  .period-picker form { left: 0; right: 0; width: 100%; }
  .sheet { padding: 15px; }
  .header-sale { padding: 7px 10px; font-size: 11px; }
  .header-left { overflow: hidden; }
  .breadcrumb strong { overflow: hidden; text-overflow: ellipsis; }
  .donut { width: 112px; }
  .pay-layout { grid-template-columns: 112px 1fr; gap: 10px; }
}
@media print { .graph-tooltip,.shortcuts,.period-picker,.switches { display: none; } }

