/* styles.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #d51e26;
    --color-secondary: #8655e7;
    --color-accent: #b4c642;
    --color-light: #f5e7d4;
    --color-dark: #1a1a2e;
    --color-gray: #6b7280;
    --color-gray-light: #f3f4f6;
    --color-white: #ffffff;
    --sidebar-width: 260px;
    --header-height: 80px;
}

html {
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Malgun Gothic', '맑은 고딕', sans-serif;
    background: #f8f9fa;
    color: var(--color-dark);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

/* 모바일 메뉴 토글 버튼 */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    width: 44px;
    height: 44px;
    background: var(--color-primary);
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

.mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
}

/* 사이드바 오버레이 */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
}

/* 사이드바 */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    color: var(--color-white);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 30px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo img {
    width: 100%;
    height: auto;
    max-width: 200px;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
    /* Sidebar scrollbar — muted on dark sidebar */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.28);
}

.sidebar-nav ul {
    list-style: none;
}

.nav-item {
    margin: 4px 12px;
}

.nav-item a {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-size: 15px;
    font-weight: 400;
    position: relative;
}

.nav-item a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
}

.nav-item.active a {
    background: rgba(255, 255, 255, 0.12);
    color: var(--color-white);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-icon {
    width: 22px;
    height: 22px;
    margin-right: 12px;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.logout-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 14px 20px;
    background: rgba(213, 30, 38, 0.1);
    border: 1px solid var(--color-primary);
    color: var(--color-white);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Malgun Gothic', sans-serif;
    font-size: 15px;
}

.logout-btn:hover {
    background: var(--color-primary);
}

/* 메인 컨텐츠 */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 30px 40px;
    min-height: 100vh;
    max-width: 100%;
    overflow-x: hidden;
}

/* Demo auth banner (adm) — main strip only, always on top of content, under sidebar */
.demo-auth-banner {
    font-size: 12px;
    padding: 6px 12px;
    background: #F3F4F6;
    color: #6B7280;
    text-align: center;
    line-height: 1.4;
    border-bottom: 1px solid #E5E7EB;
    box-sizing: border-box;
}

.demo-auth-banner--adm {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    z-index: 900; /* sidebar is 1000 — never cover sidebar */
}

body.has-demo-auth-banner .main-content {
    /* existing padding 30px 40px → add banner height ~34px */
    padding-top: calc(30px + 34px);
}

/* 헤더 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--color-gray-light);
}

.header-left {
    flex: 1;
    min-width: 0;
}

.page-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 15px;
    color: var(--color-gray);
    font-weight: 400;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.date-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--color-white);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.date-display .icon {
    width: 18px;
    height: 18px;
    color: var(--color-secondary);
}

.date-display span {
    font-size: 14px;
    color: var(--color-dark);
    font-weight: 700;
    white-space: nowrap;
}

.admin-profile {
    display: flex;
    align-items: center;
}

.profile-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    font-weight: 700;
    font-size: 14px;
}

/* 통계 카드 */
.stats-section {
    margin-bottom: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
}

.stat-card {
    background: var(--color-white);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--card-color), transparent);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.stat-card-accent {
    --card-color: #b4c642;
}

.stat-card-accent .stat-icon {
    background: rgba(180, 198, 66, 0.1);
}

.stat-card-accent .stat-icon svg {
    color: #b4c642;
}

.stat-card-blue {
    --card-color: #3b82f6;
}

.stat-card-blue .stat-icon {
    background: rgba(59, 130, 246, 0.1);
}

.stat-card-blue .stat-icon svg {
    color: #3b82f6;
}

.stat-card-purple {
    --card-color: #8655e7;
}

.stat-card-red {
    --card-color: #d51e26;
}

.stat-card-green {
    --card-color: #b4c642;
}

.stat-card-orange {
    --card-color: #f59e0b;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-card-purple .stat-icon {
    background: rgba(134, 85, 231, 0.1);
}

.stat-card-red .stat-icon {
    background: rgba(213, 30, 38, 0.1);
}

.stat-card-green .stat-icon {
    background: rgba(180, 198, 66, 0.1);
}

.stat-card-orange .stat-icon {
    background: rgba(245, 158, 11, 0.1);
}

.stat-icon svg {
    width: 28px;
    height: 28px;
}

.stat-card-purple .stat-icon svg {
    color: #8655e7;
}

.stat-card-red .stat-icon svg {
    color: #d51e26;
}

.stat-card-green .stat-icon svg {
    color: #b4c642;
}

