/* ==========================================================================
   📂 C:\xampp\htdocs\job-system\style.css 
   ========================================================================== */

/* ==========================================================================
   🏠 หมวดหมู่ที่ 1: โครงสร้างหลักของระบบ & แถบเมนูยืดหด (Navbar)
   ========================================================================== */
body { 
    background: #f4f6f9; 
    font-family: 'Segoe UI', Tahoma, sans-serif; 
}
.top-navbar { 
    background: #22314e; 
    padding: 0.75rem 1.5rem; 
    border-bottom: 3px solid #d6c08a; 
}
.menu-dropdown-box { 
    background: #f9f8f3; 
    border-bottom: 3px solid #d6c08a; 
    padding: 1rem 0; 
    display: none; 
}
.menu-dropdown-box.show { 
    display: block; 
    animation: slideDown 0.25s ease-out; 
}
.menu-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
    gap: 10px; 
    padding: 0 1.5rem; 
}
.menu-item { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    padding: 0.75rem 1rem; 
    color: #22314e; 
    text-decoration: none; 
    border-radius: 8px; 
    transition: all 0.2s; 
    background: #ffffff; 
    border: 1px solid #e1dfd5; 
    font-size: 0.95rem; 
    font-weight: 500; 
}
.menu-item:hover { 
    background: #d6c08a; 
    color: #22314e; 
    border-color: #d6c08a; 
    transform: translateY(-1px); 
}
.menu-item.active { 
    background: #d6c08a; 
    color: #22314e; 
    font-weight: 600; 
    border-color: #c4ae79; 
}

/* ==========================================================================
   🔒 หมวดหมู่ที่ 2: หน้าล็อกอินเข้าสู่ระบบ (index.php)
   ========================================================================== */
.login-container { 
    width: 100%;
    min-height: 100vh; 
    display: flex;
    align-items: center;    
    justify-content: center;
    background: #f4f6f9;
}
.login-card { 
    border: none; 
    border-top: 4px solid #d6c08a !important; 
    border-radius: 12px; 
    box-shadow: 0 10px 30px rgba(34, 49, 78, 0.05); 
    width: 100%; 
    max-width: 420px; 
    padding: 2.5rem !important;
    transition: all 0.3s ease;
}
.btn-line { 
    background-color: #22314e; 
    color: #ffffff; 
    font-weight: 600; 
    border: none;
}
.btn-line:hover { 
    background-color: #d6c08a; 
    color: #22314e; 
}
.forgot-link { 
    font-size: 0.85rem; 
    text-decoration: none; 
    color: #6c757d; 
    transition: color 0.2s; 
}
.forgot-link:hover { 
    color: #d6c08a; 
    text-decoration: underline; 
}
.lang-btn { 
    font-size: 0.85rem; 
    font-weight: 600; 
}

/* ==========================================================================
   🔍 หมวดหมู่ที่ 3: แผงควบคุมตัวคัดกรองงานอัจฉริยะ (my-tasks.php)
   ========================================================================== */
.filter-section-card { 
    background: #ffffff; 
    border-radius: 12px; 
    border-top: 4px solid #d6c08a; 
    padding: 1.5rem; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.04); 
    margin-bottom: 2rem; 
}
.filter-card-title { 
    color: #22314e; 
    font-weight: 700; 
    font-size: 0.95rem; 
    margin-bottom: 1.25rem; 
    border-bottom: 1px solid #f1f0ea; 
    padding-bottom: 6px; 
}
.form-select-custom, .form-input-custom { 
    border-color: #cbd5e1; 
    font-size: 0.85rem; 
    color: #22314e; 
    font-weight: 600; 
}
.form-select-custom:focus, .form-input-custom:focus { 
    border-color: #d6c08a; 
    box-shadow: 0 0 0 0.2rem rgba(214, 192, 138, 0.2); 
}

/* ==========================================================================
   📊 หมวดหมู่ที่ 4: กระดานบอร์ดคัมบังและการ์ดใบงาน (Dashboard / My Tasks)
   ========================================================================== */
