/* Approved shared card heading; reference: docs/agent-rules/ui.md. */
.crm-card-heading {
    font-family: var(--crm-font);
    font-size: clamp(30px, 2.8vw, 38px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.8px;
    color: #173c70;
    background: linear-gradient(180deg, #103263 12%, #2467ae 58%, #103263 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 1px 0 #ffffffeb);
}
.crm-card-heading::after {
    content: '';
    display: block;
    width: 88px;
    height: 6px;
    margin: 10px auto 0;
    border-radius: 999px;
    background: linear-gradient(180deg, #d9f3ff, #73b8ec 48%, #3886c9);
    box-shadow: inset 0 1px 1px #ffffffd9, 0 1px 2px #245a8b26;
}

/* One return control at the left edge of each card header. */
body button.crm-back-button {
    position: relative;
    display: inline-block;
    flex: 0 0 70px;
    width: 70px !important;
    min-width: 70px !important;
    height: 70px !important;
    margin: 0;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 0 !important;
    cursor: pointer;
    transition: transform 160ms ease, filter 160ms ease;
}
body button.crm-back-button::before {
    content: '';
    position: absolute;
    inset: 0 0 20%;
    z-index: 1;
    background: url('/icons/template-back-symbol.webp') center / contain no-repeat;
}
body button.crm-back-button::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    height: 39.453125%;
    background: url('/icons/template-pedestal.webp') center bottom / contain no-repeat;
}
body button.crm-back-button:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.06);
    filter: drop-shadow(0 3px 3px #1e40af26);
}
body button.crm-back-button:active:not(:disabled) { transform: translateY(1px) scale(.96); filter: none; }
body button.crm-back-button:focus-visible { outline: none; filter: drop-shadow(0 0 5px #4daeff88); }
body button.crm-back-button[hidden] { display: none; }
#orderCardView .order-header-left { flex-direction: row; align-items: center; gap: 16px; }
@media (max-width: 1500px) {
    #orderCardView .order-card-header { grid-template-columns: minmax(0, 1fr) auto; }
    #orderCardView .order-header-left { grid-column: 1; grid-row: 1; }
    #orderCardView .order-header-actions { grid-column: 2; grid-row: 1; }
    #orderCardView .order-progress-wrapper { grid-column: 1 / -1; grid-row: 2; }
}
@media (prefers-reduced-motion: reduce) { body button.crm-back-button { transition: none; } }
@media (max-width: 1100px) {
    #orderCardView .order-card-header { grid-template-columns:minmax(0,1fr); }
    #orderCardView .order-header-left { grid-column:1; grid-row:1; }
    #orderCardView .order-header-actions { grid-column:1; grid-row:2; justify-content:flex-end; }
}

