/* ===================================
   네이버웍스 스타일 대시보드 레이아웃
   =================================== */

/* 전체 레이아웃 */
.dashboard-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background: #f7f9fc;
}

/* ===================================
   좌측 사이드바
   =================================== */
.sidebar {
    width: 260px;
    background: #fff;
    border-right: 1px solid #e5e8eb;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

/* 로고 영역 */
.sidebar-logo {
    padding: 24px 20px;
    border-bottom: 1px solid #e5e8eb;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #00c73c 0%, #00a030 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.logo-text {
    flex: 1;
}

.logo-title {
    font-size: 16px;
    font-weight: 700;
    color: #00c73c;
    line-height: 1.2;
}

.logo-subtitle {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

/* 사용자 프로필 */
.sidebar-profile {
    padding: 20px;
    border-bottom: 1px solid #e5e8eb;
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-avatar {
    width: 42px;
    height: 42px;
    background: #00c73c;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    flex-shrink: 0;
}

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

.profile-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-role {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

/* 메뉴 리스트 */
.sidebar-menu {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
}

.menu-section {
    margin-bottom: 24px;
}

.menu-section-title {
    font-size: 11px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 20px;
    margin-bottom: 4px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: #666;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border-left: 3px solid transparent;
}

.menu-item:hover {
    background: #f7f9fc;
    color: #00c73c;
}

.menu-item.active {
    background: #f0fdf4;
    color: #00c73c;
    border-left-color: #00c73c;
    font-weight: 600;
}

.menu-icon {
    font-size: 18px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.menu-text {
    font-size: 14px;
    flex: 1;
}

/* ===================================
   우측 메인 콘텐츠 영역
   =================================== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* 상단 헤더 */
.content-header {
    background: #fff;
    border-bottom: 1px solid #e5e8eb;
    padding: 10px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 50px;
    flex-shrink: 0;
    position: relative;
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-btn {
    height: 36px;
    padding: 0 16px;
    border: 1px solid #e5e8eb;
    background: white;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-btn:hover {
    background: #f7f9fc;
    border-color: #d0d5dd;
}

.notification-btn {
    position: relative;
    padding: 0 12px;
}

.notification-btn .icon {
    font-size: 16px;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ff4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid white;
}

.logout-btn {
    color: #666;
}

.logout-btn:hover {
    color: #ff4444;
    border-color: #ff4444;
    background: #fff5f5;
}

/* 알림 드롭다운 */
.notification-dropdown {
    position: absolute;
    top: 70px;
    right: 32px;
    width: 360px;
    max-height: 480px;
    background: white;
    border: 1px solid #e5e8eb;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: none;
    flex-direction: column;
    z-index: 1000;
}

.notification-dropdown.active {
    display: flex;
}

.notification-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e8eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notification-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.notification-header a {
    font-size: 13px;
    color: #00c73c;
    text-decoration: none;
}

.notification-header a:hover {
    text-decoration: underline;
}

.notification-list {
    flex: 1;
    overflow-y: auto;
    max-height: 420px;
}

.notification-empty {
    padding: 40px 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.notification-item {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
}

.notification-item:hover {
    background: #f7f9fc;
}

.notification-item.unread {
    background: #f0fdf4;
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: #00c73c;
    border-radius: 50%;
}

/* 메인 콘텐츠 바디 */
.content-body {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
}

/* ===================================
   대시보드 콘텐츠
   =================================== */

/* 통계 그리드 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    /* background는 색상 클래스에서 지정 */
}

/* 보라색 카드 (연차 현황) */
.stat-card-purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none;
}

.stat-card-purple .stat-title,
.stat-card-purple .stat-value,
.stat-card-purple .stat-detail {
    color: white !important;
}

/* 핑크 카드 (대기중인 신청) */
.stat-card-pink {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
    border: none;
}

.stat-card-pink .stat-title,
.stat-card-pink .stat-value,
.stat-card-pink .stat-detail {
    color: white !important;
}

/* 파란색 카드 (전체 잔여 휴가) */
.stat-card-blue {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
    border: none;
}

.stat-card-blue .stat-title,
.stat-card-blue .stat-value,
.stat-card-blue .stat-detail {
    color: white !important;
}

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

.stat-title {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.95;
}

.stat-main {
    margin: 8px 0;
}

.stat-value {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
}

.stat-footer {
    margin-top: auto;
}

.stat-detail {
    font-size: 13px;
    opacity: 0.9;
}

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

/* 정보 카드 스타일 */

/* 정보 카드 */
.info-card {
    background: white;
    border: 1px solid #e5e8eb;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 32px;
}

.info-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}

.welcome-section {
    flex: 1;
}

.info-card-header:hover h2 {
    color: #00c73c;
}

.info-card h2 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0;
    transition: color 0.2s;
}

.datetime-display {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 22px;
    font-weight: 700;
    color: #00c73c;
    line-height: 1.2;
}

.date-display {
    color: #00c73c;
}

.time-display {
    color: #00c73c;
    opacity: 0.8;
}

.toggle-btn {
    width: 32px;
    height: 32px;
    background: #f7f9fc;
    border: 1px solid #e5e8eb;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-btn:hover {
    background: #00c73c;
    border-color: #00c73c;
}

.toggle-btn:hover .toggle-icon {
    color: white;
}

.toggle-icon {
    font-size: 12px;
    color: #666;
    transition: all 0.2s;
}

.user-info-detail {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 500px;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    margin-top: 20px;
}

.user-info-detail.collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.info-row {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 14px;
    color: #999;
    width: 100px;
    flex-shrink: 0;
}

.info-value {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    flex: 1;
}

/* 빠른 접근 */
.quick-access {
    background: white;
    border: 1px solid #e5e8eb;
    border-radius: 8px;
    padding: 24px;
}

.quick-access h2 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px 0;
}

.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.quick-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 16px;
    border: 1px solid #e5e8eb;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.quick-card:hover {
    border-color: #00c73c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 199, 60, 0.1);
}

.quick-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.quick-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.quick-desc {
    font-size: 12px;
    color: #999;
}

/* ===================================
   관리 섹션 (공지사항, 알림)
   =================================== */

.management-section {
    background: white;
    border: 1px solid #e5e8eb;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 32px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 16px;
}

.section-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
    white-space: nowrap;
}

/* 작은 보조 버튼 스타일 */
.section-header .btn-secondary {
    padding: 6px 12px;
    font-size: 13px;
    background: #f7f9fc;
    color: #666;
    border: 1px solid #e5e8eb;
    border-radius: 6px;
    transition: all 0.2s;
    white-space: nowrap;
    width: auto;
    min-width: auto;
    flex-shrink: 0;
}

.section-header .btn-secondary:hover {
    background: #e5e8eb;
    color: #333;
}

.management-content {
    overflow-x: auto;
}

.management-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.management-table thead {
    background: #f7f9fc;
}

.management-table th {
    padding: 10px 8px;
    text-align: left;
    font-weight: 600;
    color: #666;
    border-bottom: 2px solid #e5e8eb;
    font-size: 12px;
}

.management-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    vertical-align: middle;
    font-size: 13px;
    white-space: nowrap;
}

