/* ==========================================================================
   FlowCoding Admin - 메인 스타일 (style.css)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 레이아웃 구조 (Main Shell)
   -------------------------------------------------------------------------- */
.app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   1-1. 샘플 페이지 상단 안내 바
   -------------------------------------------------------------------------- */
.fc-sample-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 250;
    height: var(--fc-sample-bar-height);
    background: linear-gradient(90deg, #db2777 0%, #ec4899 35%, #f472b6 65%, #db2777 100%);
    background-size: 200% 100%;
    animation: fc-sample-bar-shimmer 8s ease-in-out infinite;
    color: #ffffff;
    box-shadow: 0 2px 10px rgb(219 39 119 / 0.35);
    border-bottom: 1px solid rgb(255 255 255 / 0.22);
}

@keyframes fc-sample-bar-shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.fc-sample-topbar-viewport {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.fc-sample-topbar-track {
    display: flex;
    width: max-content;
    height: 100%;
    align-items: center;
    animation: fc-sample-marquee 100s linear infinite;
}

.fc-sample-topbar:hover .fc-sample-topbar-track {
    animation-play-state: paused;
}

@keyframes fc-sample-marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.fc-sample-topbar-group {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding-right: 28px;
    white-space: nowrap;
}

.fc-sample-topbar-text {
    font-size: var(--font-size-sm);
    font-weight: 700;
    letter-spacing: -0.01em;
    text-shadow: 0 1px 2px rgb(0 0 0 / 0.12);
}

.fc-sample-topbar .fc-sample-kakao-btn.kakao-chat-fab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 0 12px 0 10px;
    border-radius: 9999px;
    background-color: #fee500;
    color: #191919;
    text-decoration: none;
    font-size: var(--font-size-xs);
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 4px 12px rgb(0 0 0 / 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    flex-shrink: 0;
}

.fc-sample-topbar .fc-sample-kakao-btn.kakao-chat-fab:hover {
    transform: translateY(-1px);
    background-color: #ffe033;
    box-shadow: 0 6px 16px rgb(0 0 0 / 0.22);
    color: #191919;
}

.fc-sample-topbar .kakao-chat-fab-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.fc-sample-topbar .kakao-chat-fab-icon svg {
    width: 100%;
    height: 100%;
}

.fc-sample-topbar .kakao-chat-fab-text {
    white-space: nowrap;
}

.fc-sample-topbar-sep {
    color: rgb(255 255 255 / 0.75);
    font-size: 10px;
}

body.has-sample-topbar .app-container {
    padding-top: var(--fc-sample-bar-height);
    min-height: calc(100vh - var(--fc-sample-bar-height));
}

body.has-sample-topbar .sidebar {
    top: var(--fc-sample-bar-height);
}

body.has-sample-topbar.login-page {
    padding-top: calc(24px + var(--fc-sample-bar-height));
}

/* --------------------------------------------------------------------------
   2. 사이드바 (Sidebar)
   -------------------------------------------------------------------------- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: var(--transition-base);
}

/* 사이드바 축소 상태 */
.sidebar.collapsed {
    width: 80px;
}

.sidebar-header {
    height: 70px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
}

.sidebar-close-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition-base);
}

.sidebar-close-btn i,
.sidebar-close-btn svg {
    width: 16px;
    height: 16px;
}

.sidebar-close-btn:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.sidebar-backdrop.is-visible {
    display: block;
    opacity: 1;
}

.sidebar.collapsed .sidebar-header {
    padding: 0;
    justify-content: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: var(--font-size-2xl);
    flex-shrink: 0;
}

.logo-text {
    font-family: 'GmarketSansBold', 'Gmarket Sans', sans-serif;
    font-size: var(--font-size-2xl);
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
    transition: var(--transition-base);
}

.sidebar.collapsed .logo-text {
    display: none;
    opacity: 0;
}

.sidebar-menu-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
}

.menu-category {
    font-size: var(--font-size-xs);
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    padding: 12px 12px 6px 12px;
    transition: var(--transition-base);
}

.sidebar.collapsed .menu-category {
    display: none;
}

.menu-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menu-item {
    padding: 0;
    border-radius: var(--radius-md);
    transition: var(--transition-base);
}

.menu-item-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: var(--font-size-md);
    text-decoration: none;
    transition: var(--transition-base);
}

.menu-item-link:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.menu-item.active .menu-item-link {
    background-color: rgb(var(--color-point-rgb) / 0.1);
    color: var(--color-primary);
    font-weight: 700;
}

body.dark .menu-item.active .menu-item-link {
    background-color: rgb(var(--color-point-rgb) / 0.2);
    color: #c4b5fd;
}

