/* ===============================
   Reset
================================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f5f6f7;
  color: #111;
}

/* ===============================
   Header
================================ */
.header {
  display: flex;
  align-items: center;
  height: 50px;
  padding: 0 12px;
  background: #fff;
  border-bottom: 1px solid #ddd;
  position: sticky;
  top: 0;
  z-index: 200;
}

.logo {
  height: 28px;
}

.hamburger {
  font-size: 22px;
  cursor: pointer;
  margin-right: 12px;
  user-select: none;
  display: none;
}

/* ===============================
   Layout
================================ */
.app {
  display: flex;
  min-height: calc(100vh - 50px);
}

/* ===============================
   Sidebar Left
================================ */
.sidebar-left {
  width: 220px;
  background: #fff;
  border-right: 1px solid #ddd;
  padding: 12px;
}

.sidebar-left ul {
  list-style: none;
}

.sidebar-left li {
  padding: 10px 8px;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.sidebar-left li:hover {
  background: #f0f0f0;
}

.sidebar-left li.active {
  background: #e8f2ff;
  color: #1d9bf0;
  font-weight: 600;
}

.submenu {
  padding-left: 14px;
  margin-top: 4px;
}

/* ===============================
   Main
================================ */
.main {
  flex: 1;
  padding: 16px;
  min-width: 0;
}

/* ===============================
   Sidebar Right
================================ */
.sidebar-right {
  width: 260px;
  background: #fff;
  border-left: 1px solid #ddd;
  padding: 12px;
}

/* ===============================
   Mobile Footer
================================ */
.mobile-footer {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: #fff;
  border-top: 1px solid #ddd;
  z-index: 150;
}

.mobile-footer nav {
  display: flex;
  height: 100%;
}

.mobile-footer a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  text-decoration: none;
  color: #333;
}

.mobile-footer a.active {
  color: #1d9bf0;
  font-weight: 600;
}

/* ===============================
   Responsive
================================ */

/* タブレット以下 */
@media (max-width: 840px) {
  .sidebar-right {
    display: none;
  }
}

/* スマホ */
@media (max-width: 560px) {

  /* ハンバーガー表示 */
  .hamburger {
    display: block;
  }

  /* 左サイドバー：スライド式 */
  .sidebar-left {
    position: fixed;
    top: 50px;
    bottom: 0;
    left: -240px;
    width: 220px;
    z-index: 180;
    box-shadow: 2px 0 8px rgba(0,0,0,0.2);
    transition: left 0.25s ease;
  }

  .sidebar-left.open {
    left: 0;
  }

  /* メイン余白 */
  .main {
    padding-bottom: 70px;
  }

  /* フッター表示 */
  .mobile-footer {
    display: block;
  }
}