/* Korussoft CRM 공통 스타일시트 (Common Stylesheet) */

/* Layout variables */
:root {
    /* Estimated footer height; used to offset content so fixed footer doesn't overlap */
    --page-footer-height: 50px;
    /* Top banner height (used to position login containers below the banner) */
    --top-banner-height: 50px;
    /* Section header/title bar height (unified across all sections) */
    --section-header-height: 60px;
}

/* 마커 바운스 애니메이션 (Marker Bounce Animation) */
@keyframes markerBounce {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
    100% {
        transform: translateY(0);
    }
}

/* 바운싱 마커 클래스 (Bouncing Marker Class) */
.marker-bouncing {
    animation: markerBounce 0.6s ease-in-out;
}

/* 지니 InfoWindow 애니메이션 (Genie InfoWindow Animation) */
@keyframes genieAppear {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(30px);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05) translateY(-5px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.info-window-genie {
    animation: genieAppear 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform-origin: bottom center;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Disney-Cartoon Style Poof (Smoke) Animation for Job Drop
   Improved: High-quality cartoon puff with squash and stretch
   ───────────────────────────────────────────────────────────────────────────── */
@keyframes poofExplosion {
    0% {
        transform: translate(0, 0) scale(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: translate(0, 0) scale(0.4, 0.4) rotate(0deg);
    }
    30% {
        /* Squash & Stretch: Stretch outward */
        transform: translate(calc(var(--move-x) * 0.4), calc(var(--move-y) * 0.4)) scale(1.4, 0.8) rotate(var(--rotate));
    }
    60% {
        /* Second bounce & Fade */
        transform: translate(calc(var(--move-x) * 0.8), calc(var(--move-y) * 0.8)) scale(1.1, 1.2) rotate(calc(var(--rotate) * 1.5));
        opacity: 0.9;
    }
    100% {
        transform: translate(var(--move-x), var(--move-y)) scale(1.6, 1.6) rotate(calc(var(--rotate) * 2));
        opacity: 0;
    }
}

@keyframes popLineAnimation {
    0% {
        transform: translate(0, 0) scaleX(0);
        opacity: 0;
    }
    20% {
        opacity: 1;
        transform: translate(0, 0) scaleX(1);
    }
    100% {
        transform: translate(var(--move-x), var(--move-y)) scaleX(0.5);
        opacity: 0;
    }
}

.poof-animation-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    pointer-events: none;
    z-index: 2147483647;
}

.poof-puff {
    position: absolute;
    top: -20px;
    left: -20px;
    width: 40px;
    height: 40px;
    background: #ffffff;
    border: 2px solid #f3f4f6;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transform-origin: center center;
    animation: poofExplosion 0.65s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Disney Cloud Variation Layering */
.poof-puff::before, .poof-puff::after {
    content: '';
    position: absolute;
    background: #ffffff;
    border-radius: 50%;
}

.poof-puff::before {
    width: 25px;
    height: 25px;
    top: -10px;
    left: 10px;
}

.poof-puff::after {
    width: 20px;
    height: 20px;
    top: 10px;
    left: -8px;
}

.poof-pop-line {
    position: absolute;
    top: -1.5px;
    left: 0;
    width: 35px;
    height: 3px;
    background: #ffffff;
    border-radius: 4px;
    transform-origin: left center;
    transform: rotate(var(--rotate-line));
    animation: popLineAnimation 0.5s ease-out forwards;
}

/* Define movement directions for each of 8 puffs (N, NE, E, SE, S, SW, W, NW) */
.poof-puff:nth-child(1) { --move-x: 0px; --move-y: -75px; --rotate: 0deg; animation-delay: 0ms; }
.poof-puff:nth-child(2) { --move-x: 55px; --move-y: -55px; --rotate: 45deg; animation-delay: 30ms; }
.poof-puff:nth-child(3) { --move-x: 75px; --move-y: 0px; --rotate: 90deg; animation-delay: 50ms; }
.poof-puff:nth-child(4) { --move-x: 55px; --move-y: 55px; --rotate: 135deg; animation-delay: 80ms; }
.poof-puff:nth-child(5) { --move-x: 0px; --move-y: 75px; --rotate: 180deg; animation-delay: 110ms; }
.poof-puff:nth-child(6) { --move-x: -55px; --move-y: 55px; --rotate: 225deg; animation-delay: 130ms; }
.poof-puff:nth-child(7) { --move-x: -75px; --move-y: 0px; --rotate: 270deg; animation-delay: 160ms; }
.poof-puff:nth-child(8) { --move-x: -55px; --move-y: -55px; --rotate: 315deg; animation-delay: 190ms; }

/* Impact lines directions */
.poof-pop-line:nth-child(9)  { --move-x: 0px; --move-y: -100px; --rotate-line: -90deg; }
.poof-pop-line:nth-child(10) { --move-x: 70px; --move-y: -70px; --rotate-line: -45deg; }
.poof-pop-line:nth-child(11) { --move-x: 100px; --move-y: 0px; --rotate-line: 0deg; }
.poof-pop-line:nth-child(12) { --move-x: 70px; --move-y: 70px; --rotate-line: 45deg; }
.poof-pop-line:nth-child(13) { --move-x: 0px; --move-y: 100px; --rotate-line: 90deg; }
.poof-pop-line:nth-child(14) { --move-x: -70px; --move-y: 70px; --rotate-line: 135deg; }
.poof-pop-line:nth-child(15) { --move-x: -100px; --move-y: 0px; --rotate-line: 180deg; }
.poof-pop-line:nth-child(16) { --move-x: -70px; --move-y: -70px; --rotate-line: 225deg; }


/* 기본 리셋 (Basic Reset) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 바디 기본 스타일 (Body Base Style) */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 150vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    padding-top: 50px;
    padding-bottom: var(--page-footer-height);
}

/* 등록 컨테이너 (Register Container) */
.register-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 800px;
    overflow: hidden;
}

/* 헤더 스타일 (Header Style) */
.register-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.register-header h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.register-header p {
    font-size: 14px;
    opacity: 0.9;
}

/* 바디 스타일 (Body Style) */
.register-body {
    padding: 40px;
}

/* 폼 섹션 (Form Section) */
.form-section {
    margin-bottom: 35px;
}

/* 폼 그룹: 레이블과 입력을 일관되게 정렬 (기본은 레이블 위, 입력 아래)
   일부 구성(예: config-row)은 그리드/플렉스로 별도 처리됩니다 */
.form-group {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin-bottom: 14px;
    padding-left: 12px;  /* Add left padding for consistent alignment with other sections */
}

/* Ensure form-group is a positioning context for inline indicators */
.form-group {
    position: relative;
}

.form-group.full-width {
    width: 100%;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    box-sizing: border-box;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

/* Make Job Description textarea larger and more readable */
#jobDescription {
    font-size: 16px; /* increase base font size for comfortable typing */
    line-height: 1.6;
    padding: 14px 12px;
    min-height: 160px; /* ensure generous typing area */
    resize: vertical; /* allow user to expand vertically */
    font-family: inherit;
}

/* Slightly increase textarea font-size globally for better readability */
textarea {
    font-size: 15px;
    caret-color: #4B0082 !important; /* ✅ 아주 진한 보라색 커서 */
}

/* ✅ 모든 input 필드에 기본 커서 색상 - 아주 진한 보라색 */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="search"],
select {
    caret-color: #4B0082 !important; /* 아주 진한 보라색 커서 */
}

/* Two-column rows for forms to reduce vertical length */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;  /* 2열 그리드 - 정상 너비 */
    gap: 16px 24px;
    align-items: start;
}

/* Inventory Filters - 3열 그리드로 한 줄 표시 (form-row와 독립) */
.inventory-filters {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;  /* 3개 필터를 한 줄에 */
    gap: 16px;
    align-items: start;
    margin-bottom: 16px;
}

.form-row .form-group.full-width {
    grid-column: 1 / -1;
}

@media (max-width: 1200px) {
    .form-row {
        grid-template-columns: 1fr 1fr;  /* 1200px 이하에서는 2열 */
        gap: 12px;
    }
}

@media (max-width: 900px) {
    .form-row {
        grid-template-columns: 1fr;  /* 900px 이하에서는 1열 */
        gap: 12px;
    }
}

/* Address row: allow street + city + state + zip on a single line
   Street should be the largest column, with city/state/zip narrower. */
.address-row {
    display: grid;
    /* ✅ 주소 입력 비율 조정: Street / City / State / ZIP (ZIP 라벨/값 가시성 강화)
       필드 순서: Street → City → State → ZIP (미국 표준) */
    grid-template-columns: 2.35fr 1.3fr 0.95fr 0.95fr;
    gap: 14px 14px;
    align-items: start;
}

#section-jobs .address-row .form-group label {
    white-space: nowrap;
}

#section-jobs #jobZipCode {
    min-width: 96px;
}

/* Make the street input span full width of its column and keep suggestions aligned */
.address-row .address-street .address-input-wrapper { width: 100%; }

@media (max-width: 900px) {
    .address-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* three-col-row: 3개 필드를 한 줄에 표시 (Job Type, Due Date, Reserved Time 등)
   반응형: 좁은 화면에서는 스택 정렬 */
.three-col-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px 24px;
    align-items: start;
}

/* four-col-row: 4개 필드를 한 줄에 표시 (Job Type, Due Date, Reserved Time, Priority)
   반응형: 좁은 화면에서는 스택 정렬 */
.four-col-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px 24px;
    align-items: start;
}

@media (max-width: 900px) {
    .three-col-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .four-col-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

.form-section h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

/* 폼 행 (Form Row) */
.page-footer {
    background: #FFFFFF; /* changed to solid white per request */
    color: #333333; /* ensure readable text on white background */
    text-align: center;
    padding: 30px 20px;
    margin-top: 50px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
}

.page-footer p {
    margin: 0;
    font-size: 13px;
}

.page-footer a {
    color: #003478; /* link color adjusted for contrast */
    text-decoration: none;
    font-weight: 600;
    cursor: default;
}

.page-footer a:hover {
    text-decoration: underline;
}

.footer-tagline {
    display: none;
}

/* Unauthorized overlay: when an unauthorized alert appears, mask page */
.unauth-overlay {
    position: fixed;
    inset: 0;
    background: #ffffff;
    opacity: 0.98;
    z-index: 2147483647; /* very high so it covers page content */
    pointer-events: auto;
}

/* 폼 힌트 (Form Hint) */
.form-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #718096;
    font-style: italic;
}

/* 입력 필드 스타일 (Input Field Style) */
input, select {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

/* Select 드롭다운 스타일 개선 */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    padding-right: 35px;
}

select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Priority select color variants: color the select control to reflect chosen priority.
   We update the select's class via JS so the selected value visibly indicates priority. */
select.priority-low {
    background-color: #f0fff4 !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23065f46' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 20px !important;
    color: #065f46 !important;
    border-color: #bbf7d0 !important;
    border-left: 6px solid #10b981 !important;
}
select.priority-medium {
    background-color: #fff7ed !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237c2d12' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 20px !important;
    color: #7c2d12 !important;
    border-color: #fde68a !important;
    border-left: 6px solid #f59e0b !important;
}
select.priority-high {
    background-color: #eff6ff !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e3a8a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 20px !important;
    color: #1e3a8a !important;
    border-color: #bfdbfe !important;
    border-left: 6px solid #3b82f6 !important;
}
select.priority-urgent {
    background-color: #fff1f2 !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237f1d1d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 20px !important;
    color: #7f1d1d !important;
    border-color: #fecaca !important;
    border-left: 6px solid #ef4444 !important;
    font-weight: 700 !important;
}

/* Ensure the select padding accounts for the left accent */
select.priority-low, select.priority-medium, select.priority-high, select.priority-urgent {
    padding-left: 14px; /* left padding + accent looks balanced */
    padding-right: 35px !important; /* padding for dropdown arrow */
}

/* State option 플래그 표시 (State option flag display with data attribute) */
option[data-code][data-flag="US"]::before {
    content: "🇺🇸 ";
}

/* Alternative: CSS content for state options (for browsers that don't support ::before on option) */
select#jobState option[data-code],
select#profileState option[data-code] {
    padding-left: 5px;
}

input:focus, select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    caret-color: #667eea; /* ✅ 커서 색상을 보라색으로 명시 */
}

/* ✅ textarea 포커스 시 커서 가시성 */
textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    caret-color: #667eea; /* 커서 색상 명시 */
}

/* 입력 필드 유효성 검사 스타일 (Input Field Validation Styles) */
input.error, select.error {
    border-color: #e53e3e;
    background-color: #fff5f5;
}

input.success, select.success {
    border-color: #48bb78;
    background-color: #f0fff4;
}

