/* YAK Excel Processing Service - 플랜베어 스타일 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 플랜베어 브랜드 컬러 */
    --planbear-primary: #48CAE4;      /* 메인 하늘바다색 */
    --planbear-secondary: #0077BE;    /* 진한 바다색 */
    --planbear-light: #ADE8F4;        /* 연한 하늘색 */
    --planbear-deep: #00547A;         /* 심해색 */
    --planbear-accent: #00B4D8;       /* 포인트 아쿠아 */
    
    /* 보조 색상 */
    --success-green: #4CAF50;
    --warning-yellow: #FFC107;
    --danger-red: #F44336;
    --info-blue: #17A2B8;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* 네비게이션 바 - 플랜베어 시그니처 (보라색 제거!) */
.navbar {
    background: linear-gradient(135deg, #48CAE4 0%, #0077BE 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 119, 190, 0.2);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.nav-container h1 {
    font-size: 1.8rem;
    font-weight: bold;
}

.nav-items {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
}

.admin-badge {
    background: #ff6b6b;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.8rem;
}

/* 버튼 스타일 */
.btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-primary {
    background: linear-gradient(135deg, #48CAE4 0%, #00B4D8 100%);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #00B4D8 0%, #0077BE 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(72, 202, 228, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-danger {
    background: #f44336;
    color: white;
}

.btn-danger:hover {
    background: #da190b;
}

.btn-warning {
    background: #ff9800;
    color: white;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.main-content {
    min-height: calc(100vh - 140px);
    padding: 2rem 0;
}

/* 히어로 섹션 */
.hero-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #333;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: #666;
    margin-bottom: 3rem;
}

/* 기능 카드 */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 119, 190, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: #48CAE4;
    box-shadow: 0 8px 25px rgba(72, 202, 228, 0.3);
}

.feature-card i {
    font-size: 3rem;
    background: linear-gradient(135deg, #48CAE4, #0077BE);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #333;
}

.cta-section {
    margin-top: 3rem;
}

/* 로그인 페이지 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: 2rem;
}

.login-card {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 119, 190, 0.15);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header i {
    font-size: 3rem;
    color: #48CAE4;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e1e1e1;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #48CAE4;
    box-shadow: 0 0 0 3px rgba(72, 202, 228, 0.1);
}

.login-footer {
    text-align: center;
    margin-top: 2rem;
}

/* 대시보드 */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 3rem;
}

.dashboard-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
}

/* 업로드 영역 */
.upload-section {
    margin-bottom: 3rem;
}

.upload-area {
    border: 3px dashed #48CAE4;
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgba(173, 232, 244, 0.05), rgba(72, 202, 228, 0.05));
}

.upload-area:hover {
    border-color: #0077BE;
    background: linear-gradient(135deg, rgba(173, 232, 244, 0.15), rgba(72, 202, 228, 0.15));
}

.upload-area.dragover {
    border-color: #00B4D8;
    background: linear-gradient(135deg, rgba(173, 232, 244, 0.2), rgba(0, 180, 216, 0.2));
    box-shadow: inset 0 0 20px rgba(72, 202, 228, 0.2);
}

.upload-area i {
    font-size: 4rem;
    color: #48CAE4;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.upload-area:hover i {
    color: #0077BE;
    transform: scale(1.1);
}

/* 파일 미리보기 */
.file-preview {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid #48CAE4;
    box-shadow: 0 4px 15px rgba(72, 202, 228, 0.15);
    margin-bottom: 2rem;
}