body.theme-split .sidebar .menu-item.active .menu-item-link {
    background-color: rgb(var(--color-point-rgb) / 0.2);
    color: #c4b5fd;
}

.logo-link {
    text-decoration: none;
    color: inherit;
}

.page-content {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Dashboard — slightly larger entrance with staggered cards */
.page-content--dashboard {
    animation: none;
}

.page-content--dashboard > .page-title-section {
    animation: dashboardHeaderIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.page-content--dashboard .stats-grid > .card,
.page-content--dashboard .charts-grid > .card,
.page-content--dashboard .data-grid > .card {
    animation: dashboardCardIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.page-content--dashboard .stats-grid > .card:nth-child(1) { animation-delay: 0.1s; }
.page-content--dashboard .stats-grid > .card:nth-child(2) { animation-delay: 0.18s; }
.page-content--dashboard .stats-grid > .card:nth-child(3) { animation-delay: 0.26s; }
.page-content--dashboard .stats-grid > .card:nth-child(4) { animation-delay: 0.34s; }

.page-content--dashboard .charts-grid > .card:nth-child(1) { animation-delay: 0.42s; }
.page-content--dashboard .charts-grid > .card:nth-child(2) { animation-delay: 0.5s; }

.page-content--dashboard .data-grid > .card:nth-child(1) { animation-delay: 0.58s; }
.page-content--dashboard .data-grid > .card:nth-child(2) { animation-delay: 0.66s; }

@keyframes dashboardHeaderIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes dashboardCardIn {
    from { opacity: 0; transform: translateX(-18px); }
    to { opacity: 1; transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
    .page-content--dashboard > .page-title-section,
    .page-content--dashboard .stats-grid > .card,
    .page-content--dashboard .charts-grid > .card,
    .page-content--dashboard .data-grid > .card {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

.sidebar.collapsed .menu-item-link {
    justify-content: center;
    padding: 10px;
}

.menu-item-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.menu-item-text {
    white-space: nowrap;
    transition: var(--transition-base);
}

.sidebar.collapsed .menu-item-text {
    display: none;
    opacity: 0;
}

/* Nested menu (3-depth accordion) */
.menu-item-toggle,
.menu-leaf-link {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: var(--font-size-md);
    text-decoration: none;
    transition: var(--transition-base);
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}

.menu-item-toggle:hover,
.menu-leaf-link:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.menu-chevron {
    width: 14px;
    height: 14px;
    margin-left: auto;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.menu-item-has-children.open > .menu-item-toggle .menu-chevron {
    transform: rotate(180deg);
}

.menu-sublist {
    display: none;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.menu-item-has-children.open > .menu-sublist {
    display: flex;
}

.menu-sublist .menu-sub-toggle {
    padding: 8px 14px 8px 40px;
    font-size: var(--font-size-md);
}

.menu-sublist .menu-sublist .menu-leaf-link {
    padding: 8px 14px 8px 54px;
    font-size: var(--font-size-sm);
}

.menu-item-has-children.open > .menu-item-toggle,
.menu-item.active > .menu-leaf-link {
    color: var(--color-primary);
}

.sidebar.collapsed .menu-chevron,
.sidebar.collapsed .menu-sublist {
    display: none !important;
}

.sidebar.collapsed .menu-item-has-children.open > .menu-item-toggle {
    background-color: var(--bg-tertiary);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: var(--bg-secondary);
}

.sidebar-user-block {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.sidebar.collapsed .sidebar-footer {
    padding: 16px 0;
    align-items: center;
}

.sidebar.collapsed .sidebar-user-block {
    justify-content: center;
}

.sidebar-logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 38px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-base);
}

.sidebar-logout-btn i,
.sidebar-logout-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.sidebar-logout-btn:hover {
    border-color: rgb(239 68 68 / 0.35);
    color: var(--color-danger);
    background-color: rgb(239 68 68 / 0.08);
}

.sidebar.collapsed .sidebar-logout-btn {
    width: 38px;
    padding: 0;
}

.sidebar.collapsed .sidebar-logout-text {
    display: none;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: var(--transition-base);
}

.sidebar.collapsed .user-info {
    display: none;
}

.user-name {
    font-weight: 600;
    font-size: var(--font-size-md);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

/* 로그인 페이지 */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
}

.login-card {
    padding: 32px 28px;
}

.login-brand {
    text-align: center;
    margin-bottom: 24px;
}

.login-brand .logo-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 14px;
    font-size: var(--font-size-2xl);
}

.login-brand h1 {
    font-size: var(--font-size-3xl);
    margin-bottom: 8px;
}

.login-brand p {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.login-form .form-group:last-of-type {
    margin-bottom: 20px;
}

.login-submit-btn {
    width: 100%;
}

.login-alert {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 600;
}

.login-alert-success {
    background-color: rgb(16 185 129 / 0.1);
    color: var(--color-success);
    border: 1px solid rgb(16 185 129 / 0.2);
}

.login-alert-error {
    background-color: rgb(239 68 68 / 0.1);
    color: var(--color-danger);
    border: 1px solid rgb(239 68 68 / 0.2);
}

.login-copyright {
    margin-top: 18px;
    text-align: center;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   3. 메인 본문 콘텐츠 프레임
   -------------------------------------------------------------------------- */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: 260px;
    min-width: 0;
    transition: margin-left var(--transition-base);
}

.sidebar.collapsed ~ .main-wrapper {
    margin-left: 80px;
}

/* --------------------------------------------------------------------------
   4. 헤더 (Header Component)
   -------------------------------------------------------------------------- */
.header {
    height: 70px;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 90;
    transition: var(--transition-base);
    overflow: visible;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: visible;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.toggle-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    transition: var(--transition-base);
}

.toggle-btn:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.search-box {
    position: relative;
    width: 280px;
}

.search-box input {
    width: 100%;
    height: 40px;
    padding: 0 16px 0 40px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: var(--font-size-md);
    transition: var(--transition-base);
}

.search-box input:focus {
    border-color: var(--color-primary);
    background-color: var(--bg-secondary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.header-theme-wrap {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    overflow: visible;
}

.theme-hint-popover {
    display: none;
    position: absolute;
    z-index: 10;
    align-items: center;
    gap: 6px;
    width: max-content;
    max-width: min(300px, calc(100vw - 24px));
    padding: 0 6px 0 0;
    background: none;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    pointer-events: none;
    overflow: visible;
    visibility: hidden;
}

.theme-hint-popover.is-visible {
    display: flex;
}

.theme-hint-popover.is-mobile {
    flex-direction: column;
    align-items: flex-end;
    padding: 0;
}

.theme-hint-popover.is-mobile .theme-hint-arrow {
    transform: rotate(90deg);
    margin-right: 10px;
}

.theme-hint-popover.is-mobile.is-below .theme-hint-arrow {
    transform: rotate(-90deg);
    margin-right: 10px;
    order: -1;
}

.theme-hint-arrow {
    flex-shrink: 0;
    display: block;
    width: 48px;
    height: 28px;
    min-width: 48px;
    min-height: 28px;
    overflow: visible;
}

.theme-hint-arrow-tail,
.theme-hint-arrow-head {
    fill: none;
    stroke: #ffffff;
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.35));
}

.theme-hint-text {
    margin: 0;
    font-family: 'Nanum Pen Script', cursive;
    font-size: 25px;
    line-height: 1.05;
    color: var(--text-primary);
    font-weight: 400;
    word-break: keep-all;
    letter-spacing: -0.01em;
    text-align: right;
    flex-shrink: 0;
    white-space: normal;
}

.action-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    position: relative;
    transition: var(--transition-base);
}

.action-btn:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background-color: var(--color-danger);
    color: #ffffff;
    font-size: var(--font-size-2xs);
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-secondary);
}

/* 알림 센터 드롭다운 */
.notification-dropdown {
    position: absolute;
    top: 55px;
    right: 0;
    width: 340px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 100;
    overflow: hidden;
}

.notification-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-header h4 {
    font-size: var(--font-size-base);
    font-weight: 600;
}

.mark-all-read {
    font-size: var(--font-size-xs);
    color: var(--color-primary);
    cursor: pointer;
    font-weight: 600;
}

.notification-list {
    max-height: 280px;
    overflow-y: auto;
}

.notification-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition-base);
}

.notification-item:hover {
    background-color: var(--bg-primary);
}

.notification-item.unread {
    background-color: rgb(var(--color-point-rgb) / 0.03);
}

.notification-item-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-item-icon.info { background-color: rgba(6, 182, 212, 0.1); color: var(--color-info); }
.notification-item-icon.warning { background-color: rgba(245, 158, 11, 0.1); color: var(--color-warning); }
.notification-item-icon.success { background-color: rgba(16, 185, 129, 0.1); color: var(--color-success); }

.notification-item-content {
    flex: 1;
}

.notification-item-text {
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    margin-bottom: 2px;
}

.notification-item-time {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   5. 메인 레이아웃 및 패널 관리
   -------------------------------------------------------------------------- */
.main-content {
    flex: 1;
    padding: 28px 32px;
    min-width: 0;
    overflow-x: hidden;
}

.main-copyright {
    flex-shrink: 0;
    padding: 16px 32px 22px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    text-align: center;
}

.main-copyright p {
    margin: 0;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.01em;
}

.view-panel {
    display: none;
    min-width: 0;
}

.view-panel.active {
    display: block;
}

/* 페이지 헤더 */
.page-title-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-title-info h2 {
    font-size: var(--font-size-3xl);
    font-weight: 700;
}

.page-subtitle {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    font-weight: 500;
}

/* --------------------------------------------------------------------------
   6. 카드 컴포넌트 & 그리드
   -------------------------------------------------------------------------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 통계 카드 맞춤 스타일 */
.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.stat-icon-wrapper {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-won-icon {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}

.trend-badge {
    font-size: var(--font-size-xs);
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 3px;
}

.trend-badge.positive {
    background-color: rgb(16 185 129 / 0.1);
    color: var(--color-success);
}

.trend-badge.negative {
    background-color: rgb(239 68 68 / 0.1);
    color: var(--color-danger);
}

.stat-card-label {
    font-size: var(--font-size-xs);
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.stat-card-value {
    font-family: 'GmarketSansBold', 'Gmarket Sans', sans-serif;
    font-size: var(--font-size-4xl);
    font-weight: 700;
    margin-top: 4px;
    color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   7. 차트 그리드
   -------------------------------------------------------------------------- */
.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
    min-width: 0;
}

.chart-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-card-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* --------------------------------------------------------------------------
   8. 데이터 테이블 및 주문 영역 & 인기 상품
   -------------------------------------------------------------------------- */
.data-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    min-width: 0;
}

.table-header-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.table-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
}

.table-actions {
    display: flex;
    gap: 10px;
}

.custom-table-wrapper {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.custom-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    text-align: left;
    table-layout: auto;
}

.custom-table th {
    background-color: var(--bg-tertiary);
    padding: 12px 16px;
    font-size: var(--font-size-xs);
    font-weight: 700;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.custom-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    vertical-align: middle;
    white-space: nowrap;
}

.custom-table tbody tr:last-child td {
    border-bottom: none;
}

.custom-table tbody tr {
    transition: var(--transition-base);
}

.custom-table tbody tr:hover {
    background-color: var(--bg-primary);
}

/* 뱃지 스타일 */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    border-radius: var(--radius-sm);
    line-height: 1;
}

.badge.completed { background-color: rgb(16 185 129 / 0.1); color: var(--color-success); }
.badge.pending { background-color: rgb(245 158 11 / 0.1); color: var(--color-warning); }
.badge.cancelled { background-color: rgb(239 68 68 / 0.1); color: var(--color-danger); }

/* 인기 상품 리스트 */
.product-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.product-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

.product-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.product-img {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background-color: var(--bg-primary);
}

.product-details {
    flex: 1;
    min-width: 0;
}

.product-name {
    font-weight: 600;
    font-size: var(--font-size-md);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.product-category {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

.product-sales-info {
    text-align: right;
    font-size: var(--font-size-sm);
}

.product-sales-count {
    font-weight: 700;
    color: var(--text-primary);
}

.product-sales-trend {
    font-weight: 600;
    font-size: var(--font-size-xs);
    margin-top: 1px;
}

/* --------------------------------------------------------------------------
   9. 버튼 UI 컴포넌트
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 18px;
    height: 42px;
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-weight: 600;
    transition: var(--transition-base);
    white-space: nowrap;
}

.btn-sm {
    height: 36px;
    padding: 0 14px;
    font-size: var(--font-size-sm);
}

.btn-xs {
    height: 32px;
    padding: 0 10px;
    font-size: var(--font-size-xs);
}

.btn-icon.btn-sm {
    width: 36px;
    padding: 0;
}

.btn-icon.btn-xs {
    width: 32px;
    padding: 0;
}

.btn-primary {
    background-color: var(--color-point);
    color: #ffffff;
    box-shadow: var(--color-point-glow);
}

.btn-primary:hover {
    background-color: var(--color-point-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgb(var(--color-point-rgb) / 0.42);
}

.btn-secondary {
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-icon {
    width: 42px;
    padding: 0;
}

/* --------------------------------------------------------------------------
   10. 제품 추가 상세 모달 (Modal Design)
   -------------------------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
    transform: scale(0.95);
    transition: var(--transition-base);
    overflow: hidden;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: var(--font-size-xl);
    font-weight: 700;
}

.close-btn {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.close-btn:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: var(--font-size-base);
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    transition: var(--transition-base);
}

.form-control:focus {
    border-color: var(--color-primary);
    background-color: var(--bg-secondary);
    box-shadow: 0 0 0 3px rgb(var(--color-point-rgb) / 0.15);
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* --------------------------------------------------------------------------
   11. 시스템 토스트 알림창
   -------------------------------------------------------------------------- */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background-color: var(--bg-secondary);
    border-left: 4px solid var(--color-primary);
    box-shadow: var(--shadow-lg);
    padding: 14px 20px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 320px;
    animation: toast-in 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.toast.success { border-left-color: var(--color-success); }
.toast.warning { border-left-color: var(--color-warning); }
.toast.error { border-left-color: var(--color-danger); }
.toast.info { border-left-color: var(--color-info); }

.toast-message {
    font-size: var(--font-size-sm);
    font-weight: 500;
    flex: 1;
}

.toast-close {
    color: var(--text-muted);
    cursor: pointer;
}

/* --------------------------------------------------------------------------
   12. 추가 서브 페이지 전용 디자인
   -------------------------------------------------------------------------- */

/* 애널리틱스 뷰 */
.analytics-highlight-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
    min-width: 0;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: var(--bg-primary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-top: 6px;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--color-primary);
}

/* 인벤토리 목록 검색 바 및 필터 */
.inventory-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.filter-category-btn {
    height: 36px;
    padding: 0 14px;
    font-size: var(--font-size-sm);
}

.tag-category {
    font-size: var(--font-size-xs);
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
}

/* 스케줄 캘린더 뷰 */
.schedule-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
    align-items: start;
    min-width: 0;
}

.schedule-calendar-card {
    padding: 24px;
    min-width: 0;
}

.schedule-grid-scroll {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-lg);
}

.schedule-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    min-width: 100%;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background-color: var(--bg-secondary);
    overflow: hidden;
}

