/* =========================================================
   ConsultaIA — layout inspirado no Google Stitch
   Versão 2.0.0
   ========================================================= */

:root {
    --st-primary: #005c55;
    --st-primary-container: #0f766e;
    --st-primary-fixed: #9cf2e8;
    --st-primary-fixed-dim: #80d5cb;

    --st-secondary: #006398;
    --st-secondary-container: #5bb8fe;
    --st-secondary-fixed: #cce5ff;

    --st-tertiary: #7d4200;
    --st-error: #ba1a1a;
    --st-error-container: #ffdad6;

    --st-surface: #f8f9ff;
    --st-surface-low: #eff4ff;
    --st-surface-container: #e5eeff;
    --st-surface-high: #dce9ff;
    --st-surface-highest: #d3e4fe;
    --st-surface-lowest: #ffffff;

    --st-on-surface: #0b1c30;
    --st-on-surface-variant: #3e4947;
    --st-outline: #6e7977;
    --st-outline-variant: #bdc9c6;

    --st-shadow-sm: 0 1px 8px rgba(0, 0, 0, 0.045);
    --st-shadow-md: 0 4px 20px -4px rgba(15, 118, 110, 0.14);

    --st-radius-sm: 8px;
    --st-radius-md: 12px;
    --st-radius-lg: 16px;
    --st-radius-xl: 20px;
}

html {
    background: var(--st-surface);
}

body {
    margin: 0 !important;
    color: var(--st-on-surface);
    background: var(--st-surface) !important;
    font-family: "Inter", Arial, sans-serif !important;
    overflow-x: hidden;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}

.stitch-app-shell {
    min-height: 100vh;
    background: var(--st-surface);
}

.stitch-main-shell {
    min-height: 100vh;
    margin-left: 288px;
}

.stitch-main-content {
    width: 100%;
    min-height: calc(100vh - 64px);
    padding: 0 !important;
    background: var(--st-surface) !important;
}

.conteudo-principal {
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    max-width: none !important;
}


/* =========================================================
   TOPBAR
   ========================================================= */

.stitch-topbar {
    position: sticky;
    top: 0;
    z-index: 80;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 24px;
    border-bottom: 1px solid rgba(189, 201, 198, 0.45);
    background: rgba(248, 249, 255, 0.94);
    backdrop-filter: blur(14px);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.025);
}

.stitch-topbar-left,
.stitch-topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stitch-topbar-brand img {
    display: block;
    width: 116px;
    max-height: 32px;
    object-fit: contain;
}

.stitch-topbar-secure {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 0 11px;
    border-radius: 999px;
    background: var(--st-surface-low);
    color: var(--st-primary);
    font-size: 11px;
    font-weight: 600;
}

.stitch-topbar-secure .material-symbols-outlined {
    font-size: 17px;
}

.stitch-topbar-avatar {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--st-primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.stitch-topbar-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    color: #fff;
    background: var(--st-primary-container);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
}

.stitch-mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--st-on-surface-variant);
    cursor: pointer;
}

.stitch-mobile-menu-button .material-symbols-outlined {
    font-size: 25px;
}


/* =========================================================
   SIDEBAR
   ========================================================= */

.stitch-sidebar {
    position: fixed !important;
    inset: 0 auto 0 0;
    z-index: 100;
    width: 288px !important;
    height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    background: var(--st-surface-low) !important;
    border-right: 0 !important;
    box-shadow: var(--st-shadow-sm);
    overflow: hidden !important;
}

.stitch-sidebar-scroll {
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 20px 12px 10px;
}

.stitch-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 4px;
    margin-bottom: 20px;
}

.stitch-sidebar-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.stitch-sidebar-brand img {
    display: block;
    width: 132px;
    max-height: 36px;
    object-fit: contain;
}

.stitch-sidebar-close {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--st-on-surface-variant);
    cursor: pointer;
}

.stitch-sidebar-primary {
    flex: 0 0 auto;
}

.stitch-new-consultation,
.botao-nova-consulta.stitch-new-consultation {
    width: 100% !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    margin: 0 0 12px !important;
    padding: 0 16px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--st-primary-container) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(15, 118, 110, 0.16) !important;
    text-decoration: none !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    transition: background 0.18s ease, transform 0.18s ease;
}

.stitch-new-consultation:hover {
    background: var(--st-primary) !important;
    transform: translateY(-1px);
}

.stitch-new-consultation .material-symbols-outlined {
    font-size: 20px;
}

.stitch-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stitch-nav-item,
.menu-lateral-item.stitch-nav-item {
    position: relative;
    width: 100% !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin: 0 !important;
    padding: 0 10px !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: transparent !important;
    color: var(--st-on-surface-variant) !important;
    text-decoration: none !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    transition: 0.16s ease !important;
}

.stitch-nav-item:hover {
    background: var(--st-surface-container) !important;
    color: var(--st-on-surface) !important;
}

.stitch-nav-item.ativo-menu {
    background: var(--st-surface-highest) !important;
    color: var(--st-primary) !important;
    font-weight: 650 !important;
}

.stitch-nav-item .material-symbols-outlined {
    width: 22px;
    flex: 0 0 22px;
    font-size: 20px;
    text-align: center;
}

.stitch-model-dot {
    width: 7px;
    height: 7px;
    margin-left: auto;
    border-radius: 50%;
    background: var(--st-primary);
}

.stitch-sidebar-history,
.sidebar-historico.stitch-sidebar-history {
    min-height: 120px !important;
    flex: 1 1 auto !important;
    margin: 18px 0 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
}

.stitch-sidebar-section-title,
.titulo-secao-sidebar.stitch-sidebar-section-title {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    margin: 0 0 6px !important;
    padding: 0 5px !important;
    color: var(--st-on-surface-variant) !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.07em !important;
}

.stitch-sidebar-section-title .material-symbols-outlined {
    font-size: 16px;
    color: var(--st-outline);
}

.stitch-history-list,
.lista-historicos.stitch-history-list {
    height: calc(100% - 24px);
    overflow-y: auto !important;
    padding: 0 !important;
}

.stitch-history-item,
.item-historico.stitch-history-item {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    margin: 0 0 2px !important;
    padding: 8px 10px !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: transparent !important;
    text-decoration: none !important;
}

.stitch-history-item:hover {
    background: var(--st-surface-container) !important;
}

.stitch-history-item.ativo {
    background: var(--st-surface-highest) !important;
}

.stitch-history-item .historico-titulo {
    display: block;
    overflow: hidden;
    color: var(--st-on-surface) !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1.35;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.stitch-history-item .historico-data {
    display: block;
    color: var(--st-outline) !important;
    font-size: 9px !important;
    font-weight: 500 !important;
}

.stitch-sidebar .historico-vazio {
    padding: 9px 8px !important;
    color: var(--st-outline) !important;
    font-size: 10px !important;
    line-height: 1.5 !important;
}

.stitch-sidebar-footer {
    flex: 0 0 auto;
    padding: 12px;
    border-top: 1px solid rgba(189, 201, 198, 0.28);
    background: var(--st-surface-low);
}

.stitch-plan-card,
.sidebar-assinatura-resumo.stitch-plan-card {
    display: block !important;
    margin: 0 0 8px !important;
    padding: 11px !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: var(--st-surface-lowest) !important;
    box-shadow: var(--st-shadow-sm) !important;
    text-decoration: none !important;
    color: inherit !important;
}

.stitch-plan-card:hover {
    transform: none !important;
}

.stitch-plan-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.stitch-plan-head strong {
    color: var(--st-on-surface);
    font-size: 11px;
    font-weight: 700;
}

.stitch-plan-head span {
    padding: 3px 7px;
    border-radius: 999px;
    background: var(--st-surface-low);
    color: var(--st-primary);
    font-size: 8px;
    font-weight: 700;
}

.stitch-plan-meter + .stitch-plan-meter {
    margin-top: 7px;
}

.stitch-plan-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
    color: var(--st-on-surface-variant);
    font-size: 9px;
}

.stitch-plan-label strong {
    font-size: 9px;
}

.stitch-plan-track {
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--st-surface-high);
}

.stitch-plan-track > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--st-primary);
}

.stitch-plan-track-secondary > span {
    background: var(--st-secondary);
}

