/* 대시보드 레이아웃 */
.dashboard-layout {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: #f8f9fa;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.dashboard-wrapper {
  display: flex;
  min-height: 100vh;
}

/* 왼쪽 사이드바 */
.dashboard-sidebar {
  width: 260px;
  background: #2c3e50;
  color: white;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.sidebar-nav {
  padding: 2rem 0;
  height: 100%;
}

.sidebar-logo {
  padding: 0 1.5rem 2rem;
  border-bottom: 1px solid #34495e;
  margin-bottom: 2rem;
}

.sidebar-logo .logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  text-decoration: none;
}

.nav-section {
  margin-bottom: 2rem;
}

.nav-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #bdc3c7;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 1.5rem;
  margin-bottom: 0.75rem;
}

.nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  color: #ecf0f1;
  text-decoration: none;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: #34495e;
  color: white;
}

.nav-item.active {
  background: #3498db;
  color: white;
  border-left-color: #2980b9;
}

.nav-icon {
  margin-right: 0.75rem;
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

/* 오른쪽 메인 영역 */
.dashboard-main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* 헤더 */
.dashboard-header {
  background: white;
  border-bottom: 1px solid #e1e8ed;
  padding: 0 2rem;
  height: 70px;
  display: flex;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sidebar-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: none;
  flex-direction: column;
  gap: 4px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.sidebar-toggle span {
  width: 20px;
  height: 2px;
  background: #495057;
  transition: all 0.3s;
}

.page-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #2c3e50;
  margin: 0;
}

/* 메인 콘텐츠 */
.dashboard-content {
  flex: 1;
  background: #f8f9fa;
  overflow-y: auto;
}

.content-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* 푸터 */
.dashboard-footer {
  background: white;
  border-top: 1px solid #e1e8ed;
  padding: 1.5rem 2rem;
  color: #7f8c8d;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: #7f8c8d;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #3498db;
}

/* 사용자 메뉴 */
.user-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-info {
  font-weight: 500;
  color: #2c3e50;
}

.dropdown {
  position: relative;
}

.dropdown-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 50%;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dropdown-toggle:hover {
  background: #f8f9fa;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e9ecef;
}

.user-name {
  font-weight: 500;
  color: #2c3e50;
}

.dropdown-arrow {
  font-size: 0.8rem;
  color: #7f8c8d;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid #e1e8ed;
  border-radius: 0.5rem;
  padding: 0.5rem 0;
  min-width: 200px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s;
  z-index: 1000;
}

.dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: #2c3e50;
  text-decoration: none;
  transition: all 0.2s;
}

.dropdown-menu a:hover {
  background: #3498db;
  color: white;
}

.dropdown-menu .nav-icon {
  margin-right: 0.75rem;
  color: inherit;
}

.divider {
  height: 1px;
  background: #e1e8ed;
  margin: 0.5rem 0;
}

/* 로딩 및 에러 상태 */
.loading, .error {
  padding: 2rem;
  text-align: center;
  border-radius: 0.5rem;
  margin: 1rem 0;
}

.loading {
  background: #e8f2ff;
  color: #3498db;
}

.error {
  background: #ffe8e8;
  color: #e74c3c;
  border: 1px solid #f5c6cb;
}

/* 반응형 디자인 */
@media (max-width: 1024px) {
  .dashboard-sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    height: 100vh;
    z-index: 1000;
    width: 280px;
  }
  
  .dashboard-sidebar.open {
    left: 0;
  }
  
  .sidebar-toggle {
    display: flex;
  }
  
  .content-inner {
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  .dashboard-header {
    padding: 0 1rem;
  }
  
  .content-inner {
    padding: 1rem;
  }
  
  .dashboard-footer {
    padding: 1rem;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .user-name {
    display: none;
  }
  
  .dropdown-arrow {
    display: none;
  }
}

@media (max-width: 480px) {
  .content-inner {
    padding: 0.75rem;
  }
}