/* static/style.css */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700&display=swap');

:root {
    --sidebar-width: 260px;
    --primary-color: #0d6efd;
    --background-color: #F8F9FA;
    --surface-color: #FFFFFF;
    --text-color: #212529;
    --subtle-text-color: #6C757D;
    --border-color: #dee2e6;
}

body {
    background-color: var(--background-color);
    font-family: 'Noto Sans KR', sans-serif;
    color: var(--text-color);
}

.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 0;
    margin: 0;
}

.main-content {
    margin-left: var(--sidebar-width);
    padding: 2rem;
    width: calc(100% - var(--sidebar-width));
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background-color: var(--surface-color);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.logo {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-color);
    text-decoration: none;
}
.logo img {
    width: 32px;
    height: 32px;
    margin-right: 0.75rem;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
    color: var(--subtle-text-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.sidebar .nav-link .icon {
    width: 20px;
    margin-right: 1rem;
    text-align: center;
}

.sidebar .nav-link.active,
.sidebar .nav-link:hover {
    background-color: #e9ecef;
    color: var(--primary-color);
}

.info-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    height: 100%;
}

/* 드래그 아이템 스타일 */
.draggable-item {
    padding: 8px 12px;
    margin-bottom: 8px;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: grab;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.draggable-item .delete-btn {
    border: none; background: transparent; color: var(--subtle-text-color);
    cursor: pointer; font-size: 1.2rem; padding: 0 0 0 10px; line-height: 1;
}
.draggable-item.dragging {
    opacity: 0.5;
}
/* --- [추가] 파일 추가 팝업창(모달) 스타일 --- */
.modal-file-list {
    list-style-type: none;
    padding: 0;
    max-height: 40vh;
    overflow-y: auto;
}
.modal-file-list li {
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 5px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}
.modal-file-list li input[type="checkbox"] {
    margin-right: 10px;
}
.modal-file-list .file-info {
    display: flex;
    flex-direction: column;
}
.modal-file-list .file-address {
    font-weight: 500;
}
.modal-file-list .file-name {
    font-size: 0.8rem;
    color: #6c757d;
}
/* --- [추가] 기사 배정 스크롤 영역 스타일 --- */
.driver-area-wrapper {
    max-height: 70vh; /* 화면 높이의 70%를 최대 높이로 설정 */
    overflow-y: auto; /* 내용이 넘치면 세로 스크롤 자동 생성 */
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: .375rem;
}
/* --- [추가] 아이템 이동 팝업 메뉴 스타일 --- */
.move-menu {
    position: absolute;
    background-color: white;
    border: 1px solid #ccc;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
    border-radius: 5px;
    padding: 5px;
    z-index: 1050; /* 다른 요소들 위에 보이도록 설정 */
    min-width: 150px;
}
.move-menu-item {
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
}
.move-menu-item:hover {
    background-color: #f0f0f0;
}
.move-menu-title {
    font-weight: bold;
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #555;
}

/* --- [수정!] 반응형 모바일 스타일 --- */

/* 1. PC에서는 햄버거 버튼을 먼저 숨깁니다. */
.sidebar-toggle-btn {
    display: none;
}

/* 2. 화면 가로 크기가 992px보다 작아질 때 스타일을 덮어씁니다. */
@media (max-width: 992px) {
    /* 기본 사이드바는 왼쪽 화면 밖으로 숨기기 */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        z-index: 1050; /* 다른 요소들 위에 보이도록 */
    }

    /* is-visible 클래스가 붙으면 다시 보이게 하기 */
    .sidebar.is-visible {
        transform: translateX(0);
    }

    /* 본문 내용은 화면 전체를 사용하도록 설정 */
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 1rem; /* 모바일에서는 여백을 줄임 */
    }

    /* 햄버거 메뉴 버튼 스타일 (여기서 display: block 으로 덮어쓰기) */
    .sidebar-toggle-btn {
        display: block;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 1051;
        font-size: 2rem;
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 8px;
        width: 50px;
        height: 50px;
        line-height: 1;
    }
}

/* --- 기사 운행정보 리스트 스타일 --- */
.job-info-area {
    display: flex;
    flex-direction: column;
}

.job-address {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-color);
    line-height: 1.4;
}

.job-address-detail {
    color: var(--subtle-text-color);
    font-size: 0.9rem;
}

.job-products {
    font-size: 0.85rem;
    color: var(--subtle-text-color);
    margin-top: 4px;
    font-weight: 500;
}

.list-group-item.task-done {
    text-decoration: line-through;
    opacity: 0.6;
    background-color: #f8f9fa;
}

/* --- SMS 버튼을 더 작게 만듭니다 --- */
.sms-btn-compact {
    padding: 0.375rem 0.6rem;
    font-size: 1rem;
    line-height: 1;
}