/*
 * YWS Theme: the Your Wedding Saga sage palette, made modern and elegant.
 * Visual properties only (colour, type, corners, shadows, spacing): nothing is
 * hidden, moved or given a new layout, so every screen keeps working.
 */

:root {
    --yws-sage: #a9af90;
    --yws-sage-dark: #8a8f74;
    --yws-sage-deep: #6b705c;
    --yws-sage-light: #c4c8b3;
    --yws-sage-tint: #eef0e6;
    --yws-sage-wash: #f5f6f0;
    --yws-cream: #f8f5ed;
    --yws-ink: #2f3328;
    --yws-ink-soft: #5c6150;
    --yws-muted: #8b8f80;
    --yws-line: #e7e5dc;
    --yws-white: #ffffff;
    --yws-radius: 14px;
    --yws-radius-sm: 10px;
    --yws-shadow: 0 1px 2px rgba(47, 51, 40, 0.04), 0 6px 20px rgba(107, 112, 92, 0.07);
    --yws-shadow-lift: 0 2px 4px rgba(47, 51, 40, 0.05), 0 12px 32px rgba(107, 112, 92, 0.12);
    --yws-font: "Lato", "Open Sans", "Helvetica Neue", Arial, sans-serif;
}

/* ---------- type ---------- */

body,
button,
input,
select,
textarea,
.form-control,
.select2-container,
.dropdown-menu,
.tooltip,
.popover {
    font-family: var(--yws-font) !important;
}

/* Lato takes slightly less width than RISE's Open Sans, and RISE's own font sizes are kept,
   so no line gets longer and nothing wraps or overlaps. No font smoothing override:
   macOS's default rendering keeps the strokes full weight. */
body {
    color: var(--yws-ink);
}

/* titles: the same Lato, bold */
.page-title h1,
.title-tab h4,
.leads-title-section h4,
.modal-title,
.card-header.fw-bold,
.card-title {
    font-family: var(--yws-font) !important;
    font-weight: 700 !important;
    color: var(--yws-ink);
}

a {
    color: var(--yws-sage-deep);
    transition: color 0.15s ease;
}

a:hover,
a:focus {
    color: var(--yws-ink);
}

.text-off,
.text-muted {
    color: var(--yws-muted) !important;
}

/* ---------- page background ---------- */

html,
body,
.page-wrapper,
#page-content {
    background-color: var(--yws-cream) !important;
}

/* ---------- top bar ---------- */

/* plain colours only: a blur effect here would change how the bar's pop-out menus are positioned */
.navbar-custom {
    background: #ffffff !important;
    box-shadow: 0 1px 0 var(--yws-line), 0 4px 18px rgba(107, 112, 92, 0.05) !important;
}

.navbar-custom .nav-link,
.navbar-custom .nav-link svg {
    color: var(--yws-ink-soft) !important;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link:hover svg {
    color: var(--yws-sage-deep) !important;
}

.navbar-custom .nav-link {
    border-radius: var(--yws-radius-sm);
}

.navbar-custom .nav-link:hover {
    background-color: var(--yws-sage-tint);
}

.navbar-custom .user-name {
    font-weight: 500;
    color: var(--yws-ink);
}

/* ---------- sidebar ---------- */

.sidebar-scroll,
.sidebar {
    background: linear-gradient(180deg, #adb394 0%, var(--yws-sage) 45%, #9fa586 100%) !important;
}

.sidebar-brand {
    background: transparent !important;
}

.sidebar-menu li a {
    border-radius: var(--yws-radius-sm);
    margin: 0 10px;
    font-weight: 500;
    letter-spacing: 0.005em;
    color: rgba(255, 255, 255, 0.94) !important;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-menu li a svg {
    opacity: 0.92;
}

.sidebar-menu li a:hover,
.sidebar-menu li a:focus {
    background-color: rgba(255, 255, 255, 0.16) !important;
    color: #ffffff !important;
}

.sidebar-menu li.active > a,
.sidebar-menu li.active > a:hover {
    background-color: rgba(255, 255, 255, 0.24) !important;
    color: #ffffff !important;
    box-shadow: inset 3px 0 0 rgba(255, 255, 255, 0.85);
}

.sidebar-menu li ul {
    background: rgba(47, 51, 40, 0.06) !important;
    border-radius: var(--yws-radius-sm);
    margin-left: 10px;
    margin-right: 10px;
}

.sidebar-menu li ul li a {
    margin: 0;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.88) !important;
}

.sidebar-menu li ul li a:hover {
    background-color: rgba(255, 255, 255, 0.14) !important;
}

/* ---------- cards ---------- */

/* the hairline edge is part of the shadow, not a border, so cards keep their exact size */
.card {
    border-radius: var(--yws-radius) !important;
    box-shadow: 0 0 0 1px rgba(231, 229, 220, 0.75), var(--yws-shadow);
    background-color: var(--yws-white);
}

.card > .card-header:first-child,
.card > .page-title:first-child {
    border-top-left-radius: var(--yws-radius) !important;
    border-top-right-radius: var(--yws-radius) !important;
}

.card > .card-footer:last-child {
    border-bottom-left-radius: var(--yws-radius) !important;
    border-bottom-right-radius: var(--yws-radius) !important;
}

.card-header,
.card-footer,
.page-title {
    background-color: transparent !important;
    border-color: var(--yws-line) !important;
}

.card.border-top-0.rounded-top-0 {
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

/* ---------- dashboard summary tiles (pending leads, clients, total invoiced, payments) ----------
   RISE floats the amount over the tile (and WhatsBoost's stylesheet nudges it 14px down), so it
   never adapts to the tile's width. Here the icon and the amount sit side by side, centred, and
   the amount scales with the screen and can never spill out. Tile height stays the same. */
/* the amount is sized from the tile's own width (container units), so it shrinks with the tile */
.dashboard-icon-widget {
    container-type: inline-size;
}

.dashboard-icon-widget .card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.dashboard-icon-widget .widget-icon {
    float: none;
    flex: 0 0 auto;
    border-radius: 12px;
}

.dashboard-icon-widget .widget-details {
    position: static !important;
    top: auto !important;
    right: auto !important;
    min-width: 0;
    text-align: right;
}

.dashboard-icon-widget .widget-details h1 {
    font-size: clamp(20px, calc(0.9vw + 10px), 28px) !important; /* older browsers */
    font-size: clamp(16px, 7.2cqi, 30px) !important;
    font-weight: 600;
    line-height: 1.15;
    color: var(--yws-ink) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-variant-numeric: tabular-nums;
}

.dashboard-icon-widget .widget-details span {
    color: var(--yws-muted) !important;
    font-size: 12.5px;
    font-weight: 500;
}

/* ---------- dashboard Invoice Overview card ----------
   RISE floats the totals block (Total invoiced, Due, Last 12 months) over the bottom of the card,
   so at in-between window widths it covers the Draft row. Here it sits below the list instead,
   and amounts stay on one line. The card keeps its height and scrolls inside if ever needed. */
.widget-footer.position-absolute {
    position: static !important;
    width: 100% !important;
    margin-top: 12px;
}

.widget-footer .col-5.ps-4 {
    padding-left: 12px !important;
}

.widget-footer .col-5 > div {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.widget-footer .strong {
    font-variant-numeric: tabular-nums;
}

/* Invoice Statistics chart: the height RISE draws it at, at every window width (see dashboard.js) */
#invoice-payment-statistics-chart {
    height: 300px !important;
}

/* ---------- dashboard Leads Overview card ----------
   RISE floats each count to the right of a label that wraps, so in a narrow card the dot, label
   and count drift apart. Each legend row is now dot, label, count, with the count on the label's
   first line. In narrow cards the ring gives the legend more room and each total gets its own
   line. The card's height is unchanged. */
#leads-overview-widget a .pb-2 {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.3;
}

#leads-overview-widget a .pb-2 .color-tag {
    flex: 0 0 auto;
    margin: 0.35em 0 0 0 !important;
}

#leads-overview-widget a .pb-2 .strong {
    float: none !important;
    margin-left: auto;
    padding-left: 8px;
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
}

