/* ============================================================
   tOS ナビゲーション
   上部タブ = プロジェクト / 予定 / チャット / メール / 承認
   サイドメニュー(☰) = 経営系(経営ダッシュボード・経営方針・会計・人事など)
   ※ style.css の後に読み込むこと(スマホ用定義の上書きを含むため)
   ============================================================ */

/* ハンバーガー */
.side-toggle {
  background: none; border: 1px solid var(--s700); color: var(--s200);
  border-radius: 8px; padding: 6px 11px; font-size: 15px; line-height: 1;
}
.side-toggle:hover { color: #fff; border-color: var(--s500); background: var(--s800); }

/* いま開いている経営メニューの名前(ブランド横) */
.nav-current {
  font-size: 11.5px; font-weight: 600; color: var(--s200);
  background: var(--s800); border: 1px solid var(--s700);
  border-radius: 999px; padding: 3px 10px; margin-left: 8px; white-space: nowrap;
}

/* オーバーレイ */
.side-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, .38); z-index: 20; }

/* ドロワー本体 */
.sidemenu {
  position: fixed; top: 0; left: 0; bottom: 0; width: 274px; z-index: 21;
  background: #fff; border-right: 1px solid var(--s200);
  box-shadow: 6px 0 26px rgba(15, 23, 42, .16);
  display: flex; flex-direction: column; overflow-y: auto;
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
}
.side-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 16px 16px 13px; border-bottom: 1px solid var(--s100);
  font-size: 14px; font-weight: 800; color: var(--s900);
}

/* サイド側のタブボタン(.tabs を共有しているため上書きする) */
.sidemenu .tabs.side-tabs {
  display: flex; flex-direction: column; flex: none; gap: 2px;
  padding: 10px 8px; margin: 0; border-top: none; overflow: visible;
}
.sidemenu .tabs.side-tabs button {
  display: block; width: 100%; text-align: left; white-space: nowrap;
  color: var(--s700); font-size: 13.5px; font-weight: 500;
  padding: 11px 12px; border: none; border-bottom: none; border-radius: 10px;
}
.sidemenu .tabs.side-tabs button:hover { color: var(--s900); background: var(--s100); }
.sidemenu .tabs.side-tabs button.active {
  color: var(--s900); font-weight: 700; background: #f0fdfa;
  border-bottom: none; box-shadow: inset 3px 0 0 var(--teal);
}
.side-note { padding: 6px 16px 0; line-height: 1.7; }

/* ---- スマホ: 上段 = ☰ + ブランド + ユーザー / 下段 = タブ ---- */
@media (max-width: 780px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "menu brand right" "tabs tabs tabs";
  }
  .side-toggle { grid-area: menu; margin-left: 10px; min-height: 34px; }
  .sidemenu { width: 82%; max-width: 300px; }
  .nav-current { display: none; }
}

@media print { .sidemenu, .side-overlay, .side-toggle { display: none !important; } }
