@charset "utf-8";
/* CSS Document */

        .sidebar, .sidebar *,
        .top-header, .top-header *,
        .main-wrapper > .content > .content-inner > .stats-grid,
        .main-wrapper > .content > .content-inner > .stats-grid * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            --sidebar-width: 260px;
            --sidebar-collapsed-width: 70px;
            --header-height: 65px;
            --primary-color: var(--primary);;  /* 원하는 포인트 컬러로 변경하세요 */
            --sidebar-bg: #1a1d2e;
            --sidebar-hover: #252940;
            --text-white: #ffffff;
            --text-gray: #a0a3b5;
            --bg-light: #f8f9fc;
            --border-color: #e5e7eb;
            --border-light: #f0f1f5;
        }



        /* 사이드바 */
        .sidebar {
            position: fixed;
            left: 0;
            top: 0;
            width: var(--sidebar-width);
            height: 100vh;
            background: var(--sidebar-bg);
            color: var(--text-white);
            transition: all 0.3s ease;
            z-index: 1000;
            overflow: hidden;
        }

        .sidebar.collapsed {
            width: var(--sidebar-collapsed-width);
        }

        .sidebar-header {
            height: var(--header-height);
            padding: 0 20px;
            display: flex;
            align-items: center;
            justify-content: flex-start;
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }

        .sidebar.collapsed .sidebar-header {
            padding: 0;
            justify-content: center;
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 12px;
            flex: 1;
            min-width: 0;
        }

        .sidebar.collapsed .logo {
            flex: none;
            width: 100%;
            justify-content: center;
            gap: 0;
        }

        .logo-icon {
            width: 40px;
            height: 40px;
            background: var(--primary-color);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 18px;
            flex-shrink: 0;
            color: white;
        }

        .logo-text {
            display: flex;
            flex-direction: column;
            min-width: 0;
            transition: opacity 0.3s ease;
        }

        .sidebar.collapsed .logo-text {
            opacity: 0;
            pointer-events: none; display: none
        }

        .site-name {
            font-size: 16px;
            font-weight: 700;
            color: var(--text-white);
            white-space: nowrap;
            line-height: 1.3;
        }

        .site-desc {
            font-size: 10px;
            color: var(--text-gray);
            white-space: nowrap;
            margin-top: 2px;
        }

        .toggle-btn {
            width: 40px;
            height: 40px;
            background: #fafbfc;
            border: 1px solid var(--border-light);
            color: #6b7280;
            cursor: pointer;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }

        .toggle-btn:hover {
            background: #f3f4f6;
            border-color: var(--border-color);
            color: #374151;
        }

        /* 토글 버튼 아이콘 회전 */
        .toggle-btn svg {
            transition: transform 0.3s ease;
        }

        .sidebar.collapsed ~ .main-wrapper .toggle-btn svg {
            transform: rotate(180deg);
        }

        /* 사이드바 네비게이션 */
        .sidebar-nav {
            height: calc(100vh - var(--header-height));
            overflow-y: auto;
            overflow-x: hidden;
            padding: 20px 0;
        }

        .sidebar.collapsed .sidebar-nav {
            padding: 20px 0;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .sidebar-nav::-webkit-scrollbar {
            width: 6px;
        }

        .sidebar-nav::-webkit-scrollbar-track {
            background: transparent;
        }

        .sidebar-nav::-webkit-scrollbar-thumb {
            background: rgba(255,255,255,0.1);
            border-radius: 3px;
        }

        .menu-list {
            list-style: none;
            width: 100%;
        }

        .sidebar.collapsed .menu-list {
            display: flex;
            flex-direction: column;
            align-items: center;
            width: 100%;
        }

        .menu-item {
            margin-bottom: 4px;
            padding: 0 15px;
            width: 100%;
        }

        .sidebar.collapsed .menu-item {
            padding: 0;
            margin: 2px 0;
            width: var(--sidebar-collapsed-width);  /* 70px */
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .menu-item a {
            display: flex;
            align-items: center;
            padding: 12px 15px;
            color: var(--text-gray);
            text-decoration: none;
            border-radius: 8px;
            transition: all 0.2s ease;
            gap: 12px;
            font-size: 16px;
        }

        .sidebar.collapsed .menu-item a {
            justify-content: center;
            align-items: center;
            padding: 12px;
            width: 44px;  /* 아이콘 영역 */
            height: 44px;
            border-radius: 8px;
        }
       .sidebar.collapsed .menu-item a svg{
            margin-left: 10px
        }

        .menu-item a:hover {
            background: var(--sidebar-hover);
            color: var(--text-white);
        }

        .menu-item.active a {

            color: var(--text-white);
        }


   .menu-item.open>a{
            background: var(--sidebar-hover);
            color: var(--text-white);
        }
        .menu-icon {
            flex-shrink: 0;
            width: 20px;
            height: 20px;
        }

        .sidebar.collapsed .menu-icon {
            margin: 0;
        }

        .menu-text {
            white-space: nowrap;
            font-size: 16px;
            transition: opacity 0.3s ease;
        }

        .sidebar.collapsed .menu-text {
            opacity: 0;
            pointer-events: none;
            width: 0PX;
            overflow: hidden;display: NONE
        }

        /* 하위메뉴 */
        .menu-item.has-submenu > a {
            position: relative;
        }

        .menu-item.has-submenu > a::after {
            content: '';
            width: 0;
            height: 0;
            border-left: 5px solid transparent;
            border-right: 5px solid transparent;
            border-top: 5px solid currentColor;
            position: absolute;
            right: 15px;
            top: 50%;
            transform: translateY(-50%);
            transition: transform 0.3s ease;
        }

        .sidebar.collapsed .menu-item.has-submenu > a::after {
            display: none;
        }

        .menu-item.has-submenu.open > a::after {
            transform: translateY(-50%) rotate(180deg);
        }

        .submenu {
            list-style: none;
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease;
            margin-top: 4px;
        }

        .menu-item.has-submenu.open .submenu {
            max-height: 500px;
        }

        .submenu li.has-submenu > a {
            position: relative;
        }

        .submenu li.has-submenu > a::after {
            content: '';
            width: 0;
            height: 0;
            border-left: 4px solid transparent;
            border-right: 4px solid transparent;
            border-top: 4px solid currentColor;
            position: absolute;
            right: 15px;
            top: 50%;
            transform: translateY(-50%);
            transition: transform 0.3s ease;
        }

        .submenu li.has-submenu.open > a::after {
            transform: translateY(-50%) rotate(180deg);
        }

        .submenu li.has-submenu .submenu {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease;
            margin-top: 4px;
        }

        .submenu li.has-submenu.open > .submenu {
            max-height: 500px;
        }

        .submenu li {
            padding: 0;
            margin: 0;
        }

        .submenu a {
            padding: 10px 15px 10px 30px;
            font-size: 15px;
            color: var(--text-gray);
            text-decoration: none;
            display: flex;
            align-items: center;
            border-radius: 8px;
            transition: all 0.2s ease;
            margin: 2px 0;
        }

        .submenu a:hover {
            background: var(--sidebar-hover);
            color: var(--text-white);
        }

        .submenu a.active {
          			
            background: var(--primary-color);
              color: #fff;
        }

        .sidebar.collapsed .submenu {
            display: none;
        }

        .sidebar.collapsed .menu-item.has-submenu.open {
            background: transparent;
        }

        /* 메인 래퍼 */
        .main-wrapper {
            margin-left: var(--sidebar-width);
            transition: margin-left 0.3s ease;
            min-height: 100vh;
            display: flex;
            flex-direction: column; margin-top: -30px
        }

        .sidebar.collapsed ~ .main-wrapper {
            margin-left: var(--sidebar-collapsed-width);
        }

        /* 사이드바 없을 때 (권한 7 미만) */
        .main-wrapper.no-sidebar {
            margin-left: 0;
        }
        .main-wrapper.no-sidebar .toggle-btn,
        .main-wrapper.no-sidebar .mobile-toggle {
            display: none;
        }

        /* 상단 헤더 */
        .top-header {
            height: var(--header-height);
            background: #fff;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 30px;
            position: sticky;
            top: 0px;
            z-index: 100;
        }

        .header-left {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .mobile-toggle {
            display: none;
            width: 40px;
            height: 40px;
            background: #fafbfc;
            border: 1px solid var(--border-light);
            color: #6b7280;
            cursor: pointer;
            border-radius: 8px;
            align-items: center;
            justify-content: center;
        }

        .mobile-toggle:hover {
            background: #f3f4f6;
            border-color: var(--border-color);
            color: #374151;
        }

        .page-title {
            font-size: 20px;
            font-weight: 600;
            color: #1f2937;
        }

        .header-right {
            display: flex;
            align-items: center;
            gap: 20px;
        }

        .user-info {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 16px;
            background: #fafbfc;
            border: 1px solid var(--border-light);
            border-radius: 8px;
        }

        .user-role {
            font-size: 12px;
            color: var(--primary-color);
            font-weight: 600; margin-top: 5px
        }

        .user-name {
            font-size: 14px;
            font-weight: 500;
            color: #1f2937;
        }

        .header-actions {
            display: flex;
            gap: 8px;
        }

        .header-btn {
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #fafbfc;
            border: 1px solid var(--border-light);
            border-radius: 8px;
            color: #6b7280;
            text-decoration: none;
            transition: all 0.2s ease;
        }
        .header-btn i{
     font-size: 20px
        }
        .header-btn:hover {
            background: #f3f4f6;
            border-color: var(--border-color);
            color: #374151;
        }

        .header-btn.logout:hover {
            background: #fef2f2;
            border-color: #fecaca;
            color: #dc2626;
        }

        /* 콘텐츠 영역 */
        .content {
            flex: 1;
            padding: 30px;
        }

        .content-inner {
            max-width: 1400px;
            margin: 0 auto;
        }

        /* 통계 카드 그리드 */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .stat-card {
            background: #fff;
            border-radius: 12px;
            border: 1px solid var(--border-light);
            padding: 24px;
            display: flex;
            align-items: center;
            gap: 20px;
            transition: all 0.2s ease;
        }

        .stat-card:hover {
            border-color: var(--border-color);
            transform: translateY(-2px);
        }

        .stat-icon {
            width: 56px;
            height: 56px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .stat-icon.blue {
            background: #dbeafe;
            color: #3b82f6;
        }

        .stat-icon.green {
            background: #d1fae5;
            color: #10b981;
        }

        .stat-icon.orange {
            background: #fed7aa;
            color: #f97316;
        }

        .stat-icon.purple {
            background: #e9d5ff;
            color: #a855f7;
        }

        .stat-content {
            flex: 1;
        }

        .stat-label {
            font-size: 14px;
            color: #6b7280;
            margin-bottom: 6px;
            font-weight: 500;
        }

        .stat-value {
            font-size: 28px;
            font-weight: 700;
            color: #1f2937;
        }

        /* 콘텐츠 섹션 */
        .content-section {
            margin-bottom: 30px;
        }

        .content-section h2 {
            font-size: 20px;
            font-weight: 600;
            color: #1f2937;
            margin-bottom: 16px;
        }

        .card {
            background: #fff;
            border-radius: 12px;
            border: 1px solid var(--border-light);
            padding: 24px;
        }

        .recent-table {
            width: 100%;
            border-collapse: collapse;
        }

        .recent-table th,
        .recent-table td {
            padding: 14px 12px;
            text-align: left;
            border-bottom: 1px solid var(--border-light);
        }

        .recent-table th {
            background: #fafbfc;
            font-weight: 600;
            color: #6b7280;
            font-size: 13px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            border-bottom: 2px solid var(--border-color);
        }

        .recent-table td {
            font-size: 14px;
            color: #374151;
        }

        .recent-table tbody tr {
            transition: background 0.15s ease;
        }

        .recent-table tbody tr:hover {
            background: #fafbfc;
        }

        .recent-table tbody tr:last-child td {
            border-bottom: none;
        }

        .badge {
            display: inline-block;
            padding: 5px 12px;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 600;
            letter-spacing: 0.3px;
        }

        .badge.new {
            background: #dbeafe;
            color: #2563eb;
        }

        .badge.pending {
            background: #fed7aa;
            color: #ea580c;
        }

        .badge.complete {
            background: #d1fae5;
            color: #059669;
        }

        /* 반응형 */
        @media (max-width: 1024px) {
            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (max-width: 768px) {
            .sidebar {
                transform: translateX(-100%);
            }

            .sidebar.mobile-open {
                transform: translateX(0);
            }

            .main-wrapper {
                margin-left: 0 !important;
            }

            .toggle-btn {
                display: none;
            }

            .mobile-toggle {
                display: flex;
            }

            .top-header {
                padding: 0 20px;
            }

            .content {
                padding: 20px;
            }

            .stats-grid {
                grid-template-columns: 1fr;
            }

            .user-info {
                display: none;
            }

            .page-title {
                font-size: 18px;
            }

            .recent-table {
                font-size: 13px;
            }

            .recent-table th,
            .recent-table td {
                padding: 10px 8px;
            }
        }

        @media (max-width: 480px) {
            .stat-card {
                padding: 20px;
            }

            .stat-icon {
                width: 48px;
                height: 48px;
            }

            .stat-value {
                font-size: 24px;
            }
        }