/* 로딩 상태 */
.dashboard-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    gap: 20px;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0099FF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* 공지 바 */
.notice-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 2px 12px;
    background: #F0F8FF;
    border: 1px solid #0099FF;
    border-radius: 8px;
    position: relative;
}

.notice-carousel {
    flex: 1;
    height: 36px;
    overflow: hidden;
    position: relative;
}

.notice-track {
    display: flex;
    flex-direction: column;
    transition: transform 0.5s ease;
}

.notice-item {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.notice-item:hover {
    opacity: 0.8;
}

.notice-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.notice-badge--blue {
    background: #0099FF;
    color: white;
}

.notice-badge--purple {
    background: #9B59B6;
    color: white;
}

.notice-badge--orange {
    background: #FA8C16;
    color: white;
}

.notice-badge--gray {
    background: #8A8A8A;
    color: white;
}

.notice-text {
    font-size: 16px;
    color: #333;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notice-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.notice-control-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.notice-control-btn:hover:not(:disabled) {
    background: rgba(0, 153, 255, 0.1);
}

.notice-control-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.notice-indicator {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    min-width: 40px;
    text-align: center;
}

/* 대시보드 카드 */
.dashboard-card {
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    height: auto;
}

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

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.card-link-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: #8A8A8A;
    font-size: 14px;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}

.card-link-btn:hover {
    color: #0099FF;
}

.card-body {
    padding: 24px;
}

.card-body--split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 8px 20px 16px 20px;
}

/* 카드 섹션 */
.card-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card-section--border-left {
    border-left: 1px solid #ccc;
    padding-left: 24px;
}

.card-section--border-left .status-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #676767;
}

.section-title > span {
    font-size: 32px;
    font-weight: 600;
    color: #676767;
}

.section-count {
    font-size: 20px;
    font-weight: 700;
    color: #0099FF;
}

.section-subtitle {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
}

/* 이체 기간 토글 */
.transfer-period-toggle {
    flex: auto;
    margin-left: 12px;
}

.period-toggle-btn {
    flex: 1;
    padding: 2px 6px;
    background: #F8F9FA;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.period-toggle-btn:hover {
    background: #E9ECEF;
}

.period-toggle-btn.active {
    background: #0099FF;
    color: white;
    border-color: #0099FF;
}

/* 직원 목록 */
.employee-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.employee-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #F8F9FA;
    border-radius: 6px;
}

.employee-dept {
    font-size: 14px;
    color: #666;
}

.employee-count {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* 휴가 목록 */
.vacation-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.vacation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: #F8F9FA;
    border-radius: 6px;
    gap: 12px;
}

.vacation-name {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    flex: 0 0 auto;
}

.vacation-type {
    font-size: 13px;
    color: #666;
    padding: 4px 12px;
    background: white;
    border-radius: 12px;
    flex: 0 0 auto;
}

.vacation-date {
    font-size: 13px;
    color: #8A8A8A;
    flex: 0 0 auto;
}

.vacation-more {
    text-align: center;
    font-size: 13px;
    color: #8A8A8A;
    padding: 8px;
}

.empty-state {
    text-align: center;
    padding: 32px;
    color: #AAAAAA;
    font-size: 14px;
}

/* 휴가 통계 */
.vacation-stats {
    margin-top: 16px;
}

.stat-divider {
    height: 1px;
    background: #ccc;
    margin-bottom: 16px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #F0F8FF;
    border-radius: 6px;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

.stat-value {
    font-size: 16px;
    font-weight: 700;
    color: #0099FF;
}

/* 상태 그리드 */
.status-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.status-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.status-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.status-item--pending {
    background: #FFF4E6;
}

.status-item--progress {
    background: #E6F4FF;
}

.status-item--complete {
    background: #E6F7ED;
}

.status-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.status-value {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

/* 이체 요약 */
.transfer-summary {
    margin-top: 16px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #F0F8FF;
    border-radius: 6px;
}

.summary-label {
    font-size: 14px;
    color: #666;
}

.summary-value {
    font-size: 18px;
    font-weight: 700;
    color: #0099FF;
}

.subscription-card--blue { border-color: #0099FF; background: #F0F8FF; }
.subscription-card--green { border-color: #52C41A; background: #F6FFED; }
.subscription-card--purple { border-color: #722ED1; background: #F9F0FF; }
.subscription-card--orange { border-color: #FA8C16; background: #FFF7E6; }
.subscription-card--pink { border-color: #EB2F96; background: #FFF0F6; }
.subscription-card--yellow { border-color: #FAAD14; background: #FFFBE6; }
.subscription-card--gray { border-color: #D9D9D9; background: #FAFAFA; }
.subscription-card-- { border-color: #D9D9D9; background: #FAFAFA; }

/* 계약 리스트 */
.contract-overview {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contract-section {
    display: flex;
    flex-direction: column;
}

.contract-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contract-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: #FAFAFA;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.contract-item:hover {
    background: #F0F0F0;
    transform: translateX(4px);
}

.contract-item--overdue {
    border-left: 4px solid #FF4444;
}

.contract-item--overdue:hover {
    background: #fdefee;
}

.contract-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contract-date {
    font-size: 13px;
    color: #666;
    flex: 0 0 auto;
}

.contract-date--overdue {
    color: #FF4444;
    font-weight: 600;
}

.contract-amount {
    font-size: 14px;
    font-weight: 700;
    color: #FA8C16;
    flex: 0 0 auto;
    text-align: right;
    min-width: 80px;
}

/* 반응형 */
@media (max-width: 1024px) {
    .card-body--split {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .card-section--border-left {
        border-left: none;
        border-top: 1px solid #ccc;
        padding-left: 0;
        padding-top: 24px;
    }
    
    .status-grid {
        grid-template-columns: 1fr;
    }

    .card-section--border-left .status-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   모바일 대시보드 최적화
   ============================================ */

@media only screen and (max-width: 768px) {
    /* 공지 바 모바일 최적화 */
    .notice-bar {
        gap: 8px;
        flex-wrap: nowrap;
    }

    .notice-bar svg {
        flex-shrink: 0;
        width: 18px;
        height: 18px;
    }


    .notice-item {
        gap: 6px;
    }

    .notice-badge {
        font-size: 11px;
        padding: 3px 6px;
    }

    .notice-text {
        font-size: 13px;
    }

    .notice-controls {
        gap: 2px;
    }

    .notice-control-btn {
        width: 16px;
        height: 28px;
        padding: 2px;
    }

    .notice-control-btn svg {
        width: 14px;
        height: 14px;
    }

    .notice-indicator {
        font-size: 10px;
        min-width: 35px;
    }

    /* 로딩 스피너 크기 축소 */
    .loading-spinner {
        width: 36px;
        height: 36px;
        border-width: 3px;
    }

    .loading-text {
        font-size: 13px;
    }

    .dashboard-loading {
        min-height: 50vh;
        gap: 16px;
    }
}