.card:has(#leads-overview-widget) {
    container-type: inline-size;
}

@container (max-width: 360px) {
    #leads-overview-widget > .row:first-child > .col-md-6:first-child {
        flex: 0 0 40%;
        max-width: 40%;
    }

    #leads-overview-widget > .row:first-child > .col-md-6:last-child {
        flex: 0 0 60%;
        max-width: 60%;
        padding-left: 6px !important;
        font-size: 12.5px;
    }

    #leads-overview-widget > .row:last-child > .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
        white-space: nowrap;
    }
}

/* ---------- tabs ---------- */

.nav-tabs {
    border-color: var(--yws-line) !important;
}

.nav-tabs.bg-white,
ul.nav-tabs.bg-white.title {
    border-top-left-radius: var(--yws-radius);
    border-top-right-radius: var(--yws-radius);
    box-shadow: var(--yws-shadow);
}

.nav-tabs li a {
    color: var(--yws-ink-soft);
    font-weight: 500;
}

.nav-tabs li .active,
.nav-tabs li.active,
.nav-tabs li a.active {
    color: var(--yws-sage-deep) !important;
}

.nav-tabs li:not(.title-tab) a:after {
    background-color: var(--yws-sage-dark) !important;
    height: 2px;
    border-radius: 2px;
}

/* ---------- buttons ---------- */

.btn {
    border-radius: var(--yws-radius-sm) !important;
    font-weight: 500;
    letter-spacing: 0.005em;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background-color: var(--yws-sage-dark) !important;
    border-color: var(--yws-sage-dark) !important;
    color: #ffffff !important;
    box-shadow: 0 1px 2px rgba(47, 51, 40, 0.12);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--yws-sage-deep) !important;
    border-color: var(--yws-sage-deep) !important;
    color: #ffffff !important;
}

.btn-default {
    background-color: var(--yws-sage-tint) !important;
    border: 1px solid transparent !important;
    color: var(--yws-sage-deep) !important;
}

.btn-default svg {
    color: var(--yws-sage-deep);
}

.btn-default:hover,
.btn-default:focus,
.btn-default:active,
.btn-default.active {
    background-color: var(--yws-sage) !important;
    border-color: var(--yws-sage) !important;
    color: #ffffff !important;
}

.btn-default:hover svg,
.btn-default:focus svg,
.btn-default.active svg {
    color: #ffffff;
}

.btn-outline-secondary {
    border-color: var(--yws-sage-light) !important;
    color: var(--yws-sage-deep) !important;
}

.btn-outline-secondary:hover {
    background-color: var(--yws-sage) !important;
    border-color: var(--yws-sage) !important;
    color: #ffffff !important;
}

.btn:focus-visible,
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 3px rgba(169, 175, 144, 0.35) !important;
}

/* ---------- forms ---------- */

.form-control,
.form-select,
.select2-container .select2-choice,
.select2-container-multi .select2-choices,
.input-group-text {
    border-radius: var(--yws-radius-sm) !important;
    border-color: var(--yws-line) !important;
    background-color: #fdfcf9;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--yws-sage) !important;
    background-color: #ffffff;
}

.input-group > .form-control:not(:last-child),
.input-group > .input-group-text:not(:last-child) {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.input-group > .form-control:not(:first-child),
.input-group > .input-group-text:not(:first-child) {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.form-check-input:checked {
    background-color: var(--yws-sage-dark);
    border-color: var(--yws-sage-dark);
}

label,
.col-form-label {
    color: var(--yws-ink-soft);
    font-weight: 500;
}

/* ---------- tables ---------- */

.table > :not(caption) > * > *,
table.dataTable td,
table.dataTable th {
    border-color: #f0eee6 !important;
}

table.dataTable thead th,
.table thead th {
    font-weight: 600;
    color: var(--yws-muted) !important;
    background-color: transparent;
}

table.dataTable tbody tr,
.table tbody tr {
    transition: background-color 0.12s ease;
}

table.dataTable tbody tr:hover td,
.table-hover tbody tr:hover td {
    background-color: var(--yws-sage-wash) !important;
}

/* ---------- badges, labels ---------- */

.badge {
    border-radius: 999px !important;
}

/* ---------- dropdowns, modals, popovers ---------- */

.dropdown-menu {
    border: 1px solid var(--yws-line) !important;
    border-radius: var(--yws-radius-sm) !important;
    box-shadow: var(--yws-shadow-lift) !important;
    padding: 6px;
}

.dropdown-menu .dropdown-item {
    border-radius: 8px;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: var(--yws-sage-tint);
    color: var(--yws-ink);
}

.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--yws-sage-dark);
}

/* corners are rounded on each part, not clipped, so dropdowns and date pickers inside still show */
.modal-content {
    border-radius: 18px !important;
    box-shadow: 0 0 0 1px rgba(231, 229, 220, 0.6), 0 24px 60px rgba(47, 51, 40, 0.22) !important;
    border-color: transparent !important;
}

.modal-header {
    border-bottom-color: var(--yws-line) !important;
    border-top-left-radius: 18px !important;
    border-top-right-radius: 18px !important;
}

.modal-footer {
    border-top-color: var(--yws-line) !important;
    background-color: #fdfcf9;
    border-bottom-left-radius: 18px !important;
    border-bottom-right-radius: 18px !important;
}

.modal-backdrop.show {
    opacity: 0.4;
}

.popover,
.tooltip-inner {
    border-radius: var(--yws-radius-sm) !important;
}

/* ---------- alerts and notices ---------- */

.alert {
    border-radius: var(--yws-radius-sm) !important;
    border: none !important;
}

.app-alert.alert-success {
    background-color: var(--yws-sage-dark) !important;
    color: #ffffff !important;
    box-shadow: var(--yws-shadow-lift);
}

/* ---------- pagination ---------- */

.pagination .page-link,
.dataTables_paginate .paginate_button {
    border-radius: 8px !important;
    margin: 0 2px;
    border-color: transparent !important;
    color: var(--yws-ink-soft) !important;
}

.pagination .page-item.active .page-link,
.dataTables_paginate .paginate_button.current,
.dt-container .dt-paging .dt-paging-button.active .page-link,
.dt-container .dt-paging .dt-paging-button.active .page-link:hover {
    background-color: var(--yws-sage-dark) !important;
    border-color: var(--yws-sage-dark) !important;
    color: #ffffff !important;
}

/* ---------- progress, list groups ---------- */

.progress {
    border-radius: 999px;
    background-color: var(--yws-sage-tint);
}

.list-group-item {
    border-color: var(--yws-line);
}

.list-group-item.active {
    background-color: var(--yws-sage-dark) !important;
    border-color: var(--yws-sage-dark) !important;
}
.list-group-item.active,
.list-group-item.active:hover {
    color: #fff !important;
}

/* Settings (and Help) side menu: soft rounded rows; the open page is a light sage pill
   with a deep-sage bar and readable deep-sage text, instead of dark green with grey text */
.help-catagory.list-group .list-group-item {
    margin: 2px 8px;
    padding: 9px 14px !important;
    border: 0 !important;
    border-radius: var(--yws-radius-sm) !important;
    color: #4a5048 !important;
    text-indent: 0 !important;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.help-catagory.list-group .list-group-item:hover {
    background-color: rgba(169, 175, 144, 0.14) !important;
    color: var(--yws-sage-deep) !important;
}
.help-catagory.list-group .list-group-item.active,
.help-catagory.list-group .list-group-item.active:hover {
    background-color: var(--yws-sage-tint) !important;
    color: var(--yws-sage-deep) !important;
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--yws-sage-deep);
}

