:root {
  --totchi-primary: #7C3AED;
  --totchi-primary-dark: #6D28D9;
  --totchi-lavender: #A78BFA;
  --totchi-pink: #F43F5E;
  --totchi-green: #10B981;
  --totchi-text: #111827;
  --totchi-muted: #4B5563;
  --totchi-border: #E5E7EB;
  --totchi-bg: #F8F9FC;
  --totchi-white: #FFFFFF;
  --totchi-sidebar: 250px;
  --totchi-topbar: 74px;
}

.totchi-dashboard-page #masthead,
.totchi-dashboard-page .site-header,
.totchi-dashboard-page footer,
.totchi-dashboard-page .site-footer,
.totchi-dashboard-page .entry-header {
  display: none !important;
}

.totchi-dashboard-page .site-content,
.totchi-dashboard-page .ast-container,
.totchi-dashboard-page #primary,
.totchi-dashboard-page .content-area,
.totchi-dashboard-page .site-main,
.totchi-dashboard-page .site-main > article,
.totchi-dashboard-page .entry-content {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.totchi-dashboard-page {
  background: var(--totchi-bg) !important;
}

.totchi-app,
.totchi-app * {
  box-sizing: border-box;
}

.totchi-app {
  width: 100vw;
  min-height: 100vh;
  margin-inline-start: calc(50% - 50vw);
  background: var(--totchi-bg);
  color: var(--totchi-text);
  font-family: Dana, Dana-regular, Tahoma, sans-serif;
  direction: rtl;
}

.totchi-app a { text-decoration: none; }
.totchi-app svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.totchi-topbar {
  height: var(--totchi-topbar);
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--totchi-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  backdrop-filter: blur(12px);
}

body.admin-bar .totchi-topbar { top: 32px; }

.totchi-topbar-right,
.totchi-topbar-left,
.totchi-brand,
.totchi-channel-nav,
.totchi-user-chip { display: flex; align-items: center; }

.totchi-topbar-right { gap: 28px; min-width: 0; }
.totchi-topbar-left { gap: 10px; }

.totchi-brand { gap: 10px; color: var(--totchi-text); flex: 0 0 auto; }
.totchi-brand-name { font-family: Peyda, Dana, sans-serif; font-size: 23px; font-weight: 800; }
.totchi-brand-mark { width: 32px; height: 32px; position: relative; display: inline-block; }
.totchi-brand-mark span { position: absolute; width: 13px; height: 13px; border-radius: 50%; background: var(--totchi-primary); box-shadow: 0 5px 12px rgba(124,58,237,.22); }
.totchi-brand-mark span:nth-child(1) { right: 4px; top: 5px; }
.totchi-brand-mark span:nth-child(2) { left: 4px; top: 5px; background: var(--totchi-lavender); }
.totchi-brand-mark span:nth-child(3) { right: 9px; bottom: 4px; background: var(--totchi-primary-dark); }
.totchi-brand-mark span:nth-child(4) { width: 8px; height: 8px; left: 1px; bottom: 3px; background: var(--totchi-pink); }

.totchi-channel-nav { gap: 6px; overflow-x: auto; scrollbar-width: none; }
.totchi-channel-nav::-webkit-scrollbar { display: none; }
.totchi-channel { min-height: 38px; padding: 8px 14px; border-radius: 10px; color: var(--totchi-muted); font-size: 14px; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; transition: .2s ease; }
.totchi-channel:hover { background: #F5F3FF; color: var(--totchi-primary); }
.totchi-channel.is-active { color: var(--totchi-primary); background: #F3EEFF; font-weight: 700; }
.totchi-channel.is-disabled { color: #9CA3AF; cursor: default; }
.totchi-channel.is-disabled small { color: #8B5CF6; background: #F3E8FF; border-radius: 999px; padding: 2px 6px; font-size: 9px; }

.totchi-icon-button { width: 40px; height: 40px; border: 1px solid var(--totchi-border); border-radius: 12px; background: #fff; color: #6B7280; display: grid; place-items: center; position: relative; cursor: pointer; padding: 0; }
.totchi-notification-dot { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--totchi-pink); top: 7px; right: 8px; border: 1.5px solid #fff; }
.totchi-user-chip { gap: 9px; border-right: 1px solid var(--totchi-border); padding-right: 12px; }
.totchi-avatar { width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(145deg,#7C3AED,#A78BFA); color: #fff; display: grid; place-items: center; font-weight: 800; }
.totchi-user-meta { display: flex; flex-direction: column; line-height: 1.45; }
.totchi-user-meta strong { font-size: 13px; color: var(--totchi-text); }
.totchi-user-meta small { font-size: 11px; color: var(--totchi-primary); }

.totchi-layout { min-height: calc(100vh - var(--totchi-topbar)); display: grid; grid-template-columns: var(--totchi-sidebar) minmax(0,1fr); }
.totchi-sidebar { width: var(--totchi-sidebar); background: #fff; border-left: 1px solid var(--totchi-border); padding: 22px 14px 18px; position: sticky; top: var(--totchi-topbar); height: calc(100vh - var(--totchi-topbar)); overflow-y: auto; display: flex; flex-direction: column; z-index: 45; }
body.admin-bar .totchi-sidebar { top: calc(var(--totchi-topbar) + 32px); height: calc(100vh - var(--totchi-topbar) - 32px); }

.totchi-sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 0 9px 16px; border-bottom: 1px solid #F0F1F4; font-weight: 700; font-size: 14px; }
.totchi-status-pill { display: inline-flex; align-items: center; gap: 6px; color: #047857; background: #ECFDF5; border-radius: 999px; padding: 5px 9px; font-size: 11px; font-weight: 700; }
.totchi-status-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--totchi-green); }

.totchi-sidebar-nav { padding-top: 14px; display: flex; flex-direction: column; gap: 5px; }
.totchi-side-link { min-height: 44px; border-radius: 11px; padding: 10px 11px; display: flex; align-items: center; gap: 11px; color: #5F6673; font-size: 14px; transition: .18s ease; }
.totchi-side-link:hover { color: var(--totchi-primary); background: #F7F5FF; }
.totchi-side-link.is-active { color: var(--totchi-primary); background: #F2EDFF; font-weight: 700; }
.totchi-side-icon { display: grid; place-items: center; width: 22px; color: #858C98; }
.totchi-side-link.is-active .totchi-side-icon { color: var(--totchi-primary); }

.totchi-plan-card { margin-top: auto; background: linear-gradient(145deg,#F8F5FF,#F1ECFF); border: 1px solid #E6DEFF; border-radius: 16px; padding: 14px; }
.totchi-plan-card-top { display: flex; justify-content: space-between; align-items: center; color: var(--totchi-text); font-size: 13px; font-weight: 700; }
.totchi-plan-card-top strong { color: var(--totchi-primary); }
.totchi-progress { height: 6px; margin: 10px 0 8px; border-radius: 999px; background: #E5DEFA; overflow: hidden; }
.totchi-progress span { display: block; height: 100%; background: var(--totchi-primary); border-radius: inherit; }
.totchi-plan-card small { display: block; color: #777E8A; font-size: 10px; margin-bottom: 10px; }
.totchi-plan-card a { display: block; text-align: center; padding: 8px; border-radius: 9px; color: var(--totchi-primary); background: #fff; border: 1px solid #DDD3FF; font-size: 12px; font-weight: 700; }

.totchi-main { min-width: 0; padding: 34px; }
.totchi-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.totchi-eyebrow { color: var(--totchi-primary); font-size: 12px; font-weight: 700; }
.totchi-page-head h1 { margin: 5px 0 5px !important; font-family: Peyda, Dana, sans-serif; color: var(--totchi-text); font-size: 29px; line-height: 1.35; font-weight: 800; }
.totchi-page-head p { margin: 0 !important; color: #6B7280; font-size: 14px; }
.totchi-page-actions { display: flex; align-items: center; gap: 10px; }
.totchi-last-sync { display: inline-flex; align-items: center; gap: 6px; color: #7A828F; font-size: 12px; }
.totchi-last-sync svg { width: 16px; height: 16px; }

.totchi-btn { border: 0; border-radius: 10px; min-height: 40px; padding: 9px 16px; font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.totchi-btn-primary { background: var(--totchi-primary); color: #fff !important; box-shadow: 0 7px 18px rgba(124,58,237,.18); }
.totchi-btn-primary:hover { background: var(--totchi-primary-dark); }

.totchi-kpi-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 16px; }
.totchi-kpi-card { background: #fff; border: 1px solid var(--totchi-border); border-radius: 16px; padding: 18px; box-shadow: 0 4px 18px rgba(17,24,39,.025); }
.totchi-kpi-label { display: flex; align-items: center; justify-content: space-between; color: #717985; font-size: 12px; }
.totchi-kpi-icon { width: 35px; height: 35px; border-radius: 10px; display: grid; place-items: center; }
.totchi-kpi-icon svg { width: 17px; height: 17px; }
.totchi-kpi-icon.is-purple { color: var(--totchi-primary); background: #F3EEFF; }
.totchi-kpi-icon.is-green { color: #059669; background: #ECFDF5; }
.totchi-kpi-icon.is-pink { color: var(--totchi-pink); background: #FFF1F2; }
.totchi-kpi-card > strong { display: block; margin: 13px 0 5px; font-size: 27px; line-height: 1; color: var(--totchi-text); font-family: Peyda,Dana,sans-serif; }
.totchi-kpi-card small { color: #8A919D; font-size: 10.5px; }
.totchi-kpi-card small.is-positive { color: #059669; }
.totchi-kpi-card small.is-warning { color: #E11D48; }
.totchi-kpi-card .totchi-engine-status { font-size: 20px; display: flex; align-items: center; gap: 8px; }
.totchi-engine-status i { width: 9px; height: 9px; border-radius: 50%; background: var(--totchi-green); box-shadow: 0 0 0 5px #ECFDF5; }

.totchi-dashboard-grid { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(280px,.85fr); gap: 16px; margin-bottom: 16px; }
.totchi-bottom-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.totchi-panel { background: #fff; border: 1px solid var(--totchi-border); border-radius: 16px; padding: 20px; box-shadow: 0 5px 22px rgba(17,24,39,.025); }
.totchi-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.totchi-panel-head h2 { margin: 0 0 4px !important; color: var(--totchi-text); font-family: Peyda,Dana,sans-serif; font-size: 17px; font-weight: 750; }
.totchi-panel-head p { margin: 0 !important; color: #8B929E; font-size: 11px; }
.totchi-panel-head > a { color: var(--totchi-primary); font-size: 11px; font-weight: 700; }

.totchi-pricing-bars { display: flex; flex-direction: column; gap: 17px; }
.totchi-bar-row > div:first-child { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; font-size: 11px; color: #6B7280; }
.totchi-bar-row strong { color: var(--totchi-text); }
.totchi-bar { height: 8px; background: #F0ECFA; border-radius: 999px; overflow: hidden; }
.totchi-bar span { display: block; height: 100%; background: var(--totchi-primary); border-radius: inherit; }
.totchi-bar.is-pink { background: #FFF0F3; }
.totchi-bar.is-pink span { background: var(--totchi-pink); }
.totchi-bar.is-muted { background: #F0F2F5; }
.totchi-bar.is-muted span { background: #98A1AF; }

.totchi-alert-list { display: flex; flex-direction: column; }
.totchi-alert-item { min-height: 62px; display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 10px; color: var(--totchi-text); border-bottom: 1px solid #F0F1F4; }
.totchi-alert-item:last-child { border-bottom: 0; }
.totchi-alert-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.totchi-alert-icon svg { width: 16px; height: 16px; }
.totchi-alert-icon.is-pink { color: #E11D48; background: #FFF1F2; }
.totchi-alert-icon.is-orange { color: #D97706; background: #FFFBEB; }
.totchi-alert-icon.is-purple { color: var(--totchi-primary); background: #F3EEFF; }
.totchi-alert-item span:nth-child(2) { display: flex; flex-direction: column; }
.totchi-alert-item strong { font-size: 12px; }
.totchi-alert-item small { color: #8A919D; font-size: 10.5px; margin-top: 2px; }
.totchi-alert-item b { color: #A2A8B2; font-size: 20px; transform: rotate(180deg); }

.totchi-connection-info { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.totchi-connection-info > div { background: #FAFAFB; border: 1px solid #F0F1F3; border-radius: 11px; padding: 12px; display: flex; flex-direction: column; gap: 5px; }
.totchi-connection-info span { color: #8A919D; font-size: 10px; }
.totchi-connection-info strong { color: var(--totchi-text); font-size: 12px; }
.totchi-run-row { display: flex; align-items: center; gap: 11px; }
.totchi-run-check { width: 36px; height: 36px; border-radius: 11px; background: #ECFDF5; color: #059669; display: grid; place-items: center; }
.totchi-run-check svg { width: 18px; height: 18px; }
.totchi-run-row div { display: flex; flex-direction: column; }
.totchi-run-row strong { font-size: 12px; }
.totchi-run-row small { color: #8A919D; font-size: 10.5px; margin-top: 3px; }

.totchi-empty-state { min-height: 360px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.totchi-empty-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: #F3EEFF; color: var(--totchi-primary); font-size: 23px; margin-bottom: 14px; }
.totchi-empty-state h2 { font-family: Peyda,Dana,sans-serif; font-size: 20px; margin: 0 0 7px !important; }
.totchi-empty-state p { color: #7D8490; max-width: 480px; margin: 0 !important; font-size: 13px; }

.totchi-login-required { max-width: 520px; margin: 80px auto; text-align: center; padding: 32px; background: #fff; border: 1px solid #E5E7EB; border-radius: 20px; font-family: Dana,Tahoma,sans-serif; }
.totchi-login-required h2 { color: #111827; }
.totchi-login-required p { color: #6B7280; }
.totchi-mobile-menu { display: none; width: 40px; height: 40px; padding: 9px; background: #fff; border: 1px solid var(--totchi-border); border-radius: 11px; cursor: pointer; flex-direction: column; justify-content: center; gap: 4px; }
.totchi-mobile-menu span { display: block; height: 2px; border-radius: 3px; background: #4B5563; width: 100%; }
.totchi-mobile-overlay { display: none; }

@media (max-width: 1180px) {
  .totchi-kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .totchi-dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  :root { --totchi-topbar: 66px; }
  body.admin-bar .totchi-topbar { top: 46px; }
  .totchi-topbar { padding: 0 14px; }
  .totchi-mobile-menu { display: flex; }
  .totchi-brand-name { display: none; }
  .totchi-topbar-right { gap: 9px; min-width: 0; flex: 1; }
  .totchi-channel-nav { gap: 3px; }
  .totchi-channel { padding: 7px 10px; font-size: 12px; }
  .totchi-channel.is-disabled small { display: none; }
  .totchi-user-meta { display: none; }
  .totchi-user-chip { padding-right: 7px; }
  .totchi-layout { display: block; }
  .totchi-sidebar { position: fixed; right: 0; top: var(--totchi-topbar); height: calc(100vh - var(--totchi-topbar)); transform: translateX(110%); transition: transform .24s ease; box-shadow: -20px 0 50px rgba(17,24,39,.12); }
  body.admin-bar .totchi-sidebar { top: calc(var(--totchi-topbar) + 46px); height: calc(100vh - var(--totchi-topbar) - 46px); }
  .totchi-app.is-menu-open .totchi-sidebar { transform: translateX(0); }
  .totchi-mobile-overlay { position: fixed; inset: var(--totchi-topbar) 0 0 0; background: rgba(17,24,39,.28); z-index: 40; }
  .totchi-app.is-menu-open .totchi-mobile-overlay { display: block; }
  .totchi-main { padding: 24px 18px; }
}

@media (max-width: 640px) {
  .totchi-icon-button { display: none; }
  .totchi-avatar { width: 34px; height: 34px; border-radius: 10px; }
  .totchi-channel.is-disabled { display: none; }
  .totchi-page-head { align-items: flex-start; flex-direction: column; }
  .totchi-page-actions { width: 100%; justify-content: space-between; }
  .totchi-page-head h1 { font-size: 24px; }
  .totchi-kpi-grid { grid-template-columns: 1fr; }
  .totchi-bottom-grid { grid-template-columns: 1fr; }
  .totchi-connection-info { grid-template-columns: 1fr; }
  .totchi-main { padding: 20px 14px; }
}

/* === Totchi Dashboard v0.2 refinements === */
:root {
  --totchi-sidebar: 228px;
  --totchi-topbar: 70px;
}

.totchi-topbar { padding-inline: 22px; }
.totchi-topbar-right { gap: 24px; }
.totchi-channel.is-disabled { opacity: .72; }
.totchi-channel.is-disabled small { font-size: 8px; padding: 2px 5px; }

.totchi-sidebar { padding: 18px 12px 16px; }
.totchi-sidebar-head { padding: 0 8px 14px; }
.totchi-sidebar-head > div { display: flex; flex-direction: column; gap: 2px; }
.totchi-sidebar-channel { font-weight: 800; color: var(--totchi-text); }
.totchi-sidebar-head small { color: #9CA3AF; font-size: 9px; font-weight: 500; }
.totchi-sidebar-nav { padding-top: 10px; gap: 12px; }
.totchi-nav-group { display: flex; flex-direction: column; gap: 3px; }
.totchi-nav-group + .totchi-nav-group { padding-top: 10px; border-top: 1px solid #F1F2F5; }
.totchi-nav-group-label { padding: 0 10px 5px; color: #A0A6B0; font-size: 9px; font-weight: 700; letter-spacing: .01em; }
.totchi-side-link { min-height: 40px; padding: 8px 10px; border-radius: 10px; gap: 9px; font-size: 13px; }
.totchi-side-icon { width: 20px; }
.totchi-side-icon svg { width: 18px; height: 18px; }

.totchi-plan-card { padding: 13px; }
.totchi-plan-card-top { margin-bottom: 6px; }
.totchi-plan-badge { color: #047857; background: #ECFDF5; border-radius: 999px; padding: 3px 7px; font-size: 9px; }
.totchi-plan-card small { line-height: 1.65; margin: 0 0 9px; }

.totchi-main { padding: 28px 30px 34px; }
.totchi-page-head { align-items: center; margin-bottom: 16px; }
.totchi-page-head h1 { font-size: 26px; margin-top: 3px !important; }
.totchi-page-head p { font-size: 13px; }
.totchi-btn svg { width: 16px; height: 16px; margin-left: 6px; }

.totchi-system-strip {
  display: flex;
  align-items: stretch;
  background: #fff;
  border: 1px solid var(--totchi-border);
  border-radius: 14px;
  min-height: 66px;
  padding: 8px 14px;
  margin-bottom: 14px;
  box-shadow: 0 4px 18px rgba(17,24,39,.02);
}
.totchi-strip-item { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 5px 12px; }
.totchi-strip-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #F7F5FF; color: var(--totchi-primary); flex: 0 0 auto; }
.totchi-strip-icon svg { width: 17px; height: 17px; }
.totchi-strip-item > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.totchi-strip-item small { color: #9299A4; font-size: 9.5px; }
.totchi-strip-item strong { color: var(--totchi-text); font-size: 11.5px; display: inline-flex; align-items: center; gap: 6px; }
.totchi-strip-item.is-ok strong i { width: 7px; height: 7px; border-radius: 50%; background: var(--totchi-green); box-shadow: 0 0 0 4px #ECFDF5; }
.totchi-strip-divider { width: 1px; background: #EEF0F3; margin: 8px 0; }

.totchi-kpi-grid { gap: 12px; margin-bottom: 14px; }
.totchi-kpi-card { padding: 16px; border-radius: 14px; }
.totchi-kpi-card > strong { font-size: 25px; margin-top: 11px; }
.totchi-kpi-icon.is-orange { color: #D97706; background: #FFFBEB; }

.totchi-dashboard-grid.is-actions-first { grid-template-columns: minmax(0,1.45fr) minmax(290px,.8fr); gap: 14px; margin-bottom: 14px; }
.totchi-panel { border-radius: 14px; padding: 18px; }
.totchi-action-panel { border-color: #E4DBFF; box-shadow: 0 7px 24px rgba(124,58,237,.04); }
.totchi-count-badge { background: #F3EEFF; color: var(--totchi-primary); border-radius: 999px; padding: 5px 9px; font-size: 10px; font-weight: 700; }
.totchi-alert-item { min-height: 70px; grid-template-columns: 38px minmax(0,1fr) auto; }
.totchi-alert-item strong { font-size: 11.5px; }
.totchi-alert-item small { line-height: 1.55; }
.totchi-alert-item b { transform: none; color: var(--totchi-primary); background: #F7F5FF; border-radius: 8px; padding: 5px 8px; font-size: 9.5px; font-weight: 700; }

.totchi-bar-row strong { display: inline-flex; align-items: baseline; gap: 6px; }
.totchi-bar-row strong em { color: #9AA1AC; font-size: 9px; font-style: normal; font-weight: 600; }
.totchi-buybox-summary { margin-top: 16px; padding: 10px 12px; border-radius: 10px; background: #F8F6FF; display: flex; align-items: center; gap: 8px; color: #5F6673; }
.totchi-buybox-summary > span { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: #ECFDF5; color: #059669; flex: 0 0 auto; }
.totchi-buybox-summary svg { width: 14px; height: 14px; }
.totchi-buybox-summary p { margin: 0 !important; font-size: 10.5px; }
.totchi-buybox-summary strong { color: var(--totchi-text); font-size: 12px; }

.totchi-bottom-grid { gap: 14px; }
.totchi-activity-list { display: flex; flex-direction: column; }
.totchi-activity-item { min-height: 60px; display: grid; grid-template-columns: 36px minmax(0,1fr); align-items: center; gap: 10px; border-bottom: 1px solid #F0F1F4; }
.totchi-activity-item:last-child { border-bottom: 0; }
.totchi-activity-item > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.totchi-activity-item strong { font-size: 11px; color: var(--totchi-text); }
.totchi-activity-item small { font-size: 9.5px; color: #8E95A0; }
.totchi-activity-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; }
.totchi-activity-icon svg { width: 15px; height: 15px; }
.totchi-activity-icon.is-green { color: #059669; background: #ECFDF5; }
.totchi-activity-icon.is-purple { color: var(--totchi-primary); background: #F3EEFF; }
.totchi-activity-icon.is-orange { color: #D97706; background: #FFFBEB; }

.totchi-health-list { display: flex; flex-direction: column; }
.totchi-health-row { min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #F0F1F4; }
.totchi-health-row:last-child { border-bottom: 0; }
.totchi-health-row span { color: #6F7783; font-size: 10.5px; }
.totchi-health-row strong { color: var(--totchi-text); font-size: 10.5px; display: inline-flex; align-items: center; gap: 6px; }
.totchi-health-row strong.is-ok { color: #047857; }
.totchi-health-row strong.is-ok i { width: 7px; height: 7px; border-radius: 50%; background: var(--totchi-green); }

@media (max-width: 1180px) {
  .totchi-dashboard-grid.is-actions-first { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  :root { --totchi-sidebar: 228px; --totchi-topbar: 66px; }
  .totchi-main { padding: 22px 18px 28px; }
  .totchi-system-strip { overflow-x: auto; }
  .totchi-strip-item { min-width: 190px; }
}

@media (max-width: 640px) {
  .totchi-system-strip { display: grid; grid-template-columns: 1fr; padding: 7px; }
  .totchi-strip-item { min-width: 0; }
  .totchi-strip-divider { width: 100%; height: 1px; margin: 0; }
  .totchi-alert-item { grid-template-columns: 34px minmax(0,1fr); padding: 8px 0; }
  .totchi-alert-item b { grid-column: 2; justify-self: start; }
}

/* === Totchi Dashboard v0.3 full-width + support === */
.totchi-dashboard-page #page,
.totchi-dashboard-page .site,
.totchi-dashboard-page #content,
.totchi-dashboard-page .site-content,
.totchi-dashboard-page .ast-container,
.totchi-dashboard-page .site-content > .ast-container,
.totchi-dashboard-page #primary,
.totchi-dashboard-page .content-area,
.totchi-dashboard-page .site-main,
.totchi-dashboard-page .site-main > article,
.totchi-dashboard-page .entry-content,
.totchi-dashboard-page .wp-block-post-content,
.totchi-dashboard-page .wp-block-shortcode {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.totchi-dashboard-page.ast-separate-container .ast-article-single,
.totchi-dashboard-page.ast-separate-container .ast-article-post,
.totchi-dashboard-page .ast-article-single,
.totchi-dashboard-page .ast-article-post {
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
}

.totchi-dashboard-page .entry-content > * {
  max-width: none !important;
}

.totchi-app {
  width: 100vw !important;
  max-width: 100vw !important;
  position: relative;
  left: 50%;
  margin-left: -50vw !important;
  margin-right: 0 !important;
}

:root {
  --totchi-sidebar: 220px;
}

.totchi-main {
  width: 100%;
  max-width: none;
  padding: 28px 30px 40px;
}

.totchi-topbar-left {
  flex: 0 0 auto;
}

.totchi-support-top {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid #E7E1FA;
  border-radius: 10px;
  background: #FAF8FF;
  color: var(--totchi-primary);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transition: .18s ease;
}

.totchi-support-top:hover,
.totchi-support-top.is-active {
  color: #fff;
  background: var(--totchi-primary);
  border-color: var(--totchi-primary);
}

.totchi-support-top svg {
  width: 16px;
  height: 16px;
}

/* Keep overview text readable on wider layouts. */
@media (min-width: 1280px) {
  .totchi-dashboard-grid.is-actions-first {
    grid-template-columns: minmax(0,1.6fr) minmax(340px,.8fr);
  }

  .totchi-alert-item strong,
  .totchi-activity-item strong,
  .totchi-health-row span,
  .totchi-health-row strong {
    font-size: 12px;
  }

  .totchi-alert-item small,
  .totchi-activity-item small {
    font-size: 10.5px;
  }
}

/* Support page */
.totchi-support-head {
  margin-bottom: 18px;
}

.totchi-support-notice {
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 600;
}

.totchi-support-notice.is-success {
  color: #047857;
  background: #ECFDF5;
  border: 1px solid #C7F1DF;
}

.totchi-support-notice.is-error {
  color: #B42318;
  background: #FFF1F1;
  border: 1px solid #FFD7D7;
}

.totchi-support-grid {
  display: grid;
  grid-template-columns: minmax(0,1.55fr) minmax(320px,.75fr);
  gap: 16px;
  align-items: start;
}

.totchi-support-form-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--totchi-primary);
  background: #F3EEFF;
}

.totchi-support-form-icon svg {
  width: 18px;
  height: 18px;
}

.totchi-support-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.totchi-form-row {
  display: grid;
  grid-template-columns: minmax(0,1.35fr) minmax(190px,.65fr);
  gap: 12px;
}

.totchi-support-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.totchi-support-form label > span {
  color: #4B5563;
  font-size: 11px;
  font-weight: 700;
}

.totchi-support-form input,
.totchi-support-form select,
.totchi-support-form textarea {
  width: 100%;
  border: 1px solid #E3E6EA;
  border-radius: 10px;
  background: #fff;
  color: var(--totchi-text);
  font-family: inherit;
  font-size: 12px;
  outline: none;
  transition: .16s ease;
}

.totchi-support-form input,
.totchi-support-form select {
  min-height: 42px;
  padding: 8px 11px;
}

.totchi-support-form textarea {
  min-height: 160px;
  padding: 11px;
  resize: vertical;
  line-height: 1.8;
}

.totchi-support-form input:focus,
.totchi-support-form select:focus,
.totchi-support-form textarea:focus {
  border-color: #B8A4F5;
  box-shadow: 0 0 0 3px #F3EEFF;
}

.totchi-support-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.totchi-support-form-footer small {
  color: #8A919D;
  font-size: 10px;
}

.totchi-support-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.totchi-contact-list {
  display: flex;
  flex-direction: column;
}

.totchi-contact-item {
  min-height: 64px;
  display: grid;
  grid-template-columns: 38px minmax(0,1fr);
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #F0F1F4;
  color: var(--totchi-text);
}

.totchi-contact-item:last-child {
  border-bottom: 0;
}

.totchi-contact-item:hover:not(.is-empty) strong {
  color: var(--totchi-primary);
}

.totchi-contact-item > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.totchi-contact-item small {
  color: #9299A4;
  font-size: 9.5px;
}

.totchi-contact-item strong {
  color: var(--totchi-text);
  font-size: 11.5px;
  overflow-wrap: anywhere;
}

.totchi-contact-item.is-empty strong {
  color: #A0A6B0;
  font-weight: 500;
}

.totchi-contact-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #F7F5FF;
  color: var(--totchi-primary);
  font-weight: 800;
}

.totchi-contact-icon svg {
  width: 16px;
  height: 16px;
}

.totchi-contact-icon.is-phone { color: #059669; background: #ECFDF5; }
.totchi-contact-icon.is-whatsapp { color: #059669; background: #ECFDF5; }
.totchi-contact-icon.is-telegram { color: #2563EB; background: #EFF6FF; }
.totchi-contact-icon.is-instagram { color: #C026D3; background: #FDF4FF; }
.totchi-contact-icon.is-email { color: #D97706; background: #FFFBEB; }

.totchi-support-admin-link {
  display: block;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #E5E7EB;
  color: var(--totchi-primary);
  font-size: 10.5px;
  font-weight: 700;
}

.totchi-support-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid #E8E1FC;
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(145deg,#FBFAFF,#F5F1FF);
}

.totchi-support-tip-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--totchi-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  flex: 0 0 auto;
}

.totchi-support-tip strong {
  display: block;
  color: var(--totchi-text);
  font-size: 11.5px;
  margin-bottom: 4px;
}

.totchi-support-tip p {
  margin: 0 !important;
  color: #747C88;
  font-size: 10px;
  line-height: 1.75;
}

@media (max-width: 1050px) {
  .totchi-support-top span { display: none; }
  .totchi-support-top { width: 40px; padding: 0; justify-content: center; }
  .totchi-support-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .totchi-app {
    left: 0;
    margin-left: 0 !important;
  }
}

@media (max-width: 640px) {
  .totchi-form-row { grid-template-columns: 1fr; }
  .totchi-support-form-footer { align-items: stretch; flex-direction: column; }
  .totchi-support-form-footer .totchi-btn { width: 100%; }
}


/* === Totchi Dashboard v0.3.1 card spacing fix ===
 * Do not let the Astra full-width reset remove padding from dashboard cards.
 */
.totchi-kpi-card,
.totchi-panel {
  padding: 18px !important;
}

@media (max-width: 640px) {
  .totchi-main {
    padding: 20px 16px 30px;
  }

  .totchi-kpi-card,
  .totchi-panel {
    padding: 18px 16px !important;
  }

  .totchi-kpi-label,
  .totchi-panel-head,
  .totchi-pricing-bars,
  .totchi-health-list,
  .totchi-activity-list,
  .totchi-alert-list {
    min-width: 0;
  }

  .totchi-panel-head {
    gap: 12px;
    margin-bottom: 16px;
  }

  .totchi-alert-item {
    padding: 12px 2px;
    gap: 12px;
  }

  .totchi-alert-item span:nth-child(2),
  .totchi-activity-item > span:last-child {
    min-width: 0;
  }

  .totchi-alert-item strong,
  .totchi-alert-item small,
  .totchi-activity-item strong,
  .totchi-activity-item small,
  .totchi-panel-head h2,
  .totchi-panel-head p {
    overflow-wrap: anywhere;
  }

  .totchi-bar-row > div:first-child {
    gap: 10px;
    padding-inline: 2px;
  }

  .totchi-buybox-summary {
    padding: 12px;
  }
}

/* === Totchi Dashboard v0.3.2 desktop full-width fix ===
 * Astra containers are already reset to 100%; do not use the viewport breakout
 * offset here because it can shift the whole app by half a screen in RTL.
 */
.totchi-dashboard-page {
  overflow-x: hidden;
}

.totchi-dashboard-page #page,
.totchi-dashboard-page .site,
.totchi-dashboard-page #content,
.totchi-dashboard-page .site-content,
.totchi-dashboard-page .ast-container,
.totchi-dashboard-page .site-content > .ast-container,
.totchi-dashboard-page #primary,
.totchi-dashboard-page .content-area,
.totchi-dashboard-page .site-main,
.totchi-dashboard-page .site-main > article,
.totchi-dashboard-page .entry-content,
.totchi-dashboard-page .wp-block-post-content,
.totchi-dashboard-page .wp-block-shortcode {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.totchi-app {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

.totchi-layout {
  width: 100%;
  max-width: none;
  grid-template-columns: var(--totchi-sidebar) minmax(0, 1fr);
}

.totchi-main {
  width: 100%;
  min-width: 0;
  max-width: none;
}

@media (min-width: 1440px) {
  .totchi-main {
    padding-left: 34px;
    padding-right: 34px;
  }

  .totchi-kpi-grid {
    gap: 16px;
  }

  .totchi-dashboard-grid.is-actions-first,
  .totchi-bottom-grid {
    gap: 16px;
  }
}

/* === Totchi Dashboard v0.4 secure live API states === */
.totchi-api-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 14px;
  padding: 13px 15px;
  border: 1px solid #FDE68A;
  border-radius: 13px;
  background: #FFFBEB;
  color: #92400E;
}
.totchi-api-notice.is-error { border-color: #FECACA; background: #FFF5F5; color: #991B1B; }
.totchi-api-notice.is-warning { border-color: #FDE68A; background: #FFFBEB; color: #92400E; }
.totchi-api-notice-icon {
  width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: 10px; background: rgba(255,255,255,.78);
}
.totchi-api-notice-icon svg { width: 17px; height: 17px; }
.totchi-api-notice > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.totchi-api-notice strong { font-size: 12px; color: inherit; }
.totchi-api-notice small { font-size: 10px; line-height: 1.7; color: inherit; opacity: .84; }
.totchi-api-notice code { direction: ltr; unicode-bidi: embed; font-size: 9px; }

.totchi-strip-item.is-off strong { color: #6B7280; }
.totchi-strip-item.is-off strong i { width: 7px; height: 7px; border-radius: 50%; background: #9CA3AF; box-shadow: 0 0 0 4px #F3F4F6; }
.totchi-status-pill.is-neutral { color: #6B7280; background: #F3F4F6; }
.totchi-status-pill.is-neutral i { background: #9CA3AF; }
.totchi-plan-badge.is-muted { color: #6B7280; background: #F3F4F6; }

.totchi-alert-list .totchi-empty-state {
  min-height: 180px;
  padding: 24px 16px;
  gap: 10px;
  color: #047857;
}
.totchi-alert-list .totchi-empty-state > span {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 12px; background: #ECFDF5;
}
.totchi-alert-list .totchi-empty-state svg { width: 20px; height: 20px; }
.totchi-alert-list .totchi-empty-state strong { font-size: 12px; }
.totchi-alert-list .totchi-empty-state.is-muted { color: #8B93A1; }

@media (max-width: 640px) {
  .totchi-api-notice { padding: 11px 12px; }
  .totchi-api-notice-icon { width: 30px; height: 30px; border-radius: 9px; }
  .totchi-api-notice strong { font-size: 11px; }
}

/* === Totchi Dashboard v0.5 account & subscription === */
.totchi-user-chip { color: inherit; border-radius: 10px; padding-top: 5px; padding-bottom: 5px; }
.totchi-user-chip:hover { background: #F8F6FF; }
.totchi-btn-secondary { background: #fff; color: var(--totchi-primary) !important; border: 1px solid #D8CCFF; }
.totchi-btn-secondary:hover { background: #F7F4FF; }
.totchi-btn-ghost { background: transparent; color: #6B7280 !important; border: 1px solid var(--totchi-border); gap: 7px; }
.totchi-btn-ghost:hover { background: #fff; color: var(--totchi-text) !important; }
.totchi-btn-ghost svg, .totchi-btn-primary svg { width: 16px; height: 16px; }

.totchi-account-notice { margin: -6px 0 16px; padding: 12px 14px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.totchi-account-notice.is-success { background: #ECFDF5; color: #047857; border: 1px solid #A7F3D0; }
.totchi-account-notice.is-error { background: #FFF1F2; color: #BE123C; border: 1px solid #FECDD3; }

.totchi-account-kpis { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-bottom: 16px; }
.totchi-account-kpi { background:#fff; border:1px solid var(--totchi-border); border-radius:16px; padding:18px; display:flex; align-items:center; gap:14px; min-width:0; box-shadow:0 4px 18px rgba(17,24,39,.025); }
.totchi-account-kpi > div { min-width:0; display:flex; flex-direction:column; gap:4px; }
.totchi-account-kpi small { font-size:10.5px; color:#8A919D; }
.totchi-account-kpi strong { font-family:Peyda,Dana,sans-serif; font-size:18px; color:var(--totchi-text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.totchi-account-kpi > div > span:not(.totchi-subscription-status) { color:#7B8390; font-size:10.5px; overflow-wrap:anywhere; }
.totchi-account-kpi-icon { width:46px; height:46px; border-radius:13px; display:grid; place-items:center; background:#F3EEFF; color:var(--totchi-primary); flex:0 0 auto; }
.totchi-account-kpi-icon.is-calendar { background:#EFF6FF; color:#2563EB; }
.totchi-account-kpi-icon.is-shield { background:#ECFDF5; color:#059669; }
.totchi-account-kpi-icon svg { width:21px; height:21px; }
.totchi-subscription-status { display:inline-flex; align-items:center; width:max-content; max-width:100%; padding:4px 8px; border-radius:999px; font-size:9.5px; font-weight:800; }
.totchi-subscription-status.is-active { background:#ECFDF5; color:#047857; }
.totchi-subscription-status.is-muted { background:#F3F4F6; color:#6B7280; }

.totchi-account-grid { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(300px,.85fr); gap:16px; margin-bottom:16px; }
.totchi-account-grid.is-profile { grid-template-columns:minmax(0,1.45fr) minmax(300px,.65fr); }
.totchi-subscription-detail-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:8px; }
.totchi-subscription-detail-grid > div { border:1px solid #EEF0F3; background:#FAFAFC; border-radius:11px; padding:12px; display:flex; flex-direction:column; gap:4px; }
.totchi-subscription-detail-grid small { color:#9299A4; font-size:9.5px; }
.totchi-subscription-detail-grid strong { color:var(--totchi-text); font-size:11.5px; }
.totchi-account-actions-row { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:16px; padding-top:14px; border-top:1px solid #F0F1F4; }
.totchi-inline-link { color:var(--totchi-primary) !important; font-size:11px; font-weight:700; }

.totchi-account-empty { min-height:106px; border:1px dashed #DDD6FE; background:#FAF8FF; border-radius:13px; padding:16px; display:flex; align-items:center; gap:13px; }
.totchi-account-empty > span { width:40px; height:40px; border-radius:11px; display:grid; place-items:center; color:var(--totchi-primary); background:#F1ECFF; flex:0 0 auto; }
.totchi-account-empty svg { width:18px; height:18px; }
.totchi-account-empty strong { display:block; font-size:11.5px; color:var(--totchi-text); margin-bottom:4px; }
.totchi-account-empty p { margin:0 !important; font-size:10px; line-height:1.75; color:#747C88; }
.totchi-account-empty.is-small { min-height:90px; }

.totchi-usage-list { display:flex; flex-direction:column; gap:16px; margin-top:4px; }
.totchi-usage-row > div:first-child { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:7px; }
.totchi-usage-row span { color:#707885; font-size:10.5px; }
.totchi-usage-row strong { color:var(--totchi-text); font-size:10.5px; }
.totchi-usage-progress { height:7px; border-radius:999px; background:#EEEAFB; overflow:hidden; }
.totchi-usage-progress span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--totchi-primary),var(--totchi-lavender)); }
.totchi-entitlement-note { margin-top:18px; padding:11px 12px; border-radius:10px; background:#F9FAFB; border:1px solid #EEF0F3; color:#848B96; font-size:9.5px; line-height:1.75; }

.totchi-panel-symbol { width:36px; height:36px; border-radius:10px; display:grid; place-items:center; color:var(--totchi-primary); background:#F3EEFF; flex:0 0 auto; }
.totchi-panel-symbol.is-green { background:#ECFDF5; color:#059669; }
.totchi-panel-symbol svg { width:17px; height:17px; }
.totchi-profile-form { display:flex; flex-direction:column; gap:13px; }
.totchi-profile-form label { display:flex; flex-direction:column; gap:6px; color:#59616E; font-size:10.5px; font-weight:700; }
.totchi-profile-form input { width:100%; min-height:40px; border:1px solid #DDE1E7; border-radius:10px; padding:8px 11px; background:#fff; color:var(--totchi-text); font-family:inherit; font-size:11.5px; box-shadow:none; }
.totchi-profile-form input:focus { outline:none; border-color:#A78BFA; box-shadow:0 0 0 3px rgba(124,58,237,.08); }
.totchi-profile-form input[readonly] { background:#F8F9FB; color:#777E89; }
.totchi-profile-form label small { color:#969DA7; font-size:8.5px; font-weight:500; }
.totchi-profile-footer { display:flex; align-items:center; justify-content:space-between; gap:14px; padding-top:3px; }
.totchi-profile-footer > span { color:#8A919D; font-size:9.5px; }
.totchi-profile-footer code { direction:ltr; unicode-bidi:embed; }

.totchi-security-list { display:flex; flex-direction:column; }
.totchi-security-list > div { min-height:52px; border-bottom:1px solid #F0F1F4; display:flex; align-items:center; justify-content:space-between; gap:14px; }
.totchi-security-list > div:last-child { border-bottom:0; }
.totchi-security-list span { color:#747C88; font-size:10px; }
.totchi-security-list strong, .totchi-security-list a { color:var(--totchi-text); font-size:10px; font-weight:700; max-width:65%; overflow-wrap:anywhere; }
.totchi-security-list strong.is-ok { color:#047857; display:inline-flex; align-items:center; gap:6px; }
.totchi-security-list strong.is-ok i { width:7px; height:7px; border-radius:50%; background:var(--totchi-green); }
.totchi-security-list a { color:var(--totchi-primary) !important; }

.totchi-orders-panel { margin-bottom:10px; }
.totchi-order-table-wrap { overflow-x:auto; border:1px solid #EEF0F3; border-radius:12px; }
.totchi-order-table { width:100%; border-collapse:collapse; min-width:650px; }
.totchi-order-table th, .totchi-order-table td { padding:12px 14px; text-align:right; border-bottom:1px solid #F0F1F4; font-size:10.5px; white-space:nowrap; }
.totchi-order-table th { color:#8A919D; background:#FAFAFC; font-weight:700; }
.totchi-order-table td { color:#4F5764; }
.totchi-order-table tr:last-child td { border-bottom:0; }
.totchi-order-status { display:inline-flex; padding:4px 8px; border-radius:999px; background:#F3F4F6; color:#59616E; font-size:9px; font-weight:700; }

@media (max-width: 1050px) {
  .totchi-account-grid, .totchi-account-grid.is-profile { grid-template-columns:1fr; }
}
@media (max-width: 800px) {
  .totchi-account-kpis { grid-template-columns:1fr; }
  .totchi-account-head { align-items:flex-start; }
}
@media (max-width: 640px) {
  .totchi-account-head { flex-direction:column; align-items:stretch; }
  .totchi-account-head .totchi-page-actions { width:100%; }
  .totchi-account-head .totchi-page-actions .totchi-btn { flex:1; }
  .totchi-subscription-detail-grid, .totchi-profile-form .totchi-form-row { grid-template-columns:1fr; }
  .totchi-account-actions-row, .totchi-profile-footer { align-items:stretch; flex-direction:column; }
  .totchi-account-actions-row .totchi-btn, .totchi-profile-footer .totchi-btn { width:100%; }
}

/* === Totchi Dashboard v0.6 notifications === */
.totchi-icon-button.is-active { color:var(--totchi-primary); border-color:#D9CEFF; background:#F7F4FF; }
.totchi-notification-badge { position:absolute; min-width:17px; height:17px; padding:0 4px; border-radius:999px; background:var(--totchi-pink); color:#fff; top:-5px; right:-5px; border:2px solid #fff; display:grid; place-items:center; font-size:8px; font-weight:800; line-height:1; }
.totchi-notifications-head { align-items:center; }
.totchi-notification-read-form { margin:0; }
.totchi-notification-read-form .totchi-btn { gap:7px; }
.totchi-notification-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin-bottom:16px; }
.totchi-notification-summary article { min-height:92px; background:#fff; border:1px solid var(--totchi-border); border-radius:15px; padding:16px; display:flex; align-items:center; gap:13px; box-shadow:0 4px 18px rgba(17,24,39,.025); }
.totchi-notification-summary article > div { display:flex; flex-direction:column; gap:2px; min-width:0; }
.totchi-notification-summary small { font-size:10px; color:#8B93A0; }
.totchi-notification-summary strong { font-family:Peyda,Dana,sans-serif; font-size:20px; color:var(--totchi-text); }
.totchi-notification-summary em { font-style:normal; color:#9AA1AC; font-size:9px; }
.totchi-notification-summary-icon { width:42px; height:42px; border-radius:12px; display:grid; place-items:center; background:#F3EEFF; color:var(--totchi-primary); flex:0 0 auto; }
.totchi-notification-summary-icon.is-unread { background:#FFF1F2; color:#E11D48; }
.totchi-notification-summary-icon.is-source { background:#ECFDF5; color:#059669; }
.totchi-notification-summary-icon svg { width:19px; height:19px; }
.totchi-notification-panel { overflow:hidden; }
.totchi-notification-list { display:flex; flex-direction:column; margin:0 -18px -18px; }
.totchi-notification-item { min-height:92px; display:grid; grid-template-columns:42px minmax(0,1fr) auto; align-items:center; gap:13px; padding:15px 18px; border-top:1px solid #F0F1F4; position:relative; }
.totchi-notification-item.is-unread { background:#FCFBFF; }
.totchi-notification-item.is-unread::before { content:""; position:absolute; right:0; top:0; bottom:0; width:3px; background:var(--totchi-primary); }
.totchi-notification-item-icon { width:40px; height:40px; border-radius:11px; display:grid; place-items:center; background:#F3F4F6; color:#6B7280; }
.totchi-notification-item.is-critical .totchi-notification-item-icon { color:#BE123C; background:#FFF1F2; }
.totchi-notification-item.is-warning .totchi-notification-item-icon { color:#D97706; background:#FFFBEB; }
.totchi-notification-item.is-info .totchi-notification-item-icon { color:var(--totchi-primary); background:#F3EEFF; }
.totchi-notification-item.is-success .totchi-notification-item-icon { color:#059669; background:#ECFDF5; }
.totchi-notification-item-icon svg { width:18px; height:18px; }
.totchi-notification-copy { min-width:0; display:flex; flex-direction:column; gap:4px; }
.totchi-notification-title-row { display:flex; align-items:center; gap:8px; min-width:0; }
.totchi-notification-title-row strong { color:var(--totchi-text); font-size:12px; }
.totchi-notification-title-row i { color:var(--totchi-primary); background:#F3EEFF; border-radius:999px; padding:3px 7px; font-size:8px; font-style:normal; font-weight:800; }
.totchi-notification-copy p { margin:0 !important; color:#69717E; font-size:10.5px; line-height:1.8; }
.totchi-notification-copy small { color:#9AA1AC; font-size:9px; }
.totchi-notification-action { color:var(--totchi-primary); background:#F7F4FF; border:1px solid #E5DDFF; border-radius:9px; padding:7px 10px; font-size:10px; font-weight:800; white-space:nowrap; }
.totchi-notification-action:hover { background:#EFE9FF; }
.totchi-notification-empty { min-height:220px; display:flex; align-items:center; justify-content:center; gap:13px; text-align:right; }
.totchi-notification-empty > span { width:46px; height:46px; border-radius:13px; display:grid; place-items:center; background:#ECFDF5; color:#059669; flex:0 0 auto; }
.totchi-notification-empty strong { display:block; color:var(--totchi-text); font-size:12px; margin-bottom:4px; }
.totchi-notification-empty p { margin:0 !important; color:#7C8490; font-size:10.5px; }

@media (max-width: 900px) {
  .totchi-notification-summary { grid-template-columns:1fr 1fr; }
  .totchi-notification-summary article:last-child { grid-column:1 / -1; }
}

@media (max-width: 640px) {
  .totchi-icon-button { display:grid; width:36px; height:36px; border-radius:10px; flex:0 0 auto; }
  .totchi-notification-badge { top:-4px; right:-4px; }
  .totchi-user-chip { border-right:0; padding-right:0; }
  .totchi-notification-summary { grid-template-columns:1fr; gap:10px; }
  .totchi-notification-summary article:last-child { grid-column:auto; }
  .totchi-notifications-head { align-items:stretch; }
  .totchi-notification-read-form, .totchi-notification-read-form .totchi-btn { width:100%; }
  .totchi-notification-item { grid-template-columns:36px minmax(0,1fr); gap:10px; padding:14px 16px; }
  .totchi-notification-item-icon { width:36px; height:36px; border-radius:10px; }
  .totchi-notification-action { grid-column:2; justify-self:start; }
  .totchi-notification-list { margin:0 -16px -18px; }
}

/* === Totchi Dashboard v0.7 settings === */
.totchi-settings-form { display:flex; flex-direction:column; gap:16px; }
.totchi-settings-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.totchi-settings-grid.is-bottom { align-items:stretch; }
.totchi-settings-card { min-width:0; }
.totchi-settings-fields { display:flex; flex-direction:column; gap:18px; }
.totchi-setting-field { display:flex; flex-direction:column; gap:7px; color:#59616E; font-size:11px; font-weight:700; }
.totchi-setting-field > span { color:#59616E; }
.totchi-setting-field > small, .totchi-setting-field span small { color:#969DA7; font-size:9px; line-height:1.75; font-weight:500; }
.totchi-setting-field select { width:100%; min-height:42px; border:1px solid #DDE1E7; border-radius:10px; padding:7px 11px; background:#fff; color:var(--totchi-text); font-family:inherit; font-size:11px; box-shadow:none; }
.totchi-setting-field select:focus { outline:none; border-color:#A78BFA; box-shadow:0 0 0 3px rgba(124,58,237,.08); }
.totchi-choice-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.totchi-choice-card { position:relative; min-height:78px; border:1px solid #E1E4E9; border-radius:12px; padding:13px 42px 13px 12px; display:flex; flex-direction:column; justify-content:center; gap:3px; cursor:pointer; background:#fff; transition:.18s ease; }
.totchi-choice-card:hover { border-color:#CFC3FF; background:#FCFBFF; }
.totchi-choice-card input { position:absolute; right:14px; top:50%; transform:translateY(-50%); accent-color:var(--totchi-primary); }
.totchi-choice-card:has(input:checked) { border-color:#BBA7FF; background:#F8F5FF; box-shadow:0 0 0 2px rgba(124,58,237,.05); }
.totchi-choice-card b { color:var(--totchi-text); font-size:11px; }
.totchi-choice-card small { color:#8E96A2; font-size:9px; font-weight:500; }
.totchi-toggle-list { display:flex; flex-direction:column; margin-top:-4px; }
.totchi-toggle-row { min-height:57px; border-bottom:1px solid #F0F1F4; display:flex; align-items:center; justify-content:space-between; gap:18px; cursor:pointer; }
.totchi-toggle-row:last-child { border-bottom:0; }
.totchi-toggle-row > span:first-child { display:flex; flex-direction:column; gap:2px; min-width:0; }
.totchi-toggle-row strong { color:var(--totchi-text); font-size:10.5px; }
.totchi-toggle-row small { color:#8F97A3; font-size:9px; line-height:1.65; }
.totchi-switch { position:relative; width:38px; height:22px; flex:0 0 38px; }
.totchi-switch input { position:absolute; opacity:0; pointer-events:none; }
.totchi-switch i { position:absolute; inset:0; border-radius:999px; background:#D9DDE3; transition:.18s ease; }
.totchi-switch i::after { content:""; position:absolute; width:16px; height:16px; border-radius:50%; background:#fff; top:3px; right:3px; box-shadow:0 1px 4px rgba(17,24,39,.2); transition:.18s ease; }
.totchi-switch input:checked + i { background:var(--totchi-primary); }
.totchi-switch input:checked + i::after { transform:translateX(-16px); }
.totchi-setting-field.is-inline-select { margin-top:14px; padding-top:15px; border-top:1px solid #F0F1F4; display:grid; grid-template-columns:minmax(0,1fr) 130px; align-items:center; gap:16px; }
.totchi-setting-field.is-inline-select > span { display:flex; flex-direction:column; gap:2px; }
.totchi-setting-field.is-inline-select b { color:var(--totchi-text); font-size:10.5px; }
.totchi-toggle-row.is-safety { min-height:70px; border:1px solid #EEF0F3; border-radius:12px; padding:10px 12px; background:#FAFAFB; }
.totchi-settings-note { margin-top:12px; padding:10px 12px; border-radius:10px; background:#F8F5FF; color:#777E8A; font-size:9px; line-height:1.8; border:1px solid #EEE9FF; }
.totchi-store-status-list { display:flex; flex-direction:column; }
.totchi-store-status-list > div { min-height:45px; display:flex; align-items:center; justify-content:space-between; gap:14px; border-bottom:1px solid #F0F1F4; }
.totchi-store-status-list > div:last-child { border-bottom:0; }
.totchi-store-status-list span { color:#7B838F; font-size:10px; }
.totchi-store-status-list strong { color:var(--totchi-text); font-size:10px; display:inline-flex; align-items:center; gap:6px; }
.totchi-store-status-list strong i { display:none; width:7px; height:7px; border-radius:50%; background:#98A1AF; }
.totchi-store-status-list strong.is-ok { color:#047857; }
.totchi-store-status-list strong.is-ok i, .totchi-store-status-list strong.is-muted i { display:block; }
.totchi-store-status-list strong.is-ok i { background:var(--totchi-green); }
.totchi-store-status-list strong.is-muted { color:#8A919D; }
.totchi-store-settings-actions { display:flex; align-items:center; gap:18px; padding-top:14px; margin-top:6px; border-top:1px solid #F0F1F4; }
.totchi-settings-savebar { position:sticky; bottom:14px; z-index:20; min-height:72px; display:flex; align-items:center; justify-content:space-between; gap:18px; padding:13px 16px; border:1px solid #E3E6EB; border-radius:15px; background:rgba(255,255,255,.96); backdrop-filter:blur(12px); box-shadow:0 10px 34px rgba(17,24,39,.08); }
.totchi-settings-savebar > div { display:flex; flex-direction:column; gap:2px; }
.totchi-settings-savebar strong { color:var(--totchi-text); font-size:11px; }
.totchi-settings-savebar small { color:#8B929E; font-size:9px; }

/* Compact mode is a per-user visual preference; it never changes data or permissions. */
.totchi-app.is-compact .totchi-main { padding:24px; }
.totchi-app.is-compact .totchi-page-head { margin-bottom:17px; }
.totchi-app.is-compact .totchi-panel { padding:15px; border-radius:14px; }
.totchi-app.is-compact .totchi-kpi-card { padding:14px; }
.totchi-app.is-compact .totchi-kpi-grid,
.totchi-app.is-compact .totchi-dashboard-grid,
.totchi-app.is-compact .totchi-bottom-grid { gap:11px; margin-bottom:11px; }
.totchi-app.is-compact .totchi-panel-head { margin-bottom:13px; }
.totchi-app.is-compact .totchi-side-link { min-height:39px; padding-top:7px; padding-bottom:7px; }
.totchi-app.is-compact .totchi-notification-item { min-height:76px; padding-top:11px; padding-bottom:11px; }
.totchi-app.is-compact .totchi-order-table th,
.totchi-app.is-compact .totchi-order-table td { padding-top:9px; padding-bottom:9px; }

@media (max-width: 1000px) {
  .totchi-settings-grid { grid-template-columns:1fr; }
}
@media (max-width: 640px) {
  .totchi-choice-row { grid-template-columns:1fr; }
  .totchi-setting-field.is-inline-select { grid-template-columns:1fr; }
  .totchi-settings-savebar { position:static; flex-direction:column; align-items:stretch; }
  .totchi-settings-savebar .totchi-btn { width:100%; }
  .totchi-store-settings-actions { flex-direction:column; align-items:flex-start; gap:8px; }
  .totchi-app.is-compact .totchi-main { padding:16px; }
}


/* === Totchi Dashboard v0.8 final lightweight polish ===
 * Pure CSS/vanilla UI polish: no framework, icon font, animation library or remote asset.
 */
:root {
  --totchi-bg: #F7F8FA;
  --totchi-surface: #FFFFFF;
  --totchi-soft: #FAFAFB;
  --totchi-radius: 12px;
  --totchi-radius-sm: 9px;
  --totchi-shadow: 0 1px 2px rgba(17,24,39,.025);
  --totchi-focus: 0 0 0 3px rgba(124,58,237,.11);
}

/* Surfaces: flatter and calmer. */
.totchi-panel,
.totchi-kpi-card,
.totchi-account-kpi,
.totchi-notification-summary article,
.totchi-system-strip {
  border-color: #E7E9EE;
  box-shadow: var(--totchi-shadow);
}
.totchi-panel,
.totchi-kpi-card,
.totchi-account-kpi { border-radius: var(--totchi-radius); }
.totchi-action-panel { box-shadow: var(--totchi-shadow); border-color: #DED5FB; }
.totchi-topbar { box-shadow: none; border-color: #E8EAF0; }
.totchi-sidebar { border-color: #E8EAF0; }

/* Navigation: use purple as a signal, not as decoration everywhere. */
.totchi-side-link { position: relative; border-radius: var(--totchi-radius-sm); }
.totchi-side-link.is-active { background: #F7F4FF; }
.totchi-side-link.is-active::after {
  content: "";
  position: absolute;
  right: 0;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 999px;
  background: var(--totchi-primary);
}
.totchi-channel.is-active { background: #F7F4FF; }
.totchi-plan-card { background: #FAF8FF; box-shadow: none; }

/* Buttons and controls: quiet, predictable feedback. */
.totchi-btn { transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease; }
.totchi-btn-primary { box-shadow: none; }
.totchi-btn:active { transform: translateY(1px); }
.totchi-icon-button,
.totchi-support-top,
.totchi-user-chip,
.totchi-side-link,
.totchi-channel,
.totchi-notification-action,
.totchi-plan-card a { transition: background-color .16s ease, border-color .16s ease, color .16s ease; }

/* One focus treatment throughout the app. */
.totchi-app :is(a,button,input,select,textarea):focus-visible {
  outline: none;
  box-shadow: var(--totchi-focus);
}
.totchi-app :is(input,select,textarea):focus-visible { border-color: #A78BFA; }

/* Statuses share one visual language. */
.totchi-status-pill,
.totchi-plan-badge,
.totchi-subscription-status,
.totchi-count-badge {
  line-height: 1.2;
  border: 1px solid transparent;
}
.totchi-status-pill { border-color: #D1FAE5; }
.totchi-status-pill.is-neutral,
.totchi-plan-badge.is-muted,
.totchi-subscription-status.is-muted { border-color: #E5E7EB; }

/* Typography and whitespace rhythm. */
.totchi-page-head h1 { letter-spacing: -.01em; }
.totchi-page-head p,
.totchi-panel-head p { line-height: 1.8; }
.totchi-panel-head { margin-bottom: 16px; }
.totchi-main { padding-bottom: 34px; }

/* Tables: reusable lightweight defaults for current and future product management. */
.totchi-order-table-wrap,
.totchi-table-wrap { background: #fff; scrollbar-width: thin; scrollbar-color: #D7DAE0 transparent; }
.totchi-order-table th,
.totchi-data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #FAFAFB;
  color: #6B7280;
  font-weight: 700;
}
.totchi-order-table tbody tr:hover,
.totchi-data-table tbody tr:hover { background: #FCFBFF; }

/* Utility for future product thumbnails: no layout shift while lazy images load. */
.totchi-product-thumb {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  object-fit: contain;
  background: #F8F9FB;
  border: 1px solid #ECEEF2;
}

/* Tiny CSS-only loading primitive; opt-in via .is-loading. */
.totchi-skeleton {
  display: inline-block;
  min-height: 12px;
  border-radius: 6px;
  color: transparent !important;
  background: #EEF0F3;
  position: relative;
  overflow: hidden;
}
.totchi-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(100%);
  background: linear-gradient(90deg,transparent,rgba(255,255,255,.72),transparent);
  animation: totchi-shimmer 1.25s infinite;
}
@keyframes totchi-shimmer { to { transform: translateX(-100%); } }

/* Optional one-line tooltips with zero JS. */
[data-totchi-tip] { position: relative; }
[data-totchi-tip]:hover::after,
[data-totchi-tip]:focus-visible::after {
  content: attr(data-totchi-tip);
  position: absolute;
  z-index: 90;
  inset-inline-start: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(50%);
  width: max-content;
  max-width: 240px;
  padding: 7px 9px;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font-size: 10px;
  line-height: 1.6;
  box-shadow: 0 8px 24px rgba(17,24,39,.14);
  pointer-events: none;
}

/* Small screens stay functional without hiding important actions. */
@media (max-width: 760px) {
  .totchi-support-top span { display: none; }
  .totchi-support-top { width: 36px; height: 36px; padding: 0; justify-content: center; }
  .totchi-topbar-left { gap: 7px; }
  .totchi-main { padding: 18px 14px 24px; }
  .totchi-page-head { gap: 12px; }
  .totchi-page-actions { flex-wrap: wrap; }
  .totchi-panel,
  .totchi-kpi-card { border-radius: 11px; }
}

@media (max-width: 480px) {
  .totchi-topbar { padding-inline: 10px; }
  .totchi-brand-mark { width: 28px; height: 28px; }
  .totchi-channel { padding-inline: 8px; }
  .totchi-main { padding-inline: 10px; }
  .totchi-page-head h1 { font-size: 22px; }
  .totchi-kpi-card > strong { font-size: 23px; }
}

/* Accessibility and performance: users asking for less motion get no decorative motion. */
@media (prefers-reduced-motion: reduce) {
  .totchi-app *,
  .totchi-app *::before,
  .totchi-app *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* v0.9.0 — lightweight desktop sidebar collapse + account dropdown */
.totchi-sidebar-head-actions { display:flex; align-items:center; gap:7px; }
.totchi-sidebar-collapse {
  width:30px; height:30px; border:1px solid var(--totchi-border); border-radius:9px;
  display:grid; place-items:center; padding:0; background:#fff; color:#7B8491; cursor:pointer;
  flex:0 0 auto; transition:background .18s ease,color .18s ease,transform .18s ease,border-color .18s ease;
}
.totchi-sidebar-collapse:hover { background:#F7F5FF; color:var(--totchi-primary); border-color:#DCD3FF; }
.totchi-sidebar-collapse svg { width:16px; height:16px; transition:transform .18s ease; }

.totchi-user-menu { position:relative; }
.totchi-user-menu > summary { list-style:none; cursor:pointer; user-select:none; }
.totchi-user-menu > summary::-webkit-details-marker { display:none; }
.totchi-user-chevron { display:grid; place-items:center; color:#9CA3AF; margin-right:2px; }
.totchi-user-chevron svg { width:15px; height:15px; transition:transform .18s ease; }
.totchi-user-menu[open] .totchi-user-chevron svg { transform:rotate(180deg); }
.totchi-user-dropdown {
  position:absolute; top:calc(100% + 10px); left:0; z-index:90; width:210px;
  background:#fff; border:1px solid #E5E7EB; border-radius:13px; padding:6px;
  box-shadow:0 14px 36px rgba(17,24,39,.10);
}
.totchi-user-dropdown a {
  min-height:40px; padding:8px 10px; border-radius:9px; display:flex; align-items:center; gap:9px;
  color:#4B5563; font-size:12.5px; font-weight:600; transition:background .16s ease,color .16s ease;
}
.totchi-user-dropdown a:hover { background:#F7F5FF; color:var(--totchi-primary); }
.totchi-user-dropdown a svg { width:17px; height:17px; }
.totchi-user-dropdown-separator { height:1px; background:#EEF0F3; margin:5px 4px; }
.totchi-user-dropdown .totchi-user-logout { color:#B4233C; }
.totchi-user-dropdown .totchi-user-logout:hover { background:#FFF1F2; color:#BE123C; }

@media (min-width: 901px) {
  .totchi-layout,
  .totchi-sidebar { transition:width .18s ease,grid-template-columns .18s ease,padding .18s ease; }
  .totchi-app.is-sidebar-collapsed .totchi-layout { grid-template-columns:76px minmax(0,1fr); }
  .totchi-app.is-sidebar-collapsed .totchi-sidebar { width:76px; padding-inline:9px; }
  .totchi-app.is-sidebar-collapsed .totchi-sidebar-head { justify-content:center; padding-inline:0; }
  .totchi-app.is-sidebar-collapsed .totchi-sidebar-channel-meta,
  .totchi-app.is-sidebar-collapsed .totchi-status-pill,
  .totchi-app.is-sidebar-collapsed .totchi-nav-group-label,
  .totchi-app.is-sidebar-collapsed .totchi-side-label,
  .totchi-app.is-sidebar-collapsed .totchi-plan-card { display:none; }
  .totchi-app.is-sidebar-collapsed .totchi-sidebar-head-actions { width:100%; justify-content:center; }
  .totchi-app.is-sidebar-collapsed .totchi-sidebar-collapse svg { transform:rotate(180deg); }
  .totchi-app.is-sidebar-collapsed .totchi-sidebar-nav { gap:8px; }
  .totchi-app.is-sidebar-collapsed .totchi-nav-group { display:flex; flex-direction:column; gap:6px; }
  .totchi-app.is-sidebar-collapsed .totchi-side-link { justify-content:center; padding-inline:0; }
  .totchi-app.is-sidebar-collapsed .totchi-side-icon { width:24px; }
}

@media (max-width: 900px) {
  .totchi-sidebar-collapse { display:none; }
  .totchi-user-dropdown { left:0; right:auto; width:200px; }
}

@media (max-width: 520px) {
  .totchi-user-meta { display:none; }
  .totchi-user-chip { border-right:0; padding-right:0; }
  .totchi-user-chevron { display:none; }
  .totchi-user-dropdown { left:0; width:190px; }
}

/* v1.0.0 — onboarding, help center and account-safety polish */
.totchi-global-banner {
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding:12px 14px; margin-bottom:16px; background:#F7F5FF; border:1px solid #E5DFFF;
  border-radius:12px;
}
.totchi-global-banner.is-warning { background:#FFF9ED; border-color:#FDE7B2; }
.totchi-global-banner > div { display:flex; flex-direction:column; gap:3px; min-width:0; }
.totchi-global-banner strong { color:#1F2937; font-size:13px; }
.totchi-global-banner span { color:#6B7280; font-size:11.5px; line-height:1.7; }
.totchi-btn-ghost { background:transparent; border:1px solid transparent; color:#6B7280; }
.totchi-btn-ghost:hover { background:#F7F7F8; color:#374151; }

.totchi-onboarding-summary { padding:16px 18px; margin-bottom:14px; }
.totchi-onboarding-summary > div:first-child { display:flex; align-items:center; gap:12px; }
.totchi-onboarding-summary strong { display:block; color:#111827; font-size:14px; margin-bottom:3px; }
.totchi-onboarding-summary small { color:#6B7280; font-size:11.5px; line-height:1.7; }
.totchi-onboarding-progress { height:7px; background:#ECEEF2; border-radius:999px; overflow:hidden; margin-top:14px; }
.totchi-onboarding-progress i { display:block; height:100%; border-radius:inherit; background:var(--totchi-primary); transition:width .2s ease; }
.totchi-onboarding-list { display:grid; gap:10px; }
.totchi-onboarding-step { display:grid; grid-template-columns:40px minmax(0,1fr) auto; align-items:center; gap:14px; padding:15px 16px; }
.totchi-step-number { width:36px; height:36px; border-radius:11px; display:grid; place-items:center; background:#F2EFFF; color:var(--totchi-primary); font-weight:800; font-size:13px; }
.totchi-step-number svg { width:18px; height:18px; }
.totchi-onboarding-step.is-done .totchi-step-number { background:#ECFDF3; color:#0F9F6E; }
.totchi-onboarding-step.is-pending { background:#FCFCFD; }
.totchi-step-copy h2 { margin:0 0 4px; font-size:14px; color:#1F2937; }
.totchi-step-copy p { margin:0; font-size:11.5px; line-height:1.8; color:#6B7280; }
.totchi-step-action { justify-self:end; }
.totchi-onboarding-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:16px; }

.totchi-help-search { max-width:520px; height:44px; background:#fff; border:1px solid #E5E7EB; border-radius:12px; display:flex; align-items:center; gap:10px; padding:0 13px; margin-bottom:14px; }
.totchi-help-search span { display:grid; color:#8B93A1; }
.totchi-help-search svg { width:18px; height:18px; }
.totchi-help-search input { border:0!important; outline:0!important; box-shadow:none!important; width:100%; background:transparent; font:inherit; color:#111827; padding:0!important; }
.totchi-help-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; }
.totchi-help-item { padding:0; overflow:hidden; }
.totchi-help-item > summary { list-style:none; cursor:pointer; display:flex; justify-content:space-between; align-items:center; gap:14px; padding:16px; }
.totchi-help-item > summary::-webkit-details-marker { display:none; }
.totchi-help-item summary h2 { margin:0 0 4px; font-size:14px; color:#1F2937; }
.totchi-help-item summary p { margin:0; color:#6B7280; font-size:11.5px; line-height:1.7; }
.totchi-help-item summary > span { display:grid; color:#9CA3AF; flex:0 0 auto; }
.totchi-help-item summary > span svg { width:17px; height:17px; transition:transform .18s ease; }
.totchi-help-item[open] summary > span svg { transform:rotate(180deg); }
.totchi-help-body { border-top:1px solid #EFF0F2; padding:14px 16px 16px; background:#FCFCFD; }
.totchi-help-body p { margin:0 0 10px; color:#4B5563; font-size:12px; line-height:2; }
.totchi-help-empty { padding:28px; text-align:center; color:#6B7280; background:#fff; border:1px dashed #D9DDE3; border-radius:12px; }

@media (max-width: 760px) {
  .totchi-global-banner { align-items:flex-start; flex-direction:column; }
  .totchi-onboarding-step { grid-template-columns:36px minmax(0,1fr); }
  .totchi-step-action { grid-column:2; justify-self:start; }
  .totchi-help-grid { grid-template-columns:1fr; }
  .totchi-onboarding-footer { align-items:flex-start; flex-direction:column; }
}

/* ========================================================================== */
/* Product Management — v1.1.0                                                */
/* ========================================================================== */
.totchi-products-head { align-items: flex-end; }
.totchi-products-actions { align-items: center; }
.totchi-products-actions .totchi-btn svg { width: 15px; height: 15px; }

.totchi-store-strip {
  display:flex; align-items:center; justify-content:space-between; gap:18px;
  padding:14px 16px; margin-bottom:14px; border:1px solid #E9EAF0; border-radius:14px; background:#fff;
}
.totchi-store-identity { display:flex; align-items:center; gap:12px; min-width:0; }
.totchi-store-logo { width:46px; height:46px; flex:0 0 46px; display:grid; place-items:center; overflow:hidden; border:1px solid #E7E9EE; border-radius:12px; background:#F8F7FC; color:var(--totchi-primary); font-weight:800; font-size:17px; }
.totchi-store-logo img { width:100%; height:100%; object-fit:contain; background:#fff; }
.totchi-store-title-row { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.totchi-store-title-row strong { color:#20242D; font-size:13px; }
.totchi-store-subtitle { display:block; max-width:620px; margin-top:4px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#7B8491; font-size:10px; }
.totchi-store-strip-note { display:flex; align-items:flex-start; gap:8px; max-width:520px; color:#68717F; font-size:9.5px; line-height:1.8; }
.totchi-dot { width:7px; height:7px; flex:0 0 7px; margin-top:5px; border-radius:999px; background:#9CA3AF; }
.totchi-dot.is-info { background:#7C3AED; }

.totchi-products-panel { padding:0; overflow:visible; }
.totchi-products-toolbar { display:grid; grid-template-columns:minmax(260px,1.7fr) repeat(5,minmax(115px,.72fr)) auto; gap:8px; align-items:center; padding:14px 14px 10px; border-bottom:1px solid #F0F1F4; }
.totchi-products-toolbar.is-secondary { display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px; padding-top:10px; padding-bottom:10px; background:#FCFCFD; }
.totchi-product-search-wrap { min-width:0; }
.totchi-field { width:100%; height:36px; border:1px solid #E1E4E9; border-radius:9px; background:#fff; color:#313742; padding:0 10px; font-family:inherit; font-size:10.5px; outline:none; }
select.totchi-field { cursor:pointer; }
.totchi-btn-quiet { color:#6B7280; background:transparent; border-color:transparent; box-shadow:none; }
.totchi-btn-quiet:hover { background:#F5F5F7; color:#414854; }
.totchi-btn.is-small { min-height:29px; padding:5px 9px; border-radius:8px; font-size:9.5px; }
.totchi-btn.is-busy { opacity:.72; cursor:wait; }

.totchi-segmented { display:inline-flex; padding:3px; border:1px solid #E3E5EA; border-radius:10px; background:#fff; }
.totchi-segmented button { border:0; border-radius:7px; padding:6px 11px; background:transparent; color:#717986; font-family:inherit; font-size:10px; cursor:pointer; }
.totchi-segmented button.is-active { background:#F2EDFF; color:#6D28D9; font-weight:700; }
.totchi-products-more-filters { display:flex; align-items:center; flex-wrap:wrap; gap:14px; }
.totchi-check { display:inline-flex; align-items:center; gap:6px; color:#626B78; font-size:9.5px; cursor:pointer; }
.totchi-check input { accent-color:var(--totchi-primary); }
.totchi-products-sort { display:flex; align-items:center; gap:6px; margin-inline-start:auto; }
.totchi-products-sort .totchi-field { width:auto; min-width:120px; }
.totchi-products-sort .totchi-field.is-page-size { min-width:70px; }
.totchi-sort-order { width:36px; height:36px; font-size:16px; }

.totchi-products-summary { display:flex; align-items:center; gap:20px; min-height:45px; padding:8px 14px; border-bottom:1px solid #F0F1F4; }
.totchi-products-summary > div:not(.totchi-products-freshness) { display:flex; align-items:baseline; gap:5px; color:#8A919D; font-size:9px; }
.totchi-products-summary strong { color:#2B313B; font-size:13px; }
.totchi-products-freshness { margin-inline-start:auto; color:#8A919D; font-size:9px; }

.totchi-bulk-bar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:10px 14px 0; padding:10px 12px; border:1px solid #DDD1FE; border-radius:11px; background:#F8F5FF; }
.totchi-bulk-bar[hidden] { display:none; }
.totchi-bulk-bar strong { color:#5B21B6; font-size:10.5px; }
.totchi-bulk-bar > div { display:flex; gap:7px; flex-wrap:wrap; }

.totchi-products-feedback { margin:10px 14px 0; padding:9px 11px; border:1px solid #FDE68A; border-radius:10px; background:#FFFBEB; color:#92400E; font-size:10px; }
.totchi-products-feedback.is-error { border-color:#FECACA; background:#FEF2F2; color:#991B1B; }
.totchi-products-feedback.is-success { border-color:#BBF7D0; background:#F0FDF4; color:#166534; }

.totchi-products-table-wrap { margin-top:10px; max-height:calc(100vh - 330px); min-height:310px; overflow:auto; border-top:1px solid #ECEEF2; border-bottom:1px solid #ECEEF2; }
.totchi-products-table { width:100%; min-width:1180px; border-collapse:separate; border-spacing:0; }
.totchi-products-table th, .totchi-products-table td { padding:10px 9px; border-bottom:1px solid #F0F1F4; text-align:right; vertical-align:middle; font-size:9.8px; }
.totchi-products-table th { height:38px; white-space:nowrap; }
.totchi-products-table tbody tr:last-child td { border-bottom:0; }
.totchi-products-table tbody tr.needs-action { box-shadow:inset -2px 0 0 #F59E0B; }
.totchi-products-table tbody tr:hover { background:#FCFBFF; }
.totchi-col-select { width:34px; text-align:center !important; }
.totchi-col-select input { accent-color:var(--totchi-primary); }
.totchi-col-product { min-width:285px; max-width:360px; }
.totchi-product-cell { display:flex; align-items:center; gap:9px; min-width:0; }
.totchi-product-thumb.is-placeholder { display:grid; place-items:center; color:#7C3AED; font-weight:800; }
.totchi-product-cell > div:last-child { min-width:0; }
.totchi-product-title { display:flex; align-items:center; gap:6px; min-width:0; }
.totchi-product-title a, .totchi-product-title strong { display:block; max-width:270px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#2D333D; font-weight:700; text-decoration:none; }
.totchi-product-title a:hover { color:var(--totchi-primary); }
.totchi-row-warning { width:17px; height:17px; flex:0 0 17px; display:grid; place-items:center; border-radius:999px; background:#FFF3D7; color:#B45309; font-weight:800; }
.totchi-product-codes, .totchi-advanced-meta { display:flex; flex-wrap:wrap; gap:5px 9px; margin-top:4px; color:#9AA1AC; font-size:8.3px; }
.totchi-advanced-meta { display:none; color:#7B8491; }
.totchi-products-panel.is-advanced-view .totchi-advanced-meta { display:flex; }

.totchi-status-stack, .totchi-money-cell, .totchi-market-cell { display:flex; flex-direction:column; align-items:flex-start; gap:4px; }
.totchi-status-stack { min-width:92px; }
.totchi-status-stack > div { display:flex; gap:4px; }
.totchi-status-stack small, .totchi-money-cell small, .totchi-market-cell small { color:#8A929E; font-size:8.4px; line-height:1.55; }
.totchi-money-cell strong { color:#323842; font-size:10.2px; white-space:nowrap; }
.totchi-status-chip { display:inline-flex; align-items:center; width:max-content; min-height:21px; padding:3px 7px; border:1px solid transparent; border-radius:999px; font-size:8.4px; font-weight:700; white-space:nowrap; }
.totchi-status-chip.is-success { color:#047857; background:#ECFDF5; border-color:#D1FAE5; }
.totchi-status-chip.is-danger { color:#B42318; background:#FFF1F0; border-color:#FECACA; }
.totchi-status-chip.is-warning { color:#A15C00; background:#FFF8E7; border-color:#FDE7A7; }
.totchi-status-chip.is-purple { color:#6D28D9; background:#F4F0FF; border-color:#E5DBFF; }
.totchi-status-chip.is-neutral { color:#68717F; background:#F5F6F7; border-color:#E5E7EB; }

.totchi-inline-input, .totchi-inline-select { width:108px; height:32px; border:1px solid #E0E3E8; border-radius:8px; background:#fff; color:#343A44; padding:0 8px; font-family:inherit; font-size:9.5px; }
.totchi-inline-select { width:165px; }
.totchi-inline-input:hover, .totchi-inline-select:hover { border-color:#CACED6; }
.totchi-inline-input:focus, .totchi-inline-select:focus { border-color:#A78BFA; outline:none; box-shadow:0 0 0 3px rgba(124,58,237,.09); }
.totchi-percent-input { position:relative; width:92px; }
.totchi-percent-input .totchi-inline-input { width:92px; padding-inline-end:22px; }
.totchi-percent-input span { position:absolute; inset-inline-end:8px; top:8px; color:#9AA1AC; font-size:9px; pointer-events:none; }
.totchi-protected-note { display:block; margin-top:4px; color:#B42318; font-size:8px; }
.totchi-engine-flags { display:flex; flex-wrap:wrap; gap:4px; }
.totchi-mini-flag { padding:3px 5px; border-radius:6px; font-size:7.8px; }
.totchi-mini-flag.is-on { color:#047857; background:#ECFDF5; }
.totchi-mini-flag.is-off { color:#8B929D; background:#F3F4F6; }
.totchi-engine-toggles { display:flex; gap:7px; margin-top:6px; }
.totchi-engine-toggles label { display:flex; align-items:center; gap:3px; color:#737B87; font-size:7.8px; }
.totchi-engine-toggles input { accent-color:var(--totchi-primary); }
.totchi-row-actions { display:flex; flex-direction:column; align-items:stretch; gap:5px; min-width:72px; }

.totchi-products-panel:not(.is-advanced-view) .totchi-advanced-col { display:none; }
.totchi-products-panel:not(.is-advanced-view) .totchi-products-table { min-width:1020px; }
.totchi-products-panel:not(.is-advanced-view) .totchi-engine-toggles { display:none; }

.totchi-table-empty { min-height:190px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:7px; color:#7B8491; text-align:center; }
.totchi-table-empty strong { color:#343A44; font-size:12px; }
.totchi-table-empty span { max-width:460px; font-size:10px; line-height:1.8; }
.totchi-table-empty.is-error strong { color:#B42318; }
.totchi-product-loading-row td { padding:9px 14px; }

.totchi-products-pagination { display:flex; align-items:center; justify-content:center; gap:12px; padding:13px; }
.totchi-products-pagination span { min-width:100px; color:#747C88; text-align:center; font-size:9.5px; }

/* Modal + preview primitives used by bulk/import/history. */
body.totchi-modal-open { overflow:hidden; }
.totchi-modal[hidden] { display:none; }
.totchi-modal { position:fixed; z-index:99999; inset:0; display:grid; place-items:center; padding:18px; direction:rtl; }
.totchi-modal-backdrop { position:absolute; inset:0; background:rgba(17,24,39,.32); backdrop-filter:blur(2px); }
.totchi-modal-card { position:relative; width:min(620px,100%); max-height:min(760px,calc(100vh - 36px)); overflow:auto; border:1px solid #E6E8ED; border-radius:16px; background:#fff; box-shadow:0 22px 70px rgba(17,24,39,.18); }
.totchi-modal-card.is-wide { width:min(760px,100%); }
.totchi-modal-head { position:sticky; top:0; z-index:2; display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:17px 18px 13px; border-bottom:1px solid #EEF0F3; background:rgba(255,255,255,.98); }
.totchi-modal-head h2 { margin:3px 0 0; color:#242A33; font-size:16px; }
.totchi-modal-close { width:32px; height:32px; border:0; border-radius:9px; background:#F5F6F8; color:#717986; font-size:22px; line-height:1; cursor:pointer; }
.totchi-modal-body { padding:17px 18px 18px; }
.totchi-muted { color:#7E8793; font-size:10px; line-height:1.8; }
.totchi-error-text { color:#B42318; font-size:10px; }
.totchi-form-grid { display:grid; gap:12px; margin-top:14px; }
.totchi-form-grid.is-2 { grid-template-columns:repeat(2,minmax(0,1fr)); }
.totchi-form-grid label { display:flex; flex-direction:column; gap:6px; color:#5E6672; font-size:9.5px; }
.totchi-form-span-2 { grid-column:1/-1; }
.totchi-modal-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:8px; margin-top:18px; }
.totchi-preview-stats { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:7px; }
.totchi-preview-stats span { display:flex; flex-direction:column; gap:3px; padding:10px; border:1px solid #ECEEF2; border-radius:10px; background:#FAFAFB; color:#747C87; font-size:8.5px; }
.totchi-preview-stats strong { color:#323842; font-size:13px; }
.totchi-preview-stats .is-success strong { color:#047857; }
.totchi-preview-stats .is-warning strong { color:#B45309; }
.totchi-preview-stats .is-danger strong { color:#B42318; }
.totchi-preview-list { margin-top:12px; border:1px solid #ECEEF2; border-radius:11px; overflow:hidden; }
.totchi-preview-list > div { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:8px 10px; border-bottom:1px solid #F0F1F4; font-size:9px; }
.totchi-preview-list > div:last-of-type { border-bottom:0; }
.totchi-preview-list span, .totchi-preview-list small { color:#7C8490; }
.totchi-upload-zone { display:flex; flex-direction:column; align-items:center; gap:7px; padding:25px 16px; border:1px dashed #CFC5F4; border-radius:13px; background:#FAF8FF; text-align:center; }
.totchi-upload-zone strong { color:#4C367D; font-size:12px; }
.totchi-upload-zone span { color:#82779A; font-size:9px; }
.totchi-upload-zone input { max-width:100%; margin-top:7px; font-family:inherit; font-size:9.5px; }

.totchi-history-list { display:flex; flex-direction:column; gap:8px; }
.totchi-history-item { padding:11px 12px; border:1px solid #ECEEF2; border-radius:11px; background:#fff; }
.totchi-history-item > div:first-child { display:flex; justify-content:space-between; gap:12px; }
.totchi-history-item strong { color:#353B45; font-size:10px; }
.totchi-history-item time { color:#969DA7; font-size:8.5px; }
.totchi-history-payload { display:flex; flex-wrap:wrap; gap:5px 12px; margin-top:8px; }
.totchi-history-payload span { color:#6D7580; font-size:8.5px; }
.totchi-history-payload b { color:#4A515C; }

.totchi-toast-stack { position:fixed; z-index:100100; inset-inline-start:18px; bottom:18px; display:flex; flex-direction:column; gap:8px; width:min(360px,calc(100vw - 36px)); pointer-events:none; }
.totchi-toast { transform:translateY(7px); opacity:0; padding:10px 12px; border:1px solid #E4E7EB; border-radius:11px; background:#fff; box-shadow:0 14px 38px rgba(17,24,39,.13); color:#444B56; font-size:10px; line-height:1.7; transition:opacity .18s ease,transform .18s ease; }
.totchi-toast.is-visible { transform:translateY(0); opacity:1; }
.totchi-toast.is-success { border-color:#BBF7D0; background:#F0FDF4; color:#166534; }
.totchi-toast.is-error { border-color:#FECACA; background:#FEF2F2; color:#991B1B; }
.totchi-toast.is-warning { border-color:#FDE68A; background:#FFFBEB; color:#92400E; }
.totchi-toast.is-neutral { border-color:#E5E7EB; background:#F9FAFB; color:#4B5563; }

@media (max-width: 1220px) {
  .totchi-products-toolbar { grid-template-columns:minmax(240px,1.5fr) repeat(3,minmax(120px,.8fr)); }
  .totchi-products-toolbar > *:nth-child(n+5) { min-width:120px; }
  .totchi-store-strip { align-items:flex-start; flex-direction:column; }
  .totchi-store-strip-note { max-width:none; }
}

@media (max-width: 760px) {
  .totchi-products-head { align-items:flex-start; }
  .totchi-products-actions { width:100%; }
  .totchi-products-actions .totchi-btn { flex:1 1 auto; }
  .totchi-store-strip { padding:12px; }
  .totchi-store-subtitle { max-width:calc(100vw - 110px); }
  .totchi-products-toolbar { display:grid; grid-template-columns:1fr 1fr; padding:10px; }
  .totchi-product-search-wrap { grid-column:1/-1; }
  .totchi-products-toolbar .totchi-btn-quiet { grid-column:1/-1; }
  .totchi-products-toolbar.is-secondary { display:flex; align-items:stretch; }
  .totchi-products-more-filters { width:100%; gap:9px 12px; }
  .totchi-products-sort { width:100%; margin:0; }
  .totchi-products-sort .totchi-field:first-child { flex:1; }
  .totchi-products-summary { gap:12px; }
  .totchi-products-freshness { display:none; }
  .totchi-bulk-bar { align-items:flex-start; flex-direction:column; }
  .totchi-products-table-wrap { max-height:none; }
  .totchi-form-grid.is-2 { grid-template-columns:1fr; }
  .totchi-form-span-2 { grid-column:auto; }
  .totchi-preview-stats { grid-template-columns:repeat(2,1fr); }
  .totchi-modal { padding:8px; }
  .totchi-modal-card { max-height:calc(100vh - 16px); border-radius:13px; }
  .totchi-modal-head, .totchi-modal-body { padding-inline:13px; }
}


/* v1.1.1 — sidebar hierarchy and collapse-control placement */
@media (min-width: 901px) {
  .totchi-sidebar-head {
    position: relative;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 9px;
    padding: 0 8px 14px;
  }

  .totchi-sidebar-channel-meta {
    min-width: 0;
    padding-left: 42px;
  }

  .totchi-sidebar-head-actions {
    display: flex;
    flex-direction: row !important;
    align-items: center;
    justify-content: flex-start;
    min-height: 30px;
    gap: 7px;
  }

  .totchi-sidebar-collapse {
    position: absolute;
    top: 0;
    left: 8px;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #F9FAFB;
  }

  .totchi-sidebar-collapse:hover {
    background: #F5F3FF;
  }

  .totchi-status-pill {
    align-self: flex-start;
    max-width: 100%;
    white-space: nowrap;
  }

  .totchi-nav-group {
    gap: 4px;
  }

  .totchi-nav-group + .totchi-nav-group {
    margin-top: 4px;
    padding-top: 15px;
    border-top-color: #ECEEF2;
  }

  .totchi-nav-group-label {
    padding: 0 10px 7px;
    color: #6B7280;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.5;
    letter-spacing: 0;
  }

  .totchi-side-link {
    font-size: 13.5px;
  }

  .totchi-app.is-sidebar-collapsed .totchi-sidebar-head {
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    min-height: 32px;
    padding-inline: 0;
  }

  .totchi-app.is-sidebar-collapsed .totchi-sidebar-head-actions {
    width: auto;
    min-height: 32px;
    justify-content: center;
  }

  .totchi-app.is-sidebar-collapsed .totchi-sidebar-collapse {
    position: static;
  }
}

/* ========================================================================== */
/* Product Management — v1.2.0 daily-work redesign                           */
/* ========================================================================== */

/* Desktop sidebar control belongs to the top bar: it stays visible while the
   operator scrolls and no longer competes with the store/channel status. */
@media (min-width: 901px) {
  .totchi-topbar .totchi-topbar-sidebar-toggle {
    position: static;
    inset: auto;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    margin-inline-start: -12px;
    border: 1px solid #E7E2F5;
    border-radius: 11px;
    background: #FAF9FF;
    color: #746B86;
    box-shadow: none;
  }
  .totchi-topbar .totchi-topbar-sidebar-toggle:hover {
    border-color: #D8CDFE;
    background: #F5F1FF;
    color: var(--totchi-primary);
  }
  .totchi-topbar .totchi-topbar-sidebar-toggle svg { width: 17px; height: 17px; }
  .totchi-sidebar-head { padding-inline: 8px; }
  .totchi-sidebar-channel-meta { padding-left: 0; }
  .totchi-sidebar-head-actions { min-height: 24px; }
}
@media (max-width: 900px) {
  .totchi-topbar-sidebar-toggle { display: none !important; }
}

.totchi-products-head { align-items:flex-end; margin-bottom:16px; }
.totchi-products-title-wrap { min-width:0; max-width:790px; }
.totchi-products-title-line { display:flex; align-items:center; flex-wrap:wrap; gap:7px; }
.totchi-products-live-dot { width:6px; height:6px; border-radius:50%; background:#10B981; box-shadow:0 0 0 4px rgba(16,185,129,.10); }
.totchi-products-head-note { color:#8A93A1; font-size:11px; }
.totchi-products-head h1 { margin-top:4px !important; margin-bottom:4px !important; }
.totchi-products-head p { max-width:760px; line-height:1.9; }
.totchi-products-actions { flex-wrap:wrap; justify-content:flex-end; }
.totchi-products-actions .totchi-btn { min-height:40px; }
.totchi-products-actions .totchi-btn svg { width:16px; height:16px; }

.totchi-store-strip {
  padding:13px 15px;
  margin-bottom:12px;
  border-color:#E8EAF0;
  border-radius:15px;
  box-shadow:0 2px 10px rgba(17,24,39,.025);
}
.totchi-store-strip-note strong { color:#4F5662; }

.totchi-products-quickstart {
  display:grid;
  grid-template-columns:minmax(210px,.9fr) minmax(520px,2fr) auto;
  align-items:center;
  gap:14px;
  padding:14px 15px;
  margin-bottom:13px;
  border:1px solid #E5DCFF;
  border-radius:16px;
  background:linear-gradient(135deg,#FBF9FF 0%,#F7F4FF 55%,#FFFBFE 100%);
  box-shadow:0 4px 16px rgba(124,58,237,.045);
}
.totchi-products-quickstart[hidden] { display:none !important; }
.totchi-products-quickstart-main { display:flex; align-items:center; gap:11px; min-width:0; }
.totchi-products-guide-icon { width:40px; height:40px; flex:0 0 40px; display:grid; place-items:center; border-radius:12px; color:#6D28D9; background:#EEE8FF; }
.totchi-products-guide-icon svg { width:20px; height:20px; }
.totchi-products-quickstart-main > div { display:flex; min-width:0; flex-direction:column; gap:2px; }
.totchi-products-quickstart-main strong { color:#2A2337; font-size:13px; }
.totchi-products-quickstart-main span { color:#756D83; font-size:10.5px; line-height:1.65; }
.totchi-products-guide-steps { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.totchi-guide-step { display:flex; align-items:center; gap:8px; min-width:0; min-height:54px; padding:8px 10px; border:1px solid rgba(221,214,254,.85); border-radius:11px; background:rgba(255,255,255,.78); color:#484151; text-align:right; font-family:inherit; cursor:pointer; transition:.17s ease; }
.totchi-guide-step:hover { border-color:#CFC0FF; background:#fff; transform:translateY(-1px); }
.totchi-guide-step b { width:25px; height:25px; flex:0 0 25px; display:grid; place-items:center; border-radius:8px; background:#7C3AED; color:#fff; font-size:10px; }
.totchi-guide-step span { display:flex; min-width:0; flex-direction:column; gap:1px; }
.totchi-guide-step strong { overflow:hidden; color:#3E3748; font-size:10.5px; text-overflow:ellipsis; white-space:nowrap; }
.totchi-guide-step small { overflow:hidden; color:#8A8197; font-size:8.8px; text-overflow:ellipsis; white-space:nowrap; }
.totchi-products-guide-actions { display:flex; align-items:center; gap:5px; }
.totchi-products-guide-dismiss { width:28px; height:28px; border:0; border-radius:8px; background:transparent; color:#958DA1; font-size:19px; cursor:pointer; }
.totchi-products-guide-dismiss:hover { background:#EEE8FF; color:#6D28D9; }

.totchi-products-kpis { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:9px; margin-bottom:13px; }
.totchi-product-kpi { display:flex; align-items:center; gap:10px; min-height:76px; padding:12px 13px; border:1px solid #E9EBEF; border-radius:14px; background:#fff; box-shadow:0 3px 14px rgba(17,24,39,.028); }
.totchi-product-kpi .totchi-kpi-icon { width:37px; height:37px; flex:0 0 37px; display:grid; place-items:center; border-radius:11px; background:#F4F1FF; color:#7C3AED; }
.totchi-product-kpi .totchi-kpi-icon svg { width:18px; height:18px; }
.totchi-product-kpi > div { display:grid; grid-template-columns:auto auto; align-items:baseline; gap:0 5px; min-width:0; }
.totchi-product-kpi small { grid-column:1/-1; margin-bottom:2px; color:#747D89; font-size:10px; white-space:nowrap; }
.totchi-product-kpi strong { color:#252A33; font-family:Peyda,Dana,sans-serif; font-size:21px; line-height:1.2; }
.totchi-product-kpi span:last-child { color:#A0A6AF; font-size:8.5px; }
.totchi-product-kpi.is-success .totchi-kpi-icon { background:#ECFDF5; color:#059669; }
.totchi-product-kpi.is-danger .totchi-kpi-icon { background:#FFF1F2; color:#E11D48; }
.totchi-product-kpi.is-warning .totchi-kpi-icon { background:#FFF8E8; color:#D97706; }
.totchi-product-kpi.is-neutral .totchi-kpi-icon { background:#F3F4F6; color:#6B7280; }

.totchi-products-panel {
  --totchi-product-font:12.5px;
  --totchi-product-small:10.4px;
  --totchi-product-row-y:12px;
  overflow:visible;
  border-color:#E7E9EF;
  border-radius:16px;
  box-shadow:0 5px 20px rgba(17,24,39,.035);
}
.totchi-products-panel.is-font-normal { --totchi-product-font:11.5px; --totchi-product-small:9.6px; }
.totchi-products-panel.is-font-large { --totchi-product-font:12.7px; --totchi-product-small:10.4px; }
.totchi-products-panel.is-font-xlarge { --totchi-product-font:14px; --totchi-product-small:11.3px; }
.totchi-products-panel.is-density-compact { --totchi-product-row-y:7px; }

.totchi-products-workbar { display:flex; align-items:center; gap:9px; padding:13px 14px 10px; border-bottom:1px solid #EEF0F3; background:#fff; border-radius:16px 16px 0 0; }
.totchi-product-search-wrap { position:relative; flex:1 1 460px; min-width:260px; }
.totchi-product-search-wrap .totchi-field { height:42px; padding-inline-start:39px; padding-inline-end:58px; border-radius:11px; font-size:11.5px; }
.totchi-product-search-wrap .totchi-field:focus { border-color:#BCA8FE; box-shadow:0 0 0 3px rgba(124,58,237,.08); }
.totchi-search-icon { position:absolute; z-index:2; inset-inline-start:12px; top:50%; display:grid; color:#8C94A1; transform:translateY(-50%); pointer-events:none; }
.totchi-search-icon svg { width:17px; height:17px; }
.totchi-product-search-wrap kbd { position:absolute; z-index:2; inset-inline-end:10px; top:50%; padding:3px 6px; border:1px solid #E4E6EA; border-radius:6px; background:#F8F9FB; color:#9399A3; font-family:inherit; font-size:8.5px; transform:translateY(-50%); pointer-events:none; }
.totchi-view-segment { flex:0 0 auto; }
.totchi-view-segment button { min-width:55px; }

.totchi-display-settings { position:relative; flex:0 0 auto; }
.totchi-display-settings > summary { list-style:none; min-height:40px; cursor:pointer; user-select:none; }
.totchi-display-settings > summary::-webkit-details-marker { display:none; }
.totchi-display-settings > summary svg { width:15px; height:15px; }
.totchi-display-settings[open] > summary { border-color:#CFC2FD; color:#6D28D9; background:#F8F5FF; }
.totchi-display-popover { position:absolute; z-index:30; top:calc(100% + 8px); inset-inline-end:0; width:310px; padding:13px; border:1px solid #E3E5EA; border-radius:13px; background:#fff; box-shadow:0 18px 45px rgba(17,24,39,.14); }
.totchi-display-section + .totchi-display-section { margin-top:13px; padding-top:12px; border-top:1px solid #EFF0F2; }
.totchi-display-section > strong { display:block; margin-bottom:7px; color:#555D69; font-size:10px; }
.totchi-segmented.is-full { display:flex; width:100%; }
.totchi-segmented.is-full button { flex:1; }
.totchi-column-toggles { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
.totchi-column-toggles label { display:flex; align-items:center; gap:6px; color:#656D79; font-size:9.5px; cursor:pointer; }
.totchi-column-toggles input { accent-color:var(--totchi-primary); }

.totchi-products-toolbar { display:grid; grid-template-columns:repeat(4,minmax(125px,1fr)) minmax(210px,1.35fr) auto; gap:8px; padding:10px 14px; border-bottom:1px solid #F0F1F4; background:#FCFCFD; }
.totchi-products-toolbar .totchi-field { height:38px; font-size:10.5px; }
.totchi-products-toolbar .totchi-products-sort { margin:0; }
.totchi-products-toolbar .totchi-products-sort .totchi-field { flex:1; min-width:145px; }

.totchi-quick-filters { display:flex; align-items:center; flex-wrap:wrap; gap:6px; min-height:48px; padding:8px 14px; border-bottom:1px solid #F0F1F4; background:#fff; }
.totchi-quick-filter-label { margin-inline-end:2px; color:#7A828E; font-size:9.5px; font-weight:700; }
.totchi-quick-filters > button { display:inline-flex; align-items:center; gap:6px; min-height:30px; padding:5px 9px; border:1px solid #E5E7EB; border-radius:999px; background:#fff; color:#69717E; font-family:inherit; font-size:9.4px; cursor:pointer; transition:.15s ease; }
.totchi-quick-filters > button:hover { border-color:#D4C9FA; color:#6D28D9; }
.totchi-quick-filters > button.is-active { border-color:#CFC0FF; background:#F4F0FF; color:#6D28D9; font-weight:700; }
.totchi-quick-filters > button i { width:6px; height:6px; border-radius:50%; background:#A1A7B0; }
.totchi-quick-filters > button i.is-success { background:#10B981; }
.totchi-quick-filters > button i.is-danger { background:#F43F5E; }
.totchi-quick-filters > button i.is-purple { background:#7C3AED; }
.totchi-quick-filters > button i.is-warning { background:#F59E0B; }
.totchi-more-filters { position:relative; margin-inline-start:auto; }
.totchi-more-filters > summary { list-style:none; padding:6px 9px; border-radius:8px; color:#6D28D9; font-size:9.5px; font-weight:700; cursor:pointer; }
.totchi-more-filters > summary::-webkit-details-marker { display:none; }
.totchi-more-filters[open] > summary { background:#F4F0FF; }
.totchi-more-filters > div { position:absolute; z-index:28; top:calc(100% + 6px); inset-inline-end:0; display:grid; gap:10px; width:235px; padding:12px; border:1px solid #E3E5E9; border-radius:12px; background:#fff; box-shadow:0 16px 38px rgba(17,24,39,.13); }
.totchi-more-filters .totchi-field { height:34px; font-size:9.5px; }

.totchi-products-summary { min-height:48px; gap:17px; padding:8px 14px; background:#FBFCFD; }
.totchi-products-summary > div:not(.totchi-products-freshness):not(.totchi-page-size-control):not(.totchi-products-summary-hint) { font-size:9.5px; }
.totchi-products-summary-hint { color:#9AA0A9; font-size:8.8px; }
.totchi-products-freshness { margin-inline-start:auto; }
.totchi-page-size-control { display:flex; align-items:center; gap:6px; color:#858D98; font-size:9px; }
.totchi-page-size-control .totchi-field { width:67px; height:31px; padding-inline:6px; font-size:9px; }

.totchi-bulk-bar { position:sticky; z-index:15; top:calc(var(--totchi-topbar) + 6px); align-items:center; margin:9px 12px; padding:10px 12px; box-shadow:0 7px 22px rgba(124,58,237,.08); }
body.admin-bar .totchi-bulk-bar { top:calc(var(--totchi-topbar) + 38px); }
.totchi-bulk-bar > span { flex:1; color:#766D85; font-size:9px; }

.totchi-products-table-wrap { position:relative; max-height:calc(100vh - 250px); min-height:360px; margin-top:0; overflow:auto; border-top:0; border-bottom:1px solid #ECEEF2; scrollbar-color:#D6D9DF transparent; }
.totchi-products-table-wrap::-webkit-scrollbar { width:10px; height:10px; }
.totchi-products-table-wrap::-webkit-scrollbar-thumb { border:2px solid transparent; border-radius:999px; background:#D5D8DE; background-clip:padding-box; }
.totchi-products-table { width:max-content; min-width:100%; table-layout:fixed; border-collapse:separate; border-spacing:0; }
.totchi-products-table th,
.totchi-products-table td { padding:var(--totchi-product-row-y) 10px; font-size:var(--totchi-product-font); line-height:1.65; border-bottom:1px solid #EEF0F3; text-align:right; vertical-align:middle; }
.totchi-products-table th { position:sticky; z-index:9; top:0; height:46px; padding-top:9px; padding-bottom:9px; border-bottom:1px solid #E3E6EB; background:#F8F9FB; color:#59616D; font-size:calc(var(--totchi-product-font) - 1.8px); font-weight:800; white-space:nowrap; box-shadow:0 1px 0 rgba(17,24,39,.02); }
.totchi-products-table tbody tr { background:#fff; transition:background .13s ease, box-shadow .13s ease; }
.totchi-products-table tbody tr:hover { background:#FCFBFF; }
.totchi-products-table tbody tr.needs-action { box-shadow:inset -3px 0 0 #F59E0B; }
.totchi-products-table tbody tr.is-dirty { background:#FFFCF2; box-shadow:inset -3px 0 0 #7C3AED; }
.totchi-products-table .is-user-hidden { display:none !important; }

/* Keep identity and actions visible while the operator scrolls horizontally. */
.totchi-products-table th[data-col-key="select"],
.totchi-products-table td[data-col-key="select"] { position:sticky; right:0; z-index:11; background:inherit; }
.totchi-products-table th[data-col-key="product"],
.totchi-products-table td[data-col-key="product"] { position:sticky; right:46px; z-index:10; background:inherit; box-shadow:-1px 0 0 #EEF0F3; }
.totchi-products-table th[data-col-key="actions"],
.totchi-products-table td[data-col-key="actions"] { position:sticky; left:0; z-index:10; background:inherit; box-shadow:1px 0 0 #EEF0F3; }
.totchi-products-table thead th[data-col-key="select"],
.totchi-products-table thead th[data-col-key="product"],
.totchi-products-table thead th[data-col-key="actions"] { z-index:14; background:#F8F9FB; }

.totchi-col-resizer { position:absolute; z-index:20; top:7px; bottom:7px; inset-inline-end:-4px; width:8px; cursor:col-resize; touch-action:none; }
.totchi-col-resizer::after { content:""; position:absolute; top:4px; bottom:4px; left:3px; width:1px; border-radius:2px; background:#D8DBE1; opacity:0; transition:.14s ease; }
.totchi-products-table th:hover .totchi-col-resizer::after,
.totchi-col-resizer:hover::after { background:#9B82F2; opacity:1; }
body.totchi-is-resizing-column { cursor:col-resize !important; user-select:none !important; }
body.totchi-is-resizing-column * { cursor:col-resize !important; }

.totchi-product-cell { gap:10px; }
.totchi-product-thumb { width:48px; height:48px; flex:0 0 48px; object-fit:contain; border:1px solid #ECEEF2; border-radius:10px; background:#fff; }
.totchi-product-thumb.is-placeholder { display:grid; place-items:center; color:#7C3AED; background:#F7F4FF; font-size:15px; font-weight:800; }
.totchi-product-title a,
.totchi-product-title strong { max-width:285px; color:#272C34; font-size:calc(var(--totchi-product-font) + .2px); font-weight:800; line-height:1.65; }
.totchi-product-codes,
.totchi-advanced-meta { gap:4px 9px; margin-top:3px; color:#9299A4; font-size:var(--totchi-product-small); }
.totchi-product-codes span { white-space:nowrap; }
.totchi-row-warning { width:19px; height:19px; flex:0 0 19px; font-size:10px; }

.totchi-status-stack,
.totchi-money-cell,
.totchi-market-cell { gap:4px; }
.totchi-status-stack small,
.totchi-money-cell small,
.totchi-market-cell small { color:#8A929E; font-size:var(--totchi-product-small); line-height:1.55; }
.totchi-money-cell strong { color:#272D36; font-size:calc(var(--totchi-product-font) + .2px); font-weight:800; }
.totchi-status-chip { min-height:24px; padding:3px 8px; font-size:calc(var(--totchi-product-small) - .2px); }
.totchi-stock-cell { display:flex; flex-direction:column; align-items:flex-start; gap:1px; }
.totchi-stock-cell strong { color:#333943; font-size:calc(var(--totchi-product-font) + 1px); }
.totchi-stock-cell small { color:#9BA1AA; font-size:var(--totchi-product-small); }

.totchi-inline-input,
.totchi-inline-select { height:36px; border-radius:9px; font-size:calc(var(--totchi-product-font) - 1px); }
.totchi-inline-input { width:100%; min-width:0; }
.totchi-inline-select { width:100%; min-width:0; }
.totchi-percent-input { width:100%; }
.totchi-percent-input .totchi-inline-input { width:100%; min-width:0; }
.totchi-percent-input span { top:9px; font-size:var(--totchi-product-small); }
.totchi-protected-note { margin-top:5px; font-size:var(--totchi-product-small); }
.totchi-mini-flag { padding:3px 6px; font-size:calc(var(--totchi-product-small) - 1px); }
.totchi-engine-toggles label { font-size:calc(var(--totchi-product-small) - .8px); }

.totchi-recommendation { display:inline-flex; align-items:center; min-height:27px; padding:4px 8px; border:1px solid #E5E7EB; border-radius:9px; background:#F7F8FA; color:#68717D; font-size:var(--totchi-product-small); font-weight:700; white-space:nowrap; }
.totchi-recommendation.is-success { border-color:#D1FAE5; background:#ECFDF5; color:#047857; }
.totchi-recommendation.is-danger { border-color:#FECACA; background:#FFF1F0; color:#B42318; }
.totchi-recommendation.is-warning { border-color:#FDE7A7; background:#FFF8E7; color:#A15C00; }
.totchi-recommendation.is-purple { border-color:#E5DBFF; background:#F4F0FF; color:#6D28D9; }
.totchi-row-actions { min-width:0; gap:6px; }
.totchi-row-actions > div { display:flex; gap:5px; }
.totchi-row-actions .totchi-btn { width:100%; min-height:31px; }
.totchi-row-icon-action { width:31px; height:29px; display:grid; place-items:center; border:1px solid #E2E5E9; border-radius:8px; background:#fff; color:#717986; font-family:inherit; font-size:15px; cursor:pointer; }
.totchi-row-icon-action:hover { border-color:#D6CBF9; background:#F8F5FF; color:#6D28D9; }
.totchi-row-icon-action.is-busy { font-size:8px; cursor:wait; }

.totchi-products-panel:not(.is-advanced-view) .totchi-advanced-col { display:none !important; }
.totchi-products-panel:not(.is-advanced-view) .totchi-engine-toggles { display:none; }
.totchi-products-panel.is-advanced-view .totchi-advanced-meta { display:flex; }

.totchi-products-pagination { min-height:58px; gap:8px; border-radius:0 0 16px 16px; background:#fff; }
.totchi-products-pagination span { min-width:165px; font-size:10px; }
.totchi-products-pagination .totchi-icon-button { width:34px; height:34px; border-radius:9px; font-size:14px; }
.totchi-products-pagination button:disabled { opacity:.42; cursor:not-allowed; }

/* Page help: practical explanations next to the actual workflow. */
.totchi-products-help-modal { width:min(900px,100%); }
.totchi-help-callout { display:flex; gap:6px; margin-bottom:13px; padding:12px 13px; border:1px solid #E4DCFF; border-radius:11px; background:#F8F5FF; color:#675D76; font-size:10.5px; line-height:1.9; }
.totchi-help-callout strong { flex:0 0 auto; color:#5B3CA0; }
.totchi-products-help-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.totchi-products-help-grid article { display:grid; grid-template-columns:31px minmax(0,1fr); gap:10px; padding:12px; border:1px solid #ECEEF2; border-radius:12px; background:#fff; transition:.25s ease; }
.totchi-products-help-grid article.is-highlighted { border-color:#BFAEFE; background:#FAF8FF; box-shadow:0 0 0 3px rgba(124,58,237,.07); }
.totchi-products-help-grid article > b { width:29px; height:29px; display:grid; place-items:center; border-radius:9px; background:#F2EDFF; color:#6D28D9; font-size:10px; }
.totchi-products-help-grid article strong { color:#363C46; font-size:11px; }
.totchi-products-help-grid article p { margin:3px 0 0; color:#707986; font-size:10px; line-height:1.9; }
.totchi-products-help-legend { display:flex; align-items:center; flex-wrap:wrap; gap:6px 8px; margin-top:13px; padding-top:12px; border-top:1px solid #EEF0F2; }
.totchi-products-help-legend small { margin-inline-end:9px; color:#7F8792; font-size:9px; }

@media (max-width: 1280px) {
  .totchi-products-quickstart { grid-template-columns:1fr; }
  .totchi-products-guide-actions { justify-content:flex-end; }
  .totchi-products-kpis { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .totchi-products-toolbar { grid-template-columns:repeat(3,minmax(120px,1fr)); }
  .totchi-products-toolbar .totchi-products-sort { grid-column:span 2; }
}

@media (max-width: 900px) {
  .totchi-products-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .totchi-products-workbar { flex-wrap:wrap; }
  .totchi-product-search-wrap { flex-basis:100%; }
  .totchi-display-settings { margin-inline-start:auto; }
  .totchi-products-toolbar { grid-template-columns:1fr 1fr; }
  .totchi-products-toolbar .totchi-products-sort { grid-column:1/-1; }
  .totchi-products-summary-hint { display:none; }
  .totchi-products-table-wrap { max-height:none; }
}

@media (max-width: 760px) {
  .totchi-products-head { align-items:flex-start; }
  .totchi-products-actions { width:100%; }
  .totchi-products-actions .totchi-btn { flex:1 1 calc(50% - 6px); justify-content:center; }
  .totchi-products-guide-steps { grid-template-columns:1fr; }
  .totchi-products-kpis { grid-template-columns:1fr 1fr; }
  .totchi-product-kpi { min-height:68px; }
  .totchi-product-kpi small { white-space:normal; }
  .totchi-products-toolbar { grid-template-columns:1fr; }
  .totchi-products-toolbar .totchi-products-sort { grid-column:auto; }
  .totchi-products-summary { flex-wrap:wrap; }
  .totchi-products-freshness { order:3; width:100%; margin:0; }
  .totchi-display-popover { width:min(310px,calc(100vw - 32px)); }
  .totchi-more-filters > div { inset-inline-end:auto; inset-inline-start:0; }
  .totchi-products-help-grid { grid-template-columns:1fr; }
  .totchi-help-callout { flex-direction:column; }
  .totchi-products-table th[data-col-key="product"],
  .totchi-products-table td[data-col-key="product"] { position:static; box-shadow:none; }
  .totchi-products-table th[data-col-key="actions"],
  .totchi-products-table td[data-col-key="actions"] { position:static; box-shadow:none; }
}
.totchi-products-panel:not(.is-advanced-view) col[data-col-key="pricing_meta"],
.totchi-products-panel:not(.is-advanced-view) col[data-col-key="engine"] { display:none; }

/* ========================================================================== */
/* v1.3.0 — Support center, ticketing, FAQ and contextual guides              */
/* ========================================================================== */

.totchi-support-hub-head { align-items:flex-end; }
.totchi-support-hub-head .totchi-btn svg { width:16px; height:16px; }
.totchi-support-notice { display:flex; align-items:center; justify-content:space-between; gap:14px; }
.totchi-support-notice a { color:inherit; font-weight:800; text-decoration:underline; text-underline-offset:3px; }

.totchi-support-tabs {
  display:flex; align-items:center; gap:7px; margin:0 0 15px; padding:6px;
  overflow:auto; scrollbar-width:thin; border:1px solid #E7E9EF; border-radius:14px; background:#fff;
  box-shadow:0 8px 24px rgba(17,24,39,.035);
}
.totchi-support-tabs a {
  position:relative; min-height:42px; display:flex; align-items:center; justify-content:center; gap:7px;
  flex:0 0 auto; padding:0 14px; border:1px solid transparent; border-radius:10px;
  color:#667085; text-decoration:none; font-size:12.5px; font-weight:700; transition:.18s ease;
}
.totchi-support-tabs a:hover { color:#5B21B6; background:#F8F6FF; }
.totchi-support-tabs a.is-active { color:#6D28D9; border-color:#E1D8FF; background:#F5F1FF; box-shadow:inset 0 0 0 1px rgba(124,58,237,.03); }
.totchi-support-tabs svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.8; }
.totchi-support-tabs b { min-width:19px; height:19px; display:grid; place-items:center; padding:0 5px; border-radius:999px; background:#F43F5E; color:#fff; font-size:9px; }

.totchi-support-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-bottom:14px; }
.totchi-support-kpis article { display:flex; align-items:center; gap:11px; padding:14px; border:1px solid #E8EAF0; border-radius:14px; background:#fff; box-shadow:0 8px 24px rgba(17,24,39,.035); }
.totchi-support-kpis article > span { width:40px; height:40px; flex:0 0 40px; display:grid; place-items:center; border-radius:12px; }
.totchi-support-kpis article > span svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.8; }
.totchi-support-kpis .is-purple { color:#7C3AED; background:#F3EFFF; }
.totchi-support-kpis .is-blue { color:#2563EB; background:#EFF6FF; }
.totchi-support-kpis .is-amber { color:#D97706; background:#FFF7E8; }
.totchi-support-kpis .is-green { color:#059669; background:#ECFDF5; }
.totchi-support-kpis small { display:block; margin-bottom:3px; color:#7B8491; font-size:10.5px; }
.totchi-support-kpis strong { display:block; color:#111827; font-size:19px; line-height:1; }

.totchi-support-overview-grid { display:grid; grid-template-columns:minmax(0,1.65fr) minmax(270px,.65fr); gap:13px; margin-bottom:14px; }
.totchi-support-start-card { padding:17px; }
.totchi-ticket-type-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.totchi-ticket-type-grid a { display:grid; grid-template-columns:38px minmax(0,1fr); gap:10px; align-items:start; padding:11px; border:1px solid #ECEEF3; border-radius:12px; color:inherit; text-decoration:none; background:#fff; transition:.18s ease; }
.totchi-ticket-type-grid a:hover { border-color:#D8CCFF; background:#FAF8FF; transform:translateY(-1px); box-shadow:0 7px 18px rgba(124,58,237,.06); }
.totchi-ticket-type-grid a > span { width:36px; height:36px; display:grid; place-items:center; border-radius:10px; background:#F4F0FF; color:#6D28D9; }
.totchi-ticket-type-grid svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.8; }
.totchi-ticket-type-grid strong { display:block; margin:1px 0 3px; color:#303642; font-size:11.5px; }
.totchi-ticket-type-grid small { display:block; color:#7A8492; font-size:9.5px; line-height:1.75; }
.totchi-support-overview-side { display:grid; align-content:start; gap:10px; }
.totchi-support-overview-side .totchi-panel { padding:16px; }
.totchi-support-overview-side h2, .totchi-contact-side-cards h2 { margin:10px 0 6px; color:#252B36; font-size:13px; }
.totchi-support-overview-side p, .totchi-contact-side-cards p { margin:0 0 10px; color:#6F7886; font-size:10.5px; line-height:1.9; }
.totchi-support-overview-side a:not(.totchi-btn) { color:#6D28D9; font-size:10.5px; font-weight:800; text-decoration:none; }
.totchi-support-card-icon { width:38px; height:38px; display:grid; place-items:center; border-radius:11px; background:#F3EFFF; color:#6D28D9; }
.totchi-support-card-icon svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; }
.totchi-support-safety-card { background:linear-gradient(150deg,#fff 0%,#FBF9FF 100%); }

.totchi-recent-tickets, .totchi-all-tickets { padding:0; overflow:hidden; }
.totchi-recent-tickets .totchi-panel-head, .totchi-all-tickets .totchi-panel-head { padding:15px 16px; margin:0; border-bottom:1px solid #ECEEF2; }
.totchi-ticket-list { display:grid; }
.totchi-ticket-row { display:grid; grid-template-columns:minmax(0,1fr) auto 120px 24px; align-items:center; gap:12px; min-height:62px; padding:10px 16px; border-bottom:1px solid #EFF1F4; color:inherit; text-decoration:none; transition:.15s ease; }
.totchi-ticket-row:last-child { border-bottom:0; }
.totchi-ticket-row:hover { background:#FCFBFF; }
.totchi-ticket-row-main strong { display:block; margin-bottom:4px; color:#2F3540; font-size:11.5px; }
.totchi-ticket-row-main small { display:block; color:#8A929D; font-size:9.5px; }
.totchi-ticket-row time { color:#8B93A0; font-size:9.5px; white-space:nowrap; }
.totchi-ticket-arrow { display:grid; color:#A0A7B2; }
.totchi-ticket-arrow svg { width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:2; }

.totchi-ticket-status { display:inline-flex; align-items:center; width:max-content; min-height:25px; padding:0 9px; border-radius:999px; font-size:9.5px; font-weight:800; white-space:nowrap; }
.totchi-ticket-status.is-open { color:#2563EB; background:#EFF6FF; }
.totchi-ticket-status.is-progress { color:#6D28D9; background:#F3EFFF; }
.totchi-ticket-status.is-waiting { color:#B45309; background:#FFF7E6; }
.totchi-ticket-status.is-resolved { color:#047857; background:#ECFDF3; }
.totchi-ticket-status.is-closed { color:#667085; background:#F2F4F7; }

.totchi-support-new-layout { display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:13px; }
.totchi-ticket-form-panel { padding:17px; }
.totchi-ticket-form .totchi-form-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
.totchi-ticket-form .totchi-form-row label.is-wide { grid-column:auto; }
.totchi-ticket-form-hints { display:flex; flex-wrap:wrap; gap:7px 14px; margin-top:-2px; padding:11px 12px; border:1px solid #ECEEF2; border-radius:10px; background:#FAFAFB; color:#6F7885; font-size:9.5px; }
.totchi-ticket-form-hints span { display:inline-flex; align-items:center; gap:5px; }
.totchi-ticket-form-hints svg { width:13px; height:13px; fill:none; stroke:currentColor; stroke-width:2; }
.totchi-ticket-form-hints .is-danger { color:#B42318; }
.totchi-ticket-guide-side { display:grid; align-content:start; gap:10px; }
.totchi-ticket-guide-side > .totchi-panel { padding:16px; }
.totchi-ticket-guide-side h2 { margin:10px 0 8px; color:#252B36; font-size:13px; }
.totchi-ticket-guide-side ol { margin:0; padding:0 20px 0 0; color:#667085; font-size:10.5px; line-height:2.05; }

.totchi-ticket-table-wrap { overflow:auto; }
.totchi-ticket-table { width:100%; min-width:850px; border-collapse:collapse; }
.totchi-ticket-table th { padding:10px 12px; border-bottom:1px solid #E7E9EE; background:#FAFAFB; color:#707986; font-size:9.5px; text-align:right; white-space:nowrap; }
.totchi-ticket-table td { padding:11px 12px; border-bottom:1px solid #EEF0F3; color:#5E6774; font-size:10px; vertical-align:middle; }
.totchi-ticket-table tbody tr:hover { background:#FCFBFF; }
.totchi-ticket-table a { color:#3F4652; text-decoration:none; }
.totchi-ticket-table td:first-child a { color:#6D28D9; font-weight:800; }
.totchi-ticket-table strong { color:#2C323C; font-size:10.5px; }
.totchi-priority { display:inline-flex; align-items:center; min-height:24px; padding:0 8px; border-radius:999px; font-size:9px; font-weight:800; }
.totchi-priority.is-low { color:#667085; background:#F2F4F7; }
.totchi-priority.is-normal { color:#2563EB; background:#EFF6FF; }
.totchi-priority.is-high { color:#B45309; background:#FFF7E6; }
.totchi-priority.is-critical { color:#B42318; background:#FFF0F0; }
.totchi-ticket-open { width:28px; height:28px; display:grid; place-items:center; border:1px solid #E4E7EC; border-radius:8px; color:#7C3AED!important; }
.totchi-ticket-open svg { width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:2; }

.totchi-ticket-detail-toolbar { margin-bottom:10px; }
.totchi-ticket-detail-layout { display:grid; grid-template-columns:minmax(0,1fr) 270px; gap:13px; }
.totchi-ticket-conversation { padding:0; overflow:hidden; }
.totchi-ticket-detail-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; padding:16px; border-bottom:1px solid #ECEEF2; background:linear-gradient(160deg,#fff 0%,#FCFBFF 100%); }
.totchi-ticket-detail-head h2 { margin:3px 0 7px; color:#202631; font-size:15px; }
.totchi-ticket-detail-head > time { color:#8D95A0; font-size:9.5px; white-space:nowrap; }
.totchi-ticket-meta-line { display:flex; align-items:center; flex-wrap:wrap; gap:7px 10px; color:#7B8491; font-size:9.5px; }
.totchi-ticket-message { display:grid; grid-template-columns:36px minmax(0,1fr); gap:10px; padding:15px 16px; border-bottom:1px solid #EFF1F4; }
.totchi-ticket-message.is-support { background:#FAF8FF; }
.totchi-ticket-message-avatar { width:34px; height:34px; display:grid; place-items:center; border-radius:10px; background:#F0F2F5; color:#657080; font-size:11px; font-weight:800; }
.totchi-ticket-message.is-support .totchi-ticket-message-avatar { color:#6D28D9; background:#EEE8FF; }
.totchi-ticket-message header { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:6px; }
.totchi-ticket-message header strong { color:#333A45; font-size:10.5px; }
.totchi-ticket-message header time { color:#9AA1AB; font-size:9px; }
.totchi-ticket-message p { margin:0; color:#596371; font-size:10.5px; line-height:2; white-space:normal; }
.totchi-ticket-reply-form { padding:15px 16px; background:#fff; }
.totchi-ticket-reply-form label > span { display:block; margin-bottom:6px; color:#434B57; font-size:10px; font-weight:800; }
.totchi-ticket-reply-form textarea { width:100%; min-height:110px; resize:vertical; padding:11px 12px; border:1px solid #DDE1E7; border-radius:10px; outline:0; background:#fff; color:#2F3742; font:inherit; font-size:11px; line-height:1.9; }
.totchi-ticket-reply-form textarea:focus { border-color:#A78BFA; box-shadow:0 0 0 3px rgba(124,58,237,.08); }
.totchi-ticket-reply-form > div { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:9px; }
.totchi-ticket-reply-form small { color:#8A929E; font-size:9.5px; }
.totchi-ticket-detail-side { display:grid; align-content:start; gap:10px; }
.totchi-ticket-detail-side .totchi-panel { padding:15px; }
.totchi-ticket-detail-side h3 { margin:0 0 10px; color:#303742; font-size:12px; }
.totchi-ticket-detail-side dl { margin:0; }
.totchi-ticket-detail-side dl > div { display:flex; justify-content:space-between; gap:10px; padding:8px 0; border-bottom:1px solid #EEF0F3; }
.totchi-ticket-detail-side dl > div:last-child { border-bottom:0; }
.totchi-ticket-detail-side dt { color:#8A929D; font-size:9.5px; }
.totchi-ticket-detail-side dd { margin:0; color:#424A56; font-size:9.5px; font-weight:800; text-align:left; }
.totchi-close-ticket-form .totchi-btn { width:100%; }

.totchi-empty-state { display:grid; justify-items:center; text-align:center; padding:45px 20px; color:#7A8390; }
.totchi-empty-state > span { width:46px; height:46px; display:grid; place-items:center; border-radius:13px; background:#F3EFFF; color:#6D28D9; }
.totchi-empty-state svg { width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:1.7; }
.totchi-empty-state h3 { margin:10px 0 4px; color:#343B46; font-size:13px; }
.totchi-empty-state p { margin:0 0 12px; font-size:10.5px; }

.totchi-faq-head { display:flex; align-items:end; justify-content:space-between; gap:18px; margin-bottom:12px; }
.totchi-faq-head h2 { margin:0 0 4px; color:#252B35; font-size:16px; }
.totchi-faq-head p { margin:0; color:#7B8490; font-size:10.5px; }
.totchi-faq-head .totchi-help-search { width:min(430px,100%); margin:0; }
.totchi-faq-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.totchi-faq-item { padding:0; overflow:hidden; }
.totchi-faq-item > summary { list-style:none; cursor:pointer; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 15px; }
.totchi-faq-item > summary::-webkit-details-marker { display:none; }
.totchi-faq-item summary div > span { display:inline-block; margin-bottom:5px; padding:3px 7px; border-radius:999px; background:#F4F1FF; color:#6D28D9; font-size:8.5px; font-weight:800; }
.totchi-faq-item summary h3 { margin:0; color:#353C47; font-size:11.5px; line-height:1.7; }
.totchi-faq-item summary > svg { width:16px; height:16px; flex:0 0 16px; fill:none; stroke:#99A1AC; stroke-width:2; transition:.18s ease; }
.totchi-faq-item[open] summary > svg { transform:rotate(180deg); color:#7C3AED; }
.totchi-faq-answer { padding:0 15px 14px; border-top:1px solid #F0F1F4; background:#FCFCFD; }
.totchi-faq-answer p { margin:12px 0 0; color:#626C79; font-size:10.5px; line-height:2; }
.totchi-faq-cta { display:flex; align-items:center; justify-content:space-between; gap:15px; margin-top:12px; padding:14px 16px; border:1px solid #E6DEFF; border-radius:13px; background:#F8F5FF; }
.totchi-faq-cta > div { display:flex; flex-direction:column; gap:3px; }
.totchi-faq-cta strong { color:#4C356F; font-size:11.5px; }
.totchi-faq-cta span { color:#7D6C92; font-size:9.5px; }

.totchi-contact-page-grid { display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:13px; }
.totchi-contact-page-grid .totchi-contact-panel { padding:17px; }
.totchi-contact-side-cards { display:grid; align-content:start; gap:10px; }
.totchi-contact-side-cards .totchi-panel { padding:16px; }
.totchi-contact-page-grid .totchi-contact-list { grid-template-columns:repeat(2,minmax(0,1fr)); }

/* Contextual help shown on every dashboard section. */
.totchi-context-guide-bar { display:flex; align-items:center; justify-content:space-between; gap:14px; min-height:54px; margin-bottom:13px; padding:9px 11px; border:1px solid #E7E1FA; border-radius:12px; background:linear-gradient(100deg,#FBF9FF,#fff); }
.totchi-context-guide-bar > div { display:flex; align-items:center; gap:9px; min-width:0; }
.totchi-context-guide-icon { width:34px; height:34px; flex:0 0 34px; display:grid; place-items:center; border-radius:10px; color:#6D28D9; background:#F0EBFF; }
.totchi-context-guide-icon svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.8; }
.totchi-context-guide-bar strong { display:block; margin-bottom:2px; color:#4A3D5F; font-size:10.5px; }
.totchi-context-guide-bar small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#827790; font-size:9.5px; }
.totchi-context-guide-btn { flex:0 0 auto; min-height:32px; padding:0 11px; border:1px solid #D9CEFC; border-radius:9px; background:#fff; color:#6D28D9; font:inherit; font-size:9.5px; font-weight:800; cursor:pointer; }
.totchi-context-guide-btn:hover { background:#F5F1FF; }

.totchi-modal-lock { overflow:hidden; }
.totchi-guide-modal { position:fixed; inset:0; z-index:100000; display:grid; place-items:center; padding:18px; }
.totchi-guide-modal[hidden] { display:none!important; }
.totchi-guide-modal-backdrop { position:absolute; inset:0; background:rgba(17,24,39,.42); backdrop-filter:blur(2px); }
.totchi-guide-dialog { position:relative; width:min(560px,100%); max-height:min(720px,calc(100vh - 36px)); overflow:auto; border:1px solid #E5E7EB; border-radius:18px; background:#fff; box-shadow:0 24px 70px rgba(17,24,39,.22); }
.totchi-guide-dialog > header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px; border-bottom:1px solid #ECEEF2; background:linear-gradient(135deg,#FAF8FF,#fff); }
.totchi-guide-dialog > header > div { display:flex; align-items:center; gap:10px; }
.totchi-guide-dialog-icon { width:38px; height:38px; display:grid; place-items:center; border-radius:11px; background:#EEE8FF; color:#6D28D9; }
.totchi-guide-dialog-icon svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; }
.totchi-guide-dialog header small { display:block; margin-bottom:2px; color:#8B8298; font-size:9px; }
.totchi-guide-dialog header h2 { margin:0; color:#302A39; font-size:14px; }
.totchi-guide-close { width:32px; height:32px; display:grid; place-items:center; border:1px solid #E4E7EC; border-radius:9px; background:#fff; color:#7B8490; font:inherit; font-size:19px; line-height:1; cursor:pointer; }
.totchi-guide-dialog-body { padding:16px; }
.totchi-guide-summary { margin:0 0 13px; color:#606A77; font-size:10.5px; line-height:1.9; }
.totchi-guide-steps { display:grid; gap:8px; margin:0; padding:0; list-style:none; }
.totchi-guide-steps li { display:grid; grid-template-columns:29px minmax(0,1fr); align-items:start; gap:9px; padding:10px; border:1px solid #ECEEF2; border-radius:10px; background:#fff; }
.totchi-guide-steps li > span { width:27px; height:27px; display:grid; place-items:center; border-radius:8px; background:#F2EDFF; color:#6D28D9; font-size:9.5px; font-weight:900; }
.totchi-guide-steps p { margin:3px 0 0; color:#56606D; font-size:10.5px; line-height:1.8; }
.totchi-guide-tip { display:grid; grid-template-columns:auto minmax(0,1fr); gap:8px; margin-top:11px; padding:11px; border:1px solid #F4E1A8; border-radius:10px; background:#FFFAEB; }
.totchi-guide-tip strong { color:#A15C00; font-size:9.5px; }
.totchi-guide-tip p { margin:0; color:#7A6544; font-size:9.5px; line-height:1.8; }
.totchi-guide-dialog > footer { display:flex; align-items:center; justify-content:flex-end; gap:8px; padding:12px 16px; border-top:1px solid #ECEEF2; background:#FCFCFD; }

@media (max-width: 1050px) {
  .totchi-support-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .totchi-support-overview-grid, .totchi-support-new-layout, .totchi-ticket-detail-layout, .totchi-contact-page-grid { grid-template-columns:1fr; }
  .totchi-support-overview-side, .totchi-ticket-guide-side, .totchi-contact-side-cards { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width: 760px) {
  .totchi-support-hub-head { align-items:flex-start; }
  .totchi-support-kpis { grid-template-columns:1fr 1fr; }
  .totchi-ticket-type-grid, .totchi-faq-grid, .totchi-contact-page-grid .totchi-contact-list { grid-template-columns:1fr; }
  .totchi-support-overview-side, .totchi-ticket-guide-side, .totchi-contact-side-cards { grid-template-columns:1fr; }
  .totchi-ticket-form .totchi-form-row { grid-template-columns:1fr; }
  .totchi-ticket-row { grid-template-columns:minmax(0,1fr) auto 22px; }
  .totchi-ticket-row time { display:none; }
  .totchi-faq-head { align-items:stretch; flex-direction:column; }
  .totchi-faq-head .totchi-help-search { width:100%; max-width:none; }
  .totchi-faq-cta, .totchi-ticket-reply-form > div { align-items:flex-start; flex-direction:column; }
  .totchi-context-guide-bar small { white-space:normal; line-height:1.6; }
}

@media (max-width: 520px) {
  .totchi-support-tabs { padding:5px; }
  .totchi-support-tabs a { min-height:38px; padding:0 10px; font-size:10.5px; }
  .totchi-support-tabs a span { display:none; }
  .totchi-support-tabs a.is-active span { display:inline; }
  .totchi-support-kpis { grid-template-columns:1fr; }
  .totchi-context-guide-bar { align-items:flex-start; }
  .totchi-context-guide-bar > div { align-items:flex-start; }
  .totchi-context-guide-btn { align-self:center; }
  .totchi-guide-dialog > footer { align-items:stretch; flex-direction:column; }
  .totchi-guide-dialog > footer .totchi-btn { width:100%; }
}
