/* App transitions & utilities (replaces motion/react) */

.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scrollbar-thin::-webkit-scrollbar {
  width: 4px;
}
.scrollbar-thin::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}

/* Tab fade transition (AnimatePresence replacement) */
.tab-fade-enter-active,
.tab-fade-leave-active {
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.tab-fade-enter-from {
  opacity: 0;
  transform: translateX(-10px);
}
.tab-fade-leave-to {
  opacity: 0;
  transform: translateX(10px);
}

/* Slide panel from right */
.slide-panel-enter-active {
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}
.slide-panel-leave-active {
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}
.slide-panel-enter-from,
.slide-panel-leave-to {
  transform: translateX(100%);
}

/* Modal fade + scale */
.modal-fade-enter-active,
.modal-fade-leave-active {
  transition: opacity 0.2s ease;
}
.modal-fade-enter-from,
.modal-fade-leave-to {
  opacity: 0;
}
.modal-scale-enter-active {
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.modal-scale-leave-active {
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.modal-scale-enter-from,
.modal-scale-leave-to {
  opacity: 0;
  transform: scale(0.95) translateY(15px);
}

/* Toast */
.toast-enter-active,
.toast-leave-active {
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast-enter-from,
.toast-leave-to {
  opacity: 0;
  transform: translateY(30px) scale(0.9);
}

/* Accordion expand */
.accordion-enter-active,
.accordion-leave-active {
  transition: height 0.2s ease, opacity 0.2s ease;
  overflow: hidden;
}
.accordion-enter-from,
.accordion-leave-to {
  height: 0 !important;
  opacity: 0;
}

/* Interactive cursors */
button,
[role="button"],
.cursor-pointer,
a {
  cursor: pointer;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  opacity: 1;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  color: rgb(71 85 105);
  flex-shrink: 0;
  vertical-align: middle;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.icon-btn--favorite {
  color: rgb(148 163 184);
}

.icon-btn--favorite:hover {
  color: rgb(245 158 11);
  background: rgb(255 251 235);
}

.icon-btn--favorite-active {
  color: rgb(245 158 11);
  background: rgb(255 251 235);
}

.detail-chip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  height: 2rem;
  padding: 0 0.625rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.detail-chip-btn--muted {
  background: rgb(241 245 249);
  color: rgb(51 65 85);
}

.detail-chip-btn--muted:hover {
  background: rgb(226 232 240);
}

.detail-chip-btn--primary {
  background: rgb(15 90 71);
  color: #fff;
}

.detail-chip-btn--primary:hover {
  background: rgb(12 74 58);
}

.detail-chip-btn--danger {
  background: rgb(220 38 38);
  color: #fff;
}

.detail-chip-btn--danger:hover {
  background: rgb(185 28 28);
}

.detail-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: rgb(148 163 184);
  margin-bottom: 0.5rem;
}

.detail-meta-time {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-family: ui-monospace, monospace;
  line-height: 1;
}

.detail-footer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  flex: 1;
  min-height: 2.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.detail-footer-btn--outline {
  border: 1px solid rgb(226 232 240);
  background: #fff;
  color: rgb(51 65 85);
}

.detail-footer-btn--outline:hover {
  background: rgb(248 250 252);
}

.detail-footer-btn--solid {
  border: none;
  background: rgb(15 90 71);
  color: #fff;
  flex: 1.5;
}

.detail-footer-btn--solid:hover {
  background: rgb(12 74 58);
}

.detail-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.portal-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.125rem;
  flex-shrink: 0;
  height: 2rem;
}

.portal-locale-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  height: 2rem;
  padding: 0 0.375rem;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgb(100 116 139);
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.portal-locale-btn:hover {
  background: rgb(241 245 249);
  color: rgb(15 90 71);
}

.portal-search {
  position: relative;
  width: 100%;
}

.portal-search__icon {
  position: absolute;
  left: 0.625rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgb(148 163 184);
  pointer-events: none;
  z-index: 1;
}

.portal-search__input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 0.75rem 0.5rem 2rem;
  border: 1px solid rgb(226 232 240);
  border-radius: 0.75rem;
  background: #fff;
  font-size: 0.875rem;
  line-height: 1.25;
  color: rgb(30 41 59);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.portal-search__input::placeholder {
  color: rgb(148 163 184);
}

.portal-search__input:focus {
  border-color: rgb(15 90 71);
  box-shadow: 0 0 0 1px rgb(15 90 71);
}

.icon-btn:hover {
  background: rgb(241 245 249);
  color: rgb(15 90 71);
}

.icon-btn--active {
  background: rgb(236 253 245);
  color: rgb(15 90 71);
}

.icon-btn svg {
  display: block;
}

.icon-btn--badged {
  overflow: visible;
}

.icon-btn__badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 0.875rem;
  height: 0.875rem;
  padding: 0 3px;
  border-radius: 9999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 0.875rem;
  text-align: center;
  pointer-events: none;
  box-sizing: border-box;
  transform: translate(40%, -40%);
  border: 1.5px solid #fff;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Markdown preview (知识库 / 信号详情) */
.markdown-body {
  color: rgb(51 65 85);
  font-size: 0.875rem;
  line-height: 1.75;
  word-break: break-word;
}

.markdown-body > *:first-child {
  margin-top: 0;
}

.markdown-body > *:last-child {
  margin-bottom: 0;
}

.markdown-h1 {
  margin: 1.25rem 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 800;
  color: rgb(15 23 42);
  line-height: 1.35;
  padding-bottom: 0.375rem;
  border-bottom: 1px solid rgb(241 245 249);
}

.markdown-h2 {
  margin: 1.125rem 0 0.625rem;
  font-size: 1rem;
  font-weight: 700;
  color: rgb(15 23 42);
  line-height: 1.4;
}

.markdown-h3 {
  margin: 1rem 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: rgb(15 23 42);
  line-height: 1.45;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgb(241 245 249);
}

.markdown-h3::before {
  content: '';
  width: 3px;
  height: 0.875rem;
  border-radius: 9999px;
  background: rgb(15 90 71);
  flex-shrink: 0;
}

.markdown-h4,
.markdown-h5,
.markdown-h6 {
  margin: 0.875rem 0 0.375rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: rgb(15 90 71);
  line-height: 1.5;
}

.markdown-p {
  margin: 0.5rem 0;
  color: rgb(71 85 105);
}

.markdown-strong {
  font-weight: 700;
  color: rgb(30 41 59);
}

.markdown-em {
  font-style: italic;
  color: rgb(100 116 139);
}

.markdown-code {
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
  background: rgb(241 245 249);
  font-family: ui-monospace, monospace;
  font-size: 0.85em;
  color: rgb(190 18 60);
}

.markdown-link {
  color: rgb(15 90 71);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.markdown-link:hover {
  color: rgb(12 74 58);
}

.markdown-ul,
.markdown-ol {
  margin: 0.5rem 0 0.75rem;
  padding-left: 1.25rem;
}

.markdown-ul {
  list-style-type: disc;
}

.markdown-ol {
  list-style-type: decimal;
}

.markdown-li {
  margin: 0.35rem 0;
  color: rgb(71 85 105);
  line-height: 1.7;
}

.markdown-li::marker {
  color: rgb(15 90 71);
}

.markdown-blockquote {
  margin: 0.75rem 0;
  padding: 0.625rem 0.875rem;
  border-left: 3px solid rgb(15 90 71);
  border-radius: 0 0.5rem 0.5rem 0;
  background: rgb(236 253 245 / 0.5);
}

.markdown-blockquote .markdown-p {
  margin: 0.25rem 0;
  color: rgb(51 65 85);
}

.markdown-pre {
  margin: 0.75rem 0;
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: rgb(15 23 42);
  overflow-x: auto;
}

.markdown-code-block {
  display: block;
  font-family: ui-monospace, monospace;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: rgb(226 232 240);
  white-space: pre-wrap;
}

.markdown-hr {
  margin: 1rem 0;
  border: none;
  border-top: 1px dashed rgb(226 232 240);
}

.markdown-empty {
  margin: 0;
  font-size: 0.875rem;
  color: rgb(148 163 184);
  text-align: center;
  padding: 2rem 0;
}

/* ── Portal typography & responsive shell ── */

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

@media (min-width: 1024px) {
  html {
    font-size: 17px;
  }
}

@media (min-width: 1440px) {
  html {
    font-size: 18px;
  }
}

.portal-ui {
  font-size: 1rem;
  line-height: 1.55;
}

.portal-ui .text-xs {
  font-size: 0.8125rem;
  line-height: 1.45;
}

@media (min-width: 1024px) {
  .portal-ui .text-xs {
    font-size: 0.875rem;
  }

  .portal-ui .text-sm {
    font-size: 0.9375rem;
  }
}

.portal-ui [class*="text-[8"],
.portal-ui [class*="text-[9"] {
  font-size: 0.8125rem !important;
  line-height: 1.4;
}

.portal-ui [class*="text-[10"] {
  font-size: 0.875rem !important;
  line-height: 1.45;
}

.portal-ui [class*="text-[11"] {
  font-size: 0.9375rem !important;
  line-height: 1.5;
}

@media (min-width: 1024px) {
  .portal-ui [class*="text-[8"],
  .portal-ui [class*="text-[9"] {
    font-size: 0.875rem !important;
  }

  .portal-ui [class*="text-[10"] {
    font-size: 0.9375rem !important;
  }

  .portal-ui [class*="text-[11"] {
    font-size: 1rem !important;
  }
}

/* Component-level readability bumps */
.icon-btn {
  width: 2.25rem;
  height: 2.25rem;
}

.icon-btn__badge {
  min-width: 1rem;
  height: 1rem;
  font-size: 0.6875rem;
  line-height: 1rem;
}

.detail-chip-btn {
  height: 2.25rem;
  padding: 0 0.75rem;
  font-size: 0.8125rem;
}

.detail-meta-row {
  font-size: 0.8125rem;
}

.detail-footer-btn {
  min-height: 2.75rem;
  font-size: 0.875rem;
}

.portal-locale-btn {
  height: 2.25rem;
  padding: 0 0.5rem;
  font-size: 0.8125rem;
}

.portal-search__input {
  padding: 0.625rem 0.875rem 0.625rem 2.25rem;
  font-size: 0.875rem;
}

@media (min-width: 1024px) {
  .portal-search__input {
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    font-size: 0.9375rem;
  }
}

.markdown-body {
  font-size: 0.9375rem;
  line-height: 1.8;
}

@media (min-width: 1024px) {
  .markdown-body {
    font-size: 1rem;
  }
}

.markdown-code-block {
  font-size: 0.8125rem;
}

/* Shell layout */
.portal-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.portal-body {
  display: flex;
  flex: 1;
  min-height: 0;
  width: 100%;
}

.portal-sidebar {
  display: none;
  flex-direction: column;
  width: 15.5rem;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid rgb(226 232 240);
  padding: 1.25rem 0.875rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

@media (min-width: 1024px) {
  .portal-sidebar {
    display: flex;
  }
}

.portal-sidebar__brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0 0.5rem 1.25rem;
  font-size: 1rem;
  font-weight: 700;
  color: rgb(15 23 42);
  border-bottom: 1px solid rgb(241 245 249);
  margin-bottom: 0.75rem;
}

.portal-sidebar__actions {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  flex-shrink: 0;
}

.portal-sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.portal-sidebar__item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: none;
  border-radius: 0.75rem;
  background: transparent;
  color: rgb(100 116 139);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.portal-sidebar__item:hover {
  background: rgb(241 245 249);
  color: rgb(15 90 71);
}

.portal-sidebar__item--active {
  background: rgb(236 253 245);
  color: rgb(15 90 71);
}

.portal-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}

.portal-content {
  width: 100%;
  max-width: 48rem;
  margin: 0 auto;
}

@media (min-width: 1024px) {
  .portal-content {
    max-width: none;
    padding: 0 1.5rem 1.5rem;
  }
}

@media (min-width: 1280px) {
  .portal-content {
    max-width: 82rem;
    padding: 0 2rem 2rem;
  }
}

.portal-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 30;
  height: 4rem;
  background: #fff;
  border-top: 1px solid rgb(226 232 240 / 0.8);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 0.5rem;
  max-width: 48rem;
  margin: 0 auto;
}

@media (min-width: 1024px) {
  .portal-bottom-nav {
    display: none;
  }
}

.portal-bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 100%;
  padding: 0.5rem 0;
  border: none;
  background: transparent;
  color: rgb(148 163 184);
  cursor: pointer;
  transition: color 0.15s ease;
}

.portal-bottom-nav__item:hover,
.portal-bottom-nav__item--active {
  color: rgb(15 90 71);
}

.portal-bottom-nav__label {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
}

@media (min-width: 1024px) {
  .portal-bottom-nav__label {
    font-size: 0.8125rem;
  }
}

.portal-toast {
  position: fixed;
  bottom: 5rem;
  left: 1rem;
  right: 1rem;
  z-index: 50;
  max-width: 48rem;
  margin: 0 auto;
  background: rgb(15 23 42);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.875rem 1rem;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  border: 1px solid rgb(30 41 59);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

@media (min-width: 1024px) {
  .portal-toast {
    bottom: 2rem;
    left: auto;
    right: 2rem;
    max-width: 28rem;
    margin: 0;
  }
}

.portal-load-error {
  background: rgb(254 226 226);
  color: rgb(153 27 27);
  font-size: 0.8125rem;
  text-align: center;
  padding: 0.375rem 1rem;
  font-weight: 700;
}

@media (min-width: 1024px) {
  .portal-load-error {
    font-size: 0.875rem;
  }
}

/* Subpages: centered panel on desktop */
.portal-subpage {
  z-index: 50;
}

@media (min-width: 1024px) {
  .portal-subpage {
    left: 50% !important;
    right: auto !important;
    top: 1.5rem !important;
    bottom: 1.5rem !important;
    width: min(56rem, calc(100vw - 3rem)) !important;
    max-height: calc(100vh - 3rem) !important;
    transform: translateX(-50%);
    border-radius: 1rem;
    border: 1px solid rgb(226 232 240);
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.2);
    overflow: hidden;
  }

  .portal-subpage--wide {
    width: min(72rem, calc(100vw - 3rem)) !important;
  }

  .portal-subpage--immersive {
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-height: none !important;
    transform: none;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }
}

@media (min-width: 1024px) {
  .portal-subpage-backdrop {
    position: fixed;
    inset: 0;
    z-index: 49;
    background: rgb(15 23 42 / 0.35);
    backdrop-filter: blur(2px);
  }
}

/* ── Owner Console Mobile-First Design System ── */

/* Shell: full-height flex with sidebar + main */
.owner-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: rgb(248 250 252);
  color: rgb(30 41 59);
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Desktop sidebar */
.owner-sidebar {
  display: none;
  flex-direction: column;
  width: 14rem;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid rgb(226 232 240);
  padding: 1rem 0.625rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

@media (min-width: 1024px) {
  .owner-sidebar {
    display: flex;
  }
}

.owner-shell {
  flex-direction: row;
}

@media (max-width: 1023px) {
  .owner-shell {
    flex-direction: column;
  }
}

.owner-brand {
  font-size: 0.9375rem;
  font-weight: 700;
  color: rgb(15 90 71);
  padding: 0 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgb(241 245 249);
}

.owner-side-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.625rem;
  border: none;
  border-radius: 0.625rem;
  background: transparent;
  color: rgb(100 116 139);
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.owner-side-item:hover {
  background: rgb(241 245 249);
  color: rgb(15 90 71);
}

.owner-side-item.on {
  background: rgb(236 253 245);
  color: rgb(15 90 71);
}

.owner-side-item span {
  font-size: 0.8125rem;
}

/* Main content area */
.owner-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}

/* Mobile header */
.owner-mobile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 1rem;
  background: #fff;
  border-bottom: 1px solid rgb(226 232 240);
  font-size: 0.9375rem;
  font-weight: 700;
}

