/* Figma node 4:56 — Elegant AI Sidebar — Desktop */
:root {
  --elegant-accent-primary: #6341ef;
  --elegant-bg-nav-active: #f0ebff;
  --elegant-bg-icon-active: #eadcff;
  --elegant-bg-icon-default: #f3f4f6;
  --elegant-text-primary: #11181f;
  --elegant-text-secondary: #9ca3af;
  --elegant-text-brand: #6d3df5;
  --elegant-border-default: #e5e7eb;
}

html, body { max-width: 100%; overflow-x: hidden; }
body { min-height: 100vh; margin: 0; background: #f6f6f7; }
.app-shell { display: flex; width: 100%; min-width: 0; min-height: 100dvh; }
.app-sidebar {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: 260px;
  min-width: 260px;
  flex-shrink: 0;
  height: 100dvh;
  padding: 16px;
  overflow: hidden;
  color: var(--elegant-text-primary);
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}
.sidebar-brand-store { display: flex; flex: 0 0 112px; flex-direction: column; gap: 14px; width: 208px; overflow: hidden; }
.sidebar-brand { display: flex; gap: 10px; align-items: flex-start; height: 38px; }
.brand-mark { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; overflow: hidden; border-radius: 12px; background: var(--elegant-accent-primary); }
.brand-mark img { display: block; width: 19px; height: 19px; }
.brand-copy { display: flex; flex-direction: column; gap: 2px; white-space: nowrap; }
.brand-copy strong { font-size: 18px; font-weight: 600; line-height: 24px; }
.brand-copy span { color: var(--elegant-text-brand); font-size: 12px; font-weight: 400; line-height: 16px; }
.connected-store { display: flex; align-items: center; gap: 8px; width: 208px; height: 48px; padding: 0 10px; overflow: hidden; border-radius: 12px; background: #fafafa; }
.store-icon { flex: 0 0 16px; width: 16px; height: 22px; }
.store-copy { display: flex; flex: 1 1 0; flex-direction: column; gap: 2px; min-width: 0; font-size: 12px; line-height: 16px; white-space: nowrap; }
.store-copy span { color: var(--elegant-text-secondary); font-weight: 400; }
.store-copy strong { overflow: hidden; color: var(--elegant-text-primary); font-weight: 600; text-overflow: ellipsis; }
.store-status { display: grid; flex: 0 0 auto; place-items: center; min-width: 48px; height: 22px; padding: 0 7px; color: #64748b; border: 1px solid #dbe3ec; border-radius: 14px; background: #f8fafc; font: inherit; font-size: 11px; line-height: 16px; }
.connected-store[data-state="connected"] .store-status { color: #15803d; border-color: #b7f0c9; background: #f0fff4; }
.connected-store[data-state="failed"] { height: auto; min-height: 48px; padding-block: 7px; }
.connected-store[data-state="failed"] .store-copy { white-space: normal; }
.connected-store[data-state="failed"] .store-status { color: #b42318; border-color: #fecaca; background: #fff1f2; cursor: pointer; }
.connected-store[data-state="failed"] .store-status:disabled { cursor: default; }
.sidebar-divider { width: 208px; height: 1px; background: var(--elegant-border-default); }
.sidebar-navigation { display: flex; flex: 0 1 830px; flex-direction: column; gap: 10px; width: 208px; min-height: 0; padding-top: 0; overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; }
.sidebar-section { display: flex; flex: 0 0 auto; flex-direction: column; gap: 3px; width: 100%; }
.sidebar-section > p { height: 18px; margin: 0; color: var(--elegant-text-secondary); font-size: 13px; font-weight: 500; line-height: 18px; }
.sidebar-nav-item { position: relative; display: flex; gap: 9px; align-items: center; width: 100%; height: 48px; padding: 0 9px; color: var(--elegant-text-primary); border: 0; border-radius: 0; background: transparent; text-align: left; }
.sidebar-nav-item:hover, .sidebar-nav-item:focus-visible { outline: 0; background: #f7f5ff; }
.sidebar-nav-item:disabled { cursor: default; opacity: .62; }
.sidebar-nav-item:disabled:hover { background: transparent; }
.sidebar-nav-item.figma-active, .sidebar-nav-item.is-current { background: var(--elegant-bg-nav-active); }
.sidebar-icon { display: grid; flex: 0 0 30px; place-items: center; width: 30px; height: 30px; overflow: hidden; border-radius: 9px; background: var(--elegant-bg-icon-default); }
.figma-active .sidebar-icon, .is-current .sidebar-icon { background: var(--elegant-bg-icon-active); }
.sidebar-icon img { display: block; width: 18px; height: 18px; }
.sidebar-nav-copy { display: flex; flex: 1 1 0; flex-direction: column; gap: 2px; min-width: 0; overflow: hidden; white-space: nowrap; }
.sidebar-nav-copy b { color: var(--elegant-text-primary); font-size: 15px; font-weight: 400; line-height: 20px; }
.sidebar-nav-copy small { overflow: hidden; color: var(--elegant-text-secondary); font-size: 12px; font-weight: 400; line-height: 16px; letter-spacing: 0; text-overflow: ellipsis; }
.sidebar-badge { position: absolute; right: 6px; display: grid; place-items: center; min-width: 36px; height: 22px; padding: 0 9px; color: #fff; border-radius: 12px; background: var(--elegant-accent-primary); font-size: 12px; font-weight: 400; line-height: 16px; }
.ai-cost-footer { position: relative; display: flex; flex: 0 0 64px; flex-direction: column; gap: 6px; width: 208px; margin-top: auto; padding-top: 12px; background: #fff; }
.ai-cost-footer::before { position: absolute; top: 0; right: 0; left: 0; height: 1px; background: var(--elegant-border-default); content: ""; }
.ai-cost-summary { display: flex; align-items: center; justify-content: space-between; height: 20px; font-size: 15px; line-height: 20px; }
.ai-cost-summary strong { font-weight: 600; }
.ai-cost-summary span { color: var(--elegant-text-brand); font-size: 12px; font-weight: 600; line-height: 16px; }
.ai-cost-progress { width: 208px; height: 5px; overflow: hidden; border-radius: 5px; background: var(--elegant-border-default); }
.ai-cost-progress i { display: block; width: 111px; height: 5px; border-radius: 5px; background: var(--elegant-accent-primary); }
.ai-cost-footer p { margin: 0; color: var(--elegant-text-secondary); font-size: 12px; font-weight: 400; line-height: 16px; white-space: nowrap; }

main { box-sizing: border-box; flex: 1 1 auto; width: calc(100% - 260px); max-width: 100%; min-width: 0; min-height: 100dvh; margin: 0; padding: 16px 18px 28px; overflow-x: hidden; }
main, main > section, main > section > div { min-width: 0; }
main > section { max-width: 1280px; }
#notice { max-width: 1280px; }
.drawer { z-index: 40; }
.hidden { display: none !important; }


@media (max-width: 900px) {
  .app-shell { display: block; }
  .app-sidebar { width: 100%; min-width: 0; height: auto; min-height: 0; padding: 18px 20px; }
  .sidebar-brand-store { flex-basis: auto; }
  .sidebar-navigation { flex: 0 0 auto; max-height: 318px; padding-top: 14px; overflow-y: auto; }
  .ai-cost-footer { display: none; }
  main { width: 100%; min-height: auto; margin: 0; padding: 18px; }
}
