/* ═══════════════════════════════════════════════════════════════════════════
   FIELD SERVICE — Schedule table
   ═══════════════════════════════════════════════════════════════════════════ */

.fs-schedule-table {
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.79rem;
}

/* Date section header rows */
.fs-date-header td {
    background: #2c3e50;
    color: #fff;
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
    position: sticky;
    top: 40px; /* below sticky thead */
    z-index: 1;
}
.fs-date-header.fs-weekend td   { background: #4a5568; }
.fs-date-header.fs-bank-holiday td { background: #7b2d2d; }

.fs-empty-day td { background: #f8f9fa; }
.fs-completed    { opacity: 0.55; text-decoration-line: line-through; }

/* Row accent colours matching Excel screenshot */
.fs-row-collection { background: #e8f4fd; }
.fs-row-dropoff    { background: #edfaf1; }
.fs-row-return     { background: #fff8e1; }
.fs-row-visit      { background: #f3e8fd; }

/* ═══════════════════════════════════════════════════════════════════════════
   FIELD SERVICE — Calendar grid
   ═══════════════════════════════════════════════════════════════════════════ */

.fs-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    background: #dee2e6;
}
.fs-cal-header {
    background: #343a40;
    color: #fff;
    text-align: center;
    padding: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}
.fs-cal-cell {
    background: #fff;
    min-height: 80px;
    padding: 4px;
    position: relative;
    font-size: 0.72rem;
    overflow: hidden;
}
.fs-cal-cell.empty    { background: #f8f9fa; }
.fs-cal-cell.weekend  { background: #f4f4f4; }
.fs-cal-cell.today    { background: #fff8e1; outline: 2px solid #f0ad00; }
.fs-cal-day-num {
    font-weight: 700;
    font-size: 0.85rem;
    color: #495057;
    margin-bottom: 2px;
}
.fs-cal-chip {
    border-radius: 3px;
    padding: 1px 4px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: default;
}
.fs-chip-collection { background:#cfe2ff; color:#084298; }
.fs-chip-dropoff    { background:#d1e7dd; color:#0a3622; }
.fs-chip-return     { background:#fff3cd; color:#664d03; }
.fs-chip-visit      { background:#e8d5ff; color:#450d7b; }
.fs-chip-other      { background:#e2e3e5; color:#41464b; }
.fs-cal-add {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-size: 0.9rem;
    color: #adb5bd;
    cursor: pointer;
    line-height: 1;
}
.fs-cal-add:hover { color: #0d6efd; }

/* ═══════════════════════════════════════════════════════════════════════════
   FIELD SERVICE — Driver / Phone view
   ═══════════════════════════════════════════════════════════════════════════ */

.fs-driver-shell {
    background: #1a1a2e;
    min-height: 100vh;
    padding-bottom: 2rem;
    color: #eee;
}
.fs-driver-topbar {
    background: #16213e;
    padding: 0.6rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid #0f3460;
}
.fs-driver-absence-bar {
    background: #0f3460;
    padding: 0.4rem 1rem;
    font-size: 0.82rem;
}
.fs-driver-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
}
.fs-driver-empty {
    text-align: center;
    padding: 4rem 1rem;
    color: #adb5bd;
}
.fs-driver-card {
    background: #16213e;
    border-radius: 10px;
    padding: 1rem 1.1rem;
    border-left: 6px solid #0d6efd;
    box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.fs-card-collection { border-left-color: #0d6efd; }
.fs-card-dropoff    { border-left-color: #198754; }
.fs-card-return     { border-left-color: #0dcaf0; }
.fs-card-visit      { border-left-color: #ffc107; }
.fs-card-done       { opacity: 0.5; }

.fs-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}
.fs-card-type   { font-size: 0.8rem; }
.fs-card-time   { color: #adb5bd; font-size: 0.85rem; }
.fs-card-status { font-size: 0.82rem; font-weight: 600; }

.fs-card-rma {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}
.fs-card-product { color: #adb5bd; font-size: 0.85rem; }
.fs-card-serial  { color: #6c757d; font-size: 0.8rem; font-family: monospace; }

.fs-card-customer {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.4rem;
}

/* Address block — designed to be readable at arm's length */
.fs-card-address {
    background: #0f1929;
    border-radius: 6px;
    padding: 0.55rem 0.75rem;
    margin-bottom: 0.6rem;
    font-size: 1rem;
    color: #e9ecef;
    line-height: 1.5;
}
.fs-card-postcode {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #fff;
    margin-top: 2px;
}

.fs-card-phone a {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0dcaf0;
    text-decoration: none;
}
.fs-card-phone a:hover { color: #fff; }

.fs-card-notes {
    font-size: 0.82rem;
    color: #adb5bd;
    background: #0d1117;
    border-radius: 4px;
    padding: 0.3rem 0.6rem;
    margin-top: 0.4rem;
    margin-bottom: 0.4rem;
}

.fs-card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RMA Edit — card left accent border */
.ms-tab-content .card,
.ms-edit-panels .card {
    border-left: 3px solid #1a6fc4 !important;
}

/* RMA Edit — tab navigation */
.ms-tab-nav .nav-link {
    color: #495057;
    border-bottom: 3px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

.ms-tab-nav .nav-link:hover:not(.active) {
    color: #1a6fc4;
    border-bottom-color: #a8c8f0;
    background: transparent;
}

.ms-tab-nav .nav-link.active {
    color: #ffffff !important;
    background-color: #1a6fc4 !important;
    border-color: #1a6fc4 #1a6fc4 #1a6fc4 !important;
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RMA Edit — compact Radzen inputs (dropdowns, date pickers, text boxes)
   Scoped to .ms-tab-content and .ms-edit-panels so other pages are unaffected.
   ═══════════════════════════════════════════════════════════════════════════ */

.ms-tab-content,
.ms-edit-panels {
    --rz-input-height: 28px;
    --rz-input-font-size: 0.8rem;
    --rz-input-padding-block: 0.15rem;
    --rz-input-padding-inline: 0.5rem;
    --rz-input-line-height: 1.4;
}

/* Dropdown: the visible label area that sets the box height */
.ms-tab-content .rz-dropdown-label,
.ms-edit-panels .rz-dropdown-label {
    font-size: 0.8rem !important;
    padding: 0.15rem 0.5rem !important;
    min-height: 28px !important;
    line-height: 1.4 !important;
}

/* Dropdown: the chevron/trigger button on the right */
.ms-tab-content .rz-dropdown-trigger,
.ms-edit-panels .rz-dropdown-trigger {
    height: 28px !important;
    width: 28px !important;
    font-size: 0.8rem !important;
}

/* The outer rz-dropdown wrapper */
.ms-tab-content .rz-dropdown,
.ms-edit-panels .rz-dropdown {
    font-size: 0.8rem !important;
    height: 28px !important;
    min-height: unset !important;
}

/* Date picker input */
.ms-tab-content .rz-datepicker input,
.ms-edit-panels .rz-datepicker input {
    font-size: 0.8rem !important;
    padding: 0.15rem 0.5rem !important;
    height: 28px !important;
}

/* Text boxes and numerics */
.ms-tab-content .rz-textbox,
.ms-tab-content .rz-numeric,
.ms-edit-panels .rz-textbox,
.ms-edit-panels .rz-numeric {
    font-size: 0.8rem !important;
    padding: 0.15rem 0.5rem !important;
    height: 28px !important;
    min-height: unset !important;
}
