/* WINS 모형관리 시스템 - 메인 스타일시트 */

/* 전역 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 스크롤바 스타일 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* 페이드인 애니메이션 */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* 테이블 행 호버 효과 */
tbody tr {
    transition: all 0.2s ease;
}

tbody tr:hover {
    background-color: #f7fafc;
    transform: translateX(2px);
}

/* 배지 스타일 */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
}

.badge-success {
    background-color: #c6f6d5;
    color: #22543d;
}

.badge-danger {
    background-color: #fed7d7;
    color: #742a2a;
}

.badge-info {
    background-color: #bee3f8;
    color: #2c5282;
}

.badge-warning {
    background-color: #feebc8;
    color: #7c2d12;
}

/* 버튼 효과 */
button {
    transition: all 0.2s ease;
}

button:active {
    transform: scale(0.98);
}

/* 모달 애니메이션 */
#moduleModal.show {
    animation: fadeIn 0.3s ease;
}

#moduleModal.show > div {
    animation: slideIn 0.3s ease;
}

/* 로딩 스피너 */
.spinner {
    animation: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* 카드 호버 효과 */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 입력 필드 포커스 효과 */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 21, 56, 0.1);
}

/* 체크박스 스타일 */
input[type="checkbox"] {
    cursor: pointer;
}

input[type="checkbox"]:checked {
    background-color: #8B1538;
    border-color: #8B1538;
}

/* 테이블 선택 행 */
tbody tr.selected {
    background-color: #FFF0F3 !important;
}

/* 액션 버튼 그룹 */
.action-buttons button {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* 반응형 사이드바 */
@media (max-width: 1024px) {
    #sidebar {
        position: fixed;
        left: 0;
        top: 4rem;
        height: calc(100vh - 4rem);
        z-index: 40;
    }
    
    #sidebar.active {
        transform: translateX(0);
    }
}

/* 프린트 스타일 */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    table {
        page-break-inside: auto;
    }
    
    tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }
}

/* 토스트 알림 */
#toast {
    transition: all 0.3s ease;
}

#toast.show {
    transform: translateY(0);
}

#toast.hide {
    transform: translateY(100px);
}

/* 빈 상태 */
.empty-state {
    padding: 3rem;
    text-align: center;
    color: #9ca3af;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* 로딩 오버레이 */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* 페이지네이션 */
.pagination button {
    min-width: 2.5rem;
    height: 2.5rem;
}

.pagination button.active {
    background-color: #8B1538;
    color: white;
}

/* 상태 표시 점 */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-dot.active {
    background-color: #10b981;
}

.status-dot.inactive {
    background-color: #ef4444;
}

/* 툴팁 */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem;
    background: #1f2937;
    color: white;
    font-size: 0.75rem;
    border-radius: 0.25rem;
    white-space: nowrap;
    z-index: 100;
    margin-bottom: 0.25rem;
}

/* 다크 모드 준비 */
@media (prefers-color-scheme: dark) {
    /* 다크 모드 스타일은 향후 추가 */
}