.owner-mobile-head button {
  border: none;
  border-radius: 0.375rem;
  background: rgb(241 245 249);
  color: rgb(51 65 85);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
}

@media (min-width: 1024px) {
  .owner-mobile-head {
    display: none;
  }
}

/* Page section */
.owner-page {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.875rem 1rem 5rem;
  max-width: 42rem;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .owner-page {
    padding: 1.25rem 1.5rem 5rem;
    max-width: 48rem;
  }
}

@media (min-width: 1280px) {
  .owner-page {
    max-width: 64rem;
    padding: 1.5rem 2rem 2rem;
  }
}

/* Page header */
.owner-header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-bottom: 0.5rem;
}

.owner-header h1 {
  font-size: 1.25rem;
  font-weight: 800;
  color: rgb(15 23 42);
  line-height: 1.3;
  margin: 0;
}

.owner-header p {
  font-size: 0.8125rem;
  color: rgb(100 116 139);
  line-height: 1.4;
  margin: 0;
}

@media (min-width: 768px) {
  .owner-header h1 {
    font-size: 1.375rem;
  }
  .owner-header p {
    font-size: 0.875rem;
  }
}

.owner-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.6875rem;
  font-weight: 700;
  color: rgb(15 90 71);
  background: rgb(236 253 245);
  border-radius: 9999px;
  padding: 0.125rem 0.5rem;
  margin-bottom: 0.25rem;
  width: fit-content;
}