.schedule-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.schedule-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.schedule-alert {
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 600;
}

.schedule-alert-error {
    background-color: rgb(239 68 68 / 0.1);
    color: var(--color-danger);
    border: 1px solid rgb(239 68 68 / 0.2);
}

.schedule-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background-color: var(--bg-secondary);
    overflow: hidden;
}

.schedule-header-cell {
    background-color: var(--bg-tertiary);
    padding: 12px;
    text-align: center;
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.schedule-day-cell {
    min-height: 110px;
    height: auto;
    min-width: 0;
    padding: 8px;
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
    background-color: var(--bg-secondary);
    transition: var(--transition-base);
}

.schedule-day-cell.other-month {
    background-color: var(--bg-primary);
    opacity: 0.72;
}

.schedule-day-cell.is-today {
    box-shadow: inset 0 0 0 2px var(--color-point);
}

.schedule-day-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.schedule-add-day {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: var(--radius-sm);
    background-color: transparent;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: var(--transition-base);
}

.schedule-day-cell:hover .schedule-add-day {
    opacity: 1;
}

.schedule-add-day:hover {
    background-color: var(--color-point-soft);
    color: var(--color-point);
}

.schedule-add-day i,
.schedule-add-day svg {
    width: 14px;
    height: 14px;
}

.schedule-day-events {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
}

.schedule-day-cell:last-child {
    border-right: none;
}

.schedule-day-num {
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--text-secondary);
}

