/* ---------------------------------
  FS Schedule Module Styles (CLEAN)
--------------------------------- */


/* =========================
   FS Navigation
========================= */

.fs-schedule-navigation {
    text-align: center;
    margin-top: 10px;
    margin-bottom: 24px;
    font-size: 16px;
}

.fs-schedule-navigation a {
    text-decoration: none;
    font-weight: 500;
    margin: 0 12px;
}

.fs-schedule-navigation strong {
    font-size: 18px;
}

.fs-nav-arrow {
    font-size: 18px;
    font-weight: bold;
}


/* =================================
   FS BOARD Layout 
================================= */

.fs-schedule-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.fs-schedule-column {
    background: #fafafa;
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #e2e2e2;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    max-height: 600px;
    overflow-y: auto;
}

.fs-schedule-column h4 {
    margin-top: 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e5e5;
    font-size: 16px;
    font-weight: 600;
}

.fs-schedule-column:hover{
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}


/* =========================
   Technician Header
========================= */

.fs-tech-header {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.fs-tech-job-count {
    font-size: 12px;
    color: #666;
    margin-left: 6px;
}

.fs-no-jobs {
    font-size: 13px;
    color:#9aa0a6;
    font-style:italic;
}


/* =================================
   CARD
================================= */

.fs-schedule-card {
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 10px;
}

.fs-schedule-card strong {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
}


.job-customer {
    font-weight: 700;
    font-size: 14px;
}

.job-address {
    font-size: 12px;
    color: #555;
    line-height: 1.3;
}

.job-spacer {
    height: 6px;
}

.job-service {
    font-size: 13px;
    margin: 6px 0;
    font-weight: 500;
}


.job-issue-reason {
    font-size: 13px;
    font-weight: 700;
    margin-top: 2px;
    margin-bottom: 6px;
    color: #7f1d1d;
    text-transform: capitalize;
}

.job-actions {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}

.job-actions button {
    background: none;
    border: none;
    font-size: 12px;
    color: var(--primary-color);
    cursor: pointer;
}

.job-actions button.secondary {
    color: #555;
}

.job-actions button:hover {
    text-decoration: underline;
}

.job-live-state {
    font-size: 13px;
    font-weight: 700;
    margin-top: 2px;
    margin-bottom: 6px;
    color: #1d4ed8;
}

.fs-schedule-customer {
    font-size: 13px;
    color: #333;
    font-weight: 500;
    margin-bottom: 6px;
}

.fs-schedule-time {
    font-weight: 600;
    margin-right: 6px;
    color: #444;
}

/* =========================
   Toggle and Week View
========================= */
.fs-board-mode-toggle{
    display:flex;
    justify-content:center;   /* center buttons */
    align-items:center;
    gap:6px;
    margin:12px 0 16px 0;
}

.fs-toggle-btn{
    padding:6px 14px;
    border-radius:6px;
    border:1px solid var(--button-color);
    text-decoration:none;
    background:var(--button-color);
    font-size:13px;
    color:var(--button-text-color);
    min-width:110px;
    text-align:center;
}

.fs-toggle-btn:hover{
    background:var(--button-hover-color);
    color: #fff;
}

.fs-toggle-btn.active{
    background:var(--button-hover-color);
    color:var(--button-text-color);
    border-color:var(--button-hover-color);
}

.fs-week-btn{
    border-right:1px solid rgba(0,0,0,0.15);
    padding-right:12px;
    margin-right:6px;
}

/* =========================
   Mobile Layout
========================= */

@media (max-width: 600px) {

    .fs-schedule-board {
        grid-template-columns: repeat(2, 1fr);
    }

    .fs-date-full {
        display: none;
    }

    .fs-date-short {
        display: inline;
    }

    .fs-nav-text {
        display: none;
    }

    .fs-schedule-navigation {
        font-size: 14px;
    }

    .fs-schedule-navigation a {
        margin: 0 6px;
        padding: 6px 8px;
    }

    .fs-nav-arrow {
        font-size: 24px;
    }
}

/* =========================
   MODAL
========================= */

.fs-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.fs-modal-box {
    background: #ffffff;
    padding: 24px;
    border-radius: 10px;
    width: 420px;
    max-width: 95%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.fs-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.fs-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #555;
}

.fs-modal-close:hover {
    color: #000;
}

/* =========================
   Modal Grid
========================= */

.fs-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    
    margin-top: 10px;
}

.fs-details-item label {
    font-size: 12px;
    color: #666;
}

.fs-details-item div {
    font-weight: 500;
    margin-top: 2px;
    margin-bottom: 2px;
}

/* =========================
   STATUS BADGE
========================= */

.fs-status-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