input.error:focus, select.error:focus {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

/* 필드 에러 메시지 스타일 (Field Error Message Style) */
.field-error {
    display: none;
    color: #e53e3e;
    font-size: 12px;
    margin-top: 5px;
    font-weight: 500;
}

/* State 선택 옵션 스타일 (State Option CSS-based Flag) */
option.state-option {
    background-repeat: no-repeat;
    background-position: left 5px center;
    background-size: 1.2em;
    padding-left: 2em;
    line-height: 1.5;
}

/* US State 플래그 표시 (CSS에서 flag emoji 사용하거나 이미지 사용 가능) */
/* 현재: HTML emoji 유지, 데이터 속성으로 CSS 확장 가능 */
select#stateSelect option[data-code="AL"]::before { content: "🇦🇱"; }
select#stateSelect option[data-code="AK"]::before { content: "🇦🇰"; }

/* 비밀번호 복잡도 표시 스타일 (Password Complexity Indicator Styles) */
.password-complexity-indicator {
    display: none;
    margin-top: 10px;
    padding: 12px;
    background-color: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    width: 100%;
    box-sizing: border-box;
}

.password-complexity-indicator .complexity-title {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
    font-size: 14px;
}

.password-complexity-indicator .complexity-item {
    display: flex;
    align-items: center;
    padding: 5px 0;
    transition: all 0.2s ease;
}

.password-complexity-indicator .complexity-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.password-complexity-indicator .complexity-item.passed .complexity-icon {
    color: #48bb78;
    background-color: #f0fff4;
    border: 2px solid #48bb78;
}

.password-complexity-indicator .complexity-item.passed .complexity-text {
    color: #48bb78;
    font-weight: 500;
}

.password-complexity-indicator .complexity-item.failed .complexity-icon {
    color: #cbd5e0;
    border: 2px solid #cbd5e0;
}

.password-complexity-indicator .complexity-item.failed .complexity-text {
    color: #718096;
}

.password-complexity-indicator .complexity-text {
    flex: 1;
    color: #4a5568;
    transition: all 0.2s ease;
}

/* 비밀번호 일치 표시 스타일 (Password Match Indicator Styles) */
.password-match-indicator {
    display: none;
    margin-top: 10px;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

/* Display the password match indicator below the confirm input without shifting
   the overall form layout. It's placed inside the same `.form-group` and
   will take the full width under the input. */
.password-match-indicator {
    position: static; /* flow layout */
    display: none;
    width: 100%;
    box-sizing: border-box;
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    white-space: normal;
    z-index: 2;
    box-shadow: 0 6px 18px rgba(2,6,23,0.06);
}

/* Remove forced right padding so input width remains natural */
#confirmPassword {
    padding-right: 12px;
}

.password-match-indicator .match-icon {
    font-size: 18px;
    font-weight: bold;
    margin-right: 8px;
}

.password-match-indicator.match {
    background-color: #f0fff4;
    border: 2px solid #48bb78;
    color: #22543d;
}

.password-match-indicator.match .match-icon {
    color: #48bb78;
}

.password-match-indicator.mismatch {
    background-color: #fff5f5;
    border: 2px solid #e53e3e;
    color: #742a2a;
}

.password-match-indicator.mismatch .match-icon {
    color: #e53e3e;
}

/* 비밀번호 일치/불일치 입력 필드 스타일 (Password Match/Mismatch Field Styles) */
input.password-match {
    border-color: #48bb78 !important;
    background-color: #f0fff4 !important;
}

input.password-match:focus {
    border-color: #48bb78 !important;
    box-shadow: 0 0 0 3px rgba(72, 187, 120, 0.1) !important;
}

input.password-mismatch {
    border-color: #e53e3e !important;
    background-color: #fff5f5 !important;
}

/* Hide the floating password match box entirely and rely on input styles */
.password-match-indicator { display: none !important; }

/* Stronger visual feedback on inputs for match/mismatch */
input.password-match {
    box-shadow: 0 6px 18px rgba(72,187,120,0.08), inset 0 0 0 1px rgba(72,187,120,0.06);
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

input.password-mismatch {
    box-shadow: 0 6px 18px rgba(229,62,62,0.06), inset 0 0 0 1px rgba(229,62,62,0.05);
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

/* Ensure the confirm field doesn't get extra layout padding */
#confirmPassword { padding-right: 12px; }

input.password-mismatch:focus {
    border-color: #e53e3e !important;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1) !important;
}

input:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

/* ZIP 자동완성 후 읽기전용 상태 (Zippopotam.us Auto-Complete Locked State) */
input[readonly],
#jobCity:readonly,
select.locked-field,
.locked-field {
    background-color: #d4edda !important;       /* 밝은 그린 배경 */
    color: #155724 !important;                  /* 진한 그린 텍스트 */
    cursor: not-allowed !important;
    border-color: #28a745 !important;           /* 그린 테두리 */
}

input:readonly::placeholder {
    color: #2d6a4f !important;                  /* 그린 플레이스홀더 */
}

input[readonly]::placeholder,
#jobCity:readonly::placeholder,
.locked-field::placeholder {
    color: #2d6a4f !important;                  /* 그린 플레이스홀더 */
}

input:readonly:focus,
input[readonly]:focus,
#jobCity:readonly:focus,
select.locked-field:focus,
.locked-field:focus {
    outline: none !important;
    box-shadow: inset 0 0 0 2px #155724 !important;  /* 그린 내부 포커스 테두리 */
    background-color: #d4edda !important;       /* 포커스 시에도 동일한 그린 배경 */
}

/* Select readonly 상태 (셀렉트 박스도 동일하게 처리) */
#jobState:disabled {
    background-color: #d4edda !important;       /* 밝은 그린 배경 */
    color: #155724 !important;                  /* 진한 그린 텍스트 */
    border-color: #28a745 !important;           /* 그린 테두리 */
    cursor: not-allowed;
    opacity: 1;                                 /* 투명도 유지 */
}

select:disabled {
    background-color: #d4edda;       /* 밝은 그린 배경 */
    color: #155724;                  /* 진한 그린 텍스트 */
    border-color: #28a745;           /* 그린 테두리 */
    cursor: not-allowed;
    opacity: 1;                      /* 투명도 유지 */
}

/* ZIP 자동완성 상태 메시지 (Zippopotam.us Status Message - Inline Display) */
.zip-status {
    font-size: 14px;
    padding: 0;
    margin: 0;
    border-radius: 4px;
    display: none;
    text-align: left;
    box-sizing: border-box;
    background-color: transparent;
    border: none;
    white-space: nowrap;
}

.zip-status.loading {
    color: #0066cc;
    background-color: transparent;
    border: none;
    display: inline-block;
}

.zip-status.success {
    color: #22863a;
    background-color: transparent;
    border: none;
    display: inline-block;
}

.zip-status.error {
    color: #cb2431;
    background-color: transparent;
    border: none;
    display: inline-block;
}

/* 버튼 그룹 (Button Group) */
.btn-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* 버튼 스타일 (Button Style) */
.btn {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #e0e0e0;
    color: #555;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

/* Inventory 테이블 버튼 크기 일관성 (36x36px 정사각형) - ONLY for inventory table */
#inventoryTableBody .btn-warning {
    background: #f59e0b;
    color: white;
    border: none;
    padding: 0;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#inventoryTableBody .btn-warning:hover {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 158, 11, 0.3);
}

#inventoryTableBody .btn-warning:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    opacity: 0.6;
}

/* 버튼 크기 일관성: btn-danger와 동일한 크기 유지 */
#inventoryTableBody .btn-danger {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* 알림 스타일 (Alert Style) */
.alert {
    padding: 20px 30px;
    border-radius: 12px;
    display: none !important;
    line-height: 1.6;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    max-width: 500px;
    width: 90%;
    animation: alertSlideDown 0.4s ease;
    font-weight: 500;
    /* opaque background to prevent underlying content bleed-through */
    background: #ffffff;
}

.alert.success {
    background: linear-gradient(90deg, #eef2ff 0%, #eef6ff 60%);
    color: #064e3b;
    border: 0;
    padding: 20px 30px;
    text-align: center;
    box-shadow: 0 28px 80px rgba(79, 70, 229, 0.12), inset 0 1px 0 rgba(255,255,255,0.7);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.2px;
    /* ensure gradient is fully opaque */
    background-repeat: no-repeat;
 }

.alert.error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 2px solid #ef4444;
}

.alert.info {
    background-color: #eff6ff;
    color: #1e40af;
    border: 2px solid #3b82f6;
}

.alert.show {
    display: block !important;
    animation: alertSlideDown 0.4s ease;
}

/* Prominent redirect pill shown inside success alerts */
/* redirect-pill intentionally left in CSS for other pages but not used for login success */

@keyframes alertSlideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Custom non-blocking alert (overlay + dialog) */
.custom-alert-overlay {
    position: fixed;
    inset: 0;
    display: none; /* hidden by default; shown when .show is added */
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.46);
    z-index: 2147483650;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.custom-alert-overlay.show {
    display: flex;
}

.custom-alert {
    background: #ffffff;
    color: #1f2937;
    padding: 18px 20px;
    border-radius: 12px;
    width: 92%;
    max-width: 460px;
    box-shadow: 0 18px 50px rgba(2,6,23,0.3);
    font-size: 15px;
}

.custom-alert .title {
    font-weight: 700;
    margin-bottom: 6px;
}

.custom-alert .title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.custom-alert .message {
    color: #374151;
    margin: 0 0 14px 0;
    line-height: 1.4;
    text-align: center;
}

.custom-alert .actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.custom-alert .actions .btn {
    min-width: 88px;
}

.custom-alert.danger {
    border-left: 4px solid #ef4444;
}

.custom-alert .icon {
    display: inline-block;
    margin-right: 10px;
    font-size: 20px;
}

/* 반응형 디자인 (Responsive Design) */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .register-body {
        padding: 30px 20px;
    }
}

/* 로그인 컨테이너 (Login Container) */
.login-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 450px;
    overflow: hidden;
}

/* 로그인 헤더 스타일 (Login Header Style) */
.login-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    /* Reduced vertical padding to tighten welcome area */
    padding: 18px 30px;
    text-align: center;
}

.login-header h1 {
    font-size: 28px;
    margin: 4px 0 6px 0;
}

.login-header p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0 0 6px 0;
}

/* 로그인 바디 스타일 (Login Body Style) */
.login-body {
    padding: 40px 30px;
    max-height: 70vh;
    overflow-y: auto;
}

/* 체크박스 그룹 스타일 (Checkbox Group Style) */
.checkbox-group {
    margin-top: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    height: auto;
    margin-right: 8px;
    cursor: pointer;
}

.checkbox-group span {
    color: #4a5568;
}

/* 폼 푸터 스타일 (Form Footer Style) */
.form-footer {
    margin-top: 25px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    flex-wrap: nowrap;
}

.form-footer .link {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
    white-space: nowrap;
}

.form-footer .link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.form-footer .separator {
    margin: 0 10px;
    color: #cbd5e0;
    white-space: nowrap;
}

/* 로그인 푸터 스타일 (Login Footer Style) */
.login-footer {
    background: #f7fafc;
    padding: 20px;
    text-align: center;
    font-size: 12px;
    color: #718096;
    border-top: 1px solid #e2e8f0;
}

/* 로그인 페이지 버튼 스타일 조정 (Login Page Button Style Adjustment) */
.login-body .form-actions {
    margin-top: 30px;
}

.login-body .btn {
    width: 100%;
    margin-bottom: 10px;
}

.login-body .btn:last-child {
    margin-bottom: 0;
}

.mobile-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #1d4ed8 0%, #4f46e5 55%, #7c3aed 100%);
    box-shadow: 0 14px 30px rgba(79, 70, 229, 0.24);
    border: 1px solid rgba(255, 255, 255, 0.18);
    letter-spacing: 0.01em;
}

.mobile-login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(79, 70, 229, 0.3);
}

.mobile-login-btn:disabled {
    opacity: 0.88;
    cursor: wait;
    transform: none;
}

.mobile-login-btn .login-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 13px;
    line-height: 1;
}

.mobile-login-btn .login-btn-text {
    font-size: 15px;
    font-weight: 700;
}

.mobile-login-btn.is-loading .login-btn-icon {
    animation: mobile-login-pulse 1.1s ease-in-out infinite;
}

@keyframes mobile-login-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.12);
        opacity: 0.75;
    }
}

/* 페이지 푸터 스타일 (Page Footer Styles) */
.page-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #FFFFFF; /* unified white footer background */
    color: #333333;
    padding: 6px 20px;
    text-align: center;
    border-top: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.06);
    z-index: 999;
}

.page-footer p {
    margin: 0;
    font-size: 12px;
    color: #4a5568;
}

.page-footer p:first-child {
    font-weight: 500;
    font-size: 12px;
}

.page-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.page-footer a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.page-footer .footer-tagline {
    display: none;
}

/* 페이지 푸터를 위한 바디 패딩 조정 (Body Padding for Footer) */
/* Ensure body keeps enough bottom padding for the fixed footer. This will
   use the shared --page-footer-height so adjustments only need one change. */
body {
    padding-bottom: var(--page-footer-height);
}

/* Ensure main content has bottom padding to stay clear of the fixed footer.
   This protects content when scrolled to the bottom inside the page layout. */
body.login-page .main-content {
    padding-bottom: calc(var(--page-footer-height) + 12px);
}

/* Layout adjustments specific to the standalone login/register pages so the
   main form sits flush above the fixed footer instead of leaving a large gap. */
body.login-page {
    /* Centered layout with full viewport gradient */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    background-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    min-height: 100vh;
    padding-bottom: var(--page-footer-height);
    /* Center login container both vertically and horizontally */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    margin: 0;
}

/* Ensure the login container doesn't have extra bottom margin that would
   create a gap between it and the footer. */
.login-container {
    margin-bottom: 12px; /* small breathing room above footer when viewport is narrow */
}

/* 스크롤 투 탑 버튼 스타일 (Scroll to Top Button Styles) */
.scroll-to-top {
    position: fixed;
    bottom: 56px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
}

.scroll-to-top:active {
    transform: translateY(-5px) scale(0.95);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top .scroll-arrow {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-2px);
}

/* Hide body scroll and disable footer when scheduler is active */
.dashboard-body.scheduler-active {
    overflow: hidden;
}

.dashboard-body.scheduler-active .scroll-to-top {
    display: none !important;
}

/* 모바일 반응형 (Mobile Responsive) */
@media (max-width: 768px) {
    .scroll-to-top {
        width: 45px;
        height: 45px;
        right: 20px;
        bottom: 42px;
    }
    
    .scroll-to-top .scroll-arrow {
        font-size: 20px;
    }
    
    .page-footer {
        padding: 12px 15px;
    }
    
    .page-footer p {
        font-size: 11px;
    }
    
    .page-footer p:first-child {
        font-size: 11px;
    }
    
    .page-footer .footer-tagline {
        display: none;
    }
    
    body {
        padding-bottom: 90px;
    }
}

/* Job Entry compact layout tuning (keep all fields, tighten visual rhythm) */
#section-jobs > #jobEntryCard,
#section-jobs > #jobSaleItemsCard,
#section-jobs > #jobHistoryCard {
    width: 100%;
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
}

#section-jobs > #jobEntryCard .card-body {
    padding: 18px 22px;
}

#section-jobs #jobSaleItemsCard .card-body {
    padding: 14px 16px;
}

#section-jobs #jobEntryForm .form-section {
    margin-bottom: 20px;
}

#section-jobs #jobEntryForm .form-section-spacing {
    margin-top: 14px;
}

#section-jobs #jobEntryForm .form-section-title {
    font-size: 15px;
    margin-bottom: 10px;
}

#section-jobs #jobEntryForm .form-row,
#section-jobs #jobEntryForm .address-row,
#section-jobs #jobEntryForm .four-col-row {
    gap: 10px 16px;
}

#section-jobs #jobEntryForm .form-group {
    margin-bottom: 10px;
}

#section-jobs #jobEntryForm .form-hint,
#section-jobs #jobEntryForm .input-hint {
    font-size: 11px;
    line-height: 1.35;
}

/* Job Description 높이 축소: 입력 편의는 유지하면서 카드 세로 길이만 완만하게 감소 */
#section-jobs #jobDescription {
    min-height: 96px;
}

/* ========================================
   Agent Login Page Styles
   ======================================== */

/* Agent 로그인 전용 배경 스타일 */
/* Agent 로그인 전용 배경 스타일 */
body.agent-page {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    /* center the agent login container vertically while reserving footer space */
    min-height: calc(100vh - var(--page-footer-height));
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 0;
}

.agent-login-container {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 450px;
    overflow: hidden;
    border: 2px solid #ff6b6b;
}

.agent-login-header {
    background: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%);
    color: white;
    /* Reduced vertical padding for tighter header */
    padding: 14px 30px;
    text-align: center;
}

/* Restore the purple gradient for login pages and add a subtle bottom
   fade so the white footer blends without a hard stripe. This overrides
   the earlier temporary white-only rule but preserves the centered layout. */
/* Login page footer fade - removed, gradient handled in main rule */

/* Add a subtle translucent white fade matching the footer height so the
   footer visually blends without removing the gradient entirely. Reduce
   height and opacity to avoid a visible band. */
body.login-page::after {
    content: "";
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(var(--page-footer-height));
    pointer-events: none;
    z-index: 990; /* sit below the footer (999) but above background */
    background: linear-gradient(to top, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.45) 30%, rgba(255,255,255,0.0) 100%);
}

.agent-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.security-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 15px;
    /* 줄어든 상단 여백: RESTRICTED ACCESS 박스 위 공간 축소 */
    margin: 8px 0;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
}

.security-warning strong {
    color: #dc3545;
}

.btn-agent-primary {
    background: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%);
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.btn-agent-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(238, 9, 121, 0.3);
}

/* ========================================
   Agent Configuration Page Styles
   ======================================== */

body.agent-config-page {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: block;
    padding: 20px;
    padding-bottom: 100px;
    min-height: 100vh;
}