/* ---------- sign-in page ---------- */

.signin-box,
.signin-box .card,
#signin-form .card {
    border-radius: 18px !important;
    box-shadow: 0 30px 80px rgba(47, 51, 40, 0.18) !important;
    border: none !important;
}

/* team chat footer tabs (Messages / Team members): the open one was white text on white */
.chat-tab .btn,
.chat-tab .btn-default {
    background-color: transparent !important;
    border-color: transparent !important;
    color: #7a857f !important;
}
.chat-tab .btn.active,
.chat-tab .btn:hover,
.chat-tab .btn:focus {
    background-color: var(--yws-sage-tint) !important;
    border-color: transparent !important;
    color: var(--yws-sage-deep) !important;
}
.chat-tab .btn svg,
.chat-tab .btn .icon { color: inherit !important; }


/* YWS: phone lists. A list's phone card is in the first column: the other columns are hidden so the card
   (number, client, amount, status) gets the full width. Contracts: number, client, amount, status, menu. */
@media (max-width: 767px) {
    table.dataTable.no-title .truncate-ellipsis.w60p { width: 70% !important; }
    .yws-m-lead-actions .la-phone { display: flex; align-items: center; gap: 6px; }
    .yws-m-lead-actions .la-phone + .la-phone { display: none; }
    /* contracts as cards: "CONTRACT #42" and the client on the left, the amount and the status on the right */
    table.yws-m-contracts thead { display: none !important; }
    table.yws-m-contracts, table.yws-m-contracts tbody, table.yws-m-contracts tbody tr { display: block !important; width: 100% !important; table-layout: auto !important; }
    table.yws-m-contracts tbody tr { position: relative; min-height: 58px; padding: 10px 120px 10px 8px; border-bottom: 1px solid var(--bs-border-color, #eee); }
    table.yws-m-contracts tbody td { display: none !important; width: auto !important; min-width: 0 !important; max-width: none !important; border: 0 !important; padding: 0 !important; white-space: normal !important; text-align: left !important; }
    table.yws-m-contracts tbody td:nth-child(1) { display: block !important; font-weight: 600; }
    table.yws-m-contracts tbody td:nth-child(1)::before { content: "CONTRACT #"; }
    table.yws-m-contracts tbody td:nth-child(3) { display: block !important; overflow: hidden; text-overflow: ellipsis; }
    table.yws-m-contracts tbody td:nth-child(7) { display: block !important; position: absolute; top: 10px; right: 8px; font-size: 12px; color: var(--bs-secondary-color, #888); text-align: right !important; }
    table.yws-m-contracts tbody td:nth-child(8) { display: block !important; position: absolute; top: 32px; right: 8px; text-align: right !important; }
    table.yws-m-contracts tbody td.dataTables_empty { display: block !important; padding: 10px !important; }
    table.yws-m-contracts tbody td:nth-child(2) { display: block !important; font-size: 12px; color: var(--bs-secondary-color, #888); }
    table.yws-m-contracts tbody td:nth-child(2) a { color: inherit; }
    table.yws-m-contracts tbody td:nth-child(2) a::after { content: ""; position: absolute; inset: 0; } /* the whole card opens the contract */
    /* lines: the drag handle only while "Reorder lines" is on */
    #estimate-item-table:not(.yws-reordering) .move-icon, #invoice-item-table:not(.yws-reordering) .move-icon { display: none !important; }
    #estimate-item-table:not(.yws-reordering) .move-icon ~ *, #estimate-item-table:not(.yws-reordering) [style*="margin-left:30px"] { margin-left: 0 !important; }
    .yws-reorder-btn { margin: 0 0 8px 8px; }
    table.yws-reordering tbody tr { cursor: grab; }
}

/* YWS: the calendar on phones: no label / event-type filters, the list opens first (Month is a tap away) */
@media (max-width: 767px) {
    #page-content .yws-hide-phone,
    #page-content #calendar-filter-dropdown,
    #page-content #event-labels-dropdown,
    #page-content #s2id_event-labels-dropdown,
    #page-content .select2-container:has(+ #event-labels-dropdown) { display: none !important; }
    #event-calendar .fc-header-toolbar { flex-wrap: wrap; gap: 8px; }
    #event-calendar .fc-toolbar-title { font-size: 18px !important; }
    #event-calendar .fc-list-event-title { white-space: normal; }
    #event-calendar .fc-list-event-time { white-space: nowrap; font-size: 12px; }
    #event-calendar .fc-list-day-cushion { font-size: 13px; }
    /* month view: the event and the client's name, wrapped in small text instead of "@…" */
    #event-calendar .fc-daygrid-event { white-space: normal !important; font-size: 9px !important; line-height: 1.15; padding: 1px 2px !important; }
    #event-calendar .fc-daygrid-event .fc-event-title, #event-calendar .fc-daygrid-event .fc-event-main { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; }
    #event-calendar .fc-daygrid-event svg, #event-calendar .fc-daygrid-event .fc-event-time { display: none !important; }
    #event-calendar .fc-daygrid-day-frame { min-height: 70px; }
}

/* YWS: Events page Simple view, like the crew app */
.yws-cal-switch .btn.active { color: #fff; }
#yws-simple-cal { max-width: 720px; margin: 0 auto; }
#yws-simple-cal .ysc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
#yws-simple-cal .ysc-title { flex: 1; text-align: center; font-size: 20px; margin: 0; }
#yws-simple-cal .ysc-nav { border: 1px solid var(--bs-border-color, #e3e3e3); background: none; border-radius: 10px; width: 38px; height: 38px; font-size: 22px; line-height: 1; color: inherit; }
#yws-simple-cal .ysc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
#yws-simple-cal .ysc-w { text-align: center; font-size: 12px; color: var(--bs-secondary-color, #8a8a8a); padding: 4px 0; }
#yws-simple-cal .ysc-day { min-height: 64px; border: 1px solid var(--bs-border-color, #ececec); border-radius: 10px; background: none; padding: 4px; display: flex; flex-direction: column; align-items: stretch; gap: 3px; color: inherit; text-align: left; }
#yws-simple-cal .ysc-day .n { font-size: 13px; font-weight: 600; }
#yws-simple-cal .ysc-day .bar { height: 5px; border-radius: 3px; }
#yws-simple-cal .ysc-day .more { font-size: 10px; color: var(--bs-secondary-color, #8a8a8a); }
#yws-simple-cal .ysc-day.past { opacity: .55; }
#yws-simple-cal .ysc-day.today { border-color: #8a9a5b; box-shadow: inset 0 0 0 1px #8a9a5b; }
#yws-simple-cal .ysc-day.picked { background: rgba(138, 154, 91, .12); }
#yws-simple-cal .ysc-sheet { margin-top: 14px; border-top: 1px solid var(--bs-border-color, #ececec); padding-top: 12px; }
#yws-simple-cal .ysc-sheet-title { font-weight: 700; margin-bottom: 8px; }
#yws-simple-cal .ysc-h { margin: 22px 0 8px; font-size: 15px; }
#yws-simple-cal .ysc-line { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 6px 10px 12px; margin: 6px 0; border: 0; border-left: 4px solid #2d9cdb; border-bottom: 1px solid var(--bs-border-color, #f0f0f0); background: none; text-align: left; color: inherit; border-radius: 4px; }
#yws-simple-cal .ysc-line:hover { background: rgba(0, 0, 0, .03); }
#yws-simple-cal .ysc-d { width: 58px; flex: none; font-size: 12px; color: var(--bs-secondary-color, #8a8a8a); }
#yws-simple-cal .ysc-b { flex: 1; min-width: 0; }
#yws-simple-cal .ysc-b strong { display: block; font-size: 14px; }
#yws-simple-cal .ysc-b span { display: block; font-size: 12px; color: var(--bs-secondary-color, #8a8a8a); }
@media (max-width: 767px) {
    #yws-simple-cal .ysc-day { min-height: 48px; padding: 3px; border-radius: 8px; }
}

/* YWS: Calendar & list, more */
#yws-simple-cal { max-width: 1200px; }
#yws-simple-cal .ysc-cols { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 992px) {
    #yws-simple-cal .ysc-cols { grid-template-columns: minmax(380px, 1.1fr) 1fr; align-items: start; }
    #yws-simple-cal .ysc-right { max-height: calc(100vh - 230px); overflow-y: auto; padding-right: 4px; }
}
#yws-simple-cal .ysc-day .n { display: flex; align-items: center; justify-content: space-between; }
#yws-simple-cal .ysc-day.busy:not(.past) { background: rgba(45, 156, 219, .04); }
.ysc-warn-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #e67e22; vertical-align: middle; margin-right: 4px; }
#yws-simple-cal .ysc-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: 12px; color: var(--bs-secondary-color, #8a8a8a); }
#yws-simple-cal .ysc-legend .bar { display: inline-block; width: 16px; height: 5px; border-radius: 3px; vertical-align: middle; margin-right: 5px; }
#yws-simple-cal .ysc-tools { position: sticky; top: 0; z-index: 2; background: var(--bs-body-bg, #fff); padding-bottom: 8px; }
#yws-simple-cal .ysc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 6px; }
#yws-simple-cal .ysc-chip { border: 1px solid var(--bs-border-color, #e3e3e3); background: none; border-radius: 16px; padding: 4px 12px; font-size: 13px; color: inherit; }
#yws-simple-cal .ysc-chip.active { background: #8a9a5b; border-color: #8a9a5b; color: #fff; }
#yws-simple-cal .ysc-chip b { font-weight: 700; }
#yws-simple-cal .ysc-sheet-title { display: flex; justify-content: space-between; align-items: center; }
#yws-simple-cal .ysc-close { border: 0; background: none; font-size: 22px; line-height: 1; color: var(--bs-secondary-color, #8a8a8a); }
#yws-simple-cal .ysc-h { margin: 14px 0 6px; }
#yws-simple-cal .ysc-day-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--bs-secondary-color, #8a8a8a); margin: 14px 0 2px; }
#yws-simple-cal .ysc-day-h.is-today { color: #8a9a5b; }
#yws-simple-cal .ysc-time { width: 64px; flex: none; font-size: 12px; color: var(--bs-secondary-color, #8a8a8a); align-self: flex-start; padding-top: 2px; }
#yws-simple-cal .ysc-b .ysc-client { color: inherit; font-size: 13px; }
#yws-simple-cal .ysc-b .ysc-issue { color: #d35400; }
#yws-simple-cal .ysc-line { align-items: flex-start; }

#yws-simple-cal .ysc-day.picked { background: #8a9a5b !important; border-color: #8a9a5b !important; color: #fff; opacity: 1; }
#yws-simple-cal .ysc-day.picked .n { color: #fff; }

/* YWS: phone lists, one tidy set. Every list row is a card. A phone-card row (first cell holds the card) shows only
   that cell; a row that came from the wide table (the list loaded wide, then the screen narrowed) lays its cells out
   as a card. The Leads list shows what matters: name and status, phone with WhatsApp/call, dates, Follow-up, menu. */
@media (max-width: 767px) {
    table.dataTable.no-title, table.dataTable.no-title > tbody, #lead-table, #lead-table > tbody { display: block !important; width: 100% !important; min-width: 0 !important; }
    table.dataTable.no-title > thead, #lead-table > thead { display: none !important; }
    table.dataTable.no-title > tbody > tr, #lead-table > tbody > tr { display: flex !important; flex-wrap: wrap; align-items: center; gap: 6px 10px; width: auto !important; box-sizing: border-box; }
    table.dataTable.no-title > tbody > tr > td, #lead-table > tbody > tr > td { display: block; width: auto !important; min-width: 0 !important; max-width: 100% !important; border: 0 !important; padding: 0 !important; white-space: normal !important; }
    table.dataTable.no-title > tbody > tr:has(> td:first-child .box-wrapper) > td:not(:first-child) { display: none !important; }
    table.dataTable.no-title > tbody > tr > td:first-child { flex: 1 1 100%; }
    table.dataTable.no-title > tbody > tr > td:empty, #lead-table > tbody > tr > td:empty { display: none !important; }

    /* lead cards */
    #lead-table > tbody > tr { margin: 0 0 10px; padding: 14px 14px 12px; background: var(--bs-body-bg, #fff); border: 1px solid rgba(0, 0, 0, .06) !important; border-radius: 14px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 14px rgba(0, 0, 0, .04); }
    #lead-table > tbody > tr > td:first-child { order: 1; flex: 1 1 auto; font-weight: 600; font-size: 15.5px; }
    #lead-table > tbody > tr > td:first-child a { color: inherit; }
    #lead-table > tbody > tr > td:has(.la-labels) { display: none !important; }
    #lead-table > tbody > tr > td:has(.la-status) { order: 2; flex: 0 0 auto; }
    #lead-table > tbody > tr > td:has(.la-phone) { order: 3; flex: 1 1 100%; }
    #lead-table > tbody > tr > td:has(.la-phone) .la-phone { display: flex; align-items: center; gap: 8px; }
    #lead-table > tbody > tr > td:has(.la-phone) .la-phone + .la-phone { display: none; }
    #lead-table > tbody > tr > td:not(:has(*)):not(:first-child) { order: 4; flex: 1 1 100%; font-size: 12.5px; color: var(--bs-secondary-color, #8a8a8a); white-space: nowrap !important; overflow: hidden; text-overflow: ellipsis; }
    #lead-table > tbody > tr > td:has(.la-followup-btn) { order: 5; display: flex !important; align-items: center; gap: 8px; flex: 1 1 auto; padding-top: 4px !important; }
    #lead-table > tbody > tr > td:has(.la-followup-btn) .la-followup-state { margin: 0; }
    #lead-table > tbody > tr > td.option { order: 6; display: flex !important; gap: 4px; margin-left: auto; }
    #lead-table > tbody > tr:has(> td:first-child .box-wrapper) { padding: 12px; }
    .dataTables_wrapper:has(#lead-table) { overflow-x: hidden; }
}

/* YWS: pop-up windows on phones: footer buttons wrap instead of running off the edge; the main button comes first */
@media (max-width: 767px) {
    #ajaxModal .modal-footer { flex-wrap: wrap; gap: 8px; justify-content: stretch; }
    #ajaxModal .modal-footer > .btn, #ajaxModal .modal-footer > a.btn { flex: 1 1 auto; margin: 0 !important; }
    #ajaxModal .modal-footer > .btn-primary, #ajaxModal .modal-footer > .btn-success, #ajaxModal .modal-footer > button[type=submit] { order: -1; flex-basis: 100%; }
}

/* YWS: Calendar & list, a chip per client: their colour and name (just the colour on phones) */
#yws-simple-cal .ysc-day .chip { display: block; color: #fff; font-size: 11px; line-height: 16px; height: 16px; padding: 0 5px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
#yws-simple-cal .ysc-day .chip.tentative { opacity: .45; }
#yws-simple-cal .ysc-line.tentative { border-left-style: dashed !important; }
#yws-simple-cal .ysc-day.picked .chip { box-shadow: 0 0 0 1px rgba(255, 255, 255, .6); }
@media (max-width: 767px) {
    /* phones: a small name in the client's colour (cut short when it doesn't fit) */
    #yws-simple-cal .ysc-day .chip { height: 14px; line-height: 14px; padding: 0 3px; font-size: 9.5px; font-weight: 600; letter-spacing: -.1px; border-radius: 3px; text-overflow: clip; margin-top: 2px; }
    #yws-simple-cal .ysc-day { padding-left: 3px !important; padding-right: 3px !important; }
}

/* YWS: Calendar & list, every day column the same width; long names are cut */
#yws-simple-cal .ysc-grid { grid-template-columns: repeat(7, minmax(0, 1fr)) !important; }
#yws-simple-cal .ysc-day { min-width: 0; overflow: hidden; }
#yws-simple-cal .ysc-day .chip { max-width: 100%; }

/* YWS: Calendar & list, who's on each event, on the right of its line */
#yws-simple-cal .ysc-crew { flex: 0 1 46%; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; align-self: center; }
#yws-simple-cal .ysc-crew i { font-style: normal; font-size: 11.5px; background: #f1f3ee; color: #4b5a2e; border-radius: 10px; padding: 2px 8px; white-space: nowrap; }
#yws-simple-cal .ysc-crew i.open { background: #fdf0e3; color: #b9580c; font-weight: 600; }
@media (max-width: 767px) { #yws-simple-cal .ysc-crew { flex-basis: 100%; justify-content: flex-start; padding-left: 76px; } #yws-simple-cal .ysc-line { flex-wrap: wrap; } }

#yws-simple-cal .ysc-hol { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; margin: 0 0 0 6px; color: var(--bs-secondary-color, #6c757d); }

/* YWS: dashboard "Today" section */
#yws-today { margin: 0 0 22px; }
#yws-today .yt-head { display: flex; align-items: flex-end; justify-content: space-between; margin: 4px 2px 12px; }
#yws-today .yt-head h2 { margin: 0; font-size: 22px; font-weight: 700; }
#yws-today .yt-date { color: var(--bs-secondary-color, #8a8a8a); font-size: 13px; }
#yws-today .yt-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
#yws-today .yt-tile { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 16px; background: var(--bs-body-bg, #fff); border: 1px solid rgba(0, 0, 0, .06); box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 6px 18px rgba(0, 0, 0, .04); color: inherit; text-decoration: none; transition: transform .12s ease, box-shadow .12s ease; }
#yws-today .yt-tile:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(0, 0, 0, .05), 0 10px 24px rgba(0, 0, 0, .07); }
#yws-today .yt-ic { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: #eef1e6; color: #6b7c3f; margin-bottom: 6px; }
#yws-today .yt-tile.hot .yt-ic { background: #fdecea; color: #c0392b; }
#yws-today .yt-tile.warn .yt-ic { background: #fdf0e3; color: #c0650f; }
#yws-today .yt-tile.ok .yt-ic { background: #e8f8ef; color: #1e8449; }
#yws-today .yt-v { font-size: 22px; font-weight: 700; line-height: 1.15; }
#yws-today .yt-tile.hot .yt-v { color: #c0392b; }
#yws-today .yt-l { font-weight: 600; font-size: 13px; }
#yws-today .yt-s { font-size: 11.5px; color: var(--bs-secondary-color, #8a8a8a); }
#yws-today .yt-loading { grid-column: 1 / -1; color: var(--bs-secondary-color, #8a8a8a); padding: 18px; }
#yws-today .yt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
#yws-today .yt-card { background: var(--bs-body-bg, #fff); border: 1px solid rgba(0, 0, 0, .06); border-radius: 16px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 6px 18px rgba(0, 0, 0, .04); overflow: hidden; }
#yws-today .yt-card-h { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; font-weight: 700; font-size: 14px; border-bottom: 1px solid rgba(0, 0, 0, .05); }
#yws-today .yt-card-h a { font-weight: 500; font-size: 12.5px; }
#yws-today .yt-card-b { padding: 4px 8px 10px; max-height: 360px; overflow-y: auto; }
#yws-today .yt-row { display: flex; gap: 10px; align-items: center; padding: 9px 8px; border-radius: 10px; color: inherit; text-decoration: none; }
#yws-today a.yt-row:hover { background: rgba(0, 0, 0, .03); }
#yws-today .yt-row + .yt-row { border-top: 1px solid rgba(0, 0, 0, .04); }
#yws-today .yt-when { width: 74px; flex: none; font-size: 12px; font-weight: 600; color: #6b7c3f; }
#yws-today .yt-when small, #yws-today .yt-what small { display: block; font-weight: 400; color: var(--bs-secondary-color, #8a8a8a); font-size: 11.5px; }
#yws-today .yt-what { flex: 1; min-width: 0; }
#yws-today .yt-what b { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#yws-today .yt-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
#yws-today .yt-tags i { font-style: normal; font-size: 11px; background: #f1f3ee; color: #4b5a2e; border-radius: 10px; padding: 1px 7px; }
#yws-today .yt-tags i.open { background: #fdf0e3; color: #b9580c; font-weight: 600; }
#yws-today .yt-tags i.soft { background: #fff7d6; color: #8a6d00; }
#yws-today .yt-amt { flex: none; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
#yws-today .yt-amt.hot { color: #c0392b; }
#yws-today .yt-amt.warn { color: #c0650f; }
#yws-today .yt-amt.ok { color: #1e8449; }
#yws-today .yt-sub { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--bs-secondary-color, #8a8a8a); margin: 10px 8px 2px; font-weight: 700; }
#yws-today .yt-empty { color: var(--bs-secondary-color, #8a8a8a); padding: 14px 8px; font-size: 13px; }
@media (max-width: 1399px) { #yws-today .yt-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1199px) { #yws-today .yt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) {
    #yws-today .yt-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    #yws-today .yt-grid { grid-template-columns: 1fr; }
    #yws-today .yt-tile { padding: 12px; }
    #yws-today .yt-v { font-size: 19px; }
}
#yws-today .yt-refresh { border: 1px solid rgba(0, 0, 0, .08); background: var(--bs-body-bg, #fff); border-radius: 10px; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; color: inherit; }
#yws-today.yt-busy .yt-refresh svg { animation: yt-spin 1s linear infinite; }
@keyframes yt-spin { to { transform: rotate(360deg); } }
#yws-today .yt-tabs { display: flex; gap: 4px; padding: 8px 12px 0; border-bottom: 1px solid rgba(0, 0, 0, .05); overflow-x: auto; }
#yws-today .yt-tab { border: 0; background: none; padding: 6px 10px 8px; font-size: 13px; color: var(--bs-secondary-color, #6c757d); border-bottom: 2px solid transparent; white-space: nowrap; }
#yws-today .yt-tab b { font-weight: 700; opacity: .7; }
#yws-today .yt-tab.active { color: inherit; font-weight: 600; border-bottom-color: #8a9a5b; }
#yws-today .yt-row.yt-link { cursor: pointer; }
#yws-today .yt-row.yt-link:hover { background: rgba(0, 0, 0, .03); }
#yws-today .yt-acts { display: flex; gap: 6px; flex: none; align-items: center; }
#yws-today .yt-act { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #f1f3ee; color: #4b5a2e; text-decoration: none; }
#yws-today .yt-act:hover { filter: brightness(.95); }
#yws-today .yt-act.wa { background: #e7f8ee; color: #1e8449; }
#yws-today .yt-act.warn { background: #fdf0e3; color: #c0650f; }
#yws-today .yt-act.pill { width: auto; border-radius: 16px; padding: 0 12px; font-size: 12px; gap: 5px; white-space: nowrap; font-weight: 600; }
#yws-today .yt-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #b8bdb0; margin-right: 4px; vertical-align: middle; }
#yws-today .yt-dot.ok { background: #27ae60; }
#yws-today .yt-dot.new { background: #2d9cdb; }
@media (max-width: 767px) {
    #yws-today .yt-row { flex-wrap: wrap; }
    #yws-today .yt-acts { width: 100%; padding-left: 84px; }
}

/* YWS: dashboard Today, two columns */
#yws-today .yt-grid { display: grid !important; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) !important; gap: 14px; align-items: start; }
#yws-today .yt-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
#yws-today .yt-foot { text-align: center; margin: 16px 0 4px; font-size: 12.5px; }
#yws-today .yt-foot a { color: var(--bs-secondary-color, #8a8a8a); }
@media (max-width: 991px) {
    #yws-today .yt-grid { grid-template-columns: 1fr !important; }
    #yws-today .yt-grid { display: flex !important; flex-direction: column; }
    #yws-today .yt-col { display: contents; }
    #yws-today #yt-events { order: 1; }
    #yws-today #yt-payments { order: 2; }
    #yws-today #yt-leads { order: 3; }
    #yws-today #yt-crew { order: 4; }
    #yws-today #yt-ai { order: 5; }
    #yws-today #yt-business { order: 6; }
    #yws-today #yt-note { order: 7; }
}

/* YWS: dashboard Business card */
#yws-today .yt-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 8px; }
#yws-today .yt-stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: #f6f7f2; color: inherit; text-decoration: none; }
#yws-today .yt-stat:hover { filter: brightness(.97); }
#yws-today .yt-stat span { font-size: 12px; color: var(--bs-secondary-color, #6c757d); }
#yws-today .yt-stat b { font-size: 20px; line-height: 1.1; }
#yws-today .yt-stat em { font-style: normal; font-size: 12px; font-weight: 600; }
#yws-today .yt-stat.hot { background: #fdecea; } #yws-today .yt-stat.hot b, #yws-today .yt-stat.hot em { color: #c0392b; }
#yws-today .yt-stat.warn { background: #fdf3e7; } #yws-today .yt-stat.warn b { color: #c0650f; }
#yws-today .yt-stat.ok { background: #eaf7ef; } #yws-today .yt-stat.ok b { color: #1e8449; }
#yws-today .yt-progress { height: 8px; border-radius: 6px; background: #fdecea; margin: 6px 10px; overflow: hidden; }
#yws-today .yt-progress div { height: 100%; background: #27ae60; border-radius: 6px; }
#yws-today .yt-totals { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; padding: 4px 10px 6px; font-size: 12.5px; color: var(--bs-secondary-color, #6c757d); }
#yws-today .yt-totals b { color: var(--bs-body-color, #222); } #yws-today .yt-totals b.hot { color: #c0392b; }
#yws-today .yt-chart { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; align-items: end; height: 150px; padding: 12px 10px 0; }
#yws-today .yt-bar { display: flex; flex-direction: column; align-items: center; height: 100%; cursor: default; }
#yws-today .yt-bars { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
#yws-today .yt-bars i { display: block; width: 40%; border-radius: 4px 4px 0 0; min-height: 2px; }
#yws-today i.inv { background: #9fb7d9; } #yws-today i.rec { background: #27ae60; }
#yws-today .yt-bar span { font-size: 11px; color: var(--bs-secondary-color, #8a8a8a); margin-top: 4px; }
#yws-today .yt-bar:hover .yt-bars i { filter: brightness(.9); }
#yws-today .yt-legend { display: flex; gap: 14px; padding: 8px 10px 4px; font-size: 12px; color: var(--bs-secondary-color, #6c757d); }
#yws-today .yt-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: middle; }
#yws-today .yt-hint { margin-left: auto; }
@media (max-width: 767px) { #yws-today .yt-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } #yws-today .yt-hint { display: none; } }

/* YWS: dashboard sticky note */
#yws-today .yt-note { display: block; width: 100%; min-height: 130px; resize: vertical; border: 0; outline: 0; padding: 12px 14px; background: #fffbe6; font-size: 14px; line-height: 1.5; color: inherit; border-radius: 10px; }
#yws-today #yt-note .yt-card-b { padding: 8px; }
#yws-today .yt-note-state { font-size: 11.5px; color: var(--bs-secondary-color, #8a8a8a); padding: 4px 6px 0; min-height: 18px; text-align: right; }

/* YWS: dashboard you can arrange (order, width, height, hidden cards) */
#yws-today .yt-head-btns { display: flex; gap: 8px; align-items: center; }
#yws-today .yt-edit-btn { border: 1px solid rgba(0, 0, 0, .08); background: var(--bs-body-bg, #fff); border-radius: 10px; height: 36px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: inherit; }
#yws-today.yt-editing .yt-edit-btn { background: #8a9a5b; color: #fff; border-color: #8a9a5b; }
#yws-today .yt-editbar { background: #f6f7f2; border: 1px dashed #b8c19a; border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; }
#yws-today .yt-editbar-t b { display: block; font-size: 14px; } #yws-today .yt-editbar-t span { font-size: 12.5px; color: var(--bs-secondary-color, #6c757d); }
#yws-today .yt-addlist { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
#yws-today .yt-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 16px; background: #fff; border: 1px solid rgba(0, 0, 0, .1); font-size: 13px; cursor: pointer; margin: 0; }
#yws-today .yt-chip.on { background: #eef1e6; border-color: #b8c19a; font-weight: 600; }
#yws-today .yt-editbar-btns { display: flex; justify-content: flex-end; gap: 8px; }
#yws-today .yt-editbar-btns button { border: 1px solid rgba(0, 0, 0, .1); background: #fff; border-radius: 10px; padding: 6px 14px; font-size: 13px; }
#yws-today .yt-editbar-btns .yt-done { background: #8a9a5b; color: #fff; border-color: #8a9a5b; font-weight: 600; }
#yws-today .yt-grid { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; grid-auto-flow: row dense; gap: 14px; align-items: stretch; }
#yws-today .yt-slot { display: flex; flex-direction: column; min-width: 0; grid-column: span 1; }
#yws-today .yt-slot.yt-w2 { grid-column: span 2; }
#yws-today .yt-slot.yt-w3 { grid-column: 1 / -1; }
#yws-today .yt-slot > .yt-card { flex: 1; display: flex; flex-direction: column; min-height: 0; }
#yws-today .yt-slot.yt-hs > .yt-card { height: 300px; flex: none; }
#yws-today .yt-slot.yt-hm > .yt-card { height: 450px; flex: none; }
#yws-today .yt-slot.yt-hl > .yt-card { height: 660px; flex: none; }
#yws-today .yt-slot .yt-card-b { flex: 1; min-height: 0; max-height: none; overflow-y: auto; }
#yws-today #yt-note .yt-card-b { display: flex; flex-direction: column; }
#yws-today #yt-note .yt-note { flex: 1; min-height: 100px; resize: none; }
#yws-today .yt-late { color: #c0392b; }
#yws-today .yt-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 6px 8px; margin-bottom: 6px; background: #eef1e6; border-radius: 12px; }
#yws-today .yt-drag { cursor: grab; width: 30px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: #fff; touch-action: none; }
#yws-today .yt-seg { display: inline-flex; background: #fff; border-radius: 8px; overflow: hidden; border: 1px solid rgba(0, 0, 0, .08); }
#yws-today .yt-seg button { border: 0; background: none; padding: 3px 9px; font-size: 12px; color: inherit; }
#yws-today .yt-seg button.on { background: #8a9a5b; color: #fff; font-weight: 600; }
#yws-today .yt-tools .yt-hide { margin-left: auto; border: 0; background: #fff; border-radius: 8px; width: 30px; height: 28px; display: inline-flex; align-items: center; justify-content: center; }
#yws-today .yt-slot.yt-hidden > .yt-card { opacity: .4; }
#yws-today .yt-slot.sortable-ghost { opacity: .35; }
#yws-today .yt-tiles.yt-off { opacity: .4; }
@media (max-width: 1199px) {
    #yws-today .yt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    #yws-today .yt-slot.yt-w2 { grid-column: 1 / -1; }
}
@media (max-width: 991px) {
    #yws-today .yt-grid { display: grid !important; }
}
@media (max-width: 767px) {
    #yws-today .yt-grid { grid-template-columns: 1fr !important; }
    #yws-today .yt-slot, #yws-today .yt-slot.yt-w2, #yws-today .yt-slot.yt-w3 { grid-column: 1 / -1; }
    #yws-today .yt-slot.yt-hs > .yt-card { height: 280px; } #yws-today .yt-slot.yt-hm > .yt-card { height: 420px; } #yws-today .yt-slot.yt-hl > .yt-card { height: 620px; }
    #yws-today .yt-seg.yt-wseg { display: none; }
    #yws-today .yt-edit-btn span { display: none; }
}

/* YWS: dashboard cards fit what's in them; the height choice is the most a card grows to; cards pack with no holes */
#yws-today .yt-grid { grid-auto-rows: 4px; row-gap: 0 !important; column-gap: 14px; align-items: start; }
#yws-today .yt-slot { padding-bottom: 14px; }
#yws-today .yt-slot > .yt-card, #yws-today .yt-slot.yt-hs > .yt-card, #yws-today .yt-slot.yt-hm > .yt-card, #yws-today .yt-slot.yt-hl > .yt-card { height: auto; flex: none; }
#yws-today .yt-slot.yt-hs > .yt-card { max-height: 300px; }
#yws-today .yt-slot.yt-hm > .yt-card { max-height: 460px; }
#yws-today .yt-slot.yt-hl > .yt-card { max-height: 680px; }
#yws-today .yt-slot .yt-card-b { flex: 1 1 auto; min-height: 0; }
#yws-today #yt-note .yt-note { min-height: 150px; resize: vertical; }
#yws-today .yt-slot .yt-card-h, #yws-today .yt-slot .yt-tabs { flex: none; }

/* YWS: "needs crew" on the calendar is a warning sign, not a dot */
.ysc-warn-dot { width: 13px; height: 12px; border-radius: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 22'%3E%3Cpath d='M10.3 1.5a2 2 0 0 1 3.4 0l9.9 17.2A2 2 0 0 1 21.9 21.7H2.1A2 2 0 0 1 .4 18.7z' fill='%23e67e22'/%3E%3Cpath d='M12 7v6' stroke='%23fff' stroke-width='2.4' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='17' r='1.4' fill='%23fff'/%3E%3C/svg%3E") center / contain no-repeat; vertical-align: -1px; margin: 0 0 0 3px; }
.ysc-legend .ysc-warn-dot { margin: 0 4px 0 0; }

/* YWS: dashboard in dark mode */
html[data-yws-theme="dark"] #yws-today .yt-tile, html[data-yws-theme="dark"] #yws-today .yt-card,
html[data-yws-theme="dark"] #yws-today .yt-refresh, html[data-yws-theme="dark"] #yws-today .yt-edit-btn { background: var(--yd-card) !important; border-color: var(--yd-line); box-shadow: none; color: var(--yd-text); }
html[data-yws-theme="dark"] #yws-today.yt-editing .yt-edit-btn { background: #6f7659 !important; }
html[data-yws-theme="dark"] #yws-today .yt-card-h, html[data-yws-theme="dark"] #yws-today .yt-tabs { border-color: var(--yd-line); }
html[data-yws-theme="dark"] #yws-today .yt-head h2, html[data-yws-theme="dark"] #yws-today .yt-what b, html[data-yws-theme="dark"] #yws-today .yt-l,
html[data-yws-theme="dark"] #yws-today .yt-v, html[data-yws-theme="dark"] #yws-today .yt-tab.active, html[data-yws-theme="dark"] #yws-today .yt-totals b { color: var(--yd-text); }
html[data-yws-theme="dark"] #yws-today .yt-date, html[data-yws-theme="dark"] #yws-today .yt-s, html[data-yws-theme="dark"] #yws-today .yt-when small,
html[data-yws-theme="dark"] #yws-today .yt-what small, html[data-yws-theme="dark"] #yws-today .yt-tab, html[data-yws-theme="dark"] #yws-today .yt-empty,
html[data-yws-theme="dark"] #yws-today .yt-sub, html[data-yws-theme="dark"] #yws-today .yt-stat span, html[data-yws-theme="dark"] #yws-today .yt-totals,
html[data-yws-theme="dark"] #yws-today .yt-legend, html[data-yws-theme="dark"] #yws-today .yt-bar span, html[data-yws-theme="dark"] #yws-today .yt-note-state,
html[data-yws-theme="dark"] #yws-today .yt-loading, html[data-yws-theme="dark"] #yws-today .yt-stat em, html[data-yws-theme="dark"] #yws-today .yt-editbar-t span { color: var(--yd-muted); }
html[data-yws-theme="dark"] #yws-today .yt-when { color: #c4d39a; }
html[data-yws-theme="dark"] #yws-today .yt-card-h a { color: var(--yd-link); }
html[data-yws-theme="dark"] #yws-today .yt-row + .yt-row { border-color: rgba(255, 255, 255, .07); }
html[data-yws-theme="dark"] #yws-today .yt-row.yt-link:hover, html[data-yws-theme="dark"] #yws-today a.yt-row:hover { background: rgba(255, 255, 255, .05); }
html[data-yws-theme="dark"] #yws-today .yt-ic, html[data-yws-theme="dark"] #yws-today .yt-act { background: var(--yd-raised); color: #cfdab2; }
html[data-yws-theme="dark"] #yws-today .yt-tile.hot .yt-ic { background: #3a1f1d; color: #ff8a7a; }
html[data-yws-theme="dark"] #yws-today .yt-tile.warn .yt-ic, html[data-yws-theme="dark"] #yws-today .yt-act.warn { background: #3a2c1c; color: #f0b278; }
html[data-yws-theme="dark"] #yws-today .yt-tile.ok .yt-ic, html[data-yws-theme="dark"] #yws-today .yt-act.wa { background: #1c3326; color: #6fd49a; }
html[data-yws-theme="dark"] #yws-today .yt-tile.hot .yt-v, html[data-yws-theme="dark"] #yws-today .yt-amt.hot, html[data-yws-theme="dark"] #yws-today .yt-totals b.hot, html[data-yws-theme="dark"] #yws-today .yt-late { color: #ff8a7a; }
html[data-yws-theme="dark"] #yws-today .yt-amt.warn { color: #f0b278; }
html[data-yws-theme="dark"] #yws-today .yt-amt.ok { color: #6fd49a; }
html[data-yws-theme="dark"] #yws-today .yt-tags i { background: var(--yd-raised); color: var(--yd-text); }
html[data-yws-theme="dark"] #yws-today .yt-tags i.open { background: #3a2c1c; color: #f0b278; }
html[data-yws-theme="dark"] #yws-today .yt-tags i.soft { background: #3a3420; color: #e8cf7a; }
html[data-yws-theme="dark"] #yws-today .yt-stat { background: var(--yd-raised); }
html[data-yws-theme="dark"] #yws-today .yt-stat b { color: var(--yd-text); }
html[data-yws-theme="dark"] #yws-today .yt-stat.hot { background: #3a1f1d; } html[data-yws-theme="dark"] #yws-today .yt-stat.hot b, html[data-yws-theme="dark"] #yws-today .yt-stat.hot em { color: #ff8a7a; }
html[data-yws-theme="dark"] #yws-today .yt-stat.warn { background: #3a2c1c; } html[data-yws-theme="dark"] #yws-today .yt-stat.warn b { color: #f0b278; }
html[data-yws-theme="dark"] #yws-today .yt-stat.ok { background: #1c3326; } html[data-yws-theme="dark"] #yws-today .yt-stat.ok b { color: #6fd49a; }
html[data-yws-theme="dark"] #yws-today .yt-progress { background: #3a1f1d; }
html[data-yws-theme="dark"] #yws-today i.inv { background: #5d7ab0; }
html[data-yws-theme="dark"] #yws-today .yt-note { background: #2a2a20; color: var(--yd-text); }
html[data-yws-theme="dark"] #yws-today .yt-editbar { background: var(--yd-card); border-color: #59603f; }
html[data-yws-theme="dark"] #yws-today .yt-chip, html[data-yws-theme="dark"] #yws-today .yt-editbar-btns button { background: var(--yd-raised); border-color: var(--yd-line); color: var(--yd-text); }
html[data-yws-theme="dark"] #yws-today .yt-chip.on { background: #33392a; border-color: #6f7659; }
html[data-yws-theme="dark"] #yws-today .yt-editbar-btns .yt-done { background: #6f7659; border-color: #6f7659; }
html[data-yws-theme="dark"] #yws-today .yt-tools { background: var(--yd-raised); }
html[data-yws-theme="dark"] #yws-today .yt-drag, html[data-yws-theme="dark"] #yws-today .yt-seg, html[data-yws-theme="dark"] #yws-today .yt-tools .yt-hide { background: var(--yd-card); border-color: var(--yd-line); color: var(--yd-text); }
html[data-yws-theme="dark"] #yws-today .yt-seg button { color: var(--yd-text); }

/* YWS: search box always visible in the header (computers); phones keep the search in the menu */
.yws-topsearch-li { display: flex; align-items: center; margin-right: 6px; }
.yws-topsearch { display: flex; align-items: center; gap: 8px; width: 320px; height: 38px; margin: 0; padding: 0 10px 0 12px; border: 1px solid rgba(120, 130, 100, .25); border-radius: 12px; background: rgba(255, 255, 255, .7); cursor: text; color: var(--bs-secondary-color, #6c757d); }
.yws-topsearch:hover { border-color: rgba(120, 130, 100, .45); }
.yws-topsearch input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 13.5px; color: inherit; }
.yws-topsearch kbd { font-size: 11px; padding: 1px 6px; border-radius: 5px; background: rgba(0, 0, 0, .06); color: inherit; box-shadow: none; }
#topbar-search-btn { display: none !important; }
@media (max-width: 1199px) { .yws-topsearch { width: 220px; } }
@media (max-width: 767px) { .yws-topsearch-li { display: none !important; } #topbar-search-btn { display: list-item !important; } }
.quick-add-dropdown .dropdown-item { display: flex; align-items: center; padding: 8px 16px; }
html[data-yws-theme="dark"] .yws-topsearch { background: var(--yd-raised); border-color: var(--yd-line); color: var(--yd-muted); }
html[data-yws-theme="dark"] .yws-topsearch kbd { background: var(--yd-card); }

/* YWS: header search types in place, with a "search in" choice and results under the box */
.yws-topsearch { position: relative; width: 420px; }
.yws-topsearch select { border: 0; background: rgba(120, 130, 100, .12); border-radius: 8px; font-size: 12.5px; padding: 3px 4px; color: inherit; max-width: 108px; outline: 0; cursor: pointer; }
.yws-topsearch input::-webkit-search-cancel-button { cursor: pointer; }
.yws-topsearch.busy > svg { animation: yt-spin 1s linear infinite; }
.yws-topsearch-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; max-height: 70vh; overflow-y: auto; background: var(--bs-body-bg, #fff); border: 1px solid rgba(120, 130, 100, .25); border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, .14); padding: 6px; z-index: 1060; }
.yws-ts-group { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; opacity: .6; padding: 8px 10px 4px; }
.yws-ts-hit { display: block; padding: 7px 10px; border-radius: 8px; color: inherit !important; text-decoration: none !important; }
.yws-ts-hit span { display: block; font-size: 13.5px; }
.yws-ts-hit small { display: block; font-size: 12px; opacity: .65; }
.yws-ts-hit.active { background: rgba(120, 130, 100, .14); }
.yws-ts-none { padding: 12px 10px; opacity: .65; font-size: 13px; }
@media (max-width: 1399px) { .yws-topsearch { width: 340px; } }
@media (max-width: 1199px) { .yws-topsearch { width: 260px; } .yws-topsearch select { max-width: 84px; } .yws-topsearch kbd { display: none; } }
html[data-yws-theme="dark"] .yws-topsearch-results { background: var(--yd-card); border-color: var(--yd-line); }
html[data-yws-theme="dark"] .yws-topsearch select { background: var(--yd-card); color: var(--yd-text); }

/* YWS: phones get the search box at the top of every page */
#yws-phone-search { position: relative; z-index: 30; padding: 10px 12px 8px; }
#yws-phone-search .yws-topsearch { display: flex; width: 100%; height: 42px; background: #fff; }
#yws-phone-search .yws-topsearch kbd { display: none; }
#yws-phone-search .yws-topsearch input { font-size: 16px; }
#yws-phone-search .yws-topsearch select { max-width: 96px; }
#yws-phone-search .yws-topsearch-results { max-height: 65vh; }
html[data-yws-theme="dark"] #yws-phone-search { background: var(--yd-bg); }
html[data-yws-theme="dark"] #yws-phone-search .yws-topsearch { background: var(--yd-raised); }

/* YWS: phone side menu uses its full width (no empty strip on the right) */
@media (max-width: 767px) {
    .sidebar .sidebar-scroll, .sidebar #sidebar-menu { width: 100% !important; }
}

/* YWS: pop-ups on phones (or a narrow window) keep one steady size: as tall as what's in them, the window scrolls */
@media (max-width: 767px) {
    #ajaxModal .modal-body { height: auto !important; min-height: 0 !important; max-height: none !important; overflow-y: visible !important; }
    #ajaxModal .modal-body > .ps__rail-x, #ajaxModal .modal-body > .ps__rail-y { display: none !important; }
}

/* YWS: back and forward in the top bar */
.yws-nav-li .nav-link { opacity: .75; }
.yws-nav-li .nav-link:hover { opacity: 1; }
.yws-nav-li + .yws-nav-li { margin-right: 6px; border-right: 1px solid rgba(120, 130, 100, .2); }
@media (max-width: 767px) { .yws-nav-back-li { order: 2; } .yws-nav-back-li .nav-link { padding-left: 6px; padding-right: 6px; } }

/* YWS: crew pay: Paid tag and Mark paid button (event crew box, Pay report) */
.ec-crew-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.ec-paid-tag { display: inline-block; font-size: 12px; font-weight: 600; color: #1e8449; background: #e7f6ec; border-radius: 12px; padding: 2px 10px; white-space: nowrap; }
a.ec-mark-paid:not(.btn) { font-size: 12px; font-weight: 600; color: #b9580c; background: #fdf0e3; border-radius: 12px; padding: 3px 10px; text-decoration: none; white-space: nowrap; }
a.ec-mark-paid.busy { opacity: .5; pointer-events: none; }
html[data-yws-theme="dark"] .ec-paid-tag { background: #1c3326; color: #6fd49a; }
html[data-yws-theme="dark"] a.ec-mark-paid:not(.btn) { background: #3a2c1c; color: #f0b278; }