.column-mapping {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.mapping-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.mapping-controls select {
    padding: 0.8rem;
    border: 2px solid #e1e1e1;
    border-radius: 6px;
    font-size: 1rem;
}

/* 처리 결과 */
.process-result {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.process-result.success {
    background: linear-gradient(135deg, #4CAF50 0%, #45A049 100%);
}

/* 관리자 페이지 */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.admin-container h1 {
    background: linear-gradient(135deg, #48CAE4, #0077BE);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card i {
    font-size: 3rem;
    color: #0077BE;
    margin-bottom: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #333;
}

.admin-actions {
    margin: 2rem 0;
    display: flex;
    gap: 1rem;
}

.recent-logs {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.log-item {
    display: grid;
    grid-template-columns: 150px 100px 150px 100px;
    gap: 1rem;
    padding: 0.8rem;
    border-bottom: 1px solid #eee;
    align-items: center;
}

/* 상태 색상 */
.status-success {
    color: #4CAF50;
    font-weight: bold;
}

.status-failed {
    color: #f44336;
    font-weight: bold;
}

/* 메시지 스타일 */
.message {
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 6px;
}

.error {
    background: rgba(244, 67, 54, 0.1);
    color: #C62828;
    border-left: 4px solid #F44336;
}

.success {
    background: rgba(76, 175, 80, 0.1);
    color: #2E7D32;
    border-left: 4px solid #4CAF50;
}

.info {
    background: rgba(72, 202, 228, 0.1);
    color: #0077BE;
    border-left: 4px solid #48CAE4;
}

/* 유틸리티 */
.hidden {
    display: none;
}

/* 푸터 */
.footer {
    background: linear-gradient(135deg, #00547A 0%, #003D5B 100%);
    color: white;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
}

/* 에러 페이지 */
.error-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: 2rem;
}

.error-card {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 500px;
}

.error-icon i {
    font-size: 5rem;
    color: #ff6b6b;
    margin-bottom: 1rem;
}

.error-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* 특수 컴포넌트 */
.welcome-banner {
    background: linear-gradient(135deg, #48CAE4 0%, #0077BE 100%);
    position: relative;
    overflow: hidden;
}

.welcome-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    animation: wave 20s linear infinite;
    opacity: 0.3;
}

/* 플랜베어 시그니처 배지 */
.planbear-badge {
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    border: 2px solid #48CAE4;
    color: #0077BE;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    display: inline-block;
    animation: pulse 2s infinite;
}

/* 타임라인 섹션 */
.timeline-section {
    background: linear-gradient(135deg, #48CAE4 0%, #0077BE 100%);
    position: relative;
}

.timeline-section::after {
    content: '🐻';
    position: absolute;
    bottom: 10px;
    right: 20px;
    font-size: 3rem;
    opacity: 0.1;
}

/* 통계 카드 색상 */
.stat-card-time {
    background: linear-gradient(135deg, #E0F7FA 0%, #B2EBF2 100%);
    border-left: 4px solid #00B4D8;
}

.stat-card-coffee {
    background: linear-gradient(135deg, #FFF8E1 0%, #FFECB3 100%);
    border-left: 4px solid #FFC107;
}

.stat-card-stress {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    border-left: 4px solid #4CAF50;
}

.stat-card-home {
    background: linear-gradient(135deg, #FCE4EC 0%, #F8BBD0 100%);
    border-left: 4px solid #E91E63;
}

/* 스크롤바 커스터마이징 */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #48CAE4, #0077BE);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #00B4D8, #00547A);
}

/* 애니메이션 */
@keyframes wave {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-20px, -20px); }
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(72, 202, 228, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(72, 202, 228, 0); }
    100% { box-shadow: 0 0 0 0 rgba(72, 202, 228, 0); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* 통계 아이콘 애니메이션 */
.fun-stats span {
    display: inline-block;
    animation: bounce 2s ease-in-out infinite;
}

/* 호버 효과 */
.btn:hover {
    filter: brightness(1.1);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .mapping-controls {
        grid-template-columns: 1fr;
    }
    
    .admin-actions {
        flex-direction: column;
    }
    
    .log-item {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* 세션 충돌 모달 스타일 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    position: relative;
}

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

.session-conflict {
    text-align: center;
}

.modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 2.5rem;
}

.modal-icon.warning {
    background: linear-gradient(135deg, #ff9966, #ff5e62);
    color: white;
}

.modal-content h2 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.5rem;
}

.modal-content p {
    color: #666;
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.countdown-message {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem 0;
    color: #856404;
    font-weight: 500;
}

.countdown-message #redirectCountdown {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ff5e62;
    display: inline-block;
    min-width: 30px;
}

.modal-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.modal-actions .btn {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
}

/* 토스트 알림 (추가 옵션) */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-left: 4px solid #ff5e62;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    max-width: 350px;
    z-index: 10000;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from { 
        transform: translateX(100%);
        opacity: 0;
    }
    to { 
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-notification.warning {
    border-left-color: #ffc107;
}

.toast-notification.success {
    border-left-color: #4CAF50;
}

.toast-notification.error {
    border-left-color: #f44336;
}