.schedule-event {
    font-size: var(--font-size-xs);
    font-weight: 600;
    padding: 4px 6px;
    border-radius: 4px;
    background-color: rgb(var(--color-point-rgb) / 0.1);
    color: var(--color-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: none;
    text-align: left;
    cursor: pointer;
    width: 100%;
    font-family: inherit;
    transition: var(--transition-base);
}

.schedule-event:hover {
    filter: brightness(1.05);
}

.schedule-event-more {
    font-size: var(--font-size-2xs);
    color: var(--text-muted);
    font-weight: 700;
    padding-left: 2px;
}

.schedule-event.green {
    background-color: rgb(16 185 129 / 0.1);
    color: var(--color-success);
}
.schedule-event.yellow {
    background-color: rgb(245 158 11 / 0.1);
    color: var(--color-warning);
}

.schedule-month-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
}

.schedule-side-panel {
    padding: 20px;
    position: sticky;
    top: 86px;
}

.schedule-side-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    margin-bottom: 16px;
}

.schedule-side-empty {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    line-height: 1.6;
}

.schedule-side-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 640px;
    overflow-y: auto;
}

.schedule-side-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.schedule-side-date {
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--color-point);
    padding-top: 2px;
}

.schedule-side-event {
    width: 100%;
    text-align: left;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-primary);
    padding: 10px 12px;
    cursor: pointer;
    transition: var(--transition-base);
    font-family: inherit;
}