.management-table tbody tr:hover {
    background: #f7f9fc;
}

.management-table .empty-state {
    padding: 40px;
    text-align: center;
    color: #999;
}

.management-table .empty-state p {
    margin: 0;
}

/* 버튼 스타일 */
.section-header .btn-primary {
    padding: 8px 16px;
    background: #00c73c;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    width: auto;
    min-width: auto;
    flex-shrink: 0;
}

.section-header .btn-primary:hover {
    background: #00a030;
    transform: none;
    box-shadow: none;
}

.btn-primary {
    padding: 8px 16px;
    background: #00c73c;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    width: auto;
    min-width: auto;
    flex-shrink: 0;
}

.btn-primary:hover {
    background: #00a030;
}

.btn-delete {
    padding: 6px 12px;
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-delete:hover {
    background: #cc0000;
}

/* 배지 */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.badge-important {
    background: #ffe5e5;
    color: #ff4444;
}

.badge-normal {
    background: #f0f0f0;
    color: #999;
}

.badge-read {
    background: #e8f5e9;
    color: #00c73c;
}

.badge-unread {
    background: #fff3cd;
    color: #ff9800;
}

/* ===================================
   모바일 메뉴 토글
   =================================== */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: #00c73c;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 199, 60, 0.3);
    z-index: 999;
    transition: all 0.3s;
}

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

/* ===================================
   반응형 디자인
   =================================== */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        z-index: 1000;
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
        box-shadow: 4px 0 12px rgba(0, 0, 0, 0.1);
    }

    .main-content {
        width: 100%;
    }

    .content-header {
        padding: 16px 20px;
    }

    .content-body {
        padding: 20px;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .quick-access-grid {
        grid-template-columns: 1fr;
    }

    .notification-dropdown {
        right: 20px;
        width: calc(100vw - 40px);
    }

    /* 날짜/시간 반응형 */
    .datetime-display {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
        font-size: 18px;
        margin-bottom: 10px;
    }

    .info-card h2 {
        font-size: 16px;
    }
}
