/* Sidebar app-shell + Dashboard screen — matches "01 Dashboard" in the
   Musketr Mockups Claude Design file. Reuses the existing in-app palette
   and type system (var(--ink)/--cardinal/--font-display etc. from
   application.css) rather than introducing a third design language —
   this is the same accent already in use on posts/social_accounts. */

body.is-app { margin: 0; }
.app-frame { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }

.app-sidebar { background: var(--wash); border-right: 1px solid var(--line); padding: 22px 16px; display: flex; flex-direction: column; gap: 22px; }
.app-sidebar__brand { display: flex; align-items: center; gap: 9px; padding: 0 8px; text-decoration: none; }
.app-sidebar__brand img { width: 30px; height: 19px; object-fit: contain; }
.app-sidebar__brand span { font: 400 1.3rem var(--font-display); letter-spacing: -0.02em; color: var(--ink); }

.app-sidebar__nav { display: flex; flex-direction: column; gap: 4px; }
.app-sidebar__cta { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px; background: var(--cardinal); color: var(--paper); font: 600 0.92rem var(--font-ui); text-decoration: none; }
.app-sidebar__cta:hover { background: var(--cardinal-dark); }
.app-sidebar__cta-icon { width: 16px; height: 16px; border: 2px solid currentColor; border-radius: 4px; display: grid; place-items: center; font-size: 11px; line-height: 1; }
.app-sidebar__link { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 9px; font: 500 0.92rem var(--font-ui); color: var(--soft); text-decoration: none; }
.app-sidebar__link:hover { background: var(--card); color: var(--ink); }
.app-sidebar__link.is-current { background: var(--card); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.app-sidebar__link--static { cursor: default; }
.app-sidebar__link--static:hover { background: none; color: var(--soft); }
.app-sidebar__count { font: 500 0.78rem var(--font-meta); color: var(--faint); }

.app-sidebar__card { display: flex; flex-direction: column; gap: 10px; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 11px; }
.app-sidebar__card-label { margin: 0; font: 500 0.68rem var(--font-meta); letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.app-sidebar__accounts { display: flex; flex-direction: column; gap: 9px; }
.app-sidebar__account { display: flex; align-items: center; gap: 9px; }
.app-sidebar__account-mark { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font: 500 0.68rem var(--font-meta); flex-shrink: 0; }
.app-sidebar__account-mark--instagram { color: #8d3d68; background: #f6e5ee; }
.app-sidebar__account-mark--tiktok { color: #196878; background: #e2f1f2; }
.app-sidebar__account-mark--youtube { color: #a44628; background: #fae8dd; }
.app-sidebar__account-name { flex: 1; font-size: 0.82rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-sidebar__account-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.app-sidebar__account-dot--expiring { background: #906221; }
.app-sidebar__account-dot--expired { background: var(--red); }
.app-sidebar__warning { margin: 0; font-size: 0.76rem; line-height: 1.45; color: #906221; }
.app-sidebar__warning a { color: var(--cardinal); font-weight: 700; }
.app-sidebar__empty { margin: 0; font-size: 0.8rem; color: var(--soft); }
.app-sidebar__empty a { color: var(--cardinal); font-weight: 700; }

.app-sidebar__profile { margin-top: auto; display: flex; align-items: center; gap: 9px; padding-top: 16px; border-top: 1px solid var(--line); }
.app-sidebar__avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--line); color: var(--ink); display: grid; place-items: center; font: 600 0.72rem var(--font-ui); flex-shrink: 0; }
.app-sidebar__profile-info { display: flex; flex-direction: column; min-width: 0; }
.app-sidebar__profile-name { font: 500 0.82rem var(--font-ui); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-sidebar__profile-email { font: 400 0.72rem var(--font-meta); color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-sidebar__signout { margin-left: auto; border: 0; background: none; padding: 6px; color: var(--faint); cursor: pointer; font-size: 0.9rem; }
.app-sidebar__signout:hover { color: var(--cardinal); }

.app-main { padding: 34px clamp(20px, 4vw, 44px) 96px; display: flex; flex-direction: column; gap: 30px; max-width: 1040px; }

.dash-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.dash-head h1 { margin: 0 0 5px; font: 400 2rem var(--font-display); letter-spacing: -0.02em; color: var(--ink); }
.dash-head p { margin: 0; font-size: 0.95rem; color: var(--soft); }
.dash-head__actions { display: flex; align-items: center; gap: 10px; }

.dash-drop { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 44px; border: 1.5px dashed #bf9b65; background: #f8f1e6; border-radius: 13px; text-decoration: none; text-align: center; }
.dash-drop__icon { width: 46px; height: 46px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); display: grid; place-items: center; font-size: 20px; color: var(--cardinal); }
.dash-drop__title { font: 600 1.15rem var(--font-ui); color: var(--ink); }
.dash-drop__hint { font-size: 0.86rem; color: var(--soft); }

.dash-section { display: flex; flex-direction: column; gap: 12px; }
.dash-section h2 { margin: 0; font: 600 1rem var(--font-ui); color: var(--ink); }
.dash-section__head { display: flex; align-items: baseline; justify-content: space-between; }
.dash-section__head a { font: 500 0.82rem var(--font-ui); color: var(--cardinal); }

.dash-upcoming { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.dash-upcoming__card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 11px; background: var(--card); overflow: hidden; text-decoration: none; }
.dash-upcoming__thumb { display: grid; place-items: center; height: 90px; background: var(--wash); color: var(--gold); font-size: 1rem; }
.dash-upcoming__meta { padding: 13px 14px; display: flex; flex-direction: column; gap: 9px; }
.dash-upcoming__meta strong { font: 600 0.86rem var(--font-ui); color: var(--ink); }
.dash-upcoming__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dash-upcoming__platforms { display: flex; gap: 3px; }
.dash-upcoming__row time { font: 400 0.7rem var(--font-meta); color: var(--faint); white-space: nowrap; }

/* Mobile-only stand-in for the sidebar's destinations card (hidden below
   900px along with the rest of the sidebar) — same status dots and
   most-urgent-first warning, condensed into a single strip under the
   greeting. Dashboard-only: it's the one screen with room for it, and the
   one place the sidebar's warning would otherwise disappear from entirely. */
.dash-connections { display: none; }

/* ============ "07 Mobile" — sidebar becomes a bottom tab bar ============ */
.app-tabbar { display: none; }

@media (max-width: 900px) {
  .app-frame { grid-template-columns: 1fr; }
  .app-sidebar { display: none; }

  .app-tabbar {
    display: grid;
    position: fixed;
    z-index: 30;
    right: 0;
    bottom: 0;
    left: 0;
    grid-template-columns: repeat(5, 1fr);
    min-height: 68px;
    padding: 7px max(8px, env(safe-area-inset-right)) max(7px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--paper) 94%, transparent);
    backdrop-filter: blur(14px);
  }
  .app-tabbar__link, .app-tabbar__signout { display: flex; min-width: 0; min-height: 52px; flex-direction: column; align-items: center; justify-content: center; gap: 1px; margin: 0; border: 0; background: transparent; color: var(--soft); box-shadow: none; text-decoration: none; font: inherit; cursor: pointer; }
  .app-tabbar__link span, .app-tabbar__signout span { font-size: 1.2rem; line-height: 1; }
  .app-tabbar small { font: 700 0.64rem var(--font-ui); }
  .app-tabbar__link.is-current { color: var(--cardinal); }
  .app-tabbar__link--cta span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: var(--cardinal); color: var(--paper); }
  .app-tabbar__signout { width: 100%; }

  .app-main { padding: 26px 18px calc(88px + env(safe-area-inset-bottom)); }
  .dash-head { flex-direction: column; }

  .dash-connections { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-size: 0.8rem; color: var(--soft); }
  .dash-connections__accounts { display: flex; align-items: center; gap: 8px; }
  .dash-connections__account { display: flex; align-items: center; gap: 3px; }
  .dash-connections__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
  .dash-connections__dot--expiring { background: #906221; }
  .dash-connections__dot--expired { background: var(--red); }
  .dash-connections__warning { color: #906221; }
  .dash-connections__warning a { color: var(--cardinal); font-weight: 700; }
}