.owner-badge.muted-badge {
  color: rgb(100 116 139);
  background: rgb(241 245 249);
}

.readiness-tag {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 600;
  color: rgb(100 116 139);
  background: rgb(241 245 249);
  border-radius: 9999px;
  padding: 0.0625rem 0.375rem;
  vertical-align: baseline;
}

.readiness-inline {
  color: rgb(100 116 139);
  font-size: 0.75rem;
}

.owner-health-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgb(15 90 71);
  background: rgb(236 253 245);
  border: 1px solid rgb(167 243 208);
  border-radius: 9999px;
  padding: 0.25rem 0.625rem;
  cursor: pointer;
}
.owner-health-btn:hover { background: rgb(220 252 231); }

.badge-translate {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 600;
  color: rgb(180 83 9);
  background: rgb(254 243 199);
  border: 1px solid rgb(253 230 138);
  border-radius: 9999px;
  padding: 0.0625rem 0.375rem;
  margin-left: 0.25rem;
}

/* Card base */
.owner-card {
  background: #fff;
  border: 1px solid rgb(226 232 240);
  border-radius: 0.875rem;
  padding: 0.875rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.owner-card.hero {
  background: linear-gradient(135deg, rgb(236 253 245) 0%, #fff 100%);
  border-color: rgb(167 243 208);
  padding: 1rem 1.125rem;
}

.owner-card.list {
  gap: 0.625rem;
}

.owner-card.warn {
  background: rgb(254 242 242);
  border-color: rgb(254 202 202);
  color: rgb(153 27 27);
  font-weight: 600;
  text-align: center;
  font-size: 0.875rem;
}

.owner-card.plan {
  color: rgb(100 116 139);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.owner-card.tiny {
  font-size: 0.75rem;
  color: rgb(100 116 139);
  line-height: 1.5;
  padding: 0.625rem 0.875rem;
}

.owner-card h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: rgb(15 23 42);
  margin: 0;
}

.owner-card h2 {
  font-size: 1rem;
  font-weight: 700;
  color: rgb(15 23 42);
  margin: 0;
  padding-top: 0.25rem;
}

/* Hero card content */
.hero-total {
  font-size: 1.5rem;
  font-weight: 800;
  color: rgb(15 23 42);
  line-height: 1.2;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.hero-total span {
  font-size: 0.875rem;
  font-weight: 600;
}

@media (min-width: 768px) {
  .hero-total {
    font-size: 1.75rem;
  }
}

/* Asset grid in hero card */
.asset-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.625rem;
  margin-top: 0.5rem;
}

@media (min-width: 640px) {
  .asset-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.asset-grid > div {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding: 0.5rem 0.625rem;
  background: rgb(248 250 252);
  border-radius: 0.625rem;
}

.asset-grid b {
  font-size: 0.6875rem;
  font-weight: 600;
  color: rgb(100 116 139);
}

.asset-grid strong {
  font-size: 0.9375rem;
  font-weight: 700;
  color: rgb(15 23 42);
}

.asset-grid span {
  font-size: 0.6875rem;
  color: rgb(148 163 184);
}

/* Owner item (card list entry) */
.owner-item {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid rgb(241 245 249);
}

.owner-item:last-child {
  border-bottom: none;
}

.owner-item .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.owner-item b {
  font-size: 0.875rem;
  font-weight: 700;
  color: rgb(15 23 42);
}

.owner-item p {
  font-size: 0.8125rem;
  color: rgb(71 85 105);
  line-height: 1.5;
  margin: 0;
}

.owner-item strong {
  font-size: 0.9375rem;
  font-weight: 700;
}

.owner-item em {
  font-style: normal;
  font-size: 0.6875rem;
  font-weight: 600;
  color: rgb(180 83 9);
  background: rgb(255 251 235);
  border-radius: 0.25rem;
  padding: 0.0625rem 0.3125rem;
}

/* Owner row (stock holding button) */
.owner-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: none;
  border-radius: 0.625rem;
  background: rgb(248 250 252);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.owner-row:hover {
  background: rgb(241 245 249);
}

.owner-row > div {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.owner-row b {
  font-size: 0.875rem;
  font-weight: 700;
  color: rgb(15 23 42);
}

.owner-row small {
  font-size: 0.6875rem;
  color: rgb(148 163 184);
}

.owner-row em {
  font-style: normal;
  font-size: 0.625rem;
  font-weight: 600;
  color: rgb(180 83 9);
  background: rgb(255 251 235);
  border-radius: 0.25rem;
  padding: 0.0625rem 0.25rem;
}

.owner-row .right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.125rem;
  flex-shrink: 0;
}

.owner-row .right b {
  font-size: 0.875rem;
  font-weight: 700;
}

.owner-row .right small {
  font-size: 0.6875rem;
}

/* Tabs */
.owner-tabs {
  display: flex;
  gap: 0.375rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.125rem;
}

.owner-tabs::-webkit-scrollbar {
  display: none;
}

.owner-tabs.wrap {
  flex-wrap: wrap;
}

.owner-tabs button {
  border: none;
  border-radius: 0.5rem;
  background: rgb(241 245 249);
  color: rgb(100 116 139);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.375rem 0.75rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.owner-tabs button:hover {
  background: rgb(226 232 240);
  color: rgb(51 65 85);
}

.owner-tabs button.on {
  background: rgb(15 90 71);
  color: #fff;
}

@media (min-width: 768px) {
  .owner-tabs button {
    font-size: 0.8125rem;
    padding: 0.4375rem 0.875rem;
  }
}

/* Primary button */
.owner-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 0.75rem;
  background: rgb(15 90 71);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.owner-primary:hover {
  background: rgb(12 74 58);
}

/* Holding group */
.holding-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.375rem 0.125rem;
}

.group-head b {
  font-size: 0.8125rem;
  font-weight: 700;
  color: rgb(51 65 85);
}

.group-head span {
  font-size: 0.75rem;
  color: rgb(100 116 139);
}

/* KPI display */
.kpi {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.625rem;
}

.kpi > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
  padding: 0.625rem;
  background: rgb(248 250 252);
  border-radius: 0.625rem;
}

.kpi b {
  font-size: 1.125rem;
  font-weight: 800;
  color: rgb(15 23 42);
}

.kpi span {
  font-size: 0.6875rem;
  color: rgb(100 116 139);
}

/* Recap */
.recap {
  font-size: 0.8125rem;
  color: rgb(100 116 139);
  line-height: 1.6;
  padding: 0.5rem 0;
}

/* Utility classes within owner console */
.owner-card .muted {
  font-size: 0.75rem;
  color: rgb(148 163 184);
  font-weight: 500;
}

.owner-card .tiny {
  font-size: 0.6875rem;
  color: rgb(148 163 184);
  line-height: 1.4;
  margin: 0;
}

.owner-card .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.owner-card .right {
  text-align: right;
}

.owner-card .red {
  color: rgb(220 38 38);
}

.owner-card .green {
  color: rgb(5 150 105);
}

.owner-card .src {
  font-weight: 600;
  color: rgb(15 90 71);
}

/* Bottom navigation (mobile) */
.owner-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 30;
  height: 3.75rem;
  background: #fff;
  border-top: 1px solid rgb(226 232 240);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 0.375rem;
}

@media (min-width: 1024px) {
  .owner-bottom {
    display: none;
  }
}

.owner-bottom button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 100%;
  padding: 0.25rem 0;
  border: none;
  background: transparent;
  color: rgb(148 163 184);
  cursor: pointer;
  transition: color 0.15s ease;
  gap: 0.125rem;
}

.owner-bottom button.on {
  color: rgb(15 90 71);
}

.owner-bottom button span {
  font-size: 0.625rem;
  font-weight: 600;
}

@media (min-width: 768px) {
  .owner-bottom button span {
    font-size: 0.6875rem;
  }
}

/* Desktop: constrain mobile-width content to center */
@media (min-width: 1024px) {
  .owner-main {
    padding-bottom: 0;
  }
}

/* Color helpers used in template */
.red { color: rgb(220 38 38); }
.green { color: rgb(5 150 105); }

/* Portal grid helpers */
.portal-grid-2-lg {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .portal-grid-2-lg {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    align-items: start;
  }
}

.portal-grid-docs-xl {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

@media (min-width: 1280px) {
  .portal-grid-docs-xl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }
}
