/* Isolated home-card presentation. Other portal screens retain existing styles. */
#appGrid .active-card[data-card-theme] {
  --card-accent: #52627b;
  --card-tint: #edf1f7;
  --card-wash: #f7f9fc;
  --card-edge: #dfe6ef;
  min-width: 0;
  min-height: 266px;
  padding: 27px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--card-edge);
  border-radius: 20px;
  background: linear-gradient(125deg, #fff 42%, var(--card-wash));
  box-shadow: 0 3px 8px #162b4c03;
}
#appGrid .active-card[data-card-theme="quote"] { --card-accent: #315cbd; --card-tint: #e7efff; --card-wash: #f3f7ff; --card-edge: #dbe5f8; }
#appGrid .active-card[data-card-theme="crab"] { --card-accent: #b65236; --card-tint: #fce9e2; --card-wash: #fff6f2; --card-edge: #f0dfd6; }
#appGrid .active-card[data-card-theme="squid"] { --card-accent: #7760b1; --card-tint: #eee8fb; --card-wash: #f8f5ff; --card-edge: #e7dff2; }
#appGrid .active-card[data-card-theme="shipping"] { --card-accent: #287a91; --card-tint: #e1f2f7; --card-wash: #f2fafc; --card-edge: #d7e9ef; }
#appGrid .active-card[data-card-theme="profit"] { --card-accent: #267a62; --card-tint: #e2f3eb; --card-wash: #f2faf6; --card-edge: #d6e9df; }
#appGrid .active-card[data-card-theme="cost"] { --card-accent: #98681e; --card-tint: #fcf0d8; --card-wash: #fffbf2; --card-edge: #ede3cd; }
#appGrid .active-card[data-card-theme="safety"] { --card-accent: #477e3d; --card-tint: #eaf4e3; --card-wash: #f6faf2; --card-edge: #e0ead8; }
#appGrid .active-card[data-card-theme="ledger"] { --card-accent: #52649d; --card-tint: #e9edfa; --card-wash: #f5f6fc; --card-edge: #dfe3f0; }
#appGrid .active-card[data-card-theme]::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 174px;
  height: 174px;
  right: -65px;
  top: -77px;
  border: 25px solid var(--card-tint);
  border-radius: 50%;
  opacity: .48;
  pointer-events: none;
}
#appGrid .active-card[data-card-theme] .app-icon {
  width: 60px;
  height: 60px;
  flex: 0 0 auto;
  border: 1px solid #ffffffc9;
  border-radius: 18px;
  color: var(--card-accent);
  background: var(--card-tint);
  box-shadow: inset 0 1px 1px #ffffffb3, 0 4px 9px #1e354506;
}
#appGrid .active-card[data-card-theme] .app-icon svg { width: 34px; height: 34px; display: block; }
#appGrid .active-card[data-card-theme] .app-number { color: #63738b; top: 25px; right: 26px; font-size: 11px; }
#appGrid .active-card[data-card-theme] h3 { margin: 24px 0 9px; font-size: 21px; line-height: 1.4; word-break: keep-all; overflow-wrap: break-word; }
#appGrid .active-card[data-card-theme] p { color: #63738b; line-height: 1.7; }
#appGrid .active-card[data-card-theme] .card-action { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 22px; color: var(--card-accent); }
#appGrid .active-card[data-card-theme] .card-action b {
  display: grid; place-items: center; width: 29px; height: 29px;
  border: 1px solid var(--card-edge); border-radius: 50%;
  background: #ffffffbf; font-size: 16px; line-height: 1;
  transition: background .18s ease, transform .18s ease;
}
#appGrid .active-card[data-card-theme]:focus-visible { outline: 3px solid var(--card-accent); outline-offset: 4px; }
@media (hover: hover) {
  #appGrid .active-card[data-card-theme]:hover { transform: translateY(-3px); border-color: var(--card-accent); box-shadow: 0 12px 26px #24364d0d; }
  #appGrid .active-card[data-card-theme]:hover .card-action b { transform: translateX(2px); background: var(--card-tint); }
}
@media (hover: none) {
  #appGrid .active-card[data-card-theme]:hover { transform: none; box-shadow: 0 3px 8px #162b4c03; }
}
@media (max-width: 780px) {
  #appGrid .active-card[data-card-theme] { min-height: 218px; padding: 18px; border-radius: 17px; }
  #appGrid .active-card[data-card-theme] .app-icon { width: 48px; height: 48px; border-radius: 15px; }
  #appGrid .active-card[data-card-theme] .app-icon svg { width: 29px; height: 29px; }
  #appGrid .active-card[data-card-theme] .app-number { top: 18px; right: 16px; font-size: 10px; }
  #appGrid .active-card[data-card-theme] h3 { margin: 20px 0 8px; font-size: 16px; }
  #appGrid .active-card[data-card-theme] p { font-size: 12px; line-height: 1.65; }
  #appGrid .active-card[data-card-theme] .card-action { padding-top: 18px; font-size: 11px; }
  #appGrid .active-card[data-card-theme] .card-action b { width: 24px; height: 24px; flex-shrink: 0; }
}
@media (max-width: 380px) {
  #workspaceSection #appGrid { grid-template-columns: 1fr; }
  #appGrid .active-card[data-card-theme] { min-height: 216px; }
}
@media (prefers-reduced-motion: reduce) {
  #appGrid .active-card[data-card-theme], #appGrid .active-card[data-card-theme] .card-action b { transition: none; transform: none; }
  #appGrid .active-card[data-card-theme]:hover, #appGrid .active-card[data-card-theme]:hover .card-action b { transform: none; }
}
@media (forced-colors: active) {
  #appGrid .active-card[data-card-theme] { border: 1px solid LinkText; }
  #appGrid .active-card[data-card-theme]::before { display: none; }
  #appGrid .active-card[data-card-theme] .app-icon { border: 1px solid currentColor; }
}