.schedule-side-event:hover {
    border-color: var(--color-point-soft-border);
    background-color: var(--color-point-soft);
}

.schedule-side-event-title {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.schedule-side-event-desc {
    display: block;
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    line-height: 1.45;
}

.schedule-modal-content {
    max-width: 520px;
}

.schedule-textarea {
    height: auto;
    min-height: 110px;
    padding: 12px 14px;
    resize: vertical;
    line-height: 1.55;
}

.schedule-modal-footer {
    justify-content: space-between;
}

.schedule-modal-footer-actions {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.schedule-delete-btn {
    color: var(--color-danger);
    border-color: rgb(239 68 68 / 0.2);
}

/* 유저 그리드 */
.user-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.user-profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.user-profile-img {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-full);
    object-fit: cover;
    margin-bottom: 12px;
    border: 3px solid var(--bg-primary);
    box-shadow: var(--shadow-sm);
}

.user-profile-name {
    font-size: var(--font-size-base);
    font-weight: 700;
    margin-bottom: 2px;
}

.user-profile-email {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    margin-bottom: 10px;
}

/* 디자인 시스템 뷰 */
.design-showcase-section {
    margin-bottom: 32px;
}

.design-showcase-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: 16px;
    border-left: 4px solid var(--color-primary);
    padding-left: 10px;
}

