/* Dashboard mobile app shell — dashboard page only.
 * Keeps the existing bottom navigation, while making the dashboard itself
 * behave like a compact native-app home screen on phones.
 */
@media (max-width: 760px) {
  body:has(.dashboard-mobile-home) {
    background: #f7f5fb;
  }

  body:has(.dashboard-mobile-home) .app-header {
    min-height: 64px;
    padding: 9px 14px;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid #eee9f6;
    box-shadow: 0 6px 22px rgba(31, 23, 56, 0.05);
  }

  body:has(.dashboard-mobile-home) .app-header__title {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    grid-template-areas: "logo title" "logo subtitle";
    align-items: center;
    column-gap: 9px;
    min-width: 0;
  }

  body:has(.dashboard-mobile-home) .app-header__logo {
    grid-area: logo;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 13px;
    border: 1px solid #e7defa;
    background: #fff;
  }

  body:has(.dashboard-mobile-home) .app-header__logo img {
    width: 100%;
    height: 100%;
  }

  body:has(.dashboard-mobile-home) .app-header__title b {
    grid-area: title;
    font-size: 16px;
    line-height: 1.25;
  }

  body:has(.dashboard-mobile-home) .app-header__subtitle {
    grid-area: subtitle;
    margin-top: 1px;
    overflow: hidden;
    color: #756d84;
    font-size: 10.5px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body:has(.dashboard-mobile-home) .app-header__tools {
    gap: 6px;
    flex-wrap: nowrap;
  }

  body:has(.dashboard-mobile-home) .app-header__tools .btn--home,
  body:has(.dashboard-mobile-home) .app-header__tools > .btn:not(.btn--danger),
  body:has(.dashboard-mobile-home) .app-header__tools .autosave-status {
    display: none !important;
  }

  body:has(.dashboard-mobile-home) .app-header__tools .btn--danger {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    border-radius: 12px;
    font-size: 0;
    box-shadow: none;
  }

  body:has(.dashboard-mobile-home) .app-header__tools .btn--danger i {
    font-size: 14px;
  }

  body:has(.dashboard-mobile-home) .mobile-workspace-bar {
    margin: 8px 10px 0;
    padding: 9px 10px;
    border: 1px solid #e7def6;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(31, 23, 56, 0.045);
  }

  body:has(.dashboard-mobile-home) .mobile-workspace-bar__head {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 32px;
    align-items: center;
    gap: 8px;
  }

  body:has(.dashboard-mobile-home) .mobile-workspace-bar__icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: var(--brand-3);
    background: var(--brand-soft);
  }

  body:has(.dashboard-mobile-home) .mobile-workspace-bar__head > div {
    min-width: 0;
  }

  body:has(.dashboard-mobile-home) .mobile-workspace-bar__head small {
    display: none;
  }

  body:has(.dashboard-mobile-home) .mobile-workspace-bar__head b,
  body:has(.dashboard-mobile-home) .mobile-workspace-bar__head span:not(.mobile-workspace-bar__icon) {
    display: inline;
    font-size: 12px;
    font-weight: 900;
  }

  body:has(.dashboard-mobile-home) .mobile-workspace-bar__head b:after {
    content: " · ";
    color: #aaa2b7;
  }

  body:has(.dashboard-mobile-home) .mobile-workspace-bar__head span:not(.mobile-workspace-bar__icon) {
    color: #756d84;
    font-size: 11px;
  }

  body:has(.dashboard-mobile-home) .mobile-workspace-bar__manage {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 10px;
    color: var(--brand-3);
    background: #f4efff;
  }

  body:has(.dashboard-mobile-home) .mobile-owner-row,
  body:has(.dashboard-mobile-home) .mobile-workspace-bar__select {
    display: none !important;
  }

  body:has(.dashboard-mobile-home) .content {
    padding: 10px 10px calc(var(--mobile-nav-height, 74px) + 20px);
  }

  body:has(.dashboard-mobile-home) .dashboard-footer,
  body:has(.dashboard-mobile-home) .back-to-top {
    display: none !important;
  }

  .dashboard-mobile-home {
    display: grid;
    gap: 10px;
    padding-bottom: 6px;
  }

  .dashboard-mobile-hero {
    padding: 14px;
    border: 1px solid #e3d8f8;
    border-radius: 20px;
    background: linear-gradient(145deg, #ffffff, #f7f1ff);
    box-shadow: 0 12px 30px rgba(74, 45, 120, 0.08);
  }

  .dashboard-mobile-hero__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
  }

  .dashboard-mobile-hero__eyebrow {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--brand-3);
    font-size: 11px;
    font-weight: 950;
  }

  .dashboard-mobile-hero h1 {
    margin: 5px 0 0;
    color: #211a30;
    font-size: 20px;
    line-height: 1.4;
    font-weight: 950;
  }

  .dashboard-mobile-hero__status {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 9px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #dfd5ef;
    color: #625970;
    font-size: 10.5px;
    font-weight: 900;
  }

  .dashboard-mobile-hero__status.is-ready {
    color: #08734c;
    border-color: #c7f5db;
    background: #f0fdf4;
  }

  .dashboard-mobile-hero__status.is-warning {
    color: #8a5a05;
    border-color: #f7ddb0;
    background: #fffaf0;
  }

  .dashboard-mobile-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-top: 9px;
    color: #756d84;
    font-size: 11px;
    font-weight: 800;
  }

  .dashboard-mobile-hero__meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
  }

  .dashboard-mobile-progress {
    margin-top: 12px;
  }

  .dashboard-mobile-progress__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #6d647a;
    font-size: 10.5px;
    font-weight: 850;
  }

  .dashboard-mobile-progress__row b {
    color: var(--brand-3);
    font-size: 11px;
  }

  .dashboard-mobile-progress__track {
    height: 6px;
    margin-top: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: #e9e2f3;
  }

  .dashboard-mobile-progress__track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
  }

  .dashboard-mobile-primary {
    width: 100%;
    min-height: 52px;
    margin-top: 12px;
    border: 0;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 15px;
    color: #fff;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    box-shadow: 0 14px 28px rgba(var(--brand-rgb), 0.25);
    font-size: 13px;
    font-weight: 950;
  }

  .dashboard-mobile-primary span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  .dashboard-mobile-primary small {
    color: rgba(255, 255, 255, 0.8);
    font-size: 10px;
    font-weight: 800;
  }

  .dashboard-mobile-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
  }

  .dashboard-mobile-stat {
    min-width: 0;
    min-height: 72px;
    padding: 9px 6px;
    border: 1px solid #ebe5f3;
    border-radius: 15px;
    background: #fff;
    text-align: center;
    box-shadow: 0 7px 18px rgba(31, 23, 56, 0.035);
  }

  .dashboard-mobile-stat i {
    color: var(--brand-3);
    font-size: 13px;
  }

  .dashboard-mobile-stat b {
    display: block;
    margin-top: 5px;
    overflow: hidden;
    color: #241c33;
    font-size: 15px;
    line-height: 1.2;
    font-weight: 950;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dashboard-mobile-stat small {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    color: #81798e;
    font-size: 9.5px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dashboard-mobile-section {
    padding: 13px;
    border: 1px solid #e8e2f0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(31, 23, 56, 0.04);
  }

  .dashboard-mobile-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
  }

  .dashboard-mobile-section__head h2 {
    margin: 0;
    font-size: 14px;
    font-weight: 950;
  }

  .dashboard-mobile-section__head small {
    color: #8a8297;
    font-size: 10px;
    font-weight: 800;
  }

  .dashboard-mobile-journey {
    display: grid;
    gap: 2px;
  }

  .dashboard-mobile-step {
    width: 100%;
    min-height: 54px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 24px;
    align-items: center;
    gap: 9px;
    padding: 7px 5px;
    border: 0;
    border-bottom: 1px solid #f0ecf5;
    color: #332b40;
    background: transparent;
    text-align: right;
  }

  .dashboard-mobile-step:last-child {
    border-bottom: 0;
  }

  .dashboard-mobile-step__icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: #81778f;
    background: #f4f1f7;
    font-size: 12px;
  }

  .dashboard-mobile-step b {
    display: block;
    font-size: 12px;
    font-weight: 950;
  }

  .dashboard-mobile-step small {
    display: block;
    margin-top: 2px;
    overflow: hidden;
    color: #8b8397;
    font-size: 9.5px;
    line-height: 1.45;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dashboard-mobile-step__state {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #9a91a6;
    background: #f3eff7;
    font-size: 9px;
  }

  .dashboard-mobile-step.is-done .dashboard-mobile-step__icon,
  .dashboard-mobile-step.is-done .dashboard-mobile-step__state {
    color: #08734c;
    background: #dcfce7;
  }

  .dashboard-mobile-step.is-current {
    margin: 2px 0;
    padding-inline: 8px;
    border: 1px solid #dacbfa;
    border-radius: 14px;
    background: #faf7ff;
  }

  .dashboard-mobile-step.is-current .dashboard-mobile-step__icon,
  .dashboard-mobile-step.is-current .dashboard-mobile-step__state {
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
  }

  .dashboard-mobile-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
  }

  .dashboard-mobile-action {
    min-width: 0;
    min-height: 67px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 4px;
    border: 1px solid #e8e1f2;
    border-radius: 14px;
    color: #554b63;
    background: #fbfaff;
    font-size: 9.5px;
    font-weight: 900;
  }

  .dashboard-mobile-action i {
    color: var(--brand-3);
    font-size: 15px;
  }

  .dashboard-mobile-attention {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 10px 11px;
    border-radius: 14px;
    color: #6b4a09;
    background: #fffaf0;
    border: 1px solid #f4dfb8;
  }

  .dashboard-mobile-attention.is-clear {
    color: #08734c;
    background: #f0fdf4;
    border-color: #c7f5db;
  }

  .dashboard-mobile-attention__icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.72);
  }

  .dashboard-mobile-attention b {
    display: block;
    font-size: 11.5px;
    font-weight: 950;
  }

  .dashboard-mobile-attention small {
    display: block;
    margin-top: 2px;
    color: inherit;
    opacity: 0.76;
    font-size: 9.5px;
    font-weight: 750;
  }

  .dashboard-mobile-attention > i {
    font-size: 10px;
  }
}

@media (max-width: 390px) {
  .dashboard-mobile-stats,
  .dashboard-mobile-actions {
    gap: 5px;
  }

  .dashboard-mobile-stat {
    padding-inline: 3px;
  }

  .dashboard-mobile-stat small,
  .dashboard-mobile-action {
    font-size: 8.7px;
  }
}
