:root {
    /* 파스텔톤 색상 스키마 */
    --primary: #6B8E9E;    /* 차분한 블루 */
    --secondary: #B4C7D4;  /* 연한 블루 */
    --success: #8CB48E;    /* 파스텔 그린 */
    --danger: #E6A5A5;     /* 파스텔 레드 */
    --warning: #F2D4A7;    /* 파스텔 옐로우 */
    --info: #A7C7E7;       /* 파스텔 스카이블루 */
    --light: #F5F7FA;      /* 밝은 그레이 */
    --dark: #4A5568;       /* 차분한 다크 */
    --border: #E2E8F0;     /* 보더 컬러 */
}

.btn-success {
    background-color: var(--success);
    border-color: var(--success);
}

.btn-danger {
    background-color: var(--danger);
    border-color: var(--danger);
}

.table thead th {
    background-color: var(--light);
    color: var(--dark);
    font-weight: 600;
    border-bottom: 2px solid var(--border);
}

.badge {
    padding: 0.5em 0.8em;
    font-weight: 500;
}

.badge.bg-success {
    background-color: var(--success) !important;
}

.badge.bg-danger {
    background-color: var(--danger) !important;
}

.badge.bg-warning {
    background-color: var(--warning) !important;
    color: var(--dark);
}

/* 공통 스타일 */
body {
    background-color: #f8f9fa;
}

/* 로그인 페이지 */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

/* 사이드바 */
.sidebar {
    min-height: 100vh;
    background: #343a40;
}

/* 테이블 스타일 */
.table th {
    background-color: #f8f9fa;
}

/* 카드 스타일 */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* 버튼 스타일 */
.btn-icon {
    display: inline-flex;
    align-items: center;
}
.btn-icon i {
    margin-right: 0.5rem;
}

/* 폼 스타일 */
.form-group {
    margin-bottom: 1rem;
}

/* 알림 메시지 */
.alert {
    margin-bottom: 1rem;
}

/* 모달 스타일 */
.modal-header {
    background-color: #f8f9fa;
}

/* 페이지네이션 */
.pagination {
    margin-bottom: 0;
}

/* 반응형 조정 */
@media (max-width: 768px) {
    .sidebar {
        min-height: auto;
    }
    
    .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
} 

/* 타임라인 스타일 */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline-item {
    position: relative;
    padding-left: 40px;
    margin-bottom: 20px;
}

.timeline-marker {
    position: absolute;
    left: 0;
    top: 0;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid #fff;
    box-shadow: 0 0 0 3px var(--primary-color);
}

.timeline-item:before {
    content: '';
    position: absolute;
    left: 7px;
    top: 15px;
    bottom: -20px;
    width: 2px;
    background: var(--primary-color);
}

.timeline-item:last-child:before {
    display: none;
}

.timeline-content {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 상태 뱃지 스타일 */
.badge {
    padding: 0.5em 0.8em;
    font-weight: 500;
}

/* 테이블 스타일 */
.table-hover tbody tr:hover {
    background-color: rgba(0,0,0,.02);
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* 카드 스타일 개선 */
.card {
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-weight: 500;
}

/* 모달 스타일 */
.modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

/* 버튼 스타일 */
.btn {
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* 공지사항 슬라이더 */
.notice-slider {
    height: 50px;
    overflow: hidden;
}

.notice-item {
    padding: 10px;
    background: #fff;
    border-radius: 4px;
    margin: 5px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* 검색 영역 스타일 */
.search-area {
    background: white;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* 반응형 조정 */
@media (max-width: 768px) {
    .timeline-item {
        padding-left: 30px;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
} 

/* 프린트 미리보기 모달 스타일 */
.print-preview-modal {
    z-index: 9999;
}

.print-preview-modal .swal2-html-container {
    margin: 0;
    padding: 1rem;
}

.print-preview-modal .swal2-content {
    padding: 0;
}

/* 프린트 미리보기 내용 스타일 */
#printPreview {
    background: #fff;
    padding: 1rem;
}

#printPreview .print-page {
    border: 1px solid #ddd;
    margin-bottom: 2rem;
    background: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

#printPreview .print-page:last-child {
    margin-bottom: 0;
}

@media print {
    body * {
        visibility: hidden;
    }
    #printPreview, #printPreview * {
        visibility: visible;
    }
    #printPreview {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
} 

/* 모바일 상세정보 모달 스타일 */
@media (max-width: 600px) {
    /* 모달 기본 설정 */
    .vehicle-detail-modal .swal2-popup {
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
        height: 100% !important;
        max-height: 100vh !important;
        display: flex !important;
        flex-direction: column !important;
    }

    /* 모달 헤더 */
    .vehicle-detail-modal .swal2-title {
        padding: 1rem !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
    }

    /* 모달 컨텐츠 영역 */
    .vehicle-detail-modal .swal2-html-container {
        margin: 0 !important;
        padding: 0 !important;
        flex: 1 !important;
        overflow: hidden !important;
        position: relative !important;
    }

    /* 스크롤 컨테이너 */
    .vehicle-detail-modal #printPreview {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 1rem !important;
        padding-bottom: 80px !important; /* 하단 버튼 영역만큼 여백 */
    }

    /* 테이블 스타일 */
    .table-responsive {
        margin-bottom: 1rem !important;
    }

    .table {
        margin-bottom: 0 !important;
    }

    /* 버튼 영역 */
    .vehicle-detail-modal .swal2-actions {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        background: white !important;
        padding: 10px 15px !important;
        margin: 0 !important;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1) !important;
        z-index: 10 !important;
        display: flex !important;
        gap: 10px !important;
        flex-shrink: 0 !important;
    }

    .vehicle-detail-modal .swal2-confirm,
    .vehicle-detail-modal .swal2-cancel {
        flex: 1 !important;
        margin: 0 !important;
    }

    /* iOS 스크롤 최적화 */
    .mobile-section {
        -webkit-transform: translateZ(0) !important;
        transform: translateZ(0) !important;
    }
}

/* 스크롤바 스타일 (iOS용) */
@supports (-webkit-touch-callout: none) {
    .vehicle-detail-modal #printPreview {
        padding-right: calc(1rem + 12px) !important; /* iOS 스크롤바 공간 확보 */
    }
}