.stat-card-orange .stat-icon svg {
    color: #f59e0b;
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-label {
    font-size: 13px;
    color: var(--color-gray);
    margin-bottom: 6px;
    font-weight: 400;
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 6px;
    word-break: break-word;
}

.stat-change {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    flex-wrap: wrap;
}

.stat-change.positive {
    color: #10b981;
}

.stat-change span:first-child {
    font-weight: 700;
}

.stat-period {
    color: var(--color-gray);
    font-weight: 400;
}

/* 컨텐츠 섹션 */
.content-section {
    margin-bottom: 30px;
    width: 100%;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    width: 100%;
}

.content-card {
    background: var(--color-white);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    min-width: 0;
    overflow: hidden;
}

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

.card-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 4px;
}

.card-subtitle {
    font-size: 13px;
    color: var(--color-gray);
    font-weight: 400;
}

.card-link {
    color: var(--color-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.card-link:hover {
    color: var(--color-primary);
}

/* 차트 */
.chart-container {
    height: 300px;
    margin-bottom: 20px;
    position: relative;
    width: 100%;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--color-dark);
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    flex-shrink: 0;
}

/* 도넛 차트 */
.donut-chart {
    height: 250px;
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
}

.chart-center-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.chart-total {
    font-size: 48px;
    font-weight: 800;
    color: var(--color-dark);
    line-height: 1;
    margin-bottom: 4px;
}

.chart-label {
    font-size: 14px;
    color: var(--color-gray);
    font-weight: 400;
}

/* 상태 레전드 */
.status-legend-new {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 20px 0;
    flex-wrap: wrap;
}

.status-item-new {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 60px;
}

.status-dot-new {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-bottom: 4px;
}

.status-text-new {
    font-size: 13px;
    color: var(--color-gray);
    font-weight: 400;
}

.status-number-new {
    font-size: 24px;
    font-weight: 800;
    color: var(--color-dark);
}

/* 활동 리스트 */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--color-gray-light);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.activity-item:hover {
    background: #e5e7eb;
}

.activity-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.activity-info {
    flex: 1;
    min-width: 0;
}

.activity-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 2px;
}

.activity-detail {
    font-size: 13px;
    color: var(--color-gray);
}

.activity-time {
    font-size: 12px;
    color: var(--color-gray);
    white-space: nowrap;
}

/* 결제 리스트 */
.payment-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.payment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px;
    background: var(--color-gray-light);
    border-radius: 10px;
    transition: all 0.3s ease;
    gap: 15px;
}

.payment-item:hover {
    background: #e5e7eb;
}

.payment-info {
    flex: 1;
    min-width: 0;
}

.payment-class {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 2px;
}

.payment-student {
    font-size: 13px;
    color: var(--color-gray);
}

.payment-amount {
    font-size: 16px;
    font-weight: 800;
    white-space: nowrap;
}

.payment-amount.positive {
    color: #10b981;
}

.payment-amount.negative {
    color: var(--color-primary);
}

/* 스케줄 */
.schedule-card {
    grid-column: 1 / -1;
}

.schedule-timeline {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.schedule-item {
    display: flex;
    gap: 20px;
}

.schedule-time {
    width: 80px;
    font-size: 15px;
    font-weight: 700;
    color: var(--color-dark);
    flex-shrink: 0;
}

.schedule-content {
    flex: 1;
    padding: 16px 20px;
    background: var(--color-gray-light);
    border-radius: 10px;
    border-left: 4px solid;
    transition: all 0.3s ease;
    min-width: 0;
}

.schedule-content:hover {
    background: #e5e7eb;
    transform: translateX(4px);
}

.schedule-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 6px;
}

.schedule-detail {
    font-size: 14px;
    color: var(--color-gray);
    margin-bottom: 10px;
}

.schedule-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.badge-academy {
    background: rgba(134, 85, 231, 0.1);
    color: #8655e7;
}

.badge-active {
    background: rgba(213, 30, 38, 0.1);
    color: #d51e26;
}