.config-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
}

.config-header {
    background: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%);
    color: white;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.config-header-left h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.config-header-right {
    text-align: right;
}

.agent-info {
    font-size: 14px;
    opacity: 0.9;
}

.btn-logout {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid white;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 10px;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.3);
}

.config-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.config-tab {
    padding: 15px 30px;
    cursor: pointer;
    border: none;
    background: transparent;
    font-size: 16px;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.3s;
}

.config-tab.active {
    background: white;
    color: #ee0979;
    border-bottom: 3px solid #ee0979;
}

.config-tab:hover {
    background: rgba(238, 9, 121, 0.1);
}

.config-content {
    padding: 30px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.config-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.config-section h3 {
    color: #ee0979;
    margin-bottom: 15px;
    font-size: 18px;
}

.config-row {
    display: grid;
    grid-template-columns: 1fr 2fr 100px;
    gap: 15px;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 6px;
    margin-bottom: 10px;
}

.config-label {
    font-weight: 600;
    color: #495057;
}

.config-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 6px;
}

.btn-save {
    background: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.btn-save:hover {
    opacity: 0.9;
}

.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
}
/* ========================================
   TOP BANNER (상단 배너)
   ======================================== */
.top-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: #FFFFFF; /* match page-footer background */
    display: flex;
    align-items: center;
    justify-content: flex-start; /* left-align logo + brand */
    gap: 0; /* remove gap so logo & brand nearly touch */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    padding: 0 0px; /* eliminate side padding to allow tighter visual */
}

.banner-logo {
    height: 36px;
    width: auto;
    object-fit: contain;
}

/* Ensure the raster logo is visible (we're using a PNG instead of SVG masks) */
.top-banner .banner-logo {
    opacity: 1;
}

/* Masked logo: use the logo image as a mask over a two-tone transparent gradient.
   Top area: semi-transparent red; bottom area: semi-transparent blue. */
/* SVG mask backgrounds are disabled when using PNG logo */
.banner-logo-mask { display: none; }

.banner-logo-wrapper {
    position: relative;
    width: 140px;
    height: 36px;
    display: inline-block;
}

/* Nudge logo slightly left inside the banner to reduce whitespace */
.top-banner .banner-logo-wrapper {
    margin-left: -8px; /* nudge right by 10px from previous -18px */
    transform: translateX(-8px);
}

.banner-logo-wrapper .banner-logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 1;
}

/* Inline SVG overlays are disabled when using PNG logo */
.banner-logo-inline { display: none; }

/* Inline SVG overlay (used when SVG is injected directly into the DOM) */
.banner-logo-inline { display: none; }

.banner-company-name {
    font-size: 32px;
    font-weight: bold;
    /* Match the vivid logo overlay colors */
    background: linear-gradient(90deg, #FF0033 0%, #0033CC 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.2px;
}
/* tighten spacing to make logo and brand look like a single mark */
.banner-company-name {
    margin-left: -44px; /* increased negative margin to narrow gap between logo and brand */
    transform: translateY(-3px); /* nudge brand slightly up to align with logo */
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

/* For very tight layouts on small screens, allow even smaller spacing */
@media (max-width: 900px) {
    .top-banner {
        padding-left: 6px;
        gap: 2px;
    }
    .banner-company-name {
        margin-left: 0px;
        font-size: 28px;
        transform: translateY(-2px);
    }
}

/* Body padding to accommodate top banner */
body {
    padding-top: 90px !important;
}

/* ========================================
   PASSWORD VISIBILITY TOGGLE (암호 보이기/숨기기)
   ======================================== */
.password-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 100%;
}

.password-wrapper input {
    width: 100%;
    padding-right: 45px !important;
    flex: 1;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #667eea;
    padding: 5px;
    transition: color 0.3s ease;
    z-index: 10;
}

.password-toggle:hover {
    color: #764ba2;
}

/* ========================================
   TEST DATA BUTTON (테스트 데이터 버튼)
   ======================================== */
.test-data-btn {
    position: sticky;
    top: 90px;
    z-index: 999;
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: 2px dashed rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(240, 147, 251, 0.3);
}

.test-data-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(240, 147, 251, 0.5);
}

.test-data-btn::before {
    content: "🧪 ";
    margin-right: 5px;
}

/* ========================================
   FOOTER UPDATE (풋터 업데이트)
   ======================================== */
.page-footer {
    /* final unified footer style */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #FFFFFF;
    color: #333333;
    text-align: center;
    padding: 15px 20px;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.06);
    z-index: 999;
}

.page-footer a {
    color: #003478; /* link color adjusted for contrast */
    text-decoration: none;
    font-weight: 600;
    cursor: default;
}

.page-footer a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.footer-tagline {
    font-size: 12px;
    opacity: 0.85;
    margin-top: 5px;
}

/* ===================================================================
   DASHBOARD STYLES
   =================================================================== */

/* Dashboard Body Layout */
.dashboard-body {
    display: flex;
    height: 100vh;
    background: #f3f4f6;
    padding: 0;
    /* 강제: 대시보드 페이지는 body 상단 패딩(베너처럼 보이는 공간) 무시 */
    padding-top: 0 !important;
    overflow: auto;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* 대시보드에서 혹시 남아있는 헤더 영역(베너)을 숨김 처리 */
.dashboard-body .header-left,
.dashboard-body .header-right,
.dashboard-body .page-banner {
    display: none !important;
}

/* 명시적으로 top-banner 숨김 (대시보드 전용) */
.dashboard-body .top-banner {
    display: none !important;
}
/* Sidebar Navigation */
.sidebar {
    width: 220px; /* reduced from 260px for a tighter layout */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 3000;
}

.sidebar-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2px 4px;
    border-bottom: none;
    user-select: none;
    -webkit-user-select: none;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.sidebar-logo-section {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 2px;
    padding-left: 0;
    padding-right: 0;
}

.sidebar-logo {
    width: 140px; /* match banner logo wrapper width */
    height: 48px; /* match banner logo height */
    max-width: 100%;
    border-radius: 0; /* make same rectangular shape as banner */
    background: transparent;
    padding: 0;
    margin: 0;
    object-fit: contain; /* preserve aspect ratio like banner */
    display: block;
}

/* Pull brand leftwards to reduce whitespace when logo image contains internal padding */
.sidebar-logo { margin-left: -24px; margin-right: -32px; }
.sidebar-brand { padding-left: 2px; }

/* tighten surrounding container so logo sits flush */
.sidebar-header .sidebar-logo-section {
    padding: 0;
}

.sidebar-brand {
    flex: 1;
}

.sidebar-brand h2 {
    font-size: 32px; /* match banner company name size */
    margin: 0;
    margin-bottom: 5px;
    font-weight: 800;
    background: linear-gradient(90deg, #B22234 0%, #3C3B6B 50%, #B22234 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.2px;
    margin-left: -44px; /* tighten spacing to match banner alignment */
    transform: translateY(2px); /* slight raise to better match logo baseline */
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.brand-tagline {
    font-size: 12px;
    opacity: 0.95;
    margin: 0;
    font-weight: 500;
    letter-spacing: 0.3px;
    line-height: 1.4;
    word-break: break-word;

/* show a single check icon before success alerts */
/* explicit icon styling for alert content */
.alert .icon {
    display: inline-block;
    margin-right: 10px;
    font-size: 18px;
    vertical-align: middle;
}
    color: rgba(255, 255, 255, 0.9);
}

.company-info {
    margin: 0;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    font-weight: 800;
    font-size: 18px;
    color: #fff;
    text-shadow: 0 1px 0 rgba(0,0,0,0.25);
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 6px;
}

.sidebar-brand {
    flex: 1;
}
.sidebar-brand h2 {
    font-size: 22px;
    margin: 0;
    margin-bottom: 5px;
    font-weight: 800;
    background: linear-gradient(90deg, #B22234 0%, #3C3B6B 50%, #B22234 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}
.sidebar .nav-item {
    width: 100%;
    margin-bottom: 8px;
}
.sidebar .nav-item a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255,255,255,0.95) !important;
    text-decoration: none !important;
    transition: background 0.3s ease, color 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    border-radius: 6px;
}

/* Ensure visited/focused/active links in sidebar keep the same appearance */
.sidebar .nav-item a:link,
.sidebar .nav-item a:visited,
.sidebar .nav-item a:focus,
.sidebar .nav-item a:hover {
    color: rgba(255,255,255,0.95) !important;
    text-decoration: none !important;
}

.nav-item a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-item-has-children > a {
    position: relative;
}

.sidebar .nav-expand-indicator {
    margin-left: auto;
    font-weight: 700;
    font-size: 16px;
    opacity: 0.95;
    width: 18px;
    text-align: center;
}

.sidebar .nav-submenu {
    list-style: none;
    margin: 2px 0 8px;
    padding: 0 0 0 18px;
    display: none;
}

.sidebar .nav-item-has-children.expanded > .nav-submenu {
    display: block;
}

.sidebar .nav-subitem {
    margin-bottom: 4px;
}

.sidebar .nav-subitem a {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.86) !important;
    text-decoration: none !important;
}

.sidebar .nav-subitem a:hover,
.sidebar .nav-subitem a.active-subitem {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff !important;
}

.sidebar .nav-subicon {
    display: inline-block;
    width: 16px;
    margin-right: 7px;
    text-align: center;
}

/* Make nav area grow and be scrollable so footer/user block can sit at bottom */
.sidebar-nav {
    flex: 1 1 auto;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 3px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.14);
    border-radius: 999px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sidebar-nav ul {
    list-style: none;
    padding-left: 0;
}

.sidebar-user-below {
    margin-top: auto;
    padding: 12px 16px;
    border-top: 1px solid rgba(255,255,255,0.04);
}

.sidebar-user-below .user-info { display:flex; align-items:center; gap:8px; }
.sidebar-user-below .user-avatar img { width:38px; height:38px; border-radius:50%; }
.sidebar-user-below .user-details .user-name { margin:0; font-weight:700; }
.sidebar-user-below .user-details .user-role { margin:0; font-size:12px; opacity:0.85; }

/* Company marquee in sidebar header */
.company-marquee {
    overflow: hidden;
    white-space: nowrap;
    width: calc(100% - 12px);
}
.company-marquee-inner {
    display: inline-block;
    padding-left: 100%; /* start off-screen to the right when animating */
    will-change: transform;
    transform: translateX(0);
    font-weight: 700; /* make marquee text bolder */
    font-size: 16px; /* decreased by 2px per request */
    color: #ffffff;
    text-overflow: clip;
}
.company-marquee-inner.marquee-active {
    animation-name: sidebar-marquee;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

@keyframes sidebar-marquee {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-100%); }
}

/* compact footer shown at very bottom of sidebar */
.page-footer { text-align: center !important; }
.page-footer p { text-align: center !important; }

.nav-item.active a {
    background: rgba(255, 255, 255, 0.12);
    border-left: 4px solid rgba(255,255,255,0.95);
}

.nav-icon {
    font-size: 20px;
    margin-right: 12px;
}

.nav-text {
    font-size: 14px;
    font-weight: 500;
}

.nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: 15px 20px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.user-details {
    flex: 1;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.user-role {
    font-size: 12px;
    opacity: 0.8;
    margin: 0;
}

/* Main Content Area - Flex container for dashboard sections */
.dashboard-body .main-content {
    margin-left: 220px; /* keep in sync with sidebar width */
    margin-top: 0;
    margin-right: 0;
    margin-bottom: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: visible;
    height: auto;
    padding: 0;
    position: relative;
}

/* Content sections - each manages its own scroll */
.dashboard-body .content-section {
    display: none;
}

.dashboard-body .content-section.active {
    display: flex !important;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 30px 30px 30px;
    padding-bottom: calc(var(--page-footer-height) + 30px);
    min-height: calc(100vh - 50px - var(--page-footer-height));
    width: 100%;
    margin: 0;
    position: relative;
}

/* Scheduler section - special fixed layout */
#section-scheduler.active {
    position: fixed;
    top: 50px;
    left: 220px;
    right: 0;
    bottom: 110px;
    width: calc(100vw - 220px);
    height: calc(100vh - 160px);
    overflow: hidden;
    padding: 12px 12px 0 12px; /* 위 우 아래 좌 - 조금 더 좁혀서 콤팩트하게 */
    margin: 0;
    z-index: 10;
    display: flex;
    flex-direction: row;
    gap: 0; /* 맵과 사이드패널이 붙음 */
    box-sizing: border-box; /* padding이 width/height에 포함되도록 */
    border-radius: 12px; /* 전체 사각형 모서리 라운딩 */
    overflow: hidden; /* 자식 요소들이 border-radius 벗어나지 않게 */
}

/* 사이드패널: 왼쪽 모서리만 라운딩 */
#section-scheduler.active > div:nth-child(2) {
    border-radius: 12px 0 0 12px; /* 왼쪽 위, 왼쪽 아래 */
}

/* 맵 영역: 오른쪽 모서리만 라운딩 */
#section-scheduler.active > div:first-child {
    border-radius: 0 12px 12px 0; /* 오른쪽 위, 오른쪽 아래 */
}

/* Dashboard page header (inline, non-fixed) */
.dashboard-page-header {
    background: white;
    border-radius: 12px;
    height: var(--section-header-height);
    padding: 0 18px;
    margin-bottom: 18px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
    display: flex;
    align-items: center;
}
.dashboard-page-header .header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    width: 100%;
}
.dashboard-page-header h1 {
    font-size: 20px;
    margin: 0;
    color: #111827;
    font-weight: 700;
}
.dashboard-page-header .header-meta {
    text-align: right;
}
.today-date {
    font-size: 14px;
    color: #374151;
    font-weight: 600;
    margin: 0;
}
.overview-text {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
}
.page-subtitle {
    margin: 2px 0 0 0;
    font-size: 13px;
    color: #4b5563;
}

/* Dashboard Statistics - Horizontal Grid Layout */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

/* Responsive: 2 columns on tablets, 1 on mobile */
@media (max-width: 1024px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
}

/* Stats Grid - 반응형 레이아웃 (2026-01-30 최종 수정) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Small variant used for API Key actions (Show / Copy) */
.api-key-action.small {
    padding: 8px 12px;
    font-size: 13px;
    min-width: 84px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.api-key-actions .api-key-action + .api-key-action {
    margin-left: 10px;
}

.stat-icon {
    font-size: 40px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
}

.stat-details h3 {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 8px 0;
    font-weight: 500;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 5px 0;
}

.stat-change {
    font-size: 12px;
    font-weight: 500;
}

.stat-change.positive {
    color: #10b981;
}

.stat-change.negative {
    color: #ef4444;
}

.stat-change.neutral {
    color: #6b7280;
}

/* Dashboard Grid - Recent Activities & Upcoming Tasks (2026-01-29 수정) */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-top: 40px;  /* Annual Revenue Trends와의 간격 */
}

/* Dashboard Card */
.dashboard-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--section-header-height);
    padding: 0 25px;
    border-bottom: 1px solid #e5e7eb;
}

.card-header h3 {
    font-size: 18px;
    color: #1f2937;
    margin: 0;
}

.card-body {
    padding: 25px;
}

.btn-link {
    background: none;
    border: none;
    color: #667eea;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
}

.btn-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.chart-tab-buttons {
    display: flex;
    gap: 8px;
    margin-left: auto;
    margin-right: 16px;
    flex-wrap: wrap;
}