.stitch-user-card,
.sidebar-rodape.stitch-user-card {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

.stitch-user-info,
.usuario-logado.stitch-user-info {
    display: grid !important;
    grid-template-columns: 36px minmax(0, 1fr) 40px !important;
    align-items: center !important;
    gap: 9px !important;
    margin: 0 !important;
    padding: 7px !important;
    border-radius: 12px !important;
    background: var(--st-surface-lowest) !important;
    box-shadow: var(--st-shadow-sm) !important;
}

.stitch-user-avatar,
.usuario-avatar.stitch-user-avatar {
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    border-radius: 50% !important;
    background: var(--st-primary) !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 700 !important;
}

.stitch-user-text {
    min-width: 0;
}

.stitch-user-text strong {
    display: block;
    overflow: hidden;
    color: var(--st-on-surface) !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.stitch-user-text span {
    display: block;
    overflow: hidden;
    color: var(--st-outline) !important;
    font-size: 8.5px !important;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.stitch-user-info form {
    margin: 0;
}

.stitch-logout-button,
.botao-logout.stitch-logout-button {
    width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: transparent !important;
    color: var(--st-on-surface-variant) !important;
    cursor: pointer !important;
}

.stitch-logout-button:hover {
    color: var(--st-error) !important;
    background: var(--st-error-container) !important;
}

.stitch-logout-button .material-symbols-outlined {
    font-size: 19px;
}

.stitch-login-button {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--st-primary-container);
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
}

.stitch-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 95;
    display: none;
    background: rgba(33, 49, 69, 0.38);
    backdrop-filter: blur(2px);
}


/* =========================================================
   PAGE HERO
   ========================================================= */

.stitch-consulta-page,
.stitch-rules-page {
    width: 100%;
}

.stitch-hero {
    padding: 24px 28px 18px;
    border-bottom: 1px solid rgba(189, 201, 198, 0.35);
    background: var(--st-surface-lowest);
}

.stitch-hero-row {
    width: 100%;
    max-width: 1520px;
    margin: 0 auto;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.stitch-greeting {
    margin-bottom: 4px;
    color: var(--st-on-surface-variant);
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 15px;
    font-weight: 600;
}

.stitch-hero h1,
.stitch-rules-header h1 {
    margin: 0;
    color: var(--st-on-surface);
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.015em;
}

.stitch-hero p,
.stitch-rules-header p {
    max-width: 760px;
    margin: 7px 0 0;
    color: var(--st-on-surface-variant);
    font-size: 12px;
    line-height: 1.6;
}

.stitch-model-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(156, 242, 232, 0.28);
    color: var(--st-primary);
    text-decoration: none;
    font-size: 10px;
    font-weight: 600;
}

.stitch-model-pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--st-primary);
    box-shadow: 0 0 0 5px rgba(15, 118, 110, 0.09);
}

.stitch-plan-alert,
.stitch-loaded-history,
.stitch-error-alert {
    max-width: 1520px;
    margin: 14px auto 0 !important;
}

.stitch-loaded-history {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid rgba(0, 99, 152, 0.18);
    border-radius: 10px;
    background: rgba(204, 229, 255, 0.42);
    color: var(--st-secondary);
    font-size: 10px;
}

.stitch-loaded-history .material-symbols-outlined {
    font-size: 17px;
}


/* =========================================================
   CONSULTATION FORM / PATIENT RIBBON
   ========================================================= */

.stitch-consultation-form,
.form-consulta.stitch-consultation-form {
    max-width: 1520px !important;
    margin: 0 auto !important;
    padding: 14px 28px 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.stitch-patient-ribbon {
    padding: 12px;
    border: 1px solid rgba(189, 201, 198, 0.28);
    border-radius: 12px;
    background: var(--st-surface-low);
}

.stitch-patient-ribbon-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.stitch-patient-title-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    border-radius: 10px;
    background: var(--st-surface-lowest);
    color: var(--st-primary);
    box-shadow: var(--st-shadow-sm);
}

.stitch-patient-title-icon .material-symbols-outlined {
    font-size: 20px;
}

.stitch-patient-ribbon-title strong {
    display: block;
    color: var(--st-on-surface);
    font-size: 11px;
    font-weight: 700;
}

.stitch-patient-ribbon-title span {
    display: block;
    margin-top: 2px;
    color: var(--st-on-surface-variant);
    font-size: 9px;
    line-height: 1.45;
}

.stitch-patient-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 10px;
    align-items: end;
}

.stitch-patient-fields .campo-form {
    position: relative;
    margin: 0 !important;
}

.stitch-patient-fields label {
    display: block;
    margin: 0 0 5px;
    color: var(--st-on-surface-variant) !important;
    font-size: 9px !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em;
}

.stitch-input-icon-wrap {
    position: relative;
}

.stitch-input-icon-wrap > .material-symbols-outlined {
    position: absolute;
    left: 12px;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    color: var(--st-outline);
    font-size: 19px;
    pointer-events: none;
}

.stitch-patient-fields input {
    width: 100% !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 12px !important;
    border: 0 !important;
    border-radius: 9px !important;
    outline: 0 !important;
    background: var(--st-surface-lowest) !important;
    color: var(--st-on-surface) !important;
    box-shadow: var(--st-shadow-sm) !important;
    font-size: 12px !important;
}

.stitch-input-icon-wrap input {
    padding-left: 40px !important;
}

.stitch-patient-fields input:focus {
    box-shadow:
        0 0 0 2px var(--st-primary),
        var(--st-shadow-sm) !important;
}

.stitch-patient-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 110;
    display: none;
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid rgba(189, 201, 198, 0.6);
    border-radius: 10px;
    background: var(--st-surface-lowest);
    box-shadow: 0 16px 36px rgba(11, 28, 48, 0.12);
}

.stitch-selected-patient {
    margin-top: 9px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 10px;
    border-radius: 9px;
    background: rgba(156, 242, 232, 0.26);
    color: var(--st-primary);
    font-size: 9.5px;
    font-weight: 500;
}

.stitch-selected-patient .material-symbols-outlined {
    font-size: 16px;
}


/* =========================================================
   RECORDING BAR
   ========================================================= */

.stitch-recording-bar,
.painel-escuta-consulta.stitch-recording-bar {
    position: relative;
    min-height: 92px;
    margin: 12px 0 0 !important;
    padding: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 18px !important;
    border: 1px solid rgba(189, 201, 198, 0.45) !important;
    border-radius: 16px !important;
    background: var(--st-surface-lowest) !important;
    box-shadow: var(--st-shadow-md) !important;
}

.stitch-recording-info,
.escuta-info.stitch-recording-info {
    min-width: 0;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.stitch-mic-shell {
    position: relative;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    border-radius: 50%;
    background: var(--st-surface-container);
    color: var(--st-primary);
}

.stitch-mic-shell > .material-symbols-outlined {
    font-size: 23px;
}

.stitch-recording-dot,
.escuta-indicador.stitch-recording-dot {
    position: absolute !important;
    top: -2px !important;
    right: -2px !important;
    width: 11px !important;
    height: 11px !important;
    border: 2px solid var(--st-surface-lowest) !important;
    border-radius: 50% !important;
    background: var(--st-outline) !important;
    box-shadow: none !important;
}

.stitch-recording-dot.ativo,
.escuta-indicador.stitch-recording-dot.ativo {
    background: var(--st-error) !important;
    animation: stitchRecordingPulse 1.4s infinite !important;
}

@keyframes stitchRecordingPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(186, 26, 26, 0.25);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(186, 26, 26, 0.08);
    }
}

.stitch-recording-title,
#statusEscutaConsulta.stitch-recording-title {
    display: block !important;
    margin: 0 0 3px !important;
    color: var(--st-on-surface) !important;
    font-family: "Plus Jakarta Sans", sans-serif !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
}

#statusEscutaConsulta[data-tipo="gravando"] {
    color: var(--st-error) !important;
}

#statusEscutaConsulta[data-tipo="processando"] {
    color: var(--st-tertiary) !important;
}

#statusEscutaConsulta[data-tipo="sucesso"] {
    color: var(--st-primary) !important;
}

#statusEscutaConsulta[data-tipo="erro"] {
    color: var(--st-error) !important;
}

.stitch-recording-subtitle {
    display: block !important;
    max-width: 650px;
    color: var(--st-on-surface-variant) !important;
    font-size: 9.5px !important;
    line-height: 1.5 !important;
}

.stitch-recording-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex: 0 0 auto;
}