/* 태블릿 반응형 */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
        padding: 80px 15px 20px 15px;
        width: 100%;
        max-width: 100vw;
    }

    .demo-auth-banner--adm {
        left: 0;
        z-index: 998; /* below mobile menu 1001 and sidebar when open 1000 */
    }

    body.has-demo-auth-banner .main-content {
        padding-top: calc(80px + 34px);
    }

    body.has-demo-auth-banner .mobile-menu-toggle {
        top: calc(20px + 34px);
    }
    
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        margin-bottom: 30px;
        width: 100%;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .page-subtitle {
        font-size: 14px;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .date-display {
        padding: 8px 12px;
        flex: 1;
    }
    
    .date-display span {
        font-size: 12px;
    }
    
    .profile-avatar {
        width: 40px;
        height: 40px;
        font-size: 13px;
    }
    
    .stats-section {
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        width: 100%;
    }
    
    .stat-card {
        padding: 18px;
        width: 100%;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
    }
    
    .stat-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    .stat-change {
        font-size: 12px;
    }
    
    .content-section {
        margin-bottom: 20px;
        width: 100%;
    }
    
    .content-grid {
        width: 100%;
        grid-template-columns: 1fr;
    }
    
    .content-card {
        padding: 20px;
        width: 100%;
    }
    
    .card-title {
        font-size: 16px;
    }
    
    .card-subtitle {
        font-size: 12px;
    }
    
    .chart-container {
        height: 250px;
        width: 100%;
    }
    
    .donut-chart {
        height: 220px;
        width: 100%;
    }
    
    .chart-total {
        font-size: 36px;
    }
    
    .status-legend-new {
        gap: 15px;
        padding: 15px 0;
    }
    
    .status-item-new {
        min-width: 50px;
    }
    
    .status-number-new {
        font-size: 20px;
    }
    
    .status-text-new {
        font-size: 11px;
    }
    
    .schedule-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .schedule-time {
        width: auto;
        font-size: 14px;
    }
    
    .schedule-content {
        padding: 14px 16px;
        width: 100%;
    }
    
    .schedule-title {
        font-size: 15px;
    }
    
    .schedule-detail {
        font-size: 13px;
    }
}

/* 작은 모바일 */
@media (max-width: 480px) {
    .main-content {
        padding: 70px 12px 15px 12px;
    }
    
    .stat-card {
        padding: 16px;
        gap: 12px;
    }
    
    .stat-icon {
        width: 45px;
        height: 45px;
    }
    
    .stat-value {
        font-size: 22px;
    }
    
    .content-card {
        padding: 16px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .activity-avatar {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .activity-name {
        font-size: 14px;
    }
    
    .activity-detail {
        font-size: 12px;
    }
    
    .activity-time {
        font-size: 11px;
    }
    
    .payment-item {
        flex-wrap: wrap;
    }
    
    .payment-class {
        font-size: 14px;
    }
    
    .payment-amount {
        font-size: 14px;
        width: 100%;
        text-align: right;
        margin-top: 5px;
    }
    
    .chart-container {
        height: 220px;
    }
    
    .donut-chart {
        height: 200px;
    }
}
/* 차트 호버 효과 강화 */
.chart-container canvas {
    transition: transform 0.3s ease;
}

.chart-container:hover canvas {
    transform: scale(1.02);
}

/* 상태 레전드 호버 효과 */
.status-item-new {
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 10px;
    border-radius: 8px;
}

.status-item-new:hover {
    background: rgba(134, 85, 231, 0.05);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.status-item-new:active {
    transform: translateY(-1px) scale(1.02);
}

/* 도넛 차트 컨테이너 */
.donut-chart {
    position: relative;
    cursor: pointer;
}

.donut-chart canvas {
    transition: all 0.3s ease;
}

/* 차트 카드 호버 효과 */
.chart-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* 통계 카드 애니메이션 */
.stat-card {
    animation: fadeInUp 0.6s ease forwards;
}

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

/* 차트 로딩 애니메이션 */
.chart-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #f3f4f6;
    border-top-color: #8655e7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: -1;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.chart-container.loaded::before {
    display: none;
}

/* 상태 숫자 애니메이션 */
.status-number-new {
    transition: all 0.3s ease;
}

.status-item-new:hover .status-number-new {
    color: var(--color-secondary);
    transform: scale(1.2);
}

.status-item-new:hover .status-dot-new {
    transform: scale(1.3);
    box-shadow: 0 0 12px currentColor;
}

.status-dot-new {
    transition: all 0.3s ease;
}

/* 활동 항목 애니메이션 */
.activity-item,
.payment-item,
.schedule-item {
    animation: slideInLeft 0.5s ease forwards;
    opacity: 0;
}

.activity-item:nth-child(1) { animation-delay: 0.1s; }
.activity-item:nth-child(2) { animation-delay: 0.2s; }
.activity-item:nth-child(3) { animation-delay: 0.3s; }
.activity-item:nth-child(4) { animation-delay: 0.4s; }

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

/* 스케줄 아이템 애니메이션 */
.schedule-item {
    animation: slideInRight 0.5s ease forwards;
}

.schedule-item:nth-child(1) { animation-delay: 0.1s; }
.schedule-item:nth-child(2) { animation-delay: 0.2s; }
.schedule-item:nth-child(3) { animation-delay: 0.3s; }

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
/* 통계 카드 추가 색상 */
.stat-card-green {
    --card-color: #10b981;
}

.stat-card-green::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #10b981, transparent);
}

.stat-card-green .stat-icon {
    background: rgba(16, 185, 129, 0.1);
}

.stat-card-green .stat-icon svg {
    color: #10b981;
}

.stat-card-red {
    --card-color: #d51e26;
}

.stat-card-red::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #d51e26, transparent);
}