.chart-tab-btn {
    border: 1px solid #d1d5db;
    background: #f9fafb;
    color: #374151;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chart-tab-btn:hover {
    background: #eef2ff;
    border-color: #a5b4fc;
}

.chart-tab-btn.active {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #ffffff;
}

.chart-panel {
    display: none;
}

.chart-panel.active {
    display: block;
}

@media (max-width: 1024px) {
    .chart-tab-buttons {
        width: 100%;
        margin: 10px 0 0 0;
        order: 3;
    }
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
}

.activity-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 8px;
}

.activity-details {
    flex: 1;
}

.activity-title {
    font-size: 14px;
    color: #1f2937;
    margin: 0 0 4px 0;
    font-weight: 500;
}

.activity-time {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
}

/* Task List */
.task-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
}

.task-priority {
    width: 4px;
    height: 40px;
    border-radius: 2px;
}

.task-priority.high {
    background: #ef4444;
}

.task-priority.medium {
    background: #f59e0b;
}

.task-priority.low {
    background: #10b981;
}

.task-details {
    flex: 1;
}

.task-title {
    font-size: 14px;
    color: #1f2937;
    margin: 0 0 4px 0;
    font-weight: 500;
}

.task-time {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
}

/* Recent Activities Modal */
.recent-activities-modal .modal-body {
    padding: 18px 22px 22px;
}

.recent-activities-toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
}

.recent-activities-search-wrap {
    flex: 1;
}

.recent-activities-table-wrap {
    max-height: 62vh;
    overflow: auto;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.recent-activities-table {
    margin-bottom: 0;
    table-layout: fixed;
}

.recent-activities-table th,
.recent-activities-table td {
    vertical-align: middle;
    font-size: 13px;
    padding: 10px 12px;
}

.recent-activities-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
    border-bottom: 1px solid #d1d5db;
}

.recent-activities-table th.sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.recent-activities-table th.sortable::after {
    content: ' ↕';
    color: #9ca3af;
    margin-left: 4px;
    font-size: 12px;
}

.recent-activities-table th.sortable.sort-asc::after {
    content: ' ↑';
    color: #2563eb;
}

.recent-activities-table th.sortable.sort-desc::after {
    content: ' ↓';
    color: #2563eb;
}

.recent-activities-table .job-id-cell {
    font-weight: 600;
    color: #1f2937;
}

.accounting-table-container {
    width: 100%;
}

.accounting-table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: collapse !important;
    font-size: 11px !important;
}

.accounting-table th {
    background: #f1f5f9 !important; /* Slightly darker background for readability */
    color: #111827 !important; /* High contrast dark color */
    font-weight: 800 !important; /* Extra bold */
    text-transform: uppercase;
    font-size: 10px !important;
    letter-spacing: 0.05em;
    padding: 8px 4px !important;
    border: 1px solid #d1d5db !important;
    text-align: center !important;
    vertical-align: middle;
}

.accounting-table td {
    padding: 6px 4px !important;
    border: 1px solid #d1d5db !important;
    font-size: 11px !important;
    color: #1f2937 !important;
    vertical-align: middle;
    line-height: 1.1 !important;
}

/* Ensure Sticky Headers for Accounting */
#section-accounting .sticky-top {
    position: sticky !important;
}

#section-accounting .card-header.sticky-top {
    top: 0;
    z-index: 1060;
}

#section-accounting .accounting-filters-container.sticky-top {
    top: 50px; /* Card header height matches */
    z-index: 1050;
}

/* [jobpool-fix.css에서 !important로 재정의됨 - 아래 규칙들은 무효] */
/* #section-accounting .accounting-table thead.sticky-top - 구 규칙 비활성화 */
#section-accounting .accounting-table thead.sticky-top {
    top: 154px; /* Matches the sum of higher stickies */
    z-index: 1040;
}

/* Job Type Cell: No Wrap */
.accounting-table .job-type-cell {
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* Status Pill Enhancements for Accounting */
.accounting-table .status-pill {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
}

/* Sticky Header Adjustments for Accounting */
#section-accounting .sticky-top {
    transition: background-color 0.2s;
}

/* Filter Specifics for Accounting */
.accounting-filters-container .filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.accounting-filters-container .filter-group label {
    font-size: 12px;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
    color: #495057;
}

/* Job ID Link Style */
#accountingTableBody a.job-link {
    color: #0d6efd;
    text-decoration: none;
    font-weight: 700;
}

#accountingTableBody a.job-link:hover {
    text-decoration: underline;
}

/* Fixed Width for Search Container */
#accountingSearchInput {
    border-radius: 4px;
    background-color: #fff;
}

.accounting-table tbody tr:hover {
    background-color: #f8fafc;
}

/* Specific Cell Styles */
.accounting-table .text-center { text-align: center !important; }
.accounting-table .text-end { text-align: right !important; }

/* Status Pills for Accounting Table */
.status-pill.open { background: #dbeafe; color: #1e40af; }
.status-pill.completed { background: #dcfce7; color: #166534; }
.status-pill.closed { background: #f1f5f9; color: #475569; }

/* Filter Specific Adjustments */
.accounting-filters .btn-success {
    background-color: #10b981;
    border-color: #10b981;
}

.accounting-filters .btn-success:hover {
    background-color: #059669;
    border-color: #059669;
}

/* Ensure no global .btn rules interfere with accounting rows */
#section-accounting .btn {
    flex: none !important;
}

/* Sticky behavior for Accounting Overview Card Header and Filters */
#section-accounting .card-header {
    position: sticky;
    top: 0;
    z-index: 1010;
    background: #fff;
}

#section-accounting .accounting-filters-container {
    position: sticky;
    top: 60px; /* Offset by card header height */
    z-index: 1000;
    background: #f8f9fa;
    padding: 15px;
    border-bottom: 2px solid #dee2e6;
}

/* [jobpool-fix.css !important 규칙으로 덮어씌워짐 - thead th sticky는 jobpool-fix.css에서 관리] */
#section-accounting .accounting-table thead th {
    position: sticky;
    top: 172px; /* Calculated: Header(60) + FilterContainer(approx 112) */
    z-index: 990;
    background: #f8f9fa;
}

/* Info Grid - Enhanced Design */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.info-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #d1d5db;
}

.info-item label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 4px;
}

.info-item p {
    font-size: 16px;
    color: #111827;
    margin: 0;
    font-weight: 600;
    line-height: 1.5;
    word-break: break-word;
}

/* Status Badge in Info Item */
.info-item .status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 600;
}

.info-item .status-badge.active {
    background-color: #dcfce7;
    color: #166534;
}

.info-item .status-badge.inactive {
    background-color: #f3f4f6;
    color: #374151;
}

@media (max-width: 640px) {
    .info-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 16px 0;
    }
    
    .info-item {
        padding: 16px;
    }
    
    /* API Key Section Mobile */
    .api-key-display {
        flex-direction: column;
        gap: 12px;
    }
    
    .api-key-value {
        border-radius: 8px;
        border: 1px solid #e5e7eb;
        border-right: 1px solid #e5e7eb;
    }
    
    .api-key-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .api-key-button {
        width: 100%;
        border-radius: 8px;
        border: 1px solid #d1d5db;
        border-left: 1px solid #d1d5db;
    }
    
    .api-key-button:first-of-type {
        border-radius: 8px;
    }
    
    .api-key-button:last-of-type {
        border-radius: 8px;
    }
    
    .key-management-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .regenerate-button {
        width: 100%;
    }
    
    .section-divider {
        padding-top: 20px;
    }
}

/* Profile Section Styles */
.profile-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.form-section-title {
    font-size: 16px;
    color: #1f2937;
    margin-bottom: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.masked-key {
    font-family: monospace;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: #f9fafb;
}

.data-table th {
    padding: 12px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    border-bottom: 2px solid #e5e7eb;
}

.data-table td {
    padding: 12px;
    font-size: 14px;
    color: #1f2937;
    border-bottom: 1px solid #e5e7eb;
}

.data-table tbody tr:hover {
    background: #f9fafb;
}

.no-data {
    text-align: center;
    color: #9ca3af;
    padding: 40px !important;
}

/* Placeholder Text */
.placeholder-text {
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
    padding: 60px 20px;
}

/* Inventory Tracking Modal */
.inventory-tracking-modal .modal-header {
    background: linear-gradient(135deg, #eef4ff 0%, #e0f2fe 100%);
}

.tracking-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 180px;
}

.tracking-loading-text {
    color: #64748b;
    font-weight: 600;
}

.tracking-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.tracking-summary-card {
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: #f8fbff;
    padding: 10px 12px;
}

.tracking-summary-label {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}

.tracking-summary-value {
    font-size: 20px;
    font-weight: 800;
    color: #1d4ed8;
    line-height: 1.1;
}

.tracking-section {
    margin-top: 12px;
}

.tracking-section-title {
    font-size: 14px;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 8px;
}

.tracking-table-wrap {
    max-height: 240px;
    overflow-y: auto;
    overflow-x: hidden !important;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    position: relative;
}

.tracking-table {
    width: 100%;
    table-layout: fixed;
}

.tracking-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
    border-bottom: 1px solid #dbe3ef;
}