.stitch-waveform {
    height: 30px;
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 0 10px;
    border-radius: 10px;
    background: var(--st-surface-low);
}

.stitch-waveform span {
    width: 3px;
    border-radius: 999px;
    background: var(--st-primary);
    opacity: 0.84;
}

.stitch-waveform span:nth-child(1) { height: 8px; }
.stitch-waveform span:nth-child(2) { height: 15px; }
.stitch-waveform span:nth-child(3) { height: 23px; }
.stitch-waveform span:nth-child(4) { height: 12px; background: var(--st-secondary-container); }
.stitch-waveform span:nth-child(5) { height: 20px; }
.stitch-waveform span:nth-child(6) { height: 10px; }
.stitch-waveform span:nth-child(7) { height: 16px; background: var(--st-secondary); }
.stitch-waveform span:nth-child(8) { height: 21px; }
.stitch-waveform span:nth-child(9) { height: 13px; }
.stitch-waveform span:nth-child(10) { height: 18px; }

.stitch-recording-bar:has(.stitch-recording-dot.ativo) .stitch-waveform span {
    animation: stitchWave 0.9s ease-in-out infinite alternate;
}

.stitch-recording-bar:has(.stitch-recording-dot.ativo) .stitch-waveform span:nth-child(2n) {
    animation-delay: 0.22s;
}

.stitch-recording-bar:has(.stitch-recording-dot.ativo) .stitch-waveform span:nth-child(3n) {
    animation-delay: 0.4s;
}

@keyframes stitchWave {
    from {
        transform: scaleY(0.55);
        opacity: 0.55;
    }
    to {
        transform: scaleY(1.05);
        opacity: 1;
    }
}

.stitch-recording-time,
.escuta-cronometro.stitch-recording-time {
    min-width: 56px !important;
    color: var(--st-on-surface) !important;
    font-family: "Inter", monospace !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.stitch-recording-button,
.botao-escuta-consulta.stitch-recording-button {
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 0 18px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: var(--st-primary-container) !important;
    color: #fff !important;
    box-shadow: 0 3px 12px rgba(15, 118, 110, 0.18) !important;
    font-size: 11px !important;
    font-weight: 650 !important;
    cursor: pointer !important;
    transition: 0.18s ease !important;
}

.stitch-recording-button:hover {
    background: var(--st-primary) !important;
}

.stitch-recording-button.gravando,
.botao-escuta-consulta.stitch-recording-button.gravando {
    background: var(--st-error) !important;
    color: #fff !important;
}

.stitch-recording-button:disabled {
    opacity: 0.62 !important;
    cursor: wait !important;
}

.stitch-recording-button .material-symbols-outlined {
    font-size: 19px;
}


/* =========================================================
   MAIN WORKSPACE — THIS IS THE IMPORTANT STITCH 8/4 LAYOUT
   ========================================================= */

.stitch-workspace-grid {
    width: 100%;
    max-width: 1520px;
    margin: 14px auto 0;
    padding: 0 28px 44px;
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(310px, 1fr);
    gap: 18px;
    align-items: start;
}

.stitch-workspace-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.stitch-workspace-side {
    min-width: 0;
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.stitch-results-card,
.resultado-container.stitch-results-card {
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 1px solid rgba(189, 201, 198, 0.42) !important;
    border-radius: 16px !important;
    background: var(--st-surface-lowest) !important;
    box-shadow: var(--st-shadow-sm) !important;
}

.stitch-result-tabs,
.resultado-abas.stitch-result-tabs {
    display: flex !important;
    align-items: center !important;
    gap: 3px !important;
    padding: 10px !important;
    overflow-x: auto;
    border: 0 !important;
    background: var(--st-surface-low) !important;
}

.stitch-result-tabs .aba {
    flex: 0 0 auto !important;
    min-height: 42px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    margin: 0 !important;
    padding: 0 14px !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: transparent !important;
    color: var(--st-on-surface-variant) !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
}

.stitch-result-tabs .aba .material-symbols-outlined {
    font-size: 18px;
}

.stitch-result-tabs .aba.ativa {
    background: var(--st-surface-lowest) !important;
    color: var(--st-on-surface) !important;
    box-shadow: var(--st-shadow-sm) !important;
}

.stitch-tab-panel,
.conteudo-aba.stitch-tab-panel {
    padding: 18px !important;
}

.stitch-result-header,
.resultado-cabecalho.stitch-result-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    margin: 0 0 12px !important;
}

.stitch-result-header > div {
    min-width: 0;
}

.stitch-result-header h2,
.stitch-tab-heading h2 {
    margin: 0 !important;
    color: var(--st-on-surface) !important;
    font-family: "Plus Jakarta Sans", sans-serif !important;
    font-size: 15px !important;
    font-weight: 600 !important;
}

.stitch-autosave-status {
    display: inline-flex;
    align-items: center;
    margin-top: 4px;
    color: var(--st-primary);
    font-size: 9px;
    font-weight: 600;
}

.stitch-icon-button {
    min-height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 0 10px !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: var(--st-surface-low) !important;
    color: var(--st-on-surface-variant) !important;
    font-size: 9.5px !important;
}

.stitch-icon-button .material-symbols-outlined {
    font-size: 17px;
}

.stitch-prontuario-editor {
    width: 100% !important;
    min-height: 420px !important;
    display: block !important;
    padding: 16px !important;
    border: 1px solid rgba(189, 201, 198, 0.42) !important;
    border-radius: 10px !important;
    outline: 0 !important;
    background: var(--st-surface-lowest) !important;
    color: var(--st-on-surface) !important;
    resize: vertical !important;
    font-family: "Inter", sans-serif !important;
    font-size: 11px !important;
    line-height: 1.72 !important;
}

.stitch-prontuario-editor:focus {
    border-color: var(--st-primary) !important;
    box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.10) !important;
}

.stitch-prontuario-readonly {
    min-height: 260px;
    padding: 16px;
    border-radius: 10px;
    background: var(--st-surface-low);
    color: var(--st-on-surface);
    font-size: 11px;
    line-height: 1.72;
}

.stitch-editor-help {
    margin-top: 7px;
    color: var(--st-outline);
    font-size: 8.5px;
}

.stitch-tab-heading {
    margin-bottom: 12px;
}

.stitch-tab-heading p {
    margin: 3px 0 0;
    color: var(--st-outline);
    font-size: 9px;
}

.stitch-result-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stitch-result-item,
.resultado-card.stitch-result-item {
    margin: 0 !important;
    padding: 12px !important;
    border: 1px solid rgba(189, 201, 198, 0.35) !important;
    border-radius: 11px !important;
    background: var(--st-surface-low) !important;
    box-shadow: none !important;
}

.stitch-result-item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.stitch-result-item h3 {
    margin: 0 !important;
    color: var(--st-on-surface) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
}

.stitch-result-item p {
    margin: 4px 0 0 !important;
    color: var(--st-on-surface-variant) !important;
    font-size: 9.5px !important;
    line-height: 1.5 !important;
}

.stitch-status-chip {
    display: inline-flex !important;
    margin-top: 8px !important;
    padding: 4px 7px !important;
    border-radius: 999px !important;
    background: rgba(156, 242, 232, 0.30) !important;
    color: var(--st-primary) !important;
    font-size: 8px !important;
    font-weight: 700 !important;
}

.stitch-copy-small {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 34px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: var(--st-surface-container) !important;
    color: var(--st-on-surface-variant) !important;
}

.stitch-copy-small .material-symbols-outlined {
    font-size: 17px;
}

.stitch-empty-result {
    padding: 20px !important;
    border: 1px dashed rgba(189, 201, 198, 0.6) !important;
    border-radius: 11px !important;
    background: var(--st-surface-low) !important;
    color: var(--st-outline) !important;
    font-size: 10px !important;
}


/* =========================================================
   RIGHT SIDE: ATTENTION + AI (as in Stitch)
   ========================================================= */

.stitch-attention-card,
.stitch-ai-card {
    border: 1px solid rgba(189, 201, 198, 0.42);
    border-radius: 16px;
    background: var(--st-surface-lowest);
    box-shadow: var(--st-shadow-sm);
}

.stitch-attention-card {
    padding: 14px;
}

.stitch-side-card-header,
.stitch-ai-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(189, 201, 198, 0.24);
}

.stitch-side-card-title,
.stitch-ai-card-head {
    display: flex;
    align-items: center;
    gap: 9px;
}