/* 파스텔톤 버튼 스타일 */
.btn-soft-success {
    color: #285c44 !important;
    background-color: #95dba8 !important;
    border: none !important;
}

.btn-soft-success:hover {
    background-color: #7bc791 !important;
}

.btn-soft-danger {
    color: #842d4f !important;
    background-color: #ffa5c3 !important;
    border: none !important;
}

.btn-soft-danger:hover {
    background-color: #ff8aaf !important;
}

.btn-soft-info {
    color: #1e3a8a !important;
    background-color: #93c5fd !important;
    border: none !important;
}

.btn-soft-info:hover {
    background-color: #60a5fa !important;
}

/* 버튼 내 아이콘 정렬 */
.btn i {
    vertical-align: middle;
}

/* 버튼 스타일 추가 설정 */
.btn-soft-success,
.btn-soft-danger,
.btn-soft-info {
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
}

/* 버튼 그림자 효과 제거 */
.btn:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* 버튼 크기 조정 */
.btn-sm {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.875rem !important;
    border-radius: 0.2rem !important;
}

/* 모바일 드롭다운 스타일 */
@media (max-width: 600px) {
    .dropdown-menu {
        width: 280px !important;
        padding: 0.5rem 0 !important;
    }

    .dropdown-header {
        font-weight: 600;
        color: #6c757d;
        padding: 0.5rem 1rem;
    }

    .dropdown-item {
        padding: 0.5rem 1rem;
        font-size: 16px;
    }

    .dropdown-item i {
        width: 20px;
        text-align: center;
        color: #6c757d;
    }

    .dropdown-item:active {
        background-color: #e9ecef;
        color: #1e2125;
    }

    .dropdown-item:active i {
        color: #1e2125;
    }

    .dropdown-divider {
        margin: 0.5rem 0;
    }

    .dropdown-menu .form-control {
        font-size: 16px;
    }

    /* 드롭다운 위치 조정 */
    .dropdown-menu {
        position: fixed !important;
        top: auto !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin-top: 0.5rem !important;
        max-height: calc(100vh - 200px) !important;
        overflow-y: auto !important;
    }
}

/* 모바일 날짜 필터 스타일 */
@media (max-width: 600px) {
    .dashboard-card-header {
        padding: 12px !important;
    }

    .dashboard-card-header h5 {
        font-size: 12px !important;
    }

    #customDateFilterMobile {
        font-size: 16px !important;
        padding: 4px 8px !important;
        height: 32px !important;
    }

    .btn-sm {
        padding: 4px 8px !important;
        font-size: 12px !important;
        height: 32px !important;
    }

    .dashboard-card-header .btn-primary {
        padding: 4px 12px !important;
    }
}

/* 모바일 버튼 스타일 */
@media (max-width: 600px) {
    .btn-outline-success,
    .btn-outline-danger,
    .btn-outline-primary {
        background-color: #fff !important;
        border-width: 1.5px !important;
    }

    .btn-outline-success {
        color: #198754 !important;
        border-color: #198754 !important;
    }

    .btn-outline-danger {
        color: #dc3545 !important;
        border-color: #dc3545 !important;
    }

    .btn-outline-primary {
        color: #0d6efd !important;
        border-color: #0d6efd !important;
    }

    .btn-sm {
        padding: 0.35rem 0.5rem !important;
        font-size: 0.875rem !important;
        min-width: 80px !important;
    }

    /* 아이콘과 텍스트 정렬 */
    .btn-sm i {
        font-size: 0.775rem !important;
        vertical-align: middle !important;
    }

    /* 버튼 컨테이너 스타일 */
    .flex-column.flex-sm-row {
        min-width: 80px !important;
    }

    /* 버튼 사이 간격 */
    .gap-1 {
        gap: 0.25rem !important;
    }

    /* 마지막 ��튼 제외 하단 마진 */
    .mb-1 {
        margin-bottom: 0.25rem !important;
    }

    /* 데스크톱에서는 마진 제거 */
    @media (min-width: 576px) {
        .mb-sm-0 {
            margin-bottom: 0 !important;
        }
    }
}

/* 반응형 폰트 크기 */
@media (max-width: 600px) {
    .dashboard-card-header h5 {
        font-size: clamp(10px, 4vw, 16px) !important;
    }

    .dashboard-card-header h5 i {
        font-size: clamp(10px, 3.5vw, 16px) !important;
    }

    .btn-sm {
        font-size: clamp(10px, 3.5vw, 16px) !important;
    }

    /* 초기화 버튼 아이콘 */
    .btn-sm i {
        font-size: clamp(10px, 3.5vw, 16px) !important;
    }

    /* 날짜 선택 입력 */
    #customDateFilterMobile {
        font-size: clamp(10px, 3.5vw, 16px) !important;
    }
}

/* 테이블 내용 반응형 폰트 */
@media (max-width: 1024px) {
    .table {
        font-size: clamp(15px, 3.5vw, 18px) !important;
    }
}

/* 버튼 최소 크기 유지 */
.btn-sm {
    min-height: 32px !important;
    white-space: nowrap !important;
}

/* 날짜 선택 입력 최소 크기 */
#customDateFilterMobile {
    min-height: 32px !important;
}