/* 
 * Admin Theme - JumClass Design System
 * 관리자 페이지 전용 스타일
 */

@import url('./design-system.css');

/* Admin Layout */
.admin-wrapper {
  display: flex;
  min-height: 100vh;
  background-color: var(--color-gray-100);
}

/* Sidebar Navigation */
.admin-sidebar {
  width: 260px;
  background-color: var(--color-white);
  border-right: 1px solid var(--color-gray-300);
  display: flex;
  flex-direction: column;
  transition: width var(--transition-base);
}

.admin-sidebar.collapsed {
  width: 80px;
}

.admin-logo {
  padding: 24px;
  border-bottom: 1px solid var(--color-gray-300);
}

.admin-logo h1 {
  font-size: 20px;
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  margin: 0;
}

.admin-nav {
  flex: 1;
  padding: 16px 0;
  overflow-y: auto;
}

.nav-item {
  margin-bottom: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: var(--color-gray-900);
  text-decoration: none;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  transition: all var(--transition-base);
  position: relative;
}

.nav-link:hover {
  background-color: var(--color-gray-100);
  color: var(--color-primary);
}

.nav-link.active {
  background-color: var(--color-primary-bg);
  color: var(--color-primary);
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: var(--color-primary);
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-submenu {
  margin-left: 32px;
  margin-top: 4px;
}

.nav-submenu .nav-link {
  padding: 8px 24px;
  font-size: var(--font-size-sm);
}

/* Admin Header */
.admin-header {
  background-color: var(--color-white);
  border-bottom: 1px solid var(--color-gray-300);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.menu-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-gray-400);
  border-radius: var(--radius-md);
  background-color: var(--color-white);
  cursor: pointer;
  transition: all var(--transition-base);
}

.menu-toggle:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
}

.header-user:hover {
  border-color: var(--color-primary);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--color-primary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
}

/* Admin Content */
.admin-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.admin-main {
  flex: 1;
  padding: 24px;
}

.page-header {
  margin-bottom: 24px;
}

.page-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-gray-900);
  margin-bottom: 8px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-size-sm);
  color: var(--color-gray-600);
}

.breadcrumb-separator {
  color: var(--color-gray-400);
}

/* Dashboard Cards */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
}

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.stat-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-gray-600);
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-primary-bg);
  color: var(--color-primary);
}

.stat-value {
  font-size: 28px;
  font-weight: var(--font-weight-bold);
  color: var(--color-gray-900);
  margin-bottom: 8px;
}

.stat-change {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--font-size-sm);
}

.stat-change.positive {
  color: var(--color-success);
}

.stat-change.negative {
  color: var(--color-error);
}

/* Charts */
.chart-card {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.chart-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-gray-900);
}

.chart-options {
  display: flex;
  gap: 8px;
}

.chart-option {
  padding: 6px 12px;
  font-size: var(--font-size-sm);
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius-md);
  background-color: var(--color-white);
  cursor: pointer;
  transition: all var(--transition-base);
}

.chart-option.active {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
}

/* Tables */
.table-card {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.table-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-gray-300);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.table-title {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  color: var(--color-gray-900);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  padding: 16px 24px;
  text-align: left;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-gray-600);
  background-color: var(--color-gray-100);
  border-bottom: 1px solid var(--color-gray-300);
}

.admin-table td {
  padding: 16px 24px;
  font-size: var(--font-size-base);
  color: var(--color-gray-900);
  border-bottom: 1px solid var(--color-gray-200);
}

.admin-table tr:hover td {
  background-color: var(--color-gray-100);
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-full);
}

.status-badge.active {
  background-color: rgba(128, 47, 255, 0.1);
  color: var(--color-primary);
}

.status-badge.pending {
  background-color: rgba(255, 205, 70, 0.1);
  color: var(--color-warning);
}

.status-badge.inactive {
  background-color: rgba(169, 169, 169, 0.1);
  color: var(--color-gray-500);
}

/* Responsive */
@media (max-width: 1024px) {
  .admin-sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    bottom: 0;
    z-index: 1000;
    transition: left var(--transition-base);
  }
  
  .admin-sidebar.open {
    left: 0;
  }
  
  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
  }
  
  .sidebar-overlay.show {
    display: block;
  }
}

@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .admin-main {
    padding: 16px;
  }
}