.kanban-container { 
    display: flex !important; 
    flex-direction: row !important; 
    justify-content: center; 
    gap: 30px !important; 
    overflow-x: auto; 
    padding-bottom: 1rem; 
    width: 100%;
}
.kanban-column { 
    flex: 1; 
    min-width: 260px; 
    max-width: 350px; 
    background: #edeef2; 
    border-radius: 12px; 
    height: 350px !important; 
    overflow-y: auto !important; 
    padding: 0 0 0.85rem 0 !important;
}
.kanban-column::-webkit-scrollbar { 
    width: 5px; 
}
.kanban-column::-webkit-scrollbar-track { 
    background: #edeef2; 
}
.kanban-column::-webkit-scrollbar-thumb { 
    background: #cbd5e1; 
    border-radius: 10px; 
}
.column-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 0.85rem; 
    border-bottom: 3px solid #ccc; 
    position: sticky; 
    top: 0; 
    z-index: 30; 
    background-color: #edeef2 !important; 
    padding: 12px 15px !important; 
    border-top-left-radius: 12px !important; 
    border-top-right-radius: 12px !important; 
}
.tickets-wrapper-inside {
    display: block;
    padding: 0 0.85rem !important; 
}
.ticket-card { 
    background: white; 
    border-radius: 8px; 
    padding: 0.85rem; 
    margin-bottom: 0.75rem; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.03); 
    border-left: 5px solid #6c757d; 
    cursor: pointer; 
    transition: all 0.1s; 
}
.ticket-card:hover { 
    transform: scale(1.02); 
}
.status-Pending { border-left-color: #ffc107 !important; }
.status-In-Progress { border-left-color: #17a2b8 !important; }
.status-Done { border-left-color: #198754 !important; }
.status-Cancelled { border-left-color: #dc3545 !important; }
.dept-badge { 
    font-size: 0.68rem; 
    font-weight: 600; 
    padding: 2px 7px; 
    border-radius: 20px; 
    background: #e3e6f0; 
    color: #4e73df; 
}

/* ==========================================================================
   📝 หมวดหมู่ที่ 5: หน้าแจ้งซ่อมและสั่งงานใหม่พรีเมียม (create-job.php)
   ========================================================================== */
.form-card { 
    background: #ffffff; 
    border-radius: 8px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.03); 
    border-top: 4px solid #d6c08a; 
    padding: 2.5rem; 
    max-width: 680px; 
    margin: 2rem auto; 
}
.form-section-title { 
    color: #22314e; 
    font-weight: 700; 
    border-bottom: 2px solid #f4f6f9; 
    padding-bottom: 12px; 
    margin-bottom: 2rem; 
    font-size: 1.25rem;
}
.btn-check + .btn-outline-custom { 
    color: #22314e; 
    border: 1px solid #cbd5e1; 
    font-weight: 500; 
    background: #ffffff;
    border-radius: 6px;
    padding: 0.65rem 1rem;
    font-size: 0.88rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}
.btn-check:checked + .btn-outline-custom { 
    background-color: #22314e !important; 
    color: #ffffff !important; 
    border-color: #22314e !important; 
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(34, 49, 78, 0.15);
}
.btn-outline-custom:hover { 
    background-color: #f8fafc; 
    border-color: #94a3b8;
    transform: translateY(-1px); 
}

.compact-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}
.upload-zone { 
    border: 2px dashed #cbd5e1; 
    border-radius: 8px; 
    padding: 1.5rem; 
    text-align: center; 
    background: #f9f8f3; 
    cursor: pointer; 
    transition: all 0.2s; 
    color: #22314e; 
}
.upload-zone:hover { 
    border-color: #d6c08a; 
    background: #f3f1e7; 
}
.preview-container { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 12px; 
    margin-top: 12px; 
}
.preview-wrapper { 
    position: relative; 
    width: 85px; 
    height: 85px; 
    border-radius: 6px; 
    overflow: hidden; 
    border: 1px solid #cbd5e1; 
    cursor: pointer; 
}
.preview-wrapper img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}
.remove-img-btn { 
    position: absolute; 
    top: 2px; 
    right: 2px; 
    background: rgba(220, 53, 69, 0.85); 
    color: white; 
    border: none; 
    border-radius: 50%; 
    width: 18px; 
    height: 18px; 
    font-size: 10px; 
    line-height: 18px; 
    text-align: center; 
    padding: 0; 
    cursor: pointer; 
    z-index: 5; 
}
.btn-custom-submit { 
    background: #22314e; 
    color: white; 
    font-weight: 600; 
    border: none; 
}
.btn-custom-submit:hover { 
    background: #1a263d; 
    color: white; 
}
.btn-custom-draft { 
    background: #d6c08a; 
    color: #22314e; 
    font-weight: 600; 
    border: none; 
}
.btn-custom-draft:hover { 
    background: #c4ae79; 
    color: #22314e; 
}

/* ==========================================================================
   🔍 หมวดหมู่ที่ 6: Popup & Image Viewer
   ========================================================================== */
.detail-modal { 
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(34, 49, 78, 0.6); 
    z-index: 9999; 
    align-items: center; 
    justify-content: center; 
    padding: 20px; 
}
.detail-modal-card { 
    background: #ffffff; 
    border-radius: 14px; 
    width: 100%; 
    max-width: 750px; 
    border-top: 6px solid #d6c08a; 
    box-shadow: 0 20px 50px rgba(0,0,0,0.2); 
    position: relative; 
    animation: slideDown 0.25s ease-out; 
    overflow: hidden; 
}
.detail-header { 
    background: #22314e; 
    color: white; 
    padding: 1.2rem 1.5rem; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}
.detail-body { 
    padding: 2rem; 
    background: #f9f8f3; 
    max-height: 80vh; 
    overflow-y: auto; 
}
.detail-close-btn { 
    background: #dc3545; 
    color: white; 
    border: none; 
    border-radius: 50%; 
    width: 32px; height: 32px; 
    font-weight: bold; 
    display: flex; align-items: center; justify-content: center; 
    cursor: pointer; 
}
.info-content-box { 
    background: #ffffff; 
    border: 1px solid #e1dfd5; 
    border-radius: 8px; 
    padding: 1rem 1.2rem; 
    margin-bottom: 1.25rem; 
}
.info-content-label { 
    font-size: 0.8rem; 
    font-weight: 700; 
    color: #8c897d; 
    margin-bottom: 0.4rem; 
    display: flex; align-items: center; gap: 6px; 
}
.info-content-value { 
    font-size: 0.95rem; 
    font-weight: 600; 
    color: #22314e; 
    margin: 0; 
    white-space: pre-wrap; 
}
.popup-img-grid { 
    display: flex; 
    gap: 12px; 
    flex-wrap: wrap; 
    margin-top: 10px; 
}
.popup-img-item { 
    width: 110px; 
    height: 110px; 
    border-radius: 6px; 
    border: 1px solid #cbd5e1; 
    object-fit: cover; 
    cursor: pointer;
}
.large-image-viewer { 
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.85); 
    z-index: 10000; 
    align-items: center; 
    justify-content: center; 
}
.large-image-viewer img { 
    max-width: 90%; 
    max-height: 85vh; 
    border-radius: 6px; 
}
.large-viewer-close { 
    position: absolute; 
    top: 20px; 
    right: 20px; 
    background: #dc3545; 
    color: white; 
    border: none; 
    border-radius: 50%; 
    width: 35px; height: 35px; 
    font-weight: bold; 
    cursor: pointer; 
}

/* ==========================================================================
   🎬 หมวดหมู่ที่ 7: อนิเมชันการเคลื่อนไหว 
   ========================================================================== */
@keyframes slideDown { 
    from { opacity: 0; transform: translateY(-10px); } 
    to { opacity: 1; transform: translateY(0); } 
}
@keyframes alertPopIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}