.tracking-table th,
.tracking-table td {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.tracking-table th:nth-child(1),
.tracking-table td:nth-child(1) {
    width: 18%;
}

.tracking-table th:nth-child(2),
.tracking-table td:nth-child(2) {
    width: 9%;
}

.tracking-table th:nth-child(3),
.tracking-table td:nth-child(3),
.tracking-table th:nth-child(4),
.tracking-table td:nth-child(4),
.tracking-table th:nth-child(5),
.tracking-table td:nth-child(5) {
    width: 8%;
}

.tracking-table th:nth-child(6),
.tracking-table td:nth-child(6),
.tracking-table th:nth-child(7),
.tracking-table td:nth-child(7) {
    width: 12%;
}

.tracking-table th:nth-child(8),
.tracking-table td:nth-child(8) {
    width: 26%;
}

.tracking-table th:nth-child(1),
.tracking-table td:nth-child(1),
.tracking-table th:nth-child(6),
.tracking-table td:nth-child(6) {
    white-space: nowrap;
}

.tracking-table .tracking-notes-cell {
    white-space: normal;
    line-height: 1.35;
}

@media (max-width: 1200px) {
    .tracking-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .tracking-summary-grid {
        grid-template-columns: 1fr;
    }
}

.calendar-container {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    border-radius: 8px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    /* auto-fill이 자동으로 처리하므로 별도 설정 불필요 */
}

@media (max-width: 768px) {
    .sidebar {
        width: 180px; /* slightly reduced for tablet breakpoint to match default reduction */
    }
    
    .main-content {
        margin-left: 220px;
        flex: 1;
        /* add bottom padding so page footer does not overlap main content */
        padding: 16px 30px 180px 30px;
        overflow-y: auto;
        height: 100vh;
    }
}

@media (max-width: 576px) {
    .sidebar {
        width: 60px;
    }
    
    .sidebar-header h2,
    .sidebar-header p,
    .nav-text,
    .user-details {
        display: none;
    }
    
    .nav-icon {
        margin-right: 0;
    }
    
    .main-content {
        margin-left: 60px;
        padding: 15px;
    }

    /* 입력 필드 힌트 텍스트 */
    /* Fix: ensure nav dividers do not show list markers (bullets) */
    body.dashboard-body .sidebar-nav .nav-divider,
    .sidebar-nav .nav-divider,
    .nav-divider {
        list-style: none !important;
        list-style-type: none !important;
        margin: 12px 0 !important;
        padding: 0 !important;
        width: 100% !important;
        height: 1px !important;
        background: rgba(255,255,255,0.06) !important;
        box-sizing: border-box !important;
    }

    /* Some browsers show marker; explicitly hide it */
    .nav-divider::marker,
    .sidebar-nav .nav-divider::marker,
    li.nav-divider::marker {
        display: none !important;
        content: none !important;
    }

    /* Defensive: ensure empty li doesn't reserve line-height or show padding */
    .nav-divider { line-height: 0 !important; min-height: 0 !important; }

    /* 암호 입력 필드 래퍼 */
    .password-input-wrapper {
        position: relative;
        display: flex;
        align-items: center;
    }

    .password-input-wrapper input {
        flex: 1;
        padding-right: 40px;
    }

    /* 암호 표시/숨김 토글 버튼 */
    .password-toggle-btn {
        position: absolute;
        right: 12px;
        background: none;
        border: none;
        cursor: pointer;
        font-size: 16px;
        padding: 4px 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #6b7280;
        transition: color 0.2s ease;
    }

    .password-toggle-btn:hover {
        color: #1f2937;
    }

    .password-toggle-btn.visible {
        color: #667eea;
    }

    .toggle-icon {
        display: inline-block;
    }

    /* 주소 입력 래퍼 */
    .address-input-wrapper {
        position: relative;
    }

    /* 주소 자동완성 제안 */
    .address-suggestions {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border: 1px solid #e5e7eb;
        border-top: none;
        border-radius: 0 0 8px 8px;
        max-height: 300px;
        overflow-y: auto;
        z-index: 1000;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .suggestion-item {
        padding: 12px 15px;
        cursor: pointer;
        border-bottom: 1px solid #f3f4f6;
        transition: background-color 0.2s ease;
    }

    .suggestion-item:last-child {
        border-bottom: none;
    }

    .suggestion-item:hover {
        background-color: #f9fafb;
    }

    .suggestion-item strong {
        display: block;
        color: #1f2937;
        margin-bottom: 4px;
    }

    .suggestion-item small {
        color: #6b7280;
        font-size: 12px;
    }

    /* Badge 스타일 */
    .badge {
        display: inline-block;
        padding: 4px 12px;
        border-radius: 20px;
        font-size: 12px;
        font-weight: 600;
    }

    .badge-low {
        background: #dbeafe;
        color: #0c4a6e;
    }

    .badge-medium {
        background: #fef08a;
        color: #7c2d12;
    }

    .badge-high {
        background: #fee2e2;
        color: #7f1d1d;
    }

    .badge-urgent {
        background: #fecaca;
        color: #7f1d1d;
        animation: pulse 2s infinite;
    }

    .badge-pending {
        background: #f3f4f6;
        color: #6b7280;
    }

    .badge-in-progress {
        background: #c7d2fe;
        color: #3730a3;
    }

    .badge-completed {
        background: #dcfce7;
        color: #15803d;
    }

    @keyframes pulse {
        0%, 100% { opacity: 1; }
        50% { opacity: 0.8; }
    }

    /* ================================================================= */
    /* 🆕 Calendar Fullwidth Trigger - 모든 date 필드에 적용 */
    /* ================================================================= */

    /* 🔹 Fullwidth trigger 컨테이너 */
    .fullwidth-trigger {
        position: relative;
        width: 100%;
    }

    /* 🔹 date input 필드 - fullwidth로 확장 */
    .fullwidth-trigger input[type="date"] {
        width: 100%;
        padding: 10px 12px;
        border: 1px solid #d1d5db;
        border-radius: 8px;
        font-size: 14px;
        font-family: inherit;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    /* 🔹 date input focus 상태 */
    .fullwidth-trigger input[type="date"]:focus {
        outline: none;
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        background-color: #f9fafb;
    }

    /* 🔹 date input hover 상태 */
    .fullwidth-trigger input[type="date"]:hover {
        border-color: #9ca3af;
        background-color: #fafbfc;
    }

    /* 🔹 date input valid 상태 */
    .fullwidth-trigger input[type="date"]:valid {
        color: #1f2937;
    }

    /* 🔹 date input placeholder 스타일 */
    .fullwidth-trigger input[type="date"]::placeholder {
        color: #9ca3af;
    }

    /* 🔹 모바일 환경에서 date picker 크기 조정 */
    @media (max-width: 768px) {
        .fullwidth-trigger input[type="date"] {
            font-size: 16px;  /* 모바일에서 확대되지 않도록 16px 유지 */
            padding: 12px;
        }
    }

    /* ================================================================= */
    /* 📅 Korus Date Picker - 아이콘 포함 공통 날짜 입력 컴포넌트      */
    /* calendar.js 와 연동 / 시스템 전체 date input에 자동 적용        */
    /* ================================================================= */

    /* 래퍼: relative 포지셔닝 기준 */
    .korus-date-wrapper {
        position: relative;
        display: inline-flex;
        align-items: center;
    }

    /* 전체 너비 모드 (fullwidth 레이아웃) */
    .korus-date-wrapper.korus-date-fullwidth {
        width: 100%;
        display: flex;
    }

    /* 달력 아이콘 - input 왼쪽 패딩 영역에 절대 위치 */
    .korus-date-icon {
        position: absolute;
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 2;
        color: #9ca3af;
        font-size: 13px;
        cursor: pointer;
        line-height: 1;
        display: flex;
        align-items: center;
        pointer-events: auto;
        transition: color 0.2s ease;
        user-select: none;
    }

    .korus-date-icon:hover {
        color: #667eea;
    }

    /* Input 자체 - 아이콘 공간(32px) 왼쪽 패딩 확보 */
    /* (calendar.js에서 inline style로도 설정하므로 CSS는 기본값 제공) */
    .korus-date-input {
        padding-left: 32px;
    }

    /* fullwidth 모드에서 input이 남은 공간 모두 차지 */
    .korus-date-fullwidth .korus-date-input {
        width: 100%;
        flex: 1;
    }

    /* focus 상태 - border 강조 */
    .korus-date-wrapper:focus-within .korus-date-icon {
        color: #667eea;
    }

    /* 모바일 환경 */
    @media (max-width: 768px) {
        .korus-date-icon {
            font-size: 14px;
            left: 9px;
        }
        .korus-date-input {
            padding-left: 30px;
        }
    }

    /* ✨ Job Pool 스타일 (Job Pool Styles) */

    .timeframe-filters {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
    }

    .filter-btn {
        padding: 8px 16px;
        border: 1px solid #e5e7eb;
        background: white;
        border-radius: 6px;
        cursor: pointer;
        font-size: 14px;
        font-weight: 500;
        transition: all 0.3s ease;
        color: #6b7280;
    }

    .filter-btn:hover {
        border-color: #667eea;
        color: #667eea;
        background: #f3f4f6;
    }

    .filter-btn.active {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border-color: transparent;
    }

    .job-pool-container {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 20px;
    }

    .job-card {
        background: white;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        overflow: hidden;
        transition: box-shadow 0.3s ease, transform 0.3s ease, border-left-color 0.3s ease;
        border-left: 4px solid #3b82f6;
    }

    .job-card:hover {
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
        transform: translateY(-4px);
    }

    .job-card.status-pending {
        border-left-color: #f59e0b;
    }

    .job-card.status-in-progress {
        border-left-color: #3b82f6;
    }

    .job-card.status-completed {
        border-left-color: #10b981;
    }

    .job-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 16px;
        background: #f9fafb;
        border-bottom: 1px solid #e5e7eb;
    }

    .job-status-badge {
        padding: 4px 12px;
        border-radius: 20px;
        font-size: 12px;
        font-weight: 600;
        text-transform: uppercase;
    }

    .job-status-badge.status-pending {
        background: #fef3c7;
        color: #92400e;
    }

    .job-status-badge.status-in-progress {
        background: #dbeafe;
        color: #1e40af;
    }

    .job-status-badge.status-completed {
        background: #d1fae5;
        color: #065f46;
    }

    .job-priority-badge {
        padding: 4px 12px;
        border-radius: 20px;
        font-size: 12px;
        font-weight: 600;
    }

    .job-priority-badge.priority-high {
        background: #fee2e2;
        color: #991b1b;
    }

    .job-priority-badge.priority-medium {
        background: #fef08a;
        color: #854d0e;
    }

    .job-priority-badge.priority-low {
        background: #d1fae5;
        color: #065f46;
    }

    .job-card-body {
        padding: 16px;
    }

    .job-customer {
        margin-bottom: 12px;
    }

    .job-name {
        font-size: 16px;
        font-weight: 700;
        color: #1f2937;
        margin-bottom: 4px;
    }

    .job-service {
        font-size: 13px;
        color: #6b7280;
        font-weight: 500;
    }

    .job-details {
        font-size: 13px;
        color: #6b7280;
    }

    .job-address {
        margin-bottom: 6px;
        word-break: break-word;
    }

    .job-time {
        color: #667eea;
        font-weight: 600;
    }

    .job-card-footer {
        display: flex;
        gap: 8px;
        padding: 12px 16px;
        background: #f9fafb;
        border-top: 1px solid #e5e7eb;
    }

    .btn-small {
        flex: 1;
        padding: 8px 12px;
        border: none;
        border-radius: 6px;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .btn-small.btn-primary {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
    }

    .btn-small.btn-primary:hover {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    }

    .btn-small.btn-secondary {
        background: white;
        color: #667eea;
        border: 1px solid #667eea;
    }

    .btn-small.btn-secondary:hover {
        background: #f3f4f6;
    }

    .empty-state {
        text-align: center;
        padding: 40px 20px;
        color: #9ca3af;
        font-size: 16px;
    }

    /* ✨ Scheduler 스타일 (Scheduler Styles) */

    .scheduler-controls {
        display: flex;
        gap: 10px;
        align-items: center;
        flex-wrap: wrap;
    }

    .scheduler-controls input[type="date"],
    .scheduler-controls select {
        padding: 8px 12px;
        border: 1px solid #e5e7eb;
        border-radius: 6px;
        font-size: 14px;
    }

    .scheduler-controls input[type="date"]:focus,
    .scheduler-controls select:focus {
        outline: none;
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }

    .scheduler-container {
        overflow-x: auto;
        margin-bottom: 30px;
    }

    .scheduler-grid {
        display: grid;
        grid-template-columns: 150px repeat(10, 1fr);
        gap: 1px;
        background: #e5e7eb;
        padding: 1px;
        border-radius: 8px;
        min-width: 100%;
    }

    .scheduler-header {
        display: contents;
    }

    .scheduler-header > * {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        padding: 12px 8px;
        font-weight: 600;
        font-size: 13px;
        text-align: center;
        min-height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .tech-name-col {
        grid-column: 1 / 2;
    }

    .time-slot-header {
        grid-column: auto;
    }

    .scheduler-row {
        display: contents;
    }

    .tech-name-cell {
        background: #f3f4f6;
        padding: 12px 8px;
        font-weight: 600;
        font-size: 13px;
        border-right: 1px solid #e5e7eb;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 80px;
    }

    .time-slot-cell {
        background: white;
        padding: 8px;
        min-height: 80px;
        border: 1px solid #e5e7eb;
        cursor: pointer;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .time-slot-cell.empty:hover {
        background: #f9fafb;
    }

    .time-slot-cell.job-assigned {
        cursor: pointer;
        padding: 4px;
    }

    .time-slot-cell.job-assigned.status-pending {
        background: #fef3c7;
    }

    .time-slot-cell.job-assigned.status-in-progress {
        background: #dbeafe;
    }

    .time-slot-cell.job-assigned.status-completed {
        background: #d1fae5;
    }

    .time-slot-cell.job-assigned:hover {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        z-index: 10;
    }

    .job-slot-info {
        text-align: center;
        font-size: 11px;
    }

    .slot-customer {
        font-weight: 600;
        color: #1f2937;
        margin-bottom: 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .slot-service {
        color: #6b7280;
        font-size: 10px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .scheduler-map {
        margin-top: 30px;
        padding-top: 30px;
        border-top: 1px solid #e5e7eb;
    }

    /* ✨ 로그아웃 모달 스타일 (Logout Modal Styles) */

    .modal {
        display: none !important;
        position: fixed;
        inset: 0;
        z-index: 99999;
    }

    /* When shown, center content and enable overlay blur */
    .modal.show {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    /* overlay covers viewport and applies blur to background */
    .modal-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.28);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        cursor: pointer;
        z-index: 100000;
    }

    .modal-content {
        position: relative;
        background: white;
        border-radius: 16px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
        z-index: 100000;
        max-width: 520px;
        width: 92%;
        animation: popIn 0.28s cubic-bezier(.2,.9,.3,1);
    }

    @keyframes popIn {
        from { opacity: 0; transform: translateY(16px) scale(0.98); }
        to { opacity: 1; transform: translateY(0) scale(1); }
    }

    /* prevent body scroll while modal open */
    body.modal-open {
        overflow: hidden !important;
    }

    .modal-header {
        padding: 20px 24px;
        border-bottom: 1px solid #e5e7eb;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border-radius: 16px 16px 0 0;
    }

    .modal-header h2 {
        font-size: 20px;
        margin: 0;
        font-weight: 700;
    }

    .logout-modal-content {
        min-width: 400px;
    }

    .modal-body {
        padding: 24px;
        text-align: center;
    }

    .modal-body p {
        font-size: 16px;
        color: #1f2937;
        margin: 0 0 12px 0;
    }

    .modal-subtext {
        font-size: 14px;
        color: #6b7280;
        font-weight: 400 !important;
    }

    .modal-footer {
        display: flex;
        gap: 12px;
        padding: 16px 24px;
        border-top: 1px solid #e5e7eb;
        background: #f9fafb;
        border-radius: 0 0 16px 16px;
        justify-content: flex-end;
    }

    .btn-modal {
        padding: 10px 20px;
        border: none;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        min-width: 100px;
    }

    .btn-modal.btn-cancel {
        background: white;
        color: #6b7280;
        border: 1px solid #d1d5db;
    }

    .btn-modal.btn-cancel:hover {
        background: #f3f4f6;
        border-color: #9ca3af;
    }

    .btn-modal.btn-confirm {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
    }

    .btn-modal.btn-confirm:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
    }

    /* Strong override: ensure no list marker or pseudo-element shows for nav-divider */
    .sidebar-nav > ul > li.nav-divider,
    .sidebar-nav ul li.nav-divider,
    ul > li.nav-divider,
    li.nav-divider {
        list-style: none !important;
        list-style-image: none !important;
        list-style-type: none !important;
        margin: 12px 0 !important;
        padding: 0 !important;
        width: 100% !important;
        height: 1px !important;
        background: rgba(255,255,255,0.06) !important;
        box-sizing: border-box !important;
        line-height: 0 !important;
        min-height: 0 !important;
    }

    /* Fallbacks: hide markers and any pseudo-elements that could render a dot */
    .sidebar-nav > ul > li.nav-divider::marker,
    .sidebar-nav ul li.nav-divider::marker,
    ul > li.nav-divider::marker,
    li.nav-divider::marker,
    li.nav-divider::before,
    li.nav-divider::after {
        display: none !important;
        visibility: hidden !important;
        content: none !important;
        font-size: 0 !important;
        width: 0 !important;
        height: 0 !important;
    }

    /* ===== Login banner spacing overrides =====
    Ensure login and agent login pages sit just below the top banner with
    a small gap. These rules intentionally live at the end to override
    earlier page-specific declarations. */
    body.login-page,
    body.agent-page {
        /* make sure content starts below the fixed banner */
        padding-top: calc(var(--top-banner-height) + 8px) !important;
        /* place the login card near the top area rather than perfectly centered */
        display: flex !important;
        align-items: flex-start !important;
        justify-content: center !important;
    }

    .login-container,
    .agent-login-container {
        /* small top margin so the card doesn't touch the banner */
        margin-top: 6px !important;
    }

    /* reduce the footer fade intensity on very short viewports */
    @media (max-height: 680px) {
        body.login-page::after {
            height: calc(var(--page-footer-height) - 6px);
            background: linear-gradient(to top, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.4) 30%, rgba(255,255,255,0.0) 100%);
        }
    }

    /* Small override: reduce top padding specifically on login pages so the
    centered card doesn't visually sit too low. This keeps the gradient and
    footer fade behavior intact while tightening the top gap. */
    body.login-page,
    body.agent-page {
        padding-top: 20px !important;
    }

    /* Scheduler Section - Full Height Without Scrollbar */
    #section-scheduler {
        position: relative;
        height: 100vh !important;
        overflow: hidden !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Remove page scrollbar */
    body.dashboard-body {
        overflow: hidden !important;
        padding: 0 !important;
        margin: 0 !important;
        height: 100vh;
        min-height: unset;
    }

    /* Job card tooltip styling */
    .job-info-tooltip {
        position: fixed;
        pointer-events: none;
        padding: 6px 10px;
        background: rgba(0,0,0,0.85);
        color: #fff;
        border-radius: 6px;
        font-size: 12px;
        z-index: 3000;
    }

    /* ========================================
    ACCOUNT SECTION STYLES
    ======================================== */

    /* API Key card wrapper */
    .api-key-card {
        margin-top: 20px;
        background: white;
        border-radius: 12px;
        padding: 20px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    /* API Key Section Container */
    .api-key-section {
        display: flex;
        flex-direction: column;
        gap: 24px;
    }

    /* API Key Display Section */
    .api-key-display-section {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    /* API Key label styling */
    .api-key-label {
        font-weight: 600;
        color: #374151;
        display: block;
        margin-bottom: 8px;
        font-size: 14px;
        letter-spacing: 0.02em;
    }

    /* API Key display container (flex layout) */
    .api-key-display {
        display: flex;
        align-items: center;
        gap: 0;
        margin-bottom: 0;
    }

    /* API Key value (monospace, colored span) */
    .api-key-value {
        flex: 1;
        padding: 12px 16px;
        background: #f3f4f6;
        border-radius: 8px 0 0 8px;
        font-family: 'Courier New', monospace;
        word-break: break-all;
        color: #667eea;
        font-weight: 600;
        font-size: 13px;
        line-height: 1.5;
        border: 1px solid #e5e7eb;
        border-right: none;
    }

    /* API Key Actions Container */
    .api-key-actions {
        display: flex;
        gap: 8px;
        align-items: stretch;
    }

    /* API Key buttons (show/copy/hidden) */
    .api-key-button {
        white-space: nowrap;
        padding: 12px 16px;
        border: 1px solid #d1d5db;
        background: white;
        border-radius: 0 8px 8px 0;
        cursor: pointer;
        font-size: 13px;
        font-weight: 600;
        color: #667eea;
        transition: all 0.2s ease;
        border-left: none;
    }

    .api-key-button:first-of-type {
        border-radius: 0;
        border-left: 1px solid #d1d5db;
    }

    .api-key-button:last-of-type {
        border-radius: 0 8px 8px 0;
    }

    .api-key-button:hover {
        background: #f3f4f6;
        border-color: #667eea;
        color: #5568d3;
    }

    .api-key-button.hidden {
        display: none;
    }

    /* Helper text / form hint */
    .form-helper-text {
        display: block;
        margin-top: 12px;
        color: #6b7280;
        font-size: 12px;
        line-height: 1.6;
        padding-left: 4px;
    }

    /* Section divider (e.g., between API Key and Key Management) */
    .section-divider {
        margin-top: 8px;
        padding-top: 24px;
        border-top: 2px solid #e5e7eb;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    /* Key Management Actions Container */
    .key-management-actions {
        display: flex;
        gap: 12px;
        align-items: center;
        margin-bottom: 8px;
        justify-content: flex-start; /* Ensure actions sit under the API key when stacked */
    }

    /* Regenerate/Rotate button styling */
    .regenerate-button {
        padding: 12px 20px;
        background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
        color: white;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        font-size: 14px;
        font-weight: 600;
        transition: all 0.2s ease;
        box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
    }

    .regenerate-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
        background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    }

    /* Small variant of regenerate-button (used for Show / Copy icons)
    Matches the visual style of the larger Regenerate button but
    with compact sizing suitable for inline action buttons. */
    .regenerate-button.small {
        padding: 8px 12px;
        background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
        color: white;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        font-size: 13px;
        font-weight: 600;
        transition: all 0.16s ease;
        box-shadow: 0 1px 3px rgba(245,158,11,0.18);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-width: 44px;
    }

    .regenerate-button.small:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(245,158,11,0.28);
        background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    }

    /* API Key action buttons (Show / Copy) - slightly smaller/tighter than main Regenerate button
    Scoped under .api-key-actions so the main large regenerate button remains unchanged. */
    .api-key-actions .regenerate-button {
        padding: 3px 8px !important;
        height: 28px !important;
        min-height: 28px !important;
        max-height: 28px !important;
        font-size: 13px !important;
        line-height: 22px !important;
        min-width: 40px !important;
        gap: 4px !important;
        display: inline-flex !important;
        align-items: center !important;
    }


    /* API Key management section header */
    .key-management-header {
        font-weight: 600;
        color: #1f2937;
        font-size: 16px;
        margin-bottom: 0;
        letter-spacing: 0.02em;
    }

    /* Card header with action buttons */
    .card-header-action {
        padding: 20px;
        border-bottom: 1px solid #e5e7eb;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* ========================================
    USER MANAGEMENT SECTION STYLES
    ======================================== */

    /* User Management section header */
    .user-management-header {
        height: var(--section-header-height);
        padding: 0 20px;
        border-bottom: 1px solid #e5e7eb;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: white;
        border-radius: 12px 12px 0 0;
    }

    /* User management title */
    .user-management-title {
        font-size: 18px;
        color: #1f2937;
        margin: 0;
        font-weight: 600;
    }

    /* User table styling */
    .user-table {
        width: 100%;
        border-collapse: collapse;
    }

    .user-table thead {
        background: #f9fafb;
    }

    .user-table th {
        padding: 12px;
        text-align: left;
        font-size: 13px;
        font-weight: 600;
        color: #6b7280;
        border-bottom: 2px solid #e5e7eb;
    }

    .user-table td {
        padding: 12px;
        font-size: 14px;
        color: #1f2937;
        border-bottom: 1px solid #e5e7eb;
    }

    .user-table tbody tr:hover {
        background: #f9fafb;
    }

    /* ========================================
    PROFILE SECTION STYLES
    ======================================== */

    /* Form section title (h3 in profile) */
    .form-section-title {
        font-size: 16px;
        color: #1f2937;
        margin-bottom: 15px;
        margin-top: 0;
        font-weight: 600;
    }

    /* Profile image section container */
    .profile-image-section {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin-bottom: 24px;
    }

    /* Profile image styling */
    .profile-image {
        width: 140px;
        height: 140px;
        border-radius: 50%;
        border: 4px solid white;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        object-fit: cover;
        margin-bottom: 16px;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .profile-image:hover {
        border-color: #667eea;
        box-shadow: 0 8px 24px rgba(102, 126, 234, 0.25);
        transform: scale(1.02);
    }

    /* File input label styling */
    .file-input-label {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 8px 20px;
        background: white;
        border: 1px solid #d1d5db;
        border-radius: 20px;
        font-size: 13px;
        font-weight: 600;
        color: #374151;
        cursor: pointer;
        transition: all 0.2s ease;
        box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    }

    .file-input-label:hover {
        background: #e5e7eb;
    }

    /* File input (hidden) */
    .file-input {
        display: none;
    }

    /* Profile form group styling */
    .profile-form-group {
        display: flex;
        flex-direction: column;
        gap: 6px;
        margin-bottom: 14px;
    }

    .profile-form-group label {
        display: block;
        font-weight: 600;
        color: #374151;
        font-size: 14px;
    }

    .profile-form-group input,
    .profile-form-group select,
    .profile-form-group textarea {
        width: 100%;
        padding: 12px;
        border: 1px solid #d1d5db;
        border-radius: 6px;
        font-size: 14px;
        font-family: inherit;
    }

    .profile-form-group input:focus,
    .profile-form-group select:focus,
    .profile-form-group textarea:focus {
        outline: none;
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.password-complexity-hint {
    display: block;
    margin-top: 8px;
    color: #6b7280;
    font-style: italic;
}

.modal-subtext {
    margin-top: 8px;
}

/* Dashboard Refactoring Classes */
.company-marquee-wrapper {
    margin-top: 8px;
}

.nav-divider-custom {
    list-style: none !important;
    list-style-type: none !important;
    list-style-image: none !important;
    margin: 12px 0 !important;
    padding: 0 !important;
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    box-sizing: border-box;
}

.form-section-title {
    font-size: 16px;
    color: #1f2937;
    margin-bottom: 15px;
}

.form-section-spacing {
    margin-top: 20px;
}

.flex-column-gap-10 {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ===== API Key Management Grid Layout ===== */
.api-key-grid {
    display: grid;
    /* Stack vertically to avoid layout break when API key is long */
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: start;
}

.api-key-display-section {
    padding: 0;
}

.api-key-management-section {
    padding: 0;
}

@media (min-width: 769px) {
    /* On wider screens keep stacked layout but allow management actions to align to the right visually
       by using auto margin on the actions container if needed. This prevents wrapping issues. */
    .api-key-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* ===== Profile Image Styling ===== */
.profile-image {
    border-radius: 50%;
    width: 180px;
    height: 180px;
    object-fit: cover;
    display: block;
    margin: 0 auto;
    border: 3px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-image:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* ===== Profile Image Form Group (Container) ===== */
.profile-image-form-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

/* Hide the default file input */
input[type="file"].file-input,
.file-input {
    display: none !important;
}

/* Style the custom upload button */
.upload-photo-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.upload-photo-label:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.6);
    transform: translateY(-2px);
}

/* File input label styles for custom appearance - Profile Image Upload Button */
label[for*="profileImage"],
label[for*="profilePhoto"],
label[for*="fileInput"],
.profile-image-container .file-input-label {
    display: block;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    width: fit-content;
    margin: 15px auto 0;
    text-align: center;
}

label[for*="profileImage"]:hover,
label[for*="profilePhoto"]:hover,
label[for*="fileInput"]:hover,
.profile-image-container .file-input-label:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

/* ===== Profile Image Container Layout ===== */
.profile-image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin: 0 auto;
}

.profile-image {
    border-radius: 50%;
    width: 180px;
    height: 180px;
    object-fit: cover;
    border: 3px solid #e5e7eb;
}

/* ===== Save Progress Bar Styles (프로필 저장 프로그래스) ===== */

/* 프로그래스 바 오버레이 (화면 중앙) */
.save-progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 프로그래스 컨테이너 (중앙) */
.save-progress-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 프로그래스 콘텐츠 (흰색 박스) */
.save-progress-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

/* 프로그래스 제목 */
.save-progress-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1.5rem;
    margin-top: 0;
}

/* 프로그래스 바 래퍼 (배경) */
.save-progress-bar-wrapper {
    background-color: #e5e7eb;
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
}

/* 프로그래스 바 (진행 상태) */
.save-progress-bar {
    width: 100%;
    height: 100%;
    background-color: #fff;
    position: relative;
    overflow: hidden;
}

/* 프로그래스 바 채우기 (움직이는 효과) */
.save-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    background-size: 200% 100%;
    animation: progressAnimation 1.5s ease-in-out infinite;
    border-radius: 10px;
    width: 0%;
}

/* 프로그래스 애니메이션 */
@keyframes progressAnimation {
    0% {
        width: 0%;
        background-position: 0% 0%;
    }
    50% {
        width: 100%;
        background-position: 100% 0%;
    }
    100% {
        width: 100%;
        background-position: 100% 0%;
    }
}

/* 프로그래스 텍스트 */
.save-progress-text {
    color: #6b7280;
    font-size: 0.95rem;
    margin: 0;
}

/* ===============================================
   CAPTCHA 슬라이드 퍼즐 스타일
   =============================================== */

/* CAPTCHA 섹션 */
.captcha-section {
    /* 모든 카드 스타일 제거 - 퍼즐만 보이게 */
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
    /* 간격을 최소화하여 Remember Me와 캡차 슬라이더 사이 여백 축소 */
    margin-top: 0; /* 카드와 슬라이더가 바로 붙도록 함 */
    box-shadow: none;
}

.captcha-section h2 {
    color: #0066cc;
    font-size: 20px;
    margin-bottom: 10px;
    font-weight: 700;
}

.captcha-instruction {
    color: #555;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.6;
    font-weight: 500;
}

/* CAPTCHA 컨테이너 */
.captcha-container {
    /* 모든 카드 스타일 제거 */
    background: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    /* 캡차 전체 컨테이너의 최대 너비를 슬라이더와 같게 고정하고 중앙 정렬
       -> 진행 바가 슬라이더 폭과 동일해지도록 함 */
    max-width: 320px;
    margin: 0 auto;
}

/* 배경 이미지 컨테이너 */
.captcha-bg-container {
    position: relative;
    /* 부모인 .captcha-container의 max-width를 사용하여 반응형 유지 */
    width: 100%;
    height: 50px; /* 원래 크기로 복원 */
    margin: 0 auto;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    overflow: hidden;
    cursor: grab;
    user-select: none;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
    transition: box-shadow 0.3s ease;
}

.captcha-bg-container:hover {
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.captcha-bg-container:active {
    cursor: grabbing;
}

.captcha-bg {
    width: 100%;
    height: 100%;
    display: block;
    user-select: none;
    pointer-events: none;
}

/* 슬라이드 이미지 */
.slider-container {
    position: absolute;
    left: 0;
    top: 0;
    width: 50px;
    height: 50px;
    cursor: grab;
    transition: transform 0.2s;
    z-index: 10;
}

.slider-container:hover {
    transform: scale(1.1);
}

.slider-container:focus {
    outline: none;
}

.slider-container.active {
    cursor: grabbing;
}

/* ✨ 실시간 피드백: 정답 위치 근접 시 녹색 테두리 강조 */
.slider-container.near-target {
    border: 3px solid #28a745;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(40, 167, 69, 0.8),
                0 0 40px rgba(40, 167, 69, 0.6);
    animation: pulse-green 0.8s ease-in-out infinite;
}

/* ✨ 실시간 피드백: 과녁(배경) 강조 효과 */
.captcha-bg-container.target-glow {
    border-color: #28a745;
    box-shadow: 0 0 25px rgba(40, 167, 69, 0.6),
                inset 0 0 15px rgba(40, 167, 69, 0.3);
}

/* 녹색 펄스 애니메이션 */
@keyframes pulse-green {
    0%, 100% {
        transform: scale(1.1);
        box-shadow: 0 0 20px rgba(40, 167, 69, 0.8),
                    0 0 40px rgba(40, 167, 69, 0.6);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 0 30px rgba(40, 167, 69, 1),
                    0 0 50px rgba(40, 167, 69, 0.8);
    }
}

.slider-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
}

/* 진행 바 */
.progress-bar {
    /* 진행바를 캡차 슬라이더 바로 아래에 붙이고 슬라이더 폭과 동일하게 맞춤 */
    width: 100%;
    height: 4px; /* 더 얇게 변경 */
    background: linear-gradient(to right, #e0e0e0, #f0f0f0);
    border-radius: 6px; /* 더 둥글게 */
    /* 간격 제거: 캡차 박스 바로 아래에 붙음 */
    margin-top: 0;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    /* 부드러운 증가 애니메이션, 더 둥근 모서리 */
    transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    width: 0%;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.45);
    border-radius: 6px;
}

/* 재시도 정보 */
.retry-info {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe5a0 100%);
    border: 2px solid #ffc107;
    border-radius: 6px;
    padding: 12px 15px;
    margin-top: 15px;
    color: #856404;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 2px 6px rgba(255, 193, 7, 0.2);
}

.retry-info p {
    margin: 0;
}

/* CAPTCHA 상태 메시지 */
.captcha-status {
    background: #e7f3ff;
    border: 2px solid #2196F3;
    border-radius: 6px;
    padding: 12px 15px;
    margin-top: 15px;
    color: #0d47a1;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 2px 6px rgba(33, 150, 243, 0.2);
}

.captcha-status.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-color: #28a745;
    color: #155724;
}

.captcha-status.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-color: #dc3545;
    color: #721c24;
}

.captcha-status p {
    margin: 0;
}

/* 로딩 스피너 */
.loading-spinner {
    text-align: center;
    padding: 20px;
    display: none;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0066cc;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .captcha-bg-container {
        width: 280px;
        height: 140px;
    }
    
    .slider-container {
        width: 45px;
        height: 140px;
    }
}

@media (max-width: 480px) {
    .captcha-bg-container {
        width: 100%;
        max-width: 280px;
        height: 140px;
    }
    
    .slider-container {
        width: 40px;
        height: 140px;
    }
    
    .captcha-section {
        padding: 15px;
    }
}

.material-symbols-outlined { 
    font-family: 'Material Symbols Outlined'; 
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; 
    font-size: 20px; 
    vertical-align: middle; 
    display: inline-block; 
}  
/* Select2 Custom Styling for User State Dropdown */ 

/* ================================
   Dashboard.html Inline Styles
   (Migrated from dashboard.html)
   ================================ */

/* Select2 드롭다운 폰트 사이즈를 다른 필터와 동일하게 조정 */
.select2-container--default .select2-selection--single {
    height: 38px !important; /* Bootstrap form-control 높이와 동일 */
    padding: 6px 12px !important;
    font-size: 14px !important; /* 다른 필터와 동일한 폰트 사이즈 */
    line-height: 1.5 !important;
    border: 1px solid #ced4da !important;
    border-radius: 4px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 24px !important;
    padding-left: 0 !important;
    font-size: 14px !important;
    color: #495057 !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px !important;
}

/* 드롭다운 옵션 폰트 사이즈 */
.select2-results__option {
    font-size: 14px !important;
    padding: 6px 12px !important;
}

/* 검색 입력 필드 폰트 사이즈 */
.select2-search--dropdown .select2-search__field {
    font-size: 14px !important;
    padding: 6px 12px !important;
}

/* Placeholder 폰트 사이즈 */
.select2-container--default .select2-selection--single .select2-selection__placeholder {
    font-size: 14px !important;
    color: #6c757d !important;
}

/* ============================================
   User Management Styles
   ============================================ */

/* Table sorting */
th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 18px;
    transition: background-color 0.2s ease;
}

th.sortable:hover {
    background-color: #f3f4f6;
}

th.sortable::after {
    content: '\2195';
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: #94a3b8;
}

th.sortable.sort-asc::after {
    content: '\2191';
    color: #2563eb;
}

th.sortable.sort-desc::after {
    content: '\2193';
    color: #2563eb;
}

#branchTable th.sortable {
    padding-right: 18px;
}

#branchTable th.sortable::after {
    content: '\2195';
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: #94a3b8;
}

#branchTable th.sortable.sort-asc::after {
    content: '\2191';
    color: #2563eb;
}