.stitch-side-card-icon,
.stitch-ai-card-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    border-radius: 9px;
    background: var(--st-surface-container);
    color: var(--st-on-surface-variant);
}

.stitch-ai-card-icon {
    background: var(--st-primary-fixed);
    color: var(--st-primary);
}

.stitch-side-card-icon .material-symbols-outlined,
.stitch-ai-card-icon .material-symbols-outlined {
    font-size: 18px;
}

.stitch-side-card-title h3,
.stitch-ai-card-head h3 {
    margin: 0;
    color: var(--st-on-surface);
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 12px;
    font-weight: 600;
}

.stitch-side-card-title span,
.stitch-ai-card-head span {
    display: block;
    margin-top: 2px;
    color: var(--st-outline);
    font-size: 8.5px;
}

.stitch-ai-card-head span {
    color: var(--st-primary);
}

.stitch-attention-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 10px;
}

.stitch-attention-item,
.atencao-card.stitch-attention-item {
    display: grid !important;
    grid-template-columns: 28px minmax(0, 1fr) !important;
    gap: 9px !important;
    margin: 0 !important;
    padding: 10px !important;
    border: 1px solid rgba(189, 201, 198, 0.28) !important;
    border-radius: 11px !important;
    background: rgba(239, 244, 255, 0.65) !important;
    box-shadow: none !important;
}

.stitch-attention-item-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--st-surface-container);
    color: var(--st-on-surface-variant);
}

.stitch-attention-item-icon .material-symbols-outlined {
    font-size: 16px;
}

.stitch-attention-item h3 {
    margin: 0 !important;
    color: var(--st-on-surface) !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
}

.stitch-attention-item p {
    margin: 3px 0 0 !important;
    color: var(--st-on-surface-variant) !important;
    font-size: 9px !important;
    line-height: 1.45 !important;
}

.stitch-attention-empty {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-radius: 10px;
    background: rgba(156, 242, 232, 0.20);
    color: var(--st-primary);
    font-size: 9px;
    font-weight: 600;
}

.stitch-attention-empty .material-symbols-outlined {
    font-size: 17px;
}

.stitch-ai-card {
    min-height: 450px;
    display: flex;
    flex-direction: column;
    padding: 16px;
}

.stitch-ai-description {
    margin-top: 12px;
    color: var(--st-on-surface-variant);
    font-size: 9.5px;
    line-height: 1.55;
}

.stitch-ai-textarea {
    width: 100%;
    min-height: 88px;
    margin-top: 13px;
    padding: 11px 12px;
    border: 1px solid rgba(189, 201, 198, 0.5) !important;
    border-radius: 10px !important;
    outline: 0 !important;
    background: var(--st-surface-low) !important;
    color: var(--st-on-surface) !important;
    resize: vertical;
    font-size: 10px !important;
    line-height: 1.55 !important;
}

.stitch-ai-textarea:focus {
    border-color: var(--st-primary) !important;
    box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.10) !important;
}

.stitch-ai-error {
    margin-top: 10px;
    padding: 9px 10px;
    border: 1px solid rgba(186, 26, 26, 0.24);
    border-radius: 9px;
    background: var(--st-error-container);
    color: #93000a;
    font-size: 9px;
    line-height: 1.45;
}

.stitch-ai-answer {
    margin-top: 11px;
    padding: 11px;
    border: 1px solid rgba(189, 201, 198, 0.36);
    border-radius: 11px;
    background: var(--st-surface-low);
}

.stitch-ai-answer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 7px;
}

.stitch-ai-answer-head strong {
    color: var(--st-primary);
    font-size: 9px;
    font-weight: 700;
}

.stitch-ai-answer-text {
    color: var(--st-on-surface);
    font-size: 9.5px;
    line-height: 1.6;
    white-space: pre-wrap;
}

.stitch-ai-submit {
    width: 100% !important;
    min-height: 42px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    margin-top: auto !important;
    padding: 0 12px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: var(--st-primary) !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: 650 !important;
}

.stitch-ai-submit .material-symbols-outlined {
    font-size: 17px;
}

.stitch-ai-disclaimer {
    margin-top: 8px;
    color: var(--st-outline);
    font-size: 8px;
    text-align: center;
}


/* =========================================================
   PATIENT HISTORY
   ========================================================= */

.stitch-history-card {
    padding: 16px;
    border: 1px solid rgba(189, 201, 198, 0.42);
    border-radius: 16px;
    background: var(--st-surface-lowest);
    box-shadow: var(--st-shadow-sm);
}

.stitch-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 11px;
}

.stitch-section-eyebrow {
    margin-bottom: 4px;
    color: var(--st-primary);
    font-size: 8.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stitch-section-heading h2 {
    margin: 0;
    color: var(--st-on-surface);
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 14px;
    font-weight: 600;
}

.stitch-section-heading p {
    margin: 3px 0 0;
    color: var(--st-outline);
    font-size: 9px;
}

.stitch-count-pill {
    flex: 0 0 auto;
    padding: 5px 8px;
    border-radius: 999px;
    background: var(--st-surface-low);
    color: var(--st-on-surface-variant);
    font-size: 8px;
    font-weight: 600;
}

.stitch-history-accordion {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.stitch-history-detail {
    overflow: hidden;
    border: 1px solid rgba(189, 201, 198, 0.30);
    border-radius: 11px;
    background: rgba(239, 244, 255, 0.54);
}

.stitch-history-detail summary {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 11px;
    cursor: pointer;
    list-style: none;
}

.stitch-history-detail summary::-webkit-details-marker {
    display: none;
}

.stitch-history-summary-left {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stitch-history-bullet {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: var(--st-primary);
    opacity: 0.65;
}

.stitch-history-summary-left div {
    min-width: 0;
}

.stitch-history-summary-left strong {
    display: block;
    color: var(--st-on-surface);
    font-size: 9.5px;
    font-weight: 700;
}

.stitch-history-summary-left span {
    display: block;
    max-width: 560px;
    overflow: hidden;
    margin-top: 2px;
    color: var(--st-outline);
    font-size: 8.5px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.stitch-chevron {
    color: var(--st-outline);
    font-size: 19px;
    transition: transform 0.18s ease;
}

.stitch-history-detail[open] .stitch-chevron {
    transform: rotate(180deg);
}

.stitch-history-detail-body {
    padding: 0 12px 12px 30px;
    border-top: 1px solid rgba(189, 201, 198, 0.20);
}

.stitch-history-block {
    margin-top: 11px;
}

.stitch-history-block > strong {
    display: block;
    margin-bottom: 5px;
    color: var(--st-on-surface);
    font-size: 9px;
    font-weight: 700;
}

.stitch-history-pre {
    padding: 10px;
    border-radius: 9px;
    background: var(--st-surface-lowest);
    color: var(--st-on-surface-variant);
    font-size: 9px;
    line-height: 1.6;
    white-space: pre-wrap;
}

.stitch-history-mini-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 5px;
    padding: 8px 9px;
    border: 1px solid rgba(189, 201, 198, 0.25);
    border-radius: 8px;
    background: var(--st-surface-lowest);
}

.stitch-history-mini-item b {
    color: var(--st-on-surface);
    font-size: 8.5px;
}

.stitch-history-mini-item span {
    color: var(--st-outline);
    font-size: 8px;
    line-height: 1.45;
}

.stitch-history-warning {
    border-color: rgba(125, 66, 0, 0.18);
    background: rgba(255, 220, 195, 0.35);
}

.stitch-empty-history {
    padding: 16px;
    border: 1px dashed rgba(189, 201, 198, 0.55);
    border-radius: 10px;
    color: var(--st-outline);
    background: var(--st-surface-low);
    font-size: 9px;
}

.stitch-imported-records-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 11px;
    padding: 10px;
    border: 1px solid rgba(0, 99, 152, 0.15);
    border-radius: 10px;
    background: rgba(204, 229, 255, 0.34);
}

.stitch-imported-records-note > .material-symbols-outlined {
    flex: 0 0 auto;
    color: var(--st-secondary);
    font-size: 20px;
}

.stitch-imported-records-note strong {
    display: block;
    color: var(--st-on-surface);
    font-size: 8.8px;
}

.stitch-imported-records-note span {
    display: block;
    margin-top: 3px;
    color: var(--st-on-surface-variant);
    font-size: 8px;
    line-height: 1.45;
}


/* =========================================================
   RULES PANEL
   ========================================================= */

.stitch-rules-page {
    max-width: 1520px;
    margin: 0 auto;
    padding: 28px;
}

.stitch-rules-header,
.regras-cabecalho.stitch-rules-header {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 20px !important;
    margin: 0 0 14px !important;
    padding: 0 !important;
    border: 0 !important;
}

.stitch-rules-header .cabecalho-eyebrow {
    display: block;
    margin-bottom: 5px;
    color: var(--st-primary) !important;
    font-size: 8.5px !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
}

.stitch-rules-back {
    min-height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    padding: 0 12px !important;
    border: 1px solid rgba(189, 201, 198, 0.44) !important;
    border-radius: 9px !important;
    background: var(--st-surface-lowest) !important;
    color: var(--st-on-surface-variant) !important;
    font-size: 9px !important;
}

.stitch-rules-back .material-symbols-outlined {
    font-size: 17px;
}

.stitch-new-rule-box,
.nova-regra-box.stitch-new-rule-box {
    margin: 0 0 14px !important;
    padding: 16px !important;
    border: 1px solid rgba(189, 201, 198, 0.42) !important;
    border-radius: 16px !important;
    background: var(--st-surface-lowest) !important;
    box-shadow: var(--st-shadow-sm) !important;
}

.stitch-rule-box-heading {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 12px;
}

.stitch-rule-box-heading > .material-symbols-outlined {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: var(--st-primary-fixed);
    color: var(--st-primary);
    font-size: 18px;
}

.stitch-rule-box-heading h2 {
    margin: 0;
    color: var(--st-on-surface);
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 12px;
    font-weight: 600;
}

.stitch-rule-box-heading p {
    margin: 2px 0 0;
    color: var(--st-outline);
    font-size: 8.5px;
}

.stitch-new-rule-form {
    display: grid !important;
    grid-template-columns: 200px 1fr;
    gap: 10px !important;
}

.stitch-new-rule-form .campo-form {
    margin: 0 !important;
}

.stitch-rule-description-field {
    grid-column: 1 / -1;
}

.stitch-new-rule-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
}

.stitch-new-rule-form input,
.stitch-new-rule-form select,
.stitch-new-rule-form textarea {
    border: 1px solid rgba(189, 201, 198, 0.46) !important;
    border-radius: 9px !important;
    background: var(--st-surface-low) !important;
}

.stitch-rules-columns,
.regras-colunas.stitch-rules-columns {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px !important;
}

.stitch-rules-column,
.coluna-regras.stitch-rules-column {
    margin: 0 !important;
    padding: 14px !important;
    border: 1px solid rgba(189, 201, 198, 0.42) !important;
    border-radius: 14px !important;
    background: var(--st-surface-lowest) !important;
    box-shadow: var(--st-shadow-sm) !important;
}


/* =========================================================
   GENERIC BUTTON OVERRIDES
   ========================================================= */

.stitch-main-content .botao-principal {
    border: 0 !important;
    background: var(--st-primary) !important;
    color: #fff !important;
}

.stitch-main-content .botao-principal:hover {
    background: var(--st-primary-container) !important;
}

.stitch-main-content .botao-secundario {
    border-color: rgba(189, 201, 198, 0.46) !important;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1180px) {
    .stitch-workspace-grid {
        grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.85fr);
    }

    .stitch-waveform {
        display: none;
    }
}

