/* NAV-01: vỏ ứng dụng gọn cho điện thoại. */
.create-sheet-wrap[hidden], .sidebar-account[hidden], .mobile-create-item[hidden] { display: none !important; }
.create-sheet-wrap { position: fixed; inset: 0; z-index: 120; }
.create-sheet-backdrop { position: absolute; inset: 0; background: rgba(15, 20, 30, .45); }
.create-sheet { position: absolute; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; background: var(--surface, #fff); box-shadow: 0 -10px 40px rgba(16, 24, 40, .25); }
.create-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 16px; }
.create-sheet-list { display: grid; gap: 8px; }
.cs-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; min-height: 58px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); font: inherit; text-align: left; cursor: pointer; }
.cs-item b { font-size: 14px; }
.cs-item span { font-size: 12px; color: var(--ink-soft); }
.cs-item:hover, .cs-item:focus-visible { background: var(--brand-tint); border-color: var(--brand); }
body.create-sheet-open { overflow: hidden; }

.sidebar-account { margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--line); }
.sa-info { padding: 4px 12px 8px; display: grid; gap: 6px; }
.sa-line { display: flex; flex-direction: column; gap: 1px; font-size: 12px; }
.sa-line b { font-size: 14px; }
.sa-line span { color: var(--ink-soft); font-size: 12px; }
.sa-actions { display: grid; gap: 6px; padding: 0 12px 12px; }
.sa-btn { min-height: 44px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); font: inherit; font-size: 14px; cursor: pointer; }
.sa-btn.is-primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 650; }
.sa-btn.is-danger { color: var(--red-ink, #b42318); border-color: #e8bfc1; }
@media (min-width: 861px) { .sidebar-account { display: none !important; } }

@media (max-width: 720px) {
  /* Một hàng đầu trang: tiêu đề và nút quay lại. Tài khoản và gói nằm trong ngăn Thêm. */
  body.appcar-preview:not(.station-bar-on) .preview-notice { display: none; }
  body.station-bar-on:not(.sb-attn) .preview-notice.station-bar { display: none; }
  body.station-bar-on:not(.sb-attn) { --station-bar-h: 0px; }
  .topbar { height: 50px; }
  #menu-toggle { display: none !important; }
  .topbar #topbar-subtitle { display: none; }
  .topbar .who { min-width: 0; }
  .topbar .who b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
  .topbar-right > .logout-btn, .topbar-right > #appcar-guide-launch, .topbar-right > .avatar { display: none !important; }
  .topbar > div:first-child:has(#global-back:not([style*="display: none"])) .logo-home-link { display: none; }
  /* Gia hạn / cảnh báo gói chỉ hiện khi sắp hết hạn: gọn một dòng. */
  body.sb-attn .preview-notice.station-bar { min-height: 40px; padding: 4px 12px; }
  body.sb-attn .station-bar .sb-name, body.sb-attn .station-bar .sb-btn:not(.sb-pri) { display: none; }

  /* Thanh dưới: số ô theo số nút đang hiện. */
  .mobile-bottom-nav { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .mobile-bottom-nav .mobile-create-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 51px; border: 0; background: transparent; color: var(--brand-ink); font: inherit; font-size: 12px; font-weight: 650; }
  .mobile-bottom-nav .mobile-create-item[hidden] { display: none; }
  .mobile-bottom-nav .mobile-create-item svg { width: 30px; height: 30px; padding: 6px; border-radius: 999px; background: var(--brand); color: #fff; stroke: #fff; }
}