#branchTable th.sortable.sort-desc::after {
    content: '\2193';
    color: #2563eb;
}

#usersTable th.sortable {
    padding-right: 18px;
}

#usersTable th.sortable::after {
    content: '\2195';
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: #94a3b8;
}

#usersTable th.sortable.sort-asc::after {
    content: '\2191';
    color: #2563eb;
}

#usersTable th.sortable.sort-desc::after {
    content: '\2193';
    color: #2563eb;
}

/* Section header (Branch Management style) */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background-color: #f9fafb;
}

.header-left {
    flex: 1;
}

.section-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

.section-title .icon {
    margin-right: 0.5rem;
}

.section-subtitle {
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.header-right {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Button styles */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background-color: #2563eb;
}

.btn-success {
    background-color: #10b981;
    color: white;
}

.btn-success:hover {
    background-color: #059669;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.btn-info {
    background-color: #06b6d4;
    color: white;
}

.btn-info:hover {
    background-color: #0891b2;
}

.btn-danger {
    background-color: #ef4444;
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

/* Badge styles */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
}

.badge-primary { background-color: #dbeafe; color: #1e40af; }
.badge-success { background-color: #d1fae5; color: #065f46; }
.badge-warning { background-color: #fef3c7; color: #92400e; }
.badge-danger { background-color: #fee2e2; color: #991b1b; }
.badge-info { background-color: #cffafe; color: #155e75; }
.badge-secondary { background-color: #e5e7eb; color: #374151; }
.badge-dark { background-color: #374151; color: #f9fafb; }

/* ========================================= */
/* 주소 검증 모달 스타일 (Address Validation Modal Styles) */
/* ========================================= */

/* 모달 오버레이 (Modal Overlay) */
.address-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 모달 컨테이너 (Modal Container) */
.address-modal-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.address-modal-container.small {
    max-width: 450px;
}

@keyframes slideUp {
    from {
        transform: translateY(50px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* 모달 헤더 (Modal Header) */
.address-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
    border-radius: 20px 20px 0 0;
}

.address-modal-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 15px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32px;
    background: rgba(255, 255, 255, 0.2);
}

.address-modal-icon.warning {
    background: #fbbf24;
}

.address-modal-icon.error {
    background: #ef4444;
}

.address-modal-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 5px;
}

.address-modal-subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

/* 모달 바디 (Modal Body) */
.address-modal-body {
    padding: 30px;
}

/* 주소 비교 박스 (Address Comparison Box) */
.address-comparison {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.address-box {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px;
    background: #f9fafb;
    transition: all 0.3s ease;
}

.address-box.entered {
    border-color: #fbbf24;
    background: #fffbeb;
}

.address-box.google {
    border-color: #10b981;
    background: #ecfdf5;
}

.address-box-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #374151;
    margin-bottom: 10px;
}

.address-box.entered .address-box-header {
    color: #92400e;
}

.address-box.google .address-box-header {
    color: #065f46;
}

.address-box-content {
    font-size: 15px;
    line-height: 1.6;
    color: #1f2937;
    white-space: pre-line;
}

/* 화살표 (Arrow) */
.address-arrow {
    text-align: center;
    font-size: 28px;
    color: #667eea;
    margin: 5px 0;
}

/* 질문 섹션 (Question Section) */
.address-modal-question {
    margin-top: 25px;
    padding: 15px;
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.address-modal-question i {
    font-size: 24px;
    color: #3b82f6;
    flex-shrink: 0;
}

.address-modal-question p {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    color: #1e40af;
}

/* 에러 메시지 (Error Message) */
.error-message {
    text-align: center;
    color: #ef4444;
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

/* 모달 푸터 (Modal Footer) */
.address-modal-footer {
    padding: 20px 30px;
    background: #f9fafb;
    display: flex;
    gap: 12px;
    justify-content: center;
}

.address-modal-footer.single {
    justify-content: center;
}

.address-modal-btn {
    flex: 1;
    max-width: 200px;
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.address-modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.address-modal-btn:active {
    transform: translateY(0);
}

.btn-keep {
    background: #6b7280;
    color: white;
}

.btn-keep:hover {
    background: #4b5563;
}

.btn-update {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-update:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.btn-ok {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-ok:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a4190 100%);
}

/* Attribution Footer */
.address-modal-attribution {
    padding: 15px 30px;
    background: #f3f4f6;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.address-modal-attribution small {
    color: #6b7280;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.address-modal-attribution a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.address-modal-attribution a:hover {
    text-decoration: underline;
}

/* 토스트 알림 (Toast Notification) */
.address-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    animation: slideInRight 0.4s ease-in-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.address-toast-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 18px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 320px;
    border-left: 5px solid #10b981;
}

.address-toast-content.success {
    border-left-color: #10b981;
}

.address-toast-content i {
    font-size: 28px;
    color: #10b981;
}

.address-toast-text {
    flex: 1;
}

.address-toast-text strong {
    display: block;
    font-size: 15px;
    color: #1f2937;
    margin-bottom: 2px;
}

.address-toast-text p {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
}

/* 반응형 디자인 (Responsive Design) */
@media (max-width: 768px) {
    .address-modal-container {
        width: 95%;
        max-width: none;
    }
    
    .address-modal-header {
        padding: 25px 20px;
    }
    
    .address-modal-title {
        font-size: 20px;
    }
    
    .address-modal-body {
        padding: 20px;
    }
    
    .address-modal-btn {
        padding: 12px 18px;
        font-size: 14px;
    }
    
    .address-toast {
        right: 10px;
        left: 10px;
    }
    
    .address-toast-content {
        min-width: auto;
    }
}

/* Fix for invisible cursor/text on hover/focus - V3 Text inputs only */
input:hover, textarea:hover,
input:focus, textarea:focus {
    color: #4B0082 !important; /* Very Dark Purple (Indigo) */
    caret-color: #4B0082 !important; /* Cursor Color */
    border-color: #4B0082 !important;
    outline-color: #4B0082 !important;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="3" height="22" viewBox="0 0 3 22"><line x1="1.5" y1="2" x2="1.5" y2="20" stroke="%234B0082" stroke-width="1.5"/><line x1="0" y1="1" x2="3" y2="1" stroke="%234B0082" stroke-width="1"/><line x1="0" y1="21" x2="3" y2="21" stroke="%234B0082" stroke-width="1"/></svg>') 1 11, text !important;
}

/* Select boxes - keep default pointer cursor */
select:hover, select:focus {
    color: #4B0082 !important;
    border-color: #4B0082 !important;
    outline-color: #4B0082 !important;
    cursor: pointer !important; /* Normal arrow cursor for dropdowns */
}

/* Ensure placeholder text is visible */
::placeholder {
    color: #888 !important;
    opacity: 1;
}

/* =============================================================================
   JOB POOL TIMELINE GRID SYSTEM (2026-02-17)
   타임라인 기반 테크니션 스케줄링 그리드
   ============================================================================= */

/* 필터 영역 (Fixed Position) */
.jobpool-filters {
    display: flex;
    gap: 15px;
    align-items: center;
    padding: 15px 20px;
    background: white;
    border-bottom: 2px solid #e5e7eb;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.jobpool-filters .filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.jobpool-filters label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}

.jobpool-filters input[type="date"],
.jobpool-filters select {
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    min-width: 150px;
}

.jobpool-filters .btn-primary,
.jobpool-filters .btn-secondary {
    padding: 6px 16px;
    font-size: 13px;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.jobpool-filters .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.jobpool-filters .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.jobpool-filters .btn-secondary {
    background: #e5e7eb;
    color: #374151;
}

.jobpool-filters .btn-secondary:hover {
    background: #d1d5db;
}

/* 타임라인 그리드 컨테이너 (이중 스크롤 제거: 전체 페이지 스크롤 사용) */
.jobpool-timeline-container {
    position: relative;
    width: 100%;
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    /* overflow 제거: 이중 스크롤 방지 */
    /* max-height 제거: 전체 높이 사용 */
}

/* 로딩 인디케이터 */
.jobpool-timeline-container .loading-spinner {
    text-align: center;
    padding: 100px 20px;
    color: #9ca3af;
    font-size: 14px;
}

/* 타임라인 그리드 (테크니션 중심 수평 레이아웃) */
.timeline-grid {
    display: grid;
    /* 좌측 테크니션 정보(150px) + 15개 시간 단위 타임슬롯 (5AM~8PM = 15시간) */
    grid-template-columns: 150px repeat(15, minmax(50px, 1fr));
    gap: 1px;
    background: #e5e7eb;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: visible;
    max-width: 100%;
    position: relative;
}

/* 헤더 행 */
.timeline-header {
    display: contents;
}

.timeline-header-cell {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 4px;
    font-weight: 600;
    font-size: 11px; /* increased by 1px */
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 45px;
    line-height: 1.2;
    position: sticky;
    top: 140px;  /* 필터 60px + Unassigned Jobs 80px */
    z-index: 95;  /* 필터/Unassigned Jobs 보다 낮은 z-index */
}

.timeline-header-cell.technician-col {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    font-size: 12px; /* increased by 1px */
    font-weight: 700;
    position: sticky;
    left: 0;
    top: 140px;  /* 필터 60px + Unassigned Jobs 80px */
    z-index: 120;  /* 가장 높은 z-index (고정 컨너) */
    padding: 8px 4px;
}

.timeline-header-cell.time-slot {
    min-width: 50px;
    font-size: 10px; /* increased by 1px */
    writing-mode: horizontal-tb;
}

/* 테크니션 정보 셀 (왼쪽 고정) */
.timeline-technician-info {
    background: #f8f9fa;
    padding: 8px 6px;
    border-right: 2px solid #d1d5db;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: sticky;
    left: 0;
    z-index: 50;
}

.timeline-technician-name {
    font-weight: bold;
    font-size: 11px;
    color: #1f2937;
    margin-bottom: 2px;
    line-height: 1.2;
}

.timeline-technician-meta {
    font-size: 9px;
    color: #6c757d;
    line-height: 1.3;
}

.timeline-tech-name {
    padding: 12px 10px;
    font-weight: 600;
    font-size: 13px;
    color: #1f2937;
    display: flex;
    align-items: center;
    border-right: 2px solid #d1d5db;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.timeline-tech-name.unassigned {
    background: #fef3c7;
    color: #92400e;
    font-style: italic;
}

/* 타임 슬롯 셀 (작업 배치 영역) */
.timeline-cell {
    background: white;
    min-height: 60px;
    position: relative;
    border-right: 1px solid #10b981; /* hour separator: solid green */
    transition: background 0.2s;
    cursor: pointer;
    /* ✅ Y-AXIS STACKING: 카드 오버플로우 허용 (가로/세로 확장) */
    overflow: visible;
    /* 4등분 구분선 (15분 단위) - 얇은 점선 녹색 */
    background-image: 
        repeating-linear-gradient(to bottom, #10b981 0 2px, rgba(0,0,0,0) 2px 6px),
        repeating-linear-gradient(to bottom, #10b981 0 2px, rgba(0,0,0,0) 2px 6px),
        repeating-linear-gradient(to bottom, #10b981 0 2px, rgba(0,0,0,0) 2px 6px);
    background-position: 25% 0, 50% 0, 75% 0;
    background-size: 1px 8px, 1px 8px, 1px 8px;
    background-repeat: repeat-y, repeat-y, repeat-y;
    /* 실선으로 시간(열) 경계와 행 경계를 명확하게 표시 */
    border-bottom: 1px solid #c7c7c7; /* 행 경계 - 진한 회색 실선 */
}

/* Grid-level settings: ensure consistent row heights */
#section-jobpool .timeline-grid {
    grid-auto-rows: minmax(60px, auto); /* row height aligns with .timeline-cell min-height */
}

/* Header and left column separators */
#section-jobpool .timeline-header-cell {
    border-bottom: 1px solid #d1d5db; /* header bottom separator */
    border-right: 1px solid #10b981; /* header vertical separators match hour lines */
}

#section-jobpool .timeline-technician-info {
    border-right: 1px solid #d1d5db; /* left fixed column separator (darker) */
    /* use slightly darker tone than header bg for visibility */
    border-bottom: 1px solid #d1d5db;
}

/* 1/4 셀 강조 (마우스 호버) */
.timeline-cell.quarter-cell-0::before,
.timeline-cell.quarter-cell-1::before,
.timeline-cell.quarter-cell-2::before,
.timeline-cell.quarter-cell-3::before {
    content: '';
    position: absolute;
    top: 0;
    height: 100%;
    z-index: 5;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.timeline-cell.quarter-cell-0::before { left: 0; width: 25%; }
.timeline-cell.quarter-cell-1::before { left: 25%; width: 25%; }
.timeline-cell.quarter-cell-2::before { left: 50%; width: 25%; }
.timeline-cell.quarter-cell-3::before { left: 75%; width: 25%; }

/* 출근 시간대 (5-6 AM) */
.timeline-cell[data-hour="5"],
.timeline-cell[data-hour="6"] {
    background-color: #fff3cd;
}

/* 퇴근 시간대 (6-8 PM) */
.timeline-cell[data-hour="18"],
.timeline-cell[data-hour="19"],
.timeline-cell[data-hour="20"] {
    background-color: #cff4fc;
}

.timeline-cell:hover {
    background: #f0f9ff;
}

.timeline-cell.drag-over {
    background: #dbeafe;
    border: 2px dashed #3b82f6;
}

.timeline-cell.droppable {
    background: #dbeafe;
}

/* 잡 카드 (타임라인 내) */
.timeline-job-card {
    position: absolute;
    left: 2px;
    right: 2px;
    background: white;
    border-left: 4px solid #3b82f6;
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 11px;
    cursor: move;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.2s;
    z-index: 10;
}

.timeline-job-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    z-index: 20;
}

.timeline-job-card.dragging {
    opacity: 0.7;
    transform: scale(1.02);
    z-index: 30;
}

/* 잡 타입별 색상 */
.timeline-job-card.type-SERVICE {
    border-left-color: #3b82f6;
    background: linear-gradient(to right, #dbeafe 0%, white 20%);
}

.timeline-job-card.type-DOOR_INSTALL {
    border-left-color: #8b5cf6;
    background: linear-gradient(to right, #ede9fe 0%, white 20%);
}

.timeline-job-card.type-WARRANTY {
    border-left-color: #f59e0b;
    background: linear-gradient(to right, #fef3c7 0%, white 20%);
}

/* 잡 상태별 스타일 */
.timeline-job-card.status-COMPLETED {
    opacity: 0.7;
}

.timeline-job-card.status-CLOSED {
    opacity: 0.5;
}

/* 잡 카드 내용 */
.timeline-job-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    font-weight: 600;
}

.timeline-job-number {
    font-size: 10px;
    color: #6b7280;
}

.timeline-job-type {
    font-size: 9px;
    padding: 2px 6px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.timeline-job-customer {
    font-size: 11px;
    color: #1f2937;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.timeline-job-time {
    font-size: 10px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 리사이즈 핸들 */
.timeline-job-resize-handle {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 8px;
    cursor: ns-resize;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));
    opacity: 0;
    transition: opacity 0.2s;
}

.timeline-job-card:hover .timeline-job-resize-handle {
    opacity: 1;
}

/* Empty State */
.timeline-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #9ca3af;
}

.timeline-empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #6b7280;
}

.timeline-empty-state p {
    font-size: 14px;
}

/* Job \uc0c1\ud0dc\ubcc4 \uceec\ub7ec \ucf54\ub529 (\ud14c\ud06c\ub2c8\uc158 \ud2b9\ud654) */
.job-card {
    border-radius: 6px;
    padding: 8px;
    margin: 0 2px; /* ✅ 상단/하단 마진 제거 (달력 아이콘 행 내 배치) */
    cursor: move;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s;
    position: relative;
}

.job-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* 대기 중 (파랑) - OPEN 상태 */
.job-card.status-open {
    background: linear-gradient(135deg, #0d6efd 0%, #3d8bfd 100%);
    color: white;
}

/* 작업 중 (주황) - IN_PROGRESS/CONFIRMED */
.job-card.status-in_progress,
.job-card.status-confirmed {
    background: linear-gradient(135deg, #fd7e14 0%, #ff922b 100%);
    color: white;
}

/* \uc644\ub8cc (\ucd08\ub85d) */
.job-card.status-completed {
    background: linear-gradient(135deg, #28a745 0%, #34d058 100%);
    color: white;
}

/* \uc774\ub3d9 \uc911 (\ud30c\ub791) */
.job-card.status-traveling {
    background: linear-gradient(135deg, #17a2b8 0%, #20c997 100%);
    color: white;
}

/* \uc9c0\uc5f0 (\ube68\uac15) */
.job-card.status-delayed {
    background: linear-gradient(135deg, #dc3545 0%, #ff4757 100%);
    color: white;
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* \uc774\ub3d9 \uc2dc\uac04 \uc2dc\uac01\ud654 */
.travel-time-indicator {
    background: linear-gradient(90deg, rgba(23,162,184,0.3) 0%, rgba(23,162,184,0.1) 100%);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #17a2b8;
    font-weight: 600;
    border-left: 2px dashed #17a2b8;
    position: relative;
}

.travel-time-indicator::before {
    content: "\ud83d\ude97";
    margin-right: 4px;
}

/* \ud604\uc7ac \uc2dc\uc810 \ub77c\uc778 (Current Time Indicator) */
.current-time-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: #dc3545;
    z-index: 1100; /* ✅ 헤더 위에 표시 (이전: 100) */
    pointer-events: none;
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.5);
}

.current-time-line::before {
    content: "";
    position: absolute;
    top: 0;
    left: -4px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 8px solid #dc3545;
}

.current-time-line span {
    position: absolute;
    top: 12px;
    left: 6px;
    background: #dc3545;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* \ubbf8\ud560\ub2f9 \uc791\uc5c5 \ud480 \ub808\uc774\uc544\uc6c3 */
.jobpool-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.timeline-section {
    width: 100%;
    overflow-x: visible;
    overflow-y: visible;
}

.unassigned-pool-section {
    width: 100%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 20px;
    min-height: 120px;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: relative;
}

.unassigned-pool-section h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 700;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
}

.unassigned-task-pool {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
}

/* ✨ Unassigned Job Card - jobpool-fix.css의 공통 스타일 상속 */
.unassigned-job-card {
    /* Job Status OPEN - 블루 계열 배경 */
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px solid #2196f3;
    border-radius: 8px;
    cursor: grab;
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px rgba(33, 150, 243, 0.15);
    min-width: 120px;
    max-width: 240px;
    position: relative;
    overflow: visible;
    /* jobpool-fix.css에서 display, padding, line-height, font-size 상속 */
}

/* Compact Header Row: Icon + ID + Priority */
.unassigned-job-card .compact-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
    gap: 4px;
}

.unassigned-job-card .type-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.unassigned-job-card .job-id-compact {
    font-weight: 700;
    font-size: 11px;
    color: #1565c0;
    background: rgba(255, 255, 255, 0.85);
    padding: 1px 5px;
    border-radius: 3px;
    flex: 1;
    text-align: center;
}

.unassigned-job-card .priority-icon {
    font-size: 12px;
    flex-shrink: 0;
}

/* Compact Customer Name */
.unassigned-job-card .compact-customer {
    font-size: 12px;
    font-weight: 600;
    color: #0b1220; /* 진한 색상으로 변경 */
    margin-bottom: 1px;
    white-space: normal; /* 줄바꿈 허용 */
    overflow: visible;
    text-overflow: unset;
    line-height: 1.3;
}

/* ✅ 아이콘 및 Job ID에 포인터 커서 추가 (UX 개선) */
.compact-header .type-icon,
.compact-header .priority-icon,
.compact-header .job-id-compact,
.job-card .type-icon,
.job-card .priority-icon,
.job-card .job-id-compact {
    cursor: pointer;
}

.compact-header .job-id-compact:hover,
.job-card .job-id-compact:hover {
    text-decoration: underline;
    opacity: 0.8;
}

/* Compact Location Row: City + ZIP */
.unassigned-job-card .compact-location {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    font-size: 12px; /* 가독성 개선 */
    color: #0b1220; /* 더 진한 색으로 변경 */
    margin-bottom: 1px;
    gap: 6px;
    white-space: normal;
}

.unassigned-job-card .city-compact {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    flex: none;
}

.unassigned-job-card .zip-compact {
    background: rgba(255, 255, 255, 0.9);
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 600;
    color: #0d47a1;
    flex-shrink: 0;
}

/* Compact Time Row */
.unassigned-job-card .compact-time {
    font-size: 9px;
    color: #1976d2;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Tooltip (Hover 시 상세 정보) */
.unassigned-job-card .job-tooltip {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: #0d47a1;
    color: white;
    padding: 10px;
    border-radius: 6px;
    font-size: 10px;
    z-index: 1000;
    min-width: 200px;
    box-shadow: 0 6px 16px rgba(13, 71, 161, 0.4);
    line-height: 1.5;
    white-space: nowrap;
}

.unassigned-job-card:hover .job-tooltip {
    display: block;
}

.unassigned-job-card:hover {
    border-color: #1565c0;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
    transform: translateY(-2px) scale(1.02);
}

.unassigned-job-card:active {
    cursor: grabbing;
    transform: scale(0.98);
}

/* 레거시 호환성 스타일 (기존 코드와 충돌 방지) - DEPRECATED */
.unassigned-job-card .job-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.unassigned-job-card .job-type-icon {
    font-size: 14px;
}

.unassigned-job-card .job-id {
    font-weight: 700;
    font-size: 11px;
    color: #1565c0;
    background: rgba(255, 255, 255, 0.8);
    padding: 2px 6px;
    border-radius: 4px;
}

.unassigned-job-card .job-customer-name {
    font-size: 10px;
    font-weight: 600;
    color: #0d47a1;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.unassigned-job-card .job-location-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 9px;
    color: #1976d2;
}

.unassigned-job-card .job-location-info .zip-code {
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 5px;
    border-radius: 3px;
    font-weight: 600;
    color: #0d47a1;
}

.unassigned-job-card .job-number {
    font-weight: 700;
    font-size: 11px;
    color: #1565c0;
    margin-bottom: 4px;
}

.unassigned-job-card .job-customer {
    font-size: 10px;
    font-weight: 600;
    color: #0d47a1;
    margin-bottom: 4px;
}

.unassigned-job-card .job-location {
    font-size: 9px;
    color: #1976d2;
    margin-bottom: 4px;
}

.unassigned-job-card .job-duration {
    display: inline-block;
    background: rgba(255, 255, 255, 0.8);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    color: #0d47a1;
    margin-bottom: 6px;
}

.unassigned-job-card .job-priority-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
}

.unassigned-job-card .job-priority-badge.high {
    background: #dc3545;
    color: white;
}

.unassigned-job-card .job-priority-badge.medium {
    background: #ffc107;
    color: #1f2937;
}

.unassigned-job-card .job-priority-badge.low {
    background: #28a745;
    color: white;
}

.empty-pool {
    text-align: center;
    color: #28a745;
    padding: 60px 20px;
    font-weight: 600;
    font-size: 15px;
    background: white;
    border-radius: 8px;
    border: 2px dashed #28a745;
}

.empty-pool::before {
    content: "\u2705";
    display: block;
    font-size: 48px;
    margin-bottom: 12px;
}

/* \ucd95\uc18c \ud3c4\ub2dc \ud1a0\uae00 \ubc84\ud2bc */
.unassigned-pool-toggle {
    position: absolute;
    top: 20px;
    right: 340px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 20px;
    z-index: 10;
    transition: all 0.2s;
}

.unassigned-pool-toggle:hover {
    background: #f8f9fa;
    transform: scale(1.1);
}

.jobpool-container.pool-collapsed .unassigned-pool-section {
    width: 0;
    padding: 0;
    overflow: hidden;
}

.jobpool-container.pool-collapsed .unassigned-pool-toggle {
    right: 20px;
}

/* \ucda9\ub3cc \ud45c\uc2dc */
.timeline-job-card.conflict {
    border-left-color: #ef4444;
    background: linear-gradient(to right, #fee2e2 0%, white 20%);
}

.timeline-job-card.conflict::after {
    content: "\u26a0\ufe0f";
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 12px;
}

/* \ubc18\uc751\ud615 (\uc791\uc740 \ud654\uba74) */
@media (max-width: 1400px) {
    .timeline-grid {
        grid-template-columns: 180px repeat(60, minmax(50px, 1fr));
    }
    
    .timeline-technician-info {
        width: 180px;
    }
    
    .unassigned-pool-section {
        width: 280px;
    }
}

@media (max-width: 1024px) {
    .jobpool-container {
        flex-direction: column;
        height: auto;
    }
    
    .unassigned-pool-section {
        width: 100%;
        max-height: 300px;
    }
    
    .timeline-grid {
        grid-template-columns: 150px repeat(60, 40px);
    }
}

/* ========================================
   Google Places Autocomplete Dropdown
   Professional Address Autocomplete UI
   ======================================== */

/* Dropdown Container */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.08);
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1050;
    margin-top: 8px;
}

/* Custom Scrollbar */
.autocomplete-dropdown::-webkit-scrollbar {
    width: 8px;
}

.autocomplete-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.autocomplete-dropdown::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.autocomplete-dropdown::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Google Attribution (Required) */
.autocomplete-attribution {
    padding: 10px 14px;
    font-size: 11px;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

/* Suggestion List */
.autocomplete-list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
}

/* Suggestion Item - Base Style */
.autocomplete-item {
    padding: 14px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f1f3;
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.autocomplete-item:first-child {
    padding-top: 12px;
}

.autocomplete-item:last-child {
    border-bottom: none;
    padding-bottom: 12px;
}

/* Suggestion Item - Hover State (Professional Blue) */
.autocomplete-item:hover {
    background-color: #eff6ff;
    border-left: 3px solid #3b82f6;
    padding-left: 13px;
}

/* Main Address Text */
.autocomplete-main-text {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 2px;
    font-size: 14px;
    line-height: 1.4;
}

/* Secondary Address Text (City, State) */
.autocomplete-secondary-text {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.3;
}

/* Form Group Relative Positioning (드롭다운 절대 위치를 위해) */
.form-group {
    position: relative;
}

/* ===========================
   Job Pool - Timeline Card Compact Styles (Wide Version)
   =========================== */

/* Timeline 카드의 Compact 헤더 스타일 */
.job-card .compact-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 3px;
}

.job-card .compact-customer {
    font-size: 10px;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.job-card .compact-location {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    margin-bottom: 2px;
    gap: 4px;
}

.job-card .city-compact {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.job-card .zip-compact {
    background: rgba(255, 255, 255, 0.3);
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 600;
    flex-shrink: 0;
}

.job-card .compact-time {
    font-size: 9px;
    font-weight: 500;
    white-space: nowrap;
}

.job-card .type-icon,
.job-card .priority-icon {
    font-size: 11px;
}

.job-card .job-id-compact {
    font-size: 11px;
    font-weight: bold;
}

/* ===== Card Brand Custom Dropdown ===== */
.card-brand-dropdown {
    position: relative;
    user-select: none;
}

.card-brand-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    min-height: 38px;
    transition: border-color 0.15s ease;
}

.card-brand-trigger:hover {
    border-color: #86b7fe;
}

.card-brand-trigger.open {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.card-brand-trigger .brand-label {
    flex: 1;
    font-size: 14px;
    color: #212529;
}

.card-brand-trigger .brand-placeholder {
    flex: 1;
    font-size: 14px;
    color: #6c757d;
}

.card-brand-trigger .brand-arrow {
    font-size: 11px;
    color: #6c757d;
    transition: transform 0.15s ease;
}

.card-brand-trigger.open .brand-arrow {
    transform: rotate(180deg);
}

.card-brand-emoji {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 22px;
    padding: 0 4px;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    font-size: 12px;
    line-height: 1;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
    flex-shrink: 0;
}

.webhook-copy-icon-btn {
    width: 22px !important;
    min-width: 22px !important;
    max-width: 22px !important;
    height: 22px !important;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 22px;
    border-radius: 4px;
    color: #ffffff !important;
    border-color: #15803d !important;
    background: #15803d !important;
    opacity: 1 !important;
}

.webhook-copy-icon-btn i {
    font-size: 12px;
    line-height: 1;
    color: #ffffff !important;
}

.webhook-copy-icon-btn:hover {
    color: #ffffff !important;
    border-color: #166534 !important;
    background: #166534 !important;
}

.webhook-copy-icon-btn:disabled {
    opacity: 1 !important;
    filter: none !important;
}

.webhook-copy-icon-btn.btn-success,
.webhook-copy-icon-btn.btn-success i {
    color: #ffffff !important;
}

.webhook-url-input-wrap {
    max-width: 620px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.webhook-url-input-wrap #webhookEndpointUrl {
    flex: 1 1 auto;
    min-width: 0;
}

.webhook-secret-status {
    cursor: default;
    word-break: break-all;
}

.webhook-secret-status.copyable {
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.webhook-config-panel {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fafbfc;
    padding: 10px 12px;
}

.webhook-secret-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.webhook-secret-toolbar .btn {
    min-height: 32px;
}

.webhook-secret-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.webhook-secret-row .webhook-secret-status {
    flex: 1;
}

.webhook-switch-wrap {
    cursor: pointer !important;
}

.webhook-switch-wrap .form-check-input,
.webhook-switch-wrap .form-check-label {
    cursor: pointer !important;
}

.webhook-switch-wrap * {
    cursor: pointer !important;
}

.card-brand-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 1060;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    overflow: hidden;
    display: none;
}

.card-brand-menu.open {
    display: block;
}

.card-brand-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    color: #212529;
    transition: background 0.1s ease;
}

.card-brand-option:hover {
    background: #f0f4ff;
}

.card-brand-option.selected {
    background: #e8f0fe;
    font-weight: 600;
}

.card-brand-option.placeholder-option {
    color: #6c757d;
}
/* ===== End Card Brand Custom Dropdown ===== */