.stat-card-red .stat-icon {
    background: rgba(213, 30, 38, 0.1);
}

.stat-card-red .stat-icon svg {
    color: #d51e26;
}

/* ============================================
   공통 폼 요소 기본 스타일
   - input, select, button 등 디자인 미반영 방지
   ============================================ */

/* 검색 인풋 기본 스타일 */
.search-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-gray-light);
    border-radius: 10px;
    font-size: 14px;
    background: var(--color-white);
    color: var(--color-dark);
    transition: all 0.3s ease;
    font-family: inherit;
}

.search-input:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(134, 85, 231, 0.1);
}

.search-input::placeholder {
    color: #9ca3af;
}

/* 검색 인풋 래퍼 — 돋보기 아이콘 */
.search-box-wrapper {
    position: relative;
}

.search-box-wrapper::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 1;
}

.search-box-wrapper .search-input {
    padding-left: 38px;
}

/* 필터 셀렉트 기본 스타일 */
.filter-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-gray-light);
    border-radius: 10px;
    font-size: 14px;
    background: var(--color-white);
    color: var(--color-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(134, 85, 231, 0.1);
}

/* 엑셀 다운로드 / 내보내기 버튼 기본 스타일 */
.btn-export {
    display: inline-flex;
    white-space: nowrap;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--color-white);
    color: var(--color-dark);
    border: 1px solid var(--color-gray-light);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-export:hover {
    background: var(--color-gray-light);
    border-color: var(--color-secondary);
    color: var(--color-secondary);
}

.btn-export svg {
    width: 16px;
    height: 16px;
}

/* 보조 버튼 기본 스타일 */
.btn-secondary {
    display: inline-flex;
    white-space: nowrap;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--color-gray-light);
    color: var(--color-dark);
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

/* 주요 버튼 기본 스타일 */
.btn-primary {
    display: inline-flex;
    white-space: nowrap;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* 필터 라벨 기본 스타일 */
.filter-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-gray);
    margin-bottom: 6px;
}

/* 필터 그룹 기본 스타일 */
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* 새로고침 버튼 기본 스타일 */
.btn-refresh {
    display: inline-flex;
    white-space: nowrap;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--color-gray-light);
    color: var(--color-dark);
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-refresh:hover {
    background: #e5e7eb;
}

.btn-refresh svg {
    width: 16px;
    height: 16px;
}

/* ============================================
   ModalUtil 알림/확인 모달 스타일 보정
   (common/modal_util.js의 _applyModalStyle이 inline padding을 덮어쓰는 문제 보정)
   ============================================ */
[data-modal-index] > div {
    padding: 28px !important;
    min-width: 320px !important;
    max-width: 420px !important;
    text-align: center !important;
}

/* 메시지 텍스트 */
[data-modal-index] > div > div:first-child {
    font-size: 15px !important;
    line-height: 1.6 !important;
    color: var(--color-dark, #1a1a2e) !important;
    font-weight: 600 !important;
    margin-bottom: 24px !important;
}

/* 버튼 영역 */
[data-modal-index] > div > div:last-child {
    display: flex !important;
    justify-content: center !important;
    gap: 10px !important;
}

/* 확인 버튼 */
[data-modal-index] .modal-confirm-btn {
    padding: 10px 32px !important;
    background: var(--color-secondary, #8655e7) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Malgun Gothic', sans-serif !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

[data-modal-index] .modal-confirm-btn:hover {
    background: #7040d0 !important;
    transform: translateY(-1px) !important;
}

/* 취소 버튼 (ModalUtil.confirm용) */
[data-modal-index] .modal-cancel-btn {
    padding: 10px 32px !important;
    background: var(--color-gray-light, #f3f4f6) !important;
    color: var(--color-dark, #1a1a2e) !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Malgun Gothic', sans-serif !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

[data-modal-index] .modal-cancel-btn:hover {
    background: #e5e7eb !important;
}

/* 삭제된 학생/자녀 공통 스타일 */
.deleted-student {
    background-color: #fef2f2 !important;
}

.deleted-student:hover {
    background-color: #fee2e2 !important;
}

.deleted-student td {
    color: #991b1b !important;
}

.badge-deleted {
    display: inline-block;
    padding: 2px 6px;
    background: #ef4444;
    color: white;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 4px;
    vertical-align: middle;
}
