/* ==========================================================================
   UTP V2 PLATFORM-WIDE CANONICAL UI ADOPTION — PASS 1
   --------------------------------------------------------------------------
   Platform owns shared visual roles.
   Workspace CSS remains allowed and expected for business-specific layout.

   This compatibility layer normalizes historical workspace selectors while
   screens migrate incrementally to the canonical utp-ui-* components.
   ========================================================================== */

/* ---------- Shared workspace typography ---------- */

html body .utp-platform-workspace-window,
html body .utp-platform-workspace-window input,
html body .utp-platform-workspace-window select,
html body .utp-platform-workspace-window textarea,
html body .utp-platform-workspace-window button {
    font-family: var(--utp-ui-font-family);
}

html body .utp-platform-workspace-window h1,
html body .utp-platform-workspace-window h2,
html body .utp-platform-workspace-window h3,
html body .utp-platform-workspace-window h4,
html body .utp-platform-workspace-window h5,
html body .utp-platform-workspace-window h6 {
    font-family: var(--utp-ui-font-family);
    color: var(--utp-ui-text);
}

html body .utp-platform-workspace-window p {
    font-family: var(--utp-ui-font-family);
}

/* ---------- Generic historical form primitives ---------- */

html body .utp-platform-workspace-window .utp-field__label,
html body .utp-platform-workspace-window .utp-field > label,
html body .utp-platform-workspace-window label.utp-label {
    color: var(--utp-ui-text-secondary);
    font-size: var(--utp-ui-font-label);
    font-weight: var(--utp-ui-weight-bold);
    line-height: 1.25;
}

html body .utp-platform-workspace-window .utp-field__input,
html body .utp-platform-workspace-window .utp-field__select,
html body .utp-platform-workspace-window .utp-field input,
html body .utp-platform-workspace-window .utp-field select,
html body .utp-platform-workspace-window .utp-field textarea {
    border-radius: var(--utp-ui-radius-control);
    font-family: var(--utp-ui-font-family);
    font-size: var(--utp-ui-font-body);
    color: var(--utp-ui-text);
}

html body .utp-platform-workspace-window .utp-field__hint,
html body .utp-platform-workspace-window .utp-help,
html body .utp-platform-workspace-window .utp-muted,
html body .utp-platform-workspace-window small {
    font-size: var(--utp-ui-font-helper);
    line-height: 1.4;
}

/* ---------- Generic historical buttons ---------- */

html body .utp-platform-workspace-window .utp-btn,
html body .utp-platform-workspace-window button:not(.gm-ui-hover-effect),
html body .utp-platform-workspace-window input[type="submit"] {
    border-radius: var(--utp-ui-radius-control);
    font-family: var(--utp-ui-font-family);
    font-size: var(--utp-ui-font-label);
    font-weight: var(--utp-ui-weight-bold);
}

/* ==========================================================================
   MARKET
   ========================================================================== */

html body .utp-platform-workspace-window .utp-hotels-search__bar .utp-field__label {
    font-size: var(--utp-ui-font-label);
}

html body .utp-platform-workspace-window .utp-hotels-search__bar .utp-field__input,
html body .utp-platform-workspace-window .utp-hotels-search__bar select {
    font-size: var(--utp-ui-font-body);
}

html body .utp-platform-workspace-window .utp-market-dashboard,
html body .utp-platform-workspace-window .utp-market-results,
html body .utp-platform-workspace-window .utp-reservations-workspace,
html body .utp-platform-workspace-window .utp-booking-page {
    color: var(--utp-ui-text);
    font-family: var(--utp-ui-font-family);
}

html body .utp-platform-workspace-window .utp-market-dashboard small,
html body .utp-platform-workspace-window .utp-market-results small,
html body .utp-platform-workspace-window .utp-reservations-workspace small,
html body .utp-platform-workspace-window .utp-booking-page small {
    font-size: var(--utp-ui-font-helper);
}

/* ==========================================================================
   ANALYTICS
   ========================================================================== */

html body .utp-platform-workspace-window .utp-analytics {
    width: 100%;
    color: var(--utp-ui-text);
    font-family: var(--utp-ui-font-family);
}

html body .utp-platform-workspace-window .utp-analytics__areas {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--utp-ui-space-4);
    margin-bottom: var(--utp-ui-space-5);
}

html body .utp-platform-workspace-window .utp-analytics-card {
    border: 1px solid var(--utp-ui-border);
    border-radius: var(--utp-ui-radius-card);
    background: var(--utp-ui-surface);
    color: var(--utp-ui-text);
    box-shadow: none;
}

html body .utp-platform-workspace-window .utp-analytics-card.is-active {
    border-color: var(--utp-ui-accent);
}

html body .utp-platform-workspace-window .utp-analytics-card__head strong {
    font-size: var(--utp-ui-font-card-title);
    font-weight: var(--utp-ui-weight-medium);
}

html body .utp-platform-workspace-window .utp-analytics-card p {
    color: var(--utp-ui-text-muted);
    font-size: var(--utp-ui-font-helper);
    line-height: 1.45;
}

html body .utp-platform-workspace-window .utp-analytics-card__status {
    font-size: var(--utp-ui-font-meta);
}

html body .utp-platform-workspace-window .utp-analytics-panel {
    border: 1px solid var(--utp-ui-border);
    border-radius: var(--utp-ui-radius-panel);
    background: var(--utp-ui-surface);
    box-shadow: none;
}

/* ==========================================================================
   DIRECTORY
   ========================================================================== */