/* ALIGNED WITH SYSTEM */

.status-badge.pending {
    background:#fff9db;
    color:#5c4f00;
    border:1px solid #e0d9a5;
}

.status-badge.started {
    background:#e7f1ff;
    color:#0b4ea2;
    border:1px solid #bcd4ff;
}

.status-badge.travel {
    background:#eef6ff;
    color:#2563eb;
    border:1px solid #93c5fd;
}

.status-badge.completed {
    background:#e8f7ec;
    color:#1c6b38;
    border:1px solid #b8e2c3;
}

.status-badge.not_attended {
    background:#fecaca;
    color:#7f1d1d;
    border:1px solid #dc2626;
}

.status-badge.not_completed {
    background:#fecaca;
    color:#7f1d1d;
    border:1px solid #dc2626;
}

.status-badge.skipped {
    background:#fff7ed;
    color:#9a3412;
    border:1px solid #f59e0b;
}

/* =========================
   CARD STATUS
========================= */

.fs-schedule-card.status-pending { background:#fff9db; }
.fs-schedule-card.status-started { background:#e7f1ff; }
.fs-schedule-card.status-travel { background:#eef6ff; }
.fs-schedule-card.status-completed { background:#e8f7ec; }
.fs-schedule-card.status-not_attended { background:#fecaca; }
.fs-schedule-card.status-skipped { background:#fff7ed; }


/* =========================
   LEGEND
========================= */

.fs-schedule-legend {
    display:flex;
    justify-content:center;
    gap:20px;
    margin:18px auto 25px auto;
    padding:10px 18px;
    border:1px solid black;
    border-radius:6px;
    background:transparent;
    width:fit-content;
}

.fs-legend-item {
     display:flex;
    align-items:center;
    gap:8px;
    font-size:14px;
    font-weight:500;
}

.fs-legend-box {
    width:20px;
    height:20px;
    border-radius:4px;
    border:1px solid #444;
}

.fs-legend-pending { background:#fff3a3; }
.fs-legend-started { background:#c9e1ff; }
.fs-legend-travel { background:#dbeafe; }
.fs-legend-completed { background:#bfe8c9; }
.fs-legend-on_hold { background:#dc2626; }
.fs-legend-skipped { background:#f59e0b; }

/* =========================
   Mobile Legend Layout
========================= */

@media (max-width: 600px) {

    .fs-schedule-legend {
        display:grid;
        grid-template-columns:repeat(3,1fr);
        max-width:340px;
        margin:12px auto 18px auto;
        gap:10px 18px;
        justify-items:start;
    }

    .fs-legend-item{
        gap:6px;
        font-size:13px;
    }

    .fs-legend-box{
        width:16px;
        height:16px;
    }

}

/* =========================
   Admin Tools
========================= */

.fs-admin-tools{
    margin-top:14px;
    padding-top:10px;
    border-top:1px solid #e5e5e5;
    text-align:center;
}

.fs-admin-tools h4{
    font-size:16px;
    font-weight:600;
    color:#666;
    margin-bottom:8px;
}

.fs-admin-buttons{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:6px;
}

.fs-admin-buttons button{
    font-size:13px;
    padding:6px 12px;
    border-radius:4px;
    border:1px solid var(--button-color);
    background:var(--button-color);
    color:var(--button-text-color);
    cursor:pointer;
}

.fs-admin-buttons button:hover{
    background:var(--button-hover-color);
}

.scope-options{
    display:flex;
    justify-content:center;
    gap:20px;
    margin:12px 0;
}

.scope-options label{
    display:flex;
    align-items:center;
    gap:6px;
    white-space:nowrap;
    font-size:13px;
}
/* =========================
   Queue Preview
========================= */

.fs-queue-heading{
    margin-top:8px;
    margin-bottom:8px;
    font-size:15px;
    font-weight:600;
    color:#555;
    text-align:left;
}

.fs-queue-preview{
    margin-top:2px;
    padding-top:0px;
    margin-bottom:0;
    border-top:1px solid #e5e5e5;
    text-align:center;
}


.fs-queue-item{
    font-size:12px;
    color:#888;
    margin:4px 0;
}

.fs-queue-current{
    font-size:14px;
    font-weight:600;
    padding:4px 10px;
    border-radius:6px;
    background:#f3f6ff;
}

.fs-queue-btn{
    font-size:12px;
    padding:4px 8px;
    border:1px solid var(--button-color);
    border-radius:4px;
    background:var(--button-color);
    cursor:pointer;
    text-decoration:none;
    color:var(--button-text-color);
}

.fs-queue-btn:hover{
    background:var(--button-hover-color);
}

.fs-queue-scope-wrap{
    text-align:center;
    margin-top:10px;
}

.fs-queue-scope-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:auto;
    max-width:220px;
    min-width:120px;
    padding:6px 14px;
    border-radius:6px;
    font-size:12px;
    font-weight:600;
    cursor:pointer;
    transition:0.15s ease;
}

.fs-queue-scope-btn.btn-secondary{
    background:#f3f4f6;
    border:1px solid #d1d5db;
    color:#374151;
}


.fs-queue-scope-btn.btn-primary{
    background:var(--primary-color);
    border:1px solid var(--primary-color);
    color:#fff;
}

.fs-queue-scope-title{
    font-size:12px;
    font-weight:500;
    color:var(--text-muted);
    margin-bottom:10px;
}

.fs-queue-scope-label{
    margin-top:8px;
}

.fs-queue-btn.disabled{
    opacity:0.45;
    pointer-events:none;
    cursor:default;
}

/* =========================
   Save Position
========================= */

.fs-queue-save-wrap{
    margin-top:12px;
    text-align:center;
}

.fs-queue-save-btn{
    background:var(--primary-color);
    color:#fff;
    border:1px solid var(--primary-color);
    border-radius:6px;
    padding:8px 18px;
    font-size:13px;
    font-weight:600;
    cursor:pointer;
}

.fs-queue-save-btn:hover{
    background:var(--button-hover-color);
}

.fs-queue-help{
    margin-top:8px;
    font-size:12px;
    color:#888;
    text-align:center;
}

/* =========================
   Queue Row Layout
========================= */

.fs-queue-row{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:12px;
    margin:10px 0;
}detai


/* =========================
   Week View
========================= */
.fs-schedule-week-table{
    width:100%;
    border-collapse:collapse;
    margin-top:15px;
}

.fs-schedule-week-table th,
.fs-schedule-week-table td{
    border:1px solid #e5e7eb;
    padding:8px;
    text-align:center;
}

.fs-schedule-week-table th{
    background:#f3f4f6;
}

.fs-week-count{
    font-weight:bold;
    color:#2563eb;
    cursor:pointer;
}

/* =================================
   NOTES
================================= */

.job-notes {
    margin-top: 2px;
    padding-top: 0px;
    border-top: 1px solid #e5e7eb;
    margin-bottom:0;
}



.job-notes-heading{
     font-size:15px;
    font-weight:600;
    margin-top:8px;
    margin-bottom:8px;
    color: #555;
}

.no-notes {
    font-size: 12px;
    color: #888;
}

/* NOTE ITEM WITH ACTIONS */
.note-item {
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:2px;
    font-size:13px;
    padding:2px 0;
}

.note-actions {
    display: flex;
    gap: 2px;
}

.note-actions button {
   padding: 2px 4px;
    background: none;
    border: none;
    font-size: 12px;
    cursor: pointer;
    color: var(--primary-color);
}

.note-actions button.danger {
    color: var(--danger-color);
}

#jobNotesList{
    margin-bottom:4px;
}

/* ADD NOTE BUTTON */
.btn-link {
    margin-top:0;
    padding-top:0;
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 12px;
    cursor: pointer;
}

.btn-link:hover {
    text-decoration: underline;
}

/* =================================
   FORM INPUTS
================================= */

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    font-size: 12px;
    color: #666;
    display: block;
    margin-bottom: 4px;
}

input[type="text"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

/* =================================
   CHECKBOX FIX
================================= */

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.checkbox-label input {
    width: auto !important;
}

/* =================================
   PRIMARY BUTTON
================================= */

.fs-modal-actions .btn-primary {
    width: 100%;
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
}

.fs-modal-actions .btn-primary:hover {
    background: var(--primary-hover);
}

/* =================================
   ACTION PANEL
================================= */

.action-panel {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.action-panel h4 {
    text-align: center;
    margin-bottom: 10px;
}

/* INPUTS */
.action-panel textarea,
.action-panel input,
.action-panel select {
    width: 100%;
    margin-bottom: 12px;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ddd;
}

/* BUTTONS */
.action-panel button {
    background: var(--button-color);
    color: var(--button-text-color);
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    font-size: 13px;
    font-weight: 500;
    transition: 0.15s;
}

.action-panel button:hover {
    background: var(--button-hover-color);
    color: #fff;
}

/* danger stays safe */
.action-panel button.danger {
    background: var(--danger-color);
    color: #fff;
}

.action-panel button.danger:hover {
    background: var(--danger-hover);
    color: #fff;
}


.board-row{
    display:flex;
    gap:12px;
    margin-bottom:14px;
}

.board-row a{
    flex:1;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:12px;
}