@media (max-width: 980px) {
    .stitch-main-shell {
        margin-left: 0;
    }

    .stitch-sidebar {
        transform: translateX(-105%);
        transition: transform 0.24s ease;
    }

    .stitch-sidebar.stitch-sidebar-open {
        transform: translateX(0);
    }

    .stitch-sidebar-backdrop.stitch-sidebar-backdrop-visible {
        display: block;
    }

    .stitch-sidebar-close {
        display: inline-flex;
    }

    .stitch-mobile-menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .stitch-workspace-grid {
        grid-template-columns: 1fr;
    }

    .stitch-workspace-side {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stitch-ai-card {
        min-height: auto;
    }

    .stitch-ai-submit {
        margin-top: 12px !important;
    }
}

@media (max-width: 720px) {
    .stitch-topbar {
        padding: 0 14px;
    }

    .stitch-topbar-secure {
        display: none;
    }

    .stitch-hero {
        padding: 18px 14px 14px;
    }

    .stitch-hero-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .stitch-hero h1,
    .stitch-rules-header h1 {
        font-size: 23px;
    }

    .stitch-consultation-form,
    .form-consulta.stitch-consultation-form {
        padding: 10px 14px 0 !important;
    }

    .stitch-patient-fields {
        grid-template-columns: 1fr;
    }

    .stitch-recording-bar,
    .painel-escuta-consulta.stitch-recording-bar {
        align-items: flex-start !important;
        flex-direction: column !important;
    }

    .stitch-recording-actions {
        width: 100%;
        justify-content: space-between;
    }

    .stitch-recording-button {
        flex: 1 1 auto;
    }

    .stitch-workspace-grid {
        padding: 0 14px 28px;
    }

    .stitch-workspace-side {
        grid-template-columns: 1fr;
    }

    .stitch-result-tabs .aba {
        padding: 0 10px !important;
    }

    .stitch-result-tabs .aba span:not(.material-symbols-outlined) {
        font-size: 10px;
    }

    .stitch-rules-page {
        padding: 20px 14px;
    }

    .stitch-rules-header {
        flex-direction: column;
    }

    .stitch-new-rule-form {
        grid-template-columns: 1fr;
    }

    .stitch-rule-description-field,
    .stitch-new-rule-actions {
        grid-column: 1;
    }

    .stitch-rules-columns,
    .regras-colunas.stitch-rules-columns {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 520px) {
    .stitch-topbar-brand img {
        width: 104px;
    }

    .stitch-recording-actions {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .stitch-recording-time {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .stitch-recording-button {
        min-width: 100%;
    }

    .stitch-result-header {
        align-items: flex-start !important;
        flex-direction: column;
    }

    .stitch-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* =========================================================
   V3 — CORREÇÕES DE ESTABILIDADE
   ========================================================= */

body.stitch-menu-mobile-aberto {
    overflow: hidden !important;
}

.stitch-recording-button-dot {
    display: inline-block;
    font-size: 12px;
    line-height: 1;
}

.botao-escuta-consulta.gravando .stitch-recording-button-dot,
.stitch-recording-button.gravando .stitch-recording-button-dot {
    color: #ffffff;
}

/* =========================================================
   V4 — PÁGINAS COMPLEMENTARES
   ========================================================= */

.stitch-page-heading{width:100%;display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:18px}.stitch-page-heading .cabecalho-eyebrow{display:block;margin-bottom:5px;color:var(--st-primary)!important;font-size:8.5px!important;font-weight:700!important;letter-spacing:.09em!important;text-transform:uppercase!important}.stitch-page-heading h1{margin:0;color:var(--st-on-surface);font-family:"Plus Jakarta Sans",sans-serif;font-size:27px;font-weight:600;line-height:1.25;letter-spacing:-.015em}.stitch-page-heading p{max-width:720px;margin:6px 0 0;color:var(--st-on-surface-variant);font-size:11px;line-height:1.6}.stitch-page-primary-action{min-height:42px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;padding:0 16px!important;border:0!important;border-radius:999px!important;background:var(--st-primary-container)!important;color:#fff!important;box-shadow:0 2px 8px rgba(15,118,110,.14)!important;font-size:10px!important;font-weight:650!important}.stitch-page-primary-action:hover{background:var(--st-primary)!important}.stitch-page-primary-action .material-symbols-outlined{font-size:18px}

/* MEUS PACIENTES */
.stitch-patients-page{width:100%;max-width:1180px!important;margin:0 auto!important;padding:28px 28px 48px!important}.stitch-patients-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;margin-bottom:12px;padding:11px;border:1px solid rgba(189,201,198,.34);border-radius:14px;background:var(--st-surface-lowest);box-shadow:var(--st-shadow-sm)}.stitch-patient-list-search{position:relative}.stitch-patient-list-search>.material-symbols-outlined{position:absolute;left:12px;top:50%;z-index:2;transform:translateY(-50%);color:var(--st-outline);font-size:19px;pointer-events:none}.stitch-patient-list-search input{width:100%;min-height:42px;padding:0 13px 0 39px;border:0;border-radius:10px;outline:0;background:var(--st-surface-low);color:var(--st-on-surface);font-size:10.5px}.stitch-patient-list-search input:focus{box-shadow:0 0 0 2px rgba(15,118,110,.14)}.stitch-sort-control{display:flex;align-items:center;gap:8px}.stitch-sort-label{color:var(--st-outline);font-size:8.5px;font-weight:600}.stitch-sort-segmented{display:inline-flex;align-items:center;gap:2px;padding:3px;border-radius:10px;background:var(--st-surface-low)}.stitch-sort-button{min-height:34px;padding:0 11px;border:0;border-radius:8px;background:transparent;color:var(--st-on-surface-variant);cursor:pointer;font-size:9px;font-weight:650}.stitch-patient-list-meta{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:7px;padding:0 4px;color:var(--st-outline);font-size:8.5px}.stitch-patient-counter{color:var(--st-on-surface-variant);font-size:9px;font-weight:650}.stitch-patient-list{display:flex;flex-direction:column;gap:7px}.stitch-patient-list-item{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:68px;padding:10px 12px;border:1px solid rgba(189,201,198,.32);border-radius:12px;background:var(--st-surface-lowest);box-shadow:var(--st-shadow-sm);transition:border-color .16s ease,background .16s ease,transform .16s ease}.stitch-patient-list-item:hover{border-color:rgba(0,92,85,.24);background:rgba(239,244,255,.5);transform:translateY(-1px)}.stitch-patient-list-main{min-width:0;display:flex;align-items:center;gap:11px}.stitch-patient-list-avatar{width:38px;height:38px;display:flex;align-items:center;justify-content:center;flex:0 0 38px;border-radius:50%;background:var(--st-primary-fixed);color:var(--st-primary);font-family:"Plus Jakarta Sans",sans-serif;font-size:12px;font-weight:700}.stitch-patient-list-text{min-width:0}.stitch-patient-list-text>strong{display:block;overflow:hidden;margin-bottom:4px;color:var(--st-on-surface);font-size:10.5px;font-weight:700;white-space:nowrap;text-overflow:ellipsis}.stitch-patient-list-text>span{display:flex;align-items:center;gap:4px;color:var(--st-outline);font-size:8.5px}.stitch-patient-list-text .material-symbols-outlined{font-size:14px}.stitch-patient-list-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex:0 0 auto}.stitch-patient-open-button{min-height:36px!important;display:inline-flex!important;align-items:center!important;gap:6px!important;padding:0 10px!important;border:1px solid rgba(189,201,198,.36)!important;border-radius:9px!important;background:var(--st-surface-low)!important;color:var(--st-on-surface-variant)!important;font-size:8.5px!important;font-weight:650!important}.stitch-patient-open-button:hover{border-color:rgba(0,92,85,.2)!important;color:var(--st-primary)!important}.stitch-patient-open-button .material-symbols-outlined{font-size:16px}.stitch-patient-delete-button{width:36px;height:36px;display:flex;align-items:center;justify-content:center;flex:0 0 36px;padding:0;border:1px solid rgba(186,26,26,.15);border-radius:9px;background:rgba(255,218,214,.34);color:var(--st-error);cursor:pointer}.stitch-patient-delete-button:hover{background:var(--st-error-container)}.stitch-patient-delete-button .material-symbols-outlined{font-size:17px}.stitch-patient-empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:180px;padding:24px;border:1px dashed rgba(189,201,198,.62);border-radius:14px;background:rgba(239,244,255,.48);text-align:center}.stitch-patient-empty-state>.material-symbols-outlined{margin-bottom:5px;color:var(--st-outline);font-size:28px}.stitch-patient-empty-state strong{color:var(--st-on-surface);font-size:10px}.stitch-patient-empty-state p{max-width:360px;margin:0;color:var(--st-outline);font-size:8.5px;line-height:1.5}

/* MODAL PACIENTE */
.stitch-patient-modal{position:fixed;inset:0;z-index:1000;padding:20px;overflow-y:auto;background:rgba(33,49,69,.42);backdrop-filter:blur(4px)}.stitch-patient-modal-dialog{width:min(980px,100%);margin:18px auto;overflow:hidden;border:1px solid rgba(189,201,198,.32);border-radius:18px;background:var(--st-surface-lowest);box-shadow:0 26px 75px rgba(11,28,48,.2)}.stitch-patient-modal-header{position:sticky;top:0;z-index:3;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px 18px;border-bottom:1px solid rgba(189,201,198,.28);background:rgba(255,255,255,.95);backdrop-filter:blur(10px)}.stitch-patient-modal-heading{display:flex;align-items:center;gap:10px}.stitch-patient-modal-icon{width:36px;height:36px;display:flex;align-items:center;justify-content:center;border-radius:10px;background:var(--st-primary-fixed);color:var(--st-primary)}.stitch-patient-modal-icon .material-symbols-outlined{font-size:20px}.stitch-patient-modal-heading>div>span{display:block;margin-bottom:2px;color:var(--st-outline);font-size:7.5px;font-weight:700;letter-spacing:.09em;text-transform:uppercase}.stitch-patient-modal-heading h2{margin:0;color:var(--st-on-surface);font-family:"Plus Jakarta Sans",sans-serif;font-size:16px;font-weight:600}.stitch-modal-close{width:38px;height:38px;display:flex;align-items:center;justify-content:center;border:0;border-radius:10px;background:var(--st-surface-low);color:var(--st-on-surface-variant);cursor:pointer}.stitch-modal-close:hover{background:var(--st-surface-container)}.stitch-modal-close .material-symbols-outlined{font-size:19px}.stitch-patient-modal-form{padding:17px 18px 18px}.stitch-form-message{margin-bottom:12px;padding:9px 10px;border-radius:9px;font-size:8.8px;line-height:1.5}.stitch-form-message-error{border:1px solid rgba(186,26,26,.2);background:var(--st-error-container);color:#93000a}.stitch-form-message-success{border:1px solid rgba(0,92,85,.16);background:rgba(156,242,232,.26);color:var(--st-primary)}.stitch-form-section{padding:13px 0 15px;border-bottom:1px solid rgba(189,201,198,.22)}.stitch-form-section:first-of-type{padding-top:0}.stitch-form-section-heading{display:flex;align-items:center;gap:8px;margin-bottom:10px}.stitch-form-section-heading>.material-symbols-outlined{width:28px;height:28px;display:flex;align-items:center;justify-content:center;flex:0 0 28px;border-radius:8px;background:var(--st-surface-low);color:var(--st-primary);font-size:16px}.stitch-form-section-heading h3{margin:0;color:var(--st-on-surface);font-size:10px;font-weight:700}.stitch-form-section-heading p{margin:2px 0 0;color:var(--st-outline);font-size:7.8px}.stitch-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.stitch-form-grid .campo-form{margin:0!important}.stitch-field-full{grid-column:1/-1}.stitch-patient-modal-form .campo-form label{display:block;margin-bottom:5px;color:var(--st-on-surface-variant)!important;font-size:8.5px!important;font-weight:650!important}.stitch-patient-modal-form .campo-form input,.stitch-patient-modal-form .campo-form select,.stitch-patient-modal-form .campo-form textarea{width:100%!important;min-height:40px!important;padding:0 10px!important;border:1px solid rgba(189,201,198,.42)!important;border-radius:9px!important;outline:0!important;background:var(--st-surface-low)!important;color:var(--st-on-surface)!important;font-size:9.5px!important}.stitch-patient-modal-form .campo-form input:focus,.stitch-patient-modal-form .campo-form select:focus,.stitch-patient-modal-form .campo-form textarea:focus{border-color:var(--st-primary)!important;box-shadow:0 0 0 2px rgba(15,118,110,.09)!important}.stitch-import-section{margin-top:14px;padding:13px;border:1px solid rgba(189,201,198,.34);border-radius:13px;background:var(--st-surface-low)}.stitch-import-section-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.stitch-import-title{display:flex;align-items:flex-start;gap:9px}.stitch-import-icon{width:32px;height:32px;display:flex;align-items:center;justify-content:center;flex:0 0 32px;border-radius:9px;background:var(--st-surface-lowest);color:var(--st-secondary);box-shadow:var(--st-shadow-sm)}.stitch-import-icon .material-symbols-outlined{font-size:18px}.stitch-import-title strong{display:block;color:var(--st-on-surface);font-size:9.5px}.stitch-import-title span{display:block;max-width:650px;margin-top:3px;color:var(--st-on-surface-variant);font-size:8px;line-height:1.5}.stitch-premium-badge{flex:0 0 auto;padding:4px 7px;border-radius:999px;background:rgba(156,242,232,.3);color:var(--st-primary);font-size:7px;font-weight:800;letter-spacing:.05em;text-transform:uppercase}.stitch-import-area{margin-top:11px}.stitch-import-controls{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}.stitch-import-controls input[type=file]{min-width:0;padding:8px;border:1px solid rgba(189,201,198,.4);border-radius:9px;background:var(--st-surface-lowest);color:var(--st-on-surface-variant);font-size:8px}.stitch-import-button{min-height:38px!important;display:inline-flex!important;align-items:center!important;gap:6px!important;padding:0 10px!important;font-size:8px!important}.stitch-import-button .material-symbols-outlined{font-size:16px}.stitch-import-help{display:block;margin-top:6px;color:var(--st-outline);font-size:7.5px;line-height:1.45}.stitch-imported-files-list{display:grid;gap:7px;margin-top:11px}.stitch-save-before-import,.stitch-premium-lock{display:flex;align-items:flex-start;gap:8px;margin-top:11px;padding:9px 10px;border:1px dashed rgba(189,201,198,.54);border-radius:9px;background:var(--st-surface-lowest);color:var(--st-on-surface-variant);font-size:8px;line-height:1.5}.stitch-save-before-import .material-symbols-outlined,.stitch-premium-lock .material-symbols-outlined{flex:0 0 auto;color:var(--st-primary);font-size:16px}.stitch-premium-lock{border-style:solid;border-color:rgba(0,92,85,.12);background:rgba(156,242,232,.15)}.stitch-patient-modal-actions{position:sticky;bottom:0;z-index:2;display:flex;align-items:center;justify-content:flex-end;gap:8px;margin:16px -18px -18px;padding:12px 18px;border-top:1px solid rgba(189,201,198,.26);background:rgba(255,255,255,.96);backdrop-filter:blur(10px)}.stitch-patient-modal-actions .botao-principal,.stitch-patient-modal-actions .botao-secundario{min-height:38px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;padding:0 12px!important;border-radius:9px!important;font-size:8.5px!important}.stitch-patient-modal-actions .material-symbols-outlined{font-size:16px}

/* MODELO DE RESUMO */
.stitch-model-page{width:100%;max-width:1180px!important;margin:0 auto!important;padding:28px 28px 48px!important}.stitch-model-active-pill{display:inline-flex;align-items:center;gap:7px;min-height:32px;padding:0 11px;border-radius:999px;background:rgba(156,242,232,.28);color:var(--st-primary);font-size:8.5px;font-weight:700}.stitch-model-active-dot{width:7px;height:7px;border-radius:50%;background:var(--st-primary);box-shadow:0 0 0 4px rgba(0,92,85,.08)}.stitch-page-message{display:flex!important;align-items:center!important;gap:8px!important;margin:0 0 12px!important;padding:10px 12px!important;border-radius:10px!important;font-size:8.8px!important}.stitch-page-message .material-symbols-outlined{font-size:17px}.stitch-model-layout{display:grid;grid-template-columns:minmax(0,1.9fr) minmax(280px,.85fr);gap:14px;align-items:start}.stitch-model-main{min-width:0;display:flex;flex-direction:column;gap:12px}.stitch-model-help-column{position:sticky;top:80px;display:flex;flex-direction:column;gap:12px}.stitch-model-form,.form-modelo-resumo.stitch-model-form{margin:0!important;padding:17px!important;border:1px solid rgba(189,201,198,.36)!important;border-radius:16px!important;background:var(--st-surface-lowest)!important;box-shadow:var(--st-shadow-sm)!important}.stitch-model-form-header{display:flex;align-items:center;gap:9px;margin-bottom:15px;padding-bottom:12px;border-bottom:1px solid rgba(189,201,198,.22)}.stitch-model-form-icon{width:34px;height:34px;display:flex;align-items:center;justify-content:center;flex:0 0 34px;border-radius:9px;background:var(--st-primary-fixed);color:var(--st-primary)}.stitch-model-form-icon .material-symbols-outlined{font-size:19px}.stitch-model-form-header h2{margin:0;color:var(--st-on-surface);font-family:"Plus Jakarta Sans",sans-serif;font-size:12px;font-weight:600}.stitch-model-form-header p{margin:2px 0 0;color:var(--st-outline);font-size:8px}.stitch-model-form .campo-form{margin-bottom:13px!important}.stitch-model-form .campo-form label{color:var(--st-on-surface-variant)!important;font-size:8.5px!important;font-weight:650!important}.stitch-model-form .campo-form input{min-height:41px!important;border:1px solid rgba(189,201,198,.42)!important;border-radius:9px!important;background:var(--st-surface-low)!important;color:var(--st-on-surface)!important;font-size:9.5px!important}.stitch-model-label-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:5px}.stitch-model-status{padding:4px 7px!important;border-radius:999px!important;background:var(--st-surface-low)!important;color:var(--st-outline)!important;font-size:7px!important;font-weight:700!important}.stitch-model-status.ativo{background:rgba(156,242,232,.28)!important;color:var(--st-primary)!important}.stitch-model-textarea,.textarea-modelo.stitch-model-textarea{width:100%!important;min-height:470px!important;padding:14px!important;border:1px solid rgba(189,201,198,.42)!important;border-radius:10px!important;outline:0!important;background:var(--st-surface-low)!important;color:var(--st-on-surface)!important;resize:vertical!important;font-family:"Inter",monospace!important;font-size:9.5px!important;line-height:1.65!important}.stitch-model-textarea:focus{border-color:var(--st-primary)!important;box-shadow:0 0 0 2px rgba(15,118,110,.09)!important}.stitch-model-actions,.acoes-modelo.stitch-model-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:8px!important;margin:0!important;padding-top:3px!important}.stitch-model-actions .botao-principal,.stitch-model-actions .botao-secundario{min-height:39px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;padding:0 12px!important;border-radius:9px!important;text-decoration:none!important;font-size:8.5px!important}.stitch-model-actions .material-symbols-outlined{font-size:16px}.stitch-model-help-card,.modelo-aviso.stitch-model-help-card,.stitch-model-example-card,.modelo-exemplo.stitch-model-example-card{margin:0!important;padding:14px!important;border:1px solid rgba(189,201,198,.34)!important;border-radius:14px!important;background:var(--st-surface-lowest)!important;box-shadow:var(--st-shadow-sm)!important}.stitch-model-help-heading{display:flex;align-items:center;gap:9px;padding-bottom:10px;border-bottom:1px solid rgba(189,201,198,.2)}.stitch-model-help-icon{width:32px;height:32px;display:flex;align-items:center;justify-content:center;flex:0 0 32px;border-radius:9px;background:rgba(255,220,195,.48);color:var(--st-tertiary)}.stitch-model-help-icon .material-symbols-outlined{font-size:18px}.stitch-model-help-heading strong{display:block;color:var(--st-on-surface);font-size:10px}.stitch-model-help-heading span{display:block;margin-top:2px;color:var(--st-outline);font-size:7.5px}.stitch-model-help-list{display:flex;flex-direction:column;gap:9px;margin-top:11px}.stitch-model-help-list>div{display:grid;grid-template-columns:22px minmax(0,1fr);gap:7px;align-items:flex-start}.stitch-model-help-list .material-symbols-outlined{color:var(--st-primary);font-size:16px}.stitch-model-help-list p{margin:0!important;color:var(--st-on-surface-variant)!important;font-size:8px!important;line-height:1.5!important}.stitch-model-example-heading{display:flex;align-items:center;gap:7px;margin-bottom:9px;color:var(--st-on-surface)}.stitch-model-example-heading .material-symbols-outlined{color:var(--st-primary);font-size:17px}.stitch-model-example-heading strong{font-size:9px}.stitch-model-example-card pre{margin:0!important;padding:11px!important;overflow-x:auto;border-radius:9px!important;background:var(--st-surface-low)!important;color:var(--st-on-surface-variant)!important;font-family:"Inter",monospace!important;font-size:7.8px!important;line-height:1.6!important}.stitch-model-danger-zone,.remover-modelo-box.stitch-model-danger-zone{display:grid!important;grid-template-columns:36px minmax(0,1fr) auto!important;align-items:center!important;gap:11px!important;margin:0!important;padding:13px!important;border:1px solid rgba(186,26,26,.14)!important;border-radius:13px!important;background:rgba(255,218,214,.24)!important}.stitch-model-danger-icon{width:36px;height:36px;display:flex;align-items:center;justify-content:center;border-radius:9px;background:var(--st-error-container);color:var(--st-error)}.stitch-model-danger-icon .material-symbols-outlined{font-size:18px}.stitch-model-danger-text strong{display:block;color:#93000a;font-size:9px}.stitch-model-danger-text p{margin:3px 0 0!important;color:#80504c!important;font-size:7.8px!important;line-height:1.45!important}.stitch-danger-button{min-height:36px;padding:0 10px!important;border:1px solid rgba(186,26,26,.18)!important;border-radius:9px!important;background:var(--st-error-container)!important;color:#93000a!important;font-size:8px!important;font-weight:700!important}

/* CARDS DE REGRAS */
.stitch-rule-card,.regra-card.stitch-rule-card{position:relative;margin:0 0 8px!important;padding:11px!important;overflow:hidden;border:1px solid rgba(189,201,198,.32)!important;border-radius:11px!important;background:var(--st-surface-low)!important;box-shadow:none!important;transition:opacity .16s ease,border-color .16s ease,background .16s ease}.stitch-rule-card:hover{border-color:rgba(0,92,85,.2)!important}.stitch-rule-inactive,.regra-inativa.stitch-rule-inactive{opacity:.62!important;background:rgba(239,244,255,.42)!important}.stitch-rule-top,.regra-topo.stitch-rule-top{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:10px!important;margin:0!important}.stitch-rule-title-wrap{min-width:0}.stitch-rule-title-line{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.stitch-rule-title-line h4{margin:0!important;color:var(--st-on-surface)!important;font-size:9.5px!important;font-weight:700!important;line-height:1.35!important}.stitch-rule-badge{display:inline-flex!important;align-items:center!important;min-height:18px!important;padding:0 6px!important;border:0!important;border-radius:999px!important;font-size:6.8px!important;font-weight:800!important;letter-spacing:.03em!important;text-transform:uppercase!important}.stitch-rule-badge-system{background:var(--st-surface-high)!important;color:var(--st-secondary)!important}.stitch-rule-badge-custom{background:rgba(156,242,232,.3)!important;color:var(--st-primary)!important}.stitch-rule-state{display:block;margin-top:4px;color:var(--st-outline);font-size:6.8px;font-weight:500}.stitch-rule-toggle-form{flex:0 0 auto;margin:0}.stitch-rule-switch,.switch-regra.stitch-rule-switch{position:relative!important;width:34px!important;height:20px!important;display:block!important;padding:0!important;border:0!important;border-radius:999px!important;background:var(--st-outline-variant)!important;cursor:pointer!important;transition:background .16s ease!important}.stitch-rule-switch>span{position:absolute!important;top:3px!important;left:3px!important;width:14px!important;height:14px!important;margin:0!important;border-radius:50%!important;background:#fff!important;box-shadow:0 1px 3px rgba(11,28,48,.18)!important;transition:transform .16s ease!important}.stitch-rule-switch.ativa{background:var(--st-primary)!important}.stitch-rule-switch.ativa>span{transform:translateX(14px)!important}.stitch-rule-description,.regra-descricao.stitch-rule-description{margin:9px 0 0!important;color:var(--st-on-surface-variant)!important;font-size:8px!important;line-height:1.55!important}.stitch-rule-actions-row{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;margin-top:9px;padding-top:8px;border-top:1px solid rgba(189,201,198,.22)}.stitch-rule-edit,.regra-edicao.stitch-rule-edit{min-width:0;flex:1 1 auto;margin:0!important}.stitch-rule-edit>summary{width:fit-content;display:inline-flex!important;align-items:center!important;gap:4px!important;padding:0!important;color:var(--st-primary)!important;cursor:pointer!important;list-style:none!important;font-size:7.8px!important;font-weight:650!important}.stitch-rule-edit>summary::-webkit-details-marker{display:none}.stitch-rule-edit>summary .material-symbols-outlined{font-size:14px}.stitch-rule-chevron{transition:transform .16s ease}.stitch-rule-edit[open] .stitch-rule-chevron{transform:rotate(180deg)}.stitch-rule-edit-form,.form-editar-regra.stitch-rule-edit-form{display:grid!important;gap:8px!important;margin-top:9px!important;padding:10px!important;border-radius:9px!important;background:var(--st-surface-lowest)!important}.stitch-rule-edit-form .campo-form{margin:0!important}.stitch-rule-edit-form label{display:block;margin-bottom:4px;color:var(--st-on-surface-variant);font-size:7.5px;font-weight:650}.stitch-rule-edit-form input,.stitch-rule-edit-form textarea{width:100%!important;padding:8px 9px!important;border:1px solid rgba(189,201,198,.42)!important;border-radius:8px!important;outline:0!important;background:var(--st-surface-low)!important;color:var(--st-on-surface)!important;font-size:8.5px!important}.stitch-rule-edit-form textarea{min-height:92px!important;resize:vertical!important}.stitch-rule-edit-form input:focus,.stitch-rule-edit-form textarea:focus{border-color:var(--st-primary)!important;box-shadow:0 0 0 2px rgba(15,118,110,.08)!important}.stitch-rule-edit-actions{display:flex;justify-content:flex-end}.stitch-rule-edit-actions .botao-secundario{min-height:32px!important;display:inline-flex!important;align-items:center!important;gap:5px!important;padding:0 8px!important;font-size:7.5px!important}.stitch-rule-edit-actions .material-symbols-outlined{font-size:14px}.stitch-rule-delete-form,.form-excluir-regra.stitch-rule-delete-form{flex:0 0 auto;margin:0!important}.stitch-rule-delete-button,.botao-excluir.stitch-rule-delete-button{min-height:28px!important;display:inline-flex!important;align-items:center!important;gap:4px!important;margin:0!important;padding:0 7px!important;border:0!important;border-radius:7px!important;background:transparent!important;color:var(--st-error)!important;cursor:pointer!important;font-size:7.5px!important;font-weight:650!important}.stitch-rule-delete-button:hover{background:var(--st-error-container)!important}.stitch-rule-delete-button .material-symbols-outlined{font-size:14px}

@media(max-width:980px){.stitch-model-layout{grid-template-columns:1fr}.stitch-model-help-column{position:static;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.stitch-patients-page,.stitch-model-page{padding:20px 14px 36px!important}.stitch-page-heading{align-items:flex-start;flex-direction:column;gap:12px}.stitch-page-heading h1{font-size:23px}.stitch-page-primary-action{width:100%}.stitch-patients-toolbar{grid-template-columns:1fr}.stitch-sort-control{justify-content:space-between}.stitch-patient-list-meta>span{display:none}.stitch-patient-list-item{align-items:flex-start;flex-direction:column}.stitch-patient-list-main,.stitch-patient-list-actions{width:100%}.stitch-patient-list-actions{justify-content:flex-end}.stitch-patient-open-button{flex:1 1 auto;justify-content:center!important}.stitch-patient-modal{padding:8px}.stitch-patient-modal-dialog{margin:8px auto;border-radius:14px}.stitch-form-grid{grid-template-columns:1fr}.stitch-field-full{grid-column:auto}.stitch-import-controls{grid-template-columns:1fr}.stitch-import-button{width:100%;justify-content:center!important}.stitch-model-help-column{grid-template-columns:1fr}.stitch-model-danger-zone,.remover-modelo-box.stitch-model-danger-zone{grid-template-columns:36px minmax(0,1fr)!important}.stitch-model-danger-zone form{grid-column:1/-1}.stitch-danger-button{width:100%}}
@media(max-width:520px){.stitch-patient-modal-actions{align-items:stretch;flex-direction:column-reverse}.stitch-patient-modal-actions .botao-principal,.stitch-patient-modal-actions .botao-secundario{width:100%}.stitch-model-actions{align-items:stretch!important;flex-direction:column-reverse}.stitch-model-actions .botao-principal,.stitch-model-actions .botao-secundario{width:100%}.stitch-rule-actions-row{align-items:stretch;flex-direction:column}.stitch-rule-delete-form{display:flex;justify-content:flex-end}}
