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

body {
  font-family: 'Noto Sans KR', sans-serif;
  background-color: #f5f5f5;
  color: #000000;
  overflow-x: hidden;
}

/* ===== App Layout ===== */
.app-wrapper,
.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ===== Sidebar ===== */
.app-sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 15;
  width: 292px;
  min-width: 292px;
  height: 100vh;
  background-color: #f7f7f7;
  display: flex;
  flex-direction: column;
  padding-top: 0;
}

.sidebar-user {
  position: absolute;
  top: 30px;
  left: 38px;
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.sidebar-username {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.sidebar-logo {
  padding: 196px 20px 24px;
  font-size: 48px;
  font-weight: 900;
  line-height: 0.95;
  display: flex;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}

.sidebar-logo span {
  display: inline;
}

.logo-pill {
  color: #35ABE9;
}

.logo-mate {
  color: #5CB665;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 12px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 16px;
  border-radius: 10px;
  text-decoration: none;
  color: #000000;
  font-size: 26px;
  font-weight: 800;
  transition: background-color 0.15s;
}

.sidebar-link:hover {
  background-color: #f0faf0;
  color: #2e7d32;
}

.sidebar-link.active {
  background-color: #e5f4e5;
  color: #000000;
}

.sidebar-icon {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
}

/* ===== Main Area ===== */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-left: 292px;
  min-width: 0;
}

/* ===== Topbar ===== */
.app-topbar {
  width: 100%;
  min-height: 112px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 44px;
  background-color: #ffffff;
  border-bottom: 1px solid #e8e8e8;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.topbar-page-icon {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
}

.topbar-title {
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 600;
  color: #1a1a1a;
  white-space: nowrap;
}

.topbar-user {
  font-size: clamp(14px, 2.2vw, 25px);
  padding: 0;
  color: #000000;
  white-space: nowrap;
}

.notification-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-btn:hover {
  opacity: 0.7;
}

.topbar-bell-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* ===== Content Area ===== */
.app-content {
  flex: 1;
  padding: clamp(16px, 3vw, 28px);
  overflow-y: auto;
}

.page-content {
  padding: clamp(16px, 3vw, 28px);
}

@media (max-width: 900px) {
  .app-sidebar {
    width: 88px;
    min-width: 88px;
  }

  .sidebar-user {
    top: 24px;
    left: 18px;
    width: 52px;
    height: 52px;
  }

  .sidebar-avatar {
    width: 52px;
    height: 52px;
  }

  .sidebar-logo {
    font-size: 22px;
    padding: 92px 12px 20px;
    text-align: center;
  }

  .sidebar-nav {
    padding: 0 10px;
  }

  .sidebar-link {
    justify-content: center;
    min-height: 52px;
    padding: 12px;
    font-size: 18px;
  }

  .sidebar-link span {
    display: none;
  }

  .app-topbar {
    padding: 14px 18px;
  }

  .topbar-left {
    gap: 8px;
  }

  .topbar-page-icon {
    width: 32px;
    height: 32px;
  }

  .app-main {
    margin-left: 88px;
  }
}

@media (max-width: 700px) {
  .app-wrapper,
  .app-layout {
    flex-direction: column;
  }

  .app-sidebar {
    position: sticky;
    top: 0;
    width: 100%;
    min-width: 0;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid #e0e0e0;
    z-index: 10;
  }

  .app-main {
    margin-left: 0;
  }

  .sidebar-logo {
    display: none;
  }

  .sidebar-user {
    display: none;
  }

  .sidebar-nav {
    flex-direction: row;
    gap: 6px;
    padding: 8px 10px;
    overflow-x: auto;
  }

  .sidebar-link {
    flex: 0 0 auto;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
  }

  .sidebar-link span {
    display: inline;
  }

  .sidebar-icon {
    width: 24px;
    height: 24px;
  }

  .app-topbar {
    align-items: flex-start;
    padding: 12px 14px;
  }

  .topbar-left {
    flex-wrap: wrap;
  }

  .topbar-page-icon {
    width: 28px;
    height: 28px;
  }

  .topbar-title {
    font-size: 20px;
  }

  .topbar-user {
    width: 100%;
    font-size: 13px;
    color: #666666;
  }
}
