/**
 * 근태관리 시스템 메인 스타일시트
 * /attend/style.css
 * 
 * 작성일: 2025년 6월 2일
 * 버전: v1.0.0
 */

/* === 기본 리셋 === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* === 기본 스타일 === */
body { 
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container { 
    max-width: 100%; 
    margin: 0 auto; 
    padding: 20px;
}

/* === 헤더 === */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 3rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
    font-weight: 700;
}

.header .subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 20px;
}

/* === 상태 바 === */
.status-bar {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.status-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
}

.status-item.success { 
    background: rgba(72, 187, 120, 0.2); 
    border-color: #48bb78; 
    color: #22543d;
}
.status-item.warning { 
    background: rgba(237, 137, 54, 0.2); 
    border-color: #ed8936; 
    color: #7d5a29;
}
.status-item.error { 
    background: rgba(229, 62, 62, 0.2); 
    border-color: #e53e3e; 
    color: #742a2a;
}
.status-item.info { 
    background: rgba(66, 153, 225, 0.2); 
    border-color: #4299e1; 
    color: #2a4365;
}

/* === 카드 === */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* === 레이아웃 === */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
}

/* === 로그인 섹션 === */
.login-section {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.login-section h2 {
    color: #2d3748;
    margin-bottom: 30px;
    font-size: 1.8rem;
}

/* === 폼 요소 === */
.form-group { 
    margin-bottom: 25px; 
    text-align: left;
}

.form-label { 
    display: block; 
    margin-bottom: 8px; 
    font-weight: 600; 
    color: #2d3748;
}

.form-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.form-input:focus {
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
    outline: none;
}

/* === 버튼 === */
.btn {
    background: linear-gradient(45deg, #4299e1, #3182ce);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(66, 153, 225, 0.3);
}

.btn:hover {
    background: linear-gradient(45deg, #3182ce, #2c5282);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 153, 225, 0.4);
    color: white;
    text-decoration: none;
}

.btn.success { 
    background: linear-gradient(45deg, #48bb78, #38a169); 
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.btn.success:hover { 
    background: linear-gradient(45deg, #38a169, #2f855a); 
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
}

.btn.danger { 
    background: linear-gradient(45deg, #e53e3e, #c53030); 
    box-shadow: 0 4px 15px rgba(229, 62, 62, 0.3);
}

.btn.danger:hover { 
    background: linear-gradient(45deg, #c53030, #9c2626); 
    box-shadow: 0 6px 20px rgba(229, 62, 62, 0.4);
}

.btn.warning { 
    background: linear-gradient(45deg, #ed8936, #dd6b20); 
    box-shadow: 0 4px 15px rgba(237, 137, 54, 0.3);
}

.btn.warning:hover { 
    background: linear-gradient(45deg, #dd6b20, #c05621); 
    box-shadow: 0 6px 20px rgba(237, 137, 54, 0.4);
}

.btn:disabled {
    background: linear-gradient(45deg, #cbd5e0, #a0aec0);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* === 사용자 정보 섹션 === */
.user-info-section {
    text-align: center;
    margin-bottom: 40px;
}

.user-info-section h2 {
    color: #2d3748;
    margin-bottom: 25px;
    font-size: 1.8rem;
}

.user-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.1), rgba(56, 161, 105, 0.1));
    padding: 25px;
    border-radius: 15px;
    border: 1px solid rgba(72, 187, 120, 0.2);
}

.user-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(72, 187, 120, 0.2);
}

.user-detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #2d3748;
}

.detail-value {
    color: #4a5568;
    font-weight: 500;
}

/* === 출퇴근 관리 섹션 === */
.attendance-section h3 {
    color: #2d3748;
    margin-bottom: 30px;
    font-size: 1.5rem;
    text-align: center;
}

.attendance-status {
    background: linear-gradient(135deg, rgba(66, 153, 225, 0.1), rgba(49, 130, 206, 0.1));
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    border: 1px solid rgba(66, 153, 225, 0.2);
}

.status-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.status-item-large {
    text-align: center;
    flex: 1;
    min-width: 120px;
}

.status-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.status-info {
    color: #2d3748;
}

.status-label {
    font-size: 0.9rem;
    color: #4a5568;
    margin-bottom: 5px;
}

.status-time {
    font-size: 1.8rem;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    color: #2d3748;
}

.status-divider {
    font-size: 1.5rem;
    color: #4a5568;
    opacity: 0.7;
}

.attendance-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.attendance-btn {
    font-size: 1.2rem;
    padding: 18px 40px;
    min-width: 200px;
}

.current-status {
    background: rgba(255, 255, 255, 0.7);
    padding: 20px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.live-clock {
    display: flex;
    align-items: center;
    gap: 10px;
}

.clock-label {
    font-weight: 600;
    color: #4a5568;
}

.clock-time {
    font-family: 'Courier New', monospace;
    font-size: 1.3rem;
    font-weight: bold;
    color: #2d3748;
    background: linear-gradient(45deg, #4299e1, #3182ce);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.work-status {
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(66, 153, 225, 0.1);
    color: #2a4365;
    border: 1px solid rgba(66, 153, 225, 0.3);
}

/* === 주간 요약 섹션 === */
.week-summary-section h3 {
    color: #2d3748;
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-bottom: 25px;
}

.day-card {
    background: rgba(255, 255, 255, 0.8);
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.day-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.day-card.today {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
    border-color: #3182ce;
}

.day-card.present {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
}

.day-card.absent {
    background: linear-gradient(135deg, #e2e8f0, #cbd5e0);
    color: #4a5568;
}

.day-name {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.day-date {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.day-time {
    font-size: 0.7rem;
    opacity: 0.8;
}

.week-summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    background: rgba(255, 255, 255, 0.5);
    padding: 20px;
    border-radius: 12px;
}

.summary-stat {
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: #4a5568;
}

/* === 사이드바 === */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* === 빠른 메뉴 섹션 === */
.quick-actions-section h3 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.quick-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.quick-menu-item {
    background: rgba(255, 255, 255, 0.7);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    color: #2d3748;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.quick-menu-item:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: #2d3748;
}

.quick-menu-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.quick-menu-label {
    font-weight: 600;
    font-size: 0.9rem;
}

/* === 시스템 정보 섹션 === */
.system-info-section h3 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.info-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(45deg, #4299e1, #3182ce);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.info-content {
    flex: 1;
}

.info-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 2px;
}

.info-status {
    font-size: 0.8rem;
    color: #4a5568;
}

/* === 모달 === */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-content h3 {
    margin-bottom: 30px;
    color: #2d3748;
    text-align: center;
    font-size: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* === 빠른 액션 === */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 30px 0;
}

.quick-action {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-decoration: none;
    color: white;
}

.quick-action:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    color: white;
    text-decoration: none;
}

.quick-action-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.quick-action-label {
    font-weight: 600;
    font-size: 0.9rem;
}

/* === 알림 === */
.notification {
    position: fixed;
    top: 30px;
    right: 30px;
    min-width: 320px;
    max-width: 400px;
    padding: 20px 25px;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    transform: translateX(450px);
    transition: all 0.4s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    line-height: 1.4;
}

.notification.show { 
    transform: translateX(0); 
}

.notification.success { 
    background: linear-gradient(135deg, #48bb78, #38a169); 
}

.notification.error { 
    background: linear-gradient(135deg, #e53e3e, #c53030); 
}

.notification.warning { 
    background: linear-gradient(135deg, #ed8936, #dd6b20); 
}

.notification.info { 
    background: linear-gradient(135deg, #4299e1, #3182ce); 
}

/* === 푸터 === */
.footer {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    margin-top: 40px;
    color: #fff;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.footer p {
    margin: 8px 0;
    opacity: 0.9;
}

.footer a {
    color: #fff;
    text-decoration: none;
    margin: 0 10px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* === 로딩 애니메이션 === */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === 상태 애니메이션 === */
.status-icon.active {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
        opacity: 1; 
    }
    50% { 
        transform: scale(1.1); 
        opacity: 0.8; 
    }
}

/* === 반응형 디자인 === */
@media (max-width: 1024px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: -1;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
        display: grid;
    }
    
    .quick-actions {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .quick-menu-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        padding: 30px 25px;
    }
    
    .header h1 {
        font-size: 2.2rem;
    }
    
    .card {
        padding: 25px;
    }
    
    .status-bar {
        flex-direction: column;
        align-items: center;
    }
    
    .status-display {
        flex-direction: column;
        gap: 15px;
    }
    
    .status-divider {
        transform: rotate(90deg);
    }
    
    .attendance-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .attendance-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .current-status {
        flex-direction: column;
        text-align: center;
    }
    
    .week-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .user-details {
        grid-template-columns: 1fr;
    }
    
    .week-summary-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .quick-menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sidebar {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        padding: 25px;
        width: 95%;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .status-time {
        font-size: 1.4rem;
    }
    
    .clock-time {
        font-size: 1.1rem;
    }
    
    .week-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .quick-menu-grid {
        grid-template-columns: 1fr;
    }
    
    .week-summary-stats {
        grid-template-columns: 1fr;
    }
}

/* === 접근성 개선 === */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* === 다크 모드 지원 === */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    }
    
    .card {
        background: rgba(45, 55, 72, 0.95);
        color: #e2e8f0;
    }
    
    .form-input {
        background: rgba(45, 55, 72, 0.9);
        color: #e2e8f0;
        border-color: #4a5568;
    }
}

/* === 인쇄 스타일 === */
@media print {
    .sidebar,
    .quick-actions,
    .modal,
    .notification {
        display: none !important;
    }
    
    .main-grid {
        grid-template-columns: 1fr;
    }
    
    .header {
        background: #333 !important;
        color: white !important;
    }
    
    .card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}