.showcase-desc {
    font-size: var(--font-size-md);
    color: var(--text-muted);
    margin: -8px 0 20px;
}

.showcase-body-sample {
    font-size: var(--font-size-lg);
    margin-bottom: 4px;
}

.showcase-caption-sample {
    font-size: var(--font-size-md);
    color: var(--text-muted);
}

.point-color-showcase {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 28px;
}

.point-color-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    flex: 1;
    min-width: 280px;
}

.point-color-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.point-color-chip {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    border: 1px solid rgb(255 255 255 / 0.08);
    flex-shrink: 0;
}

.point-color-chip-base {
    background-color: var(--color-point);
    box-shadow: var(--color-point-glow);
}

.point-color-chip-hover {
    background-color: var(--color-point-hover);
}

.point-color-chip-soft {
    background-color: var(--color-point-soft);
    border-color: var(--color-point-soft-border);
}

.point-color-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.point-color-meta strong {
    font-size: var(--font-size-md);
    color: var(--text-primary);
}

.point-color-meta code {
    font-size: var(--font-size-sm);
    color: var(--color-point);
    font-weight: 600;
}

.point-color-reference {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-point-reference {
    min-width: 200px;
}

.showcase-subtitle {
    font-size: var(--font-size-md);
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.showcase-divider {
    border: none;
    border-bottom: 1px solid var(--border-color);
    margin: 24px 0;
}

.showcase-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.showcase-form-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.showcase-toggle-row,
.showcase-icon-toggle-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Checkbox & Radio */
.form-check,
.form-switch {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.form-check.is-disabled,
.form-switch.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.form-check-input {
    appearance: none;
    width: 20px;
    height: 20px;
    margin: 0;
    flex-shrink: 0;
    border: 2px solid var(--border-color);
    background-color: var(--bg-secondary);
    transition: var(--transition-base);
    cursor: pointer;
}

.form-check-input[type="checkbox"] {
    border-radius: 5px;
}

.form-check-input[type="radio"] {
    border-radius: var(--radius-full);
}

.form-check-input:hover:not(:disabled) {
    border-color: var(--color-primary);
}

.form-check-input:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.form-check-input[type="checkbox"]:checked {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-size: 14px;
    background-position: center;
    background-repeat: no-repeat;
}

.form-check-input[type="radio"]:checked {
    box-shadow: inset 0 0 0 5px var(--bg-secondary);
}

.form-check-input:disabled {
    cursor: not-allowed;
}

.form-check-label {
    font-size: var(--font-size-lg);
    color: var(--text-primary);
    line-height: 1.45;
}

/* Switch */
.form-switch {
    position: relative;
}

.form-switch-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.form-switch-track {
    width: 48px;
    height: 26px;
    border-radius: var(--radius-full);
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    position: relative;
    flex-shrink: 0;
    transition: var(--transition-base);
}

.form-switch-track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    background-color: #ffffff;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease;
}

.form-switch-input:checked + .form-switch-track {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.form-switch-input:checked + .form-switch-track::after {
    transform: translateX(22px);
}

.form-switch-input:focus-visible + .form-switch-track {
    outline: 2px solid var(--color-point-outline);
    outline-offset: 2px;
}

.form-switch-input:disabled + .form-switch-track {
    opacity: 0.6;
}

/* Toggle buttons */
.btn-check {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.btn-toggle {
    height: 42px;
    padding: 0 18px;
    font-size: var(--font-size-base);
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-base);
}

.btn-check:checked + .btn-toggle,
.btn-check:checked + .btn-icon-toggle {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff;
    box-shadow: 0 4px 10px rgb(var(--color-point-rgb) / 0.2);
}

.btn-check:disabled + .btn-toggle,
.btn-check:disabled + .btn-icon-toggle {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn-toggle:hover,
.btn-icon-toggle:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-check:checked + .btn-toggle:hover,
.btn-check:checked + .btn-icon-toggle:hover {
    color: #ffffff;
}

/* Icon toggle */
.btn-icon-toggle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 92px;
    height: 76px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
}

.btn-icon-toggle i,
.btn-icon-toggle svg {
    width: 22px;
    height: 22px;
}

/* Form Layout */
.form-layout-showcase {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}

.form-layout-panel {
    display: flex;
    flex-direction: column;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background-color: var(--bg-primary);
    min-height: 100%;
}

.fc-form-vertical,
.fc-form-horizontal {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.fc-form-vertical .form-group:last-of-type {
    margin-bottom: 12px;
}

.form-layout-row {
    display: grid;
    gap: 12px;
}

.form-layout-row-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-layout-agree {
    margin: 4px 0 16px;
}

.form-layout-submit {
    width: 100%;
    margin-top: auto;
}

.form-input-group {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.form-input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    display: inline-flex;
    pointer-events: none;
    z-index: 1;
}

.form-input-icon i,
.form-input-icon svg {
    width: 16px;
    height: 16px;
}

.form-control-with-icon {
    padding-left: 42px;
    height: 42px;
}

select.form-control {
    appearance: auto;
}

.form-horizontal-body {
    flex: 1;
}

.fc-form-horizontal {
    gap: 0;
}

.form-horizontal-item {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.form-horizontal-item:last-child {
    margin-bottom: 12px;
}

.form-horizontal-label {
    font-size: var(--font-size-base);
    font-weight: 700;
    color: var(--text-secondary);
    line-height: 1.4;
    padding-top: 0;
}

.form-horizontal-field {
    min-width: 0;
    width: 100%;
}

.form-horizontal-item-top {
    align-items: flex-start;
}

.form-horizontal-item-top .form-horizontal-label {
    padding-top: 11px;
}

/* File Upload */
.form-control-file {
    height: auto;
    min-height: 42px;
    padding: 8px 14px;
    line-height: 1.45;
    cursor: pointer;
}

.form-control-file::file-selector-button {
    margin-right: 12px;
    padding: 7px 14px;
    border: none;
    border-radius: var(--radius-sm);
    background-color: var(--color-point-soft);
    color: var(--color-point);
    font-size: var(--font-size-sm);
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition-base);
}

.form-control-file::file-selector-button:hover {
    background-color: rgb(var(--color-point-rgb) / 0.2);
}

.fc-dropzone {
    position: relative;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px 16px;
    text-align: center;
    background-color: var(--bg-primary);
    cursor: pointer;
    transition: var(--transition-base);
}

.fc-dropzone:hover,
.fc-dropzone.is-dragover {
    border-color: var(--color-point);
    background-color: var(--color-point-soft);
}

.fc-dropzone.has-file {
    padding: 12px;
    cursor: default;
}

.fc-dropzone.has-file:hover {
    border-color: var(--border-color);
    background-color: var(--bg-primary);
}

.fc-dropzone-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    pointer-events: none;
}

.fc-dropzone.has-file .fc-dropzone-empty {
    display: none;
}

.fc-dropzone-icon {
    display: inline-flex;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.fc-dropzone-icon i,
.fc-dropzone-icon svg {
    width: 36px;
    height: 36px;
}

.fc-dropzone.is-dragover .fc-dropzone-icon {
    color: var(--color-point);
}

.fc-dropzone-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.fc-dropzone-hint {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin: 0;
}

.fc-dropzone-preview {
    display: none;
    position: relative;
    align-items: center;
    justify-content: center;
    min-height: 100px;
}

.fc-dropzone.has-file .fc-dropzone-preview {
    display: flex;
}

.fc-dropzone-thumb {
    max-width: 100%;
    max-height: 140px;
    border-radius: var(--radius-sm);
    object-fit: contain;
}

.fc-dropzone-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: var(--radius-full);
    background-color: var(--color-danger);
    color: #fff;
    cursor: pointer;
    transition: var(--transition-base);
}

.fc-dropzone-remove:hover {
    opacity: 0.9;
}

.fc-dropzone-remove i,
.fc-dropzone-remove svg {
    width: 14px;
    height: 14px;
}

/* --------------------------------------------------------------------------
   13. 반응형 (Responsive Breakpoints)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .charts-grid {
        grid-template-columns: 1fr;
    }
    .data-grid {
        grid-template-columns: 1fr;
    }
    .form-layout-showcase {
        grid-template-columns: 1fr;
    }
    .schedule-layout {
        grid-template-columns: 1fr;
    }
    .schedule-side-panel {
        position: static;
    }

    /* 태블릿: 아이콘만 보이는 반닫힘 메뉴 */
    .sidebar:not(.mobile-open) {
        width: 80px;
    }

    .sidebar:not(.mobile-open) .logo-text,
    .sidebar:not(.mobile-open) .menu-category,
    .sidebar:not(.mobile-open) .menu-item-text,
    .sidebar:not(.mobile-open) .sidebar-logout-text,
    .sidebar:not(.mobile-open) .user-info {
        display: none;
        opacity: 0;
    }

    .sidebar:not(.mobile-open) .menu-item-link,
    .sidebar:not(.mobile-open) .menu-item-toggle {
        justify-content: center;
        padding: 10px;
    }

    .sidebar:not(.mobile-open) .menu-chevron,
    .sidebar:not(.mobile-open) .menu-sublist {
        display: none !important;
    }

    .sidebar:not(.mobile-open) .sidebar-header {
        padding: 0;
        justify-content: center;
    }

    .sidebar:not(.mobile-open) .sidebar-footer {
        padding: 16px 0;
        align-items: center;
    }

    .sidebar:not(.mobile-open) .sidebar-user-block {
        justify-content: center;
    }

    .sidebar:not(.mobile-open) .sidebar-logout-btn {
        width: 38px;
        padding: 0;
    }

    .main-wrapper {
        margin-left: 80px;
    }

    /* 햄버거 클릭 시 완전 펼침 오버레이 (태블릿·모바일 공통) */
    .sidebar.mobile-open {
        width: 260px;
        left: 0;
        box-shadow: var(--shadow-lg);
    }

    .sidebar.mobile-open .logo-text,
    .sidebar.mobile-open .menu-category,
    .sidebar.mobile-open .menu-item-text,
    .sidebar.mobile-open .sidebar-logout-text,
    .sidebar.mobile-open .user-info {
        display: flex;
        opacity: 1;
    }

    .sidebar.mobile-open .menu-item-link,
    .sidebar.mobile-open .menu-item-toggle {
        justify-content: flex-start;
        padding: 10px 14px;
    }

    .sidebar.mobile-open .menu-chevron {
        display: block !important;
    }

    .sidebar.mobile-open .sidebar-header {
        position: relative;
        align-items: flex-start;
        justify-content: flex-start;
        height: auto;
        min-height: 70px;
        padding: 38px 20px 16px 24px;
    }

    .sidebar.mobile-open .sidebar-close-btn {
        display: inline-flex;
        position: absolute;
        top: 10px;
        right: 12px;
        z-index: 2;
    }

    .sidebar.mobile-open .sidebar-footer {
        padding: 16px;
        align-items: stretch;
    }

    .sidebar.mobile-open .sidebar-user-block {
        justify-content: flex-start;
    }

    .sidebar.mobile-open .sidebar-logout-btn {
        width: 100%;
        padding: 0 12px;
    }

    body.sidebar-mobile-open {
        overflow: hidden;
    }
}

@media (max-width: 768px) {
    /* 모바일: 메뉴 완전 숨김 */
    .sidebar:not(.mobile-open) {
        left: -260px;
    }

    .main-wrapper,
    .sidebar.collapsed ~ .main-wrapper {
        margin-left: 0;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .analytics-highlight-row {
        grid-template-columns: 1fr;
    }
    .inventory-filters {
        flex-direction: column;
        align-items: stretch;
    }
    .inventory-filters .search-box {
        width: 100%;
    }
    .filter-group {
        width: 100%;
    }
    .schedule-grid {
        min-width: 728px;
        grid-template-columns: repeat(7, minmax(104px, 1fr));
    }
    .header {
        padding: 0 16px;
    }
    .main-content {
        padding: 20px 16px;
    }
    .main-copyright {
        padding: 14px 16px 18px;
    }
    .search-box {
        width: 150px;
    }
    .showcase-form-grid {
        grid-template-columns: 1fr;
    }
    .form-layout-row-2 {
        grid-template-columns: 1fr;
    }
    .form-horizontal-item {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}

@media (max-width: 520px) {
    .theme-hint-text {
        font-size: 22px;
        line-height: 1.15;
    }
}