html body .utp-platform-workspace-window .utp-directory {
    width: 100%;
    color: var(--utp-ui-text);
    font-family: var(--utp-ui-font-family);
}

html body .utp-platform-workspace-window .utp-directory-search-card,
html body .utp-platform-workspace-window .utp-directory-form-card,
html body .utp-platform-workspace-window .utp-directory-dossier-head {
    border: 1px solid var(--utp-ui-border);
    border-radius: var(--utp-ui-radius-panel);
    background: var(--utp-ui-surface);
    box-shadow: none;
}

html body .utp-platform-workspace-window .utp-directory-eyebrow {
    color: var(--utp-ui-accent);
    font-size: var(--utp-ui-font-eyebrow);
    font-weight: var(--utp-ui-weight-strong);
    letter-spacing: .08em;
}

html body .utp-platform-workspace-window .utp-directory-search-card h2,
html body .utp-platform-workspace-window .utp-directory-form-card h2,
html body .utp-platform-workspace-window .utp-directory-dossier-head h2 {
    font-size: var(--utp-ui-font-page-title);
    font-weight: var(--utp-ui-weight-medium);
}

html body .utp-platform-workspace-window .utp-directory-search-card p,
html body .utp-platform-workspace-window .utp-directory-form-card p,
html body .utp-platform-workspace-window .utp-directory-dossier-head p {
    color: var(--utp-ui-text-muted);
    font-size: var(--utp-ui-font-body);
}

html body .utp-platform-workspace-window .utp-directory-row,
html body .utp-platform-workspace-window .utp-directory-list-row {
    border-color: var(--utp-ui-border);
    border-radius: var(--utp-ui-radius-card);
    font-family: var(--utp-ui-font-family);
}

/* ==========================================================================
   OPERATIONS
   ========================================================================== */

html body .utp-platform-workspace-window .utp-operations-home,
html body .utp-platform-workspace-window .utp-dispatch-home {
    width: 100%;
    color: var(--utp-ui-text);
    font-family: var(--utp-ui-font-family);
}

html body .utp-platform-workspace-window .utp-operations-eyebrow {
    color: var(--utp-ui-accent);
    font-size: var(--utp-ui-font-eyebrow);
    font-weight: var(--utp-ui-weight-strong);
    letter-spacing: .08em;
}

html body .utp-platform-workspace-window .utp-transport-head h2,
html body .utp-platform-workspace-window .utp-dispatch-head h2 {
    font-size: var(--utp-ui-font-page-title);
    font-weight: var(--utp-ui-weight-medium);
}

html body .utp-platform-workspace-window .utp-transport-head p,
html body .utp-platform-workspace-window .utp-dispatch-head p,
html body .utp-platform-workspace-window .utp-transport-section-head p,
html body .utp-platform-workspace-window .utp-dispatch-board__head p {
    color: var(--utp-ui-text-muted);
    font-size: var(--utp-ui-font-body);
    line-height: var(--utp-ui-line-body);
}

html body .utp-platform-workspace-window .utp-transport-type,
html body .utp-platform-workspace-window .utp-dispatch-domain,
html body .utp-platform-workspace-window .utp-transport-transfers,
html body .utp-platform-workspace-window .utp-dispatch-board,
html body .utp-platform-workspace-window .utp-operations-search-card {
    border-color: var(--utp-ui-border);
    border-radius: var(--utp-ui-radius-card);
    background: var(--utp-ui-surface);
    color: var(--utp-ui-text);
    box-shadow: none;
}

html body .utp-platform-workspace-window .utp-transport-type strong,
html body .utp-platform-workspace-window .utp-dispatch-domain strong {
    font-size: var(--utp-ui-font-card-title);
}

html body .utp-platform-workspace-window .utp-transport-type small,
html body .utp-platform-workspace-window .utp-dispatch-domain small {
    color: var(--utp-ui-text-muted);
    font-size: var(--utp-ui-font-helper);
}

/* ==========================================================================
   OFFICE
   ========================================================================== */

html body .utp-platform-workspace-window .utp-office-workspace {
    width: 100%;
    color: var(--utp-ui-text);
    font-family: var(--utp-ui-font-family);
}

html body .utp-platform-workspace-window .utp-office-workspace h2,
html body .utp-platform-workspace-window .utp-office-workspace .utp-admin-title {
    font-size: var(--utp-ui-font-page-title);
    font-weight: var(--utp-ui-weight-medium);
}

html body .utp-platform-workspace-window .utp-office-workspace p {
    font-size: var(--utp-ui-font-body);
    line-height: var(--utp-ui-line-body);
}

/* ==========================================================================
   FINANCE / GENERIC PLACEHOLDERS
   ========================================================================== */

html body .utp-platform-workspace-window .utp-workspace-placeholder,
html body .utp-platform-workspace-window .utp-placeholder {
    padding: var(--utp-ui-panel-padding-lg);
    border: 1px solid var(--utp-ui-border);
    border-radius: var(--utp-ui-radius-panel);
    background: var(--utp-ui-surface);
    color: var(--utp-ui-text);
    font-family: var(--utp-ui-font-family);
}

html body .utp-platform-workspace-window .utp-workspace-placeholder h2,
html body .utp-platform-workspace-window .utp-placeholder h2 {
    font-size: var(--utp-ui-font-page-title);
    font-weight: var(--utp-ui-weight-medium);
}

/* ---------- Tablet ---------- */

@media (min-width: 768px) and (max-width: 1120px) {
    html body .utp-platform-workspace-window .utp-analytics__areas {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
