
body {
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

.mud-main-content {
    padding-top: 0;
}

.sa-muted-text {
    color: var(--sa-muted-fg);
}

.sa-login-root {
    min-height: 100vh;
}

.sa-brand {
    display: inline-flex;
    align-items: center;
}

.sa-login-page {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    overflow: hidden;
}

.sa-login-background {
    position: absolute;
    inset: 0;
}

.sa-login-card {
    width: min(100%, 30rem);
    position: relative;
    z-index: 1;
    padding: 2rem;
    border: 1px solid var(--sa-border);
    border-radius: 28px;
    background: var(--sa-surface);
    box-shadow: 0 24px 80px rgba(43, 43, 45, 0.16);
}

.sa-login-logo {
    width: 11rem;
    height: auto;
}

.sa-loading-shell {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    z-index: 3000;
    background: rgba(249, 248, 251, 0.78);
    backdrop-filter: blur(12px);
}

.sa-loading-card {
    min-width: 15rem;
    padding: 1.6rem 1.8rem;
    border: 1px solid var(--sa-border);
    border-radius: 24px;
    background: var(--sa-surface);
    box-shadow: 0 24px 80px rgba(43, 43, 45, 0.16);
    text-align: center;
}

.sa-loading-spinner {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
    border: 3px solid var(--sa-border);
    border-top-color: var(--sa-primary);
    border-radius: 999px;
    animation: sa-spin 0.9s linear infinite;
}

.sa-loading-image {
    max-width: 7rem;
    margin-bottom: 1rem;
}

.sa-loading-text {
    color: var(--sa-fg);
    font-weight: 600;
}

.sa-orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(45px);
    opacity: 0.7;
}

.sa-orb-blue {
    top: 2rem;
    left: -2rem;
    width: 14rem;
    height: 14rem;
    background: rgba(0, 138, 134, 0.14);
}

.sa-orb-purple {
    top: 5rem;
    right: 4rem;
    width: 11rem;
    height: 11rem;
    background: rgba(133, 52, 132, 0.14);
}

.sa-grid-glow {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background:
        linear-gradient(to right, color-mix(in srgb, var(--sa-primary) 8%, transparent) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(133, 52, 132, 0.05) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.85));
    opacity: 0.35;
}

.sa-primary-button,
.sa-secondary-button {
    min-width: 0;
    height: 2.75rem;
    padding-inline: 1.25rem;
    border-radius: 12px;
    font-size: 0.9375rem;
}

.sa-actions-cell {
    width: 9rem;
    text-align: right;
}

.sa-toolbar-menu-button {
    min-width: 0;
    width: fit-content;
    height: 2.75rem;
    padding-inline: 0.95rem;
    border-radius: 0.75rem;
}

.sa-toolbar-menu-button .mud-button-root {
    min-width: 0;
    padding-inline: 0.95rem !important;
    border-radius: 0.75rem;
}

.sa-toolbar-menu-button .mud-button-label {
    gap: 0.45rem;
}

.sa-checkbox-cell {
    display: flex;
    justify-content: center;
    align-items: center;
}

.sa-content-thumb {
    width: 4rem;
    height: 4rem;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid var(--sa-border);
    background: var(--sa-surface);
}

.sa-gallery-preview {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.sa-gallery-more {
    color: var(--sa-muted-fg);
    font-size: 0.875rem;
    font-weight: 600;
}

.sa-form-thumb {
    width: 5rem;
    height: 5rem;
}

.sa-media-selection {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    align-items: flex-start;
}

.sa-media-thumb-card {
    position: relative;
    display: inline-flex;
    border-radius: 16px;
}

.sa-media-remove-button {
    position: absolute !important;
    top: -0.45rem;
    right: -0.45rem;
    background: var(--sa-surface) !important;
    border: 1px solid var(--sa-border);
    width: 2rem !important;
    height: 2rem !important;
    min-width: 2rem !important;
}

.sa-media-file-row {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.sa-media-picker-button {
    padding: 13.5px 14px !important;
}

.sa-gallery-editor-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.sa-gallery-item {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    width: 5rem;
}

.sa-gallery-sortable-item {
    cursor: grab;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.sa-gallery-sortable-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(43, 43, 45, 0.16);
}

.sa-gallery-sortable-item:active {
    cursor: grabbing;
}

.sa-gallery-caption-field {
    width: 100%;
}

.sa-gallery-caption .mud-typography {
    max-width: 5rem;
}

.sa-gallery-caption {
    max-width: 5rem;
    word-break: break-word;
}

.sa-media-dialog .mud-dialog {
    border-radius: 24px;
    background: var(--sa-surface);
    border: 1px solid var(--sa-border);
    width: min(96vw, 1400px);
    max-width: min(96vw, 1400px);
    min-height: 90vh;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.sa-media-dialog .mud-dialog-content {
    flex: 1 1 auto;
    overflow: hidden;
}

.sa-media-dialog .mud-dialog-actions {
    flex: 0 0 auto;
}

.sa-media-library-viewport {
    height: calc(90vh - 18rem);
    min-height: 26rem;
    overflow-y: auto;
    padding-right: 0.2rem;
}

.sa-media-library-grid-row {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.9rem;
    margin-bottom: 0.9rem;
}

.sa-media-library-item {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    width: 100%;
    min-height: 11.5rem;
    padding: 0.7rem;
    border-radius: 18px;
    border: 1px solid var(--sa-border);
    background: var(--sa-surface);
    color: var(--sa-fg);
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.sa-media-library-item:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--sa-primary) 45%, transparent);
}

.sa-media-library-item.is-selected {
    border-color: var(--sa-primary);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--sa-primary) 18%, transparent) inset;
}

.sa-media-library-thumb,
.sa-media-library-file {
    width: 100%;
    height: 7.5rem;
    border-radius: 14px;
    border: 1px solid var(--sa-border);
    background: var(--sa-surface);
}

.sa-media-library-thumb {
    object-fit: cover;
}

.sa-media-library-file {
    display: grid;
    place-items: center;
    color: var(--sa-muted-fg);
}

.sa-media-library-name {
    font-size: 0.83rem;
    line-height: 1.3;
    word-break: break-word;
    color: var(--sa-fg);
}

.sa-media-detail-dialog .mud-dialog {
    width: min(94vw, 980px);
    max-width: min(94vw, 980px);
}

.sa-media-detail-preview {
    display: grid;
    place-items: center;
    min-height: 24rem;
}

.sa-media-detail-image {
    max-width: 100%;
    max-height: 24rem;
    border-radius: 16px;
    object-fit: contain;
    border: 1px solid var(--sa-border);
    background: var(--sa-surface);
}

.sa-media-detail-file-icon {
    display: grid;
    place-items: center;
    width: 12rem;
    height: 12rem;
    border-radius: 24px;
    border: 1px solid var(--sa-border);
    background: var(--sa-surface);
    color: var(--sa-muted-fg);
}

.sa-media-detail-row {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.sa-subtle-refresh-button {
    border: 1px solid var(--sa-border);
    background: var(--sa-surface);
    opacity: 0.72;
}

.sa-subtle-refresh-button:hover {
    opacity: 1;
    background: color-mix(in srgb, var(--sa-primary) 8%, transparent);
}

@media (max-width: 1200px) {
    .sa-media-library-grid-row {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .sa-media-library-grid-row {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .sa-media-dialog .mud-dialog {
        min-height: 94vh;
        max-height: 94vh;
    }

    .sa-media-library-viewport {
        height: calc(94vh - 18rem);
        min-height: 22rem;
    }

    .sa-media-library-grid-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.sa-field-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sa-upload-input {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.sa-upload-input label {
    color: var(--sa-muted-fg);
    font-size: 0.9rem;
}

.sa-upload-dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-height: 7rem;
    padding: 1rem 1.1rem;
    border: 1px dashed var(--sa-border);
    border-radius: 18px;
    background: var(--sa-surface);
    overflow: hidden;
}

.sa-upload-dropzone-title {
    color: var(--sa-fg);
    font-weight: 600;
}

.sa-upload-dropzone-subtitle {
    color: var(--sa-muted-fg);
    font-size: 0.92rem;
}

.sa-upload-input-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.sa-form-fields {
    align-items: flex-start;
}

.mud-input-outlined-border {
    border-radius: 12px !important;
}


.sa-rich-editor-shell .ql-toolbar.ql-snow,
.sa-rich-editor-shell .ql-container.ql-snow {
    border-color: rgb(189 189 189);
}

.sa-rich-editor-shell .ql-toolbar.ql-snow {
    border-radius: 12px 12px 0 0;
    background: var(--sa-surface);
}

.sa-rich-editor-shell .ql-container.ql-snow {
    border-radius: 0 0 12px 12px;
    background: var(--sa-surface);
    min-height: 20rem;
}

.sa-rich-editor-shell .ql-editor {
    min-height: 18rem;
    color: var(--sa-fg);
    font-size: 1rem;
}

.sa-rich-editor-shell .ql-snow .ql-stroke {
    stroke: var(--sa-muted-fg);
}

.sa-rich-editor-shell .ql-snow .ql-fill {
    fill: var(--sa-muted-fg);
}

.sa-rich-editor-shell .ql-snow .ql-picker {
    color: var(--sa-fg);
}

.sa-rich-editor-shell .ql-snow .ql-picker-options {
    background: var(--sa-surface);
    border: 1px solid var(--sa-border);
    color: var(--sa-fg);
}

.sa-rich-editor-shell .ql-snow .ql-picker-item {
    color: var(--sa-fg);
}

.sa-rich-editor-shell .ql-snow .ql-picker-item:hover,
.sa-rich-editor-shell .ql-snow .ql-picker-item.ql-selected {
    color: var(--sa-primary);
}

.sa-rich-editor-shell .ql-snow .ql-picker-label {
    background: var(--sa-surface);
}

.sa-rich-editor-shell .ql-picker.ql-header,
.sa-rich-editor-shell .ql-picker.ql-font,
.sa-rich-editor-shell .ql-picker.ql-size {
    min-width: 7.5rem;
}

.sa-rich-editor-shell .ql-snow .ql-picker.ql-header .ql-picker-label::before,
.sa-rich-editor-shell .ql-snow .ql-picker.ql-header .ql-picker-item::before {
    color: var(--sa-fg);
}

.sa-rich-editor-shell .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before,
.sa-rich-editor-shell .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {
    content: "Título 1";
}

.sa-rich-editor-shell .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
.sa-rich-editor-shell .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
    content: "Título 2";
}

.sa-rich-editor-shell .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
.sa-rich-editor-shell .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
    content: "Título 3";
}

.sa-rich-editor-shell .ql-snow .ql-picker.ql-header .ql-picker-label:not([data-value])::before,
.sa-rich-editor-shell .ql-snow .ql-picker.ql-header .ql-picker-item:not([data-value])::before {
    content: "Normal";
}

.sa-rich-editor-shell .ql-snow .ql-picker.ql-size .ql-picker-label::before,
.sa-rich-editor-shell .ql-snow .ql-picker.ql-size .ql-picker-item::before {
    color: var(--sa-fg);
}

.sa-rich-editor-shell .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="small"]::before,
.sa-rich-editor-shell .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="small"]::before {
    content: "Pequeno";
}

.sa-rich-editor-shell .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="large"]::before,
.sa-rich-editor-shell .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="large"]::before {
    content: "Grande";
}

.sa-rich-editor-shell .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="huge"]::before,
.sa-rich-editor-shell .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="huge"]::before {
    content: "Gigante";
}

.sa-rich-editor-shell .ql-snow .ql-picker.ql-size .ql-picker-label:not([data-value])::before,
.sa-rich-editor-shell .ql-snow .ql-picker.ql-size .ql-picker-item:not([data-value])::before {
    content: "Normal";
}

.sa-rich-editor-shell .ql-snow .ql-picker.ql-font .ql-picker-label::before,
.sa-rich-editor-shell .ql-snow .ql-picker.ql-font .ql-picker-item::before {
    color: var(--sa-fg);
}

.sa-rich-editor-shell .ql-snow .ql-picker.ql-font .ql-picker-label[data-value="sans-serif"]::before,
.sa-rich-editor-shell .ql-snow .ql-picker.ql-font .ql-picker-item[data-value="sans-serif"]::before {
    content: "Sans Serif";
}

.sa-rich-editor-shell .ql-snow .ql-picker.ql-font .ql-picker-label[data-value="serif"]::before,
.sa-rich-editor-shell .ql-snow .ql-picker.ql-font .ql-picker-item[data-value="serif"]::before {
    content: "Serif";
}

.sa-rich-editor-shell .ql-snow .ql-picker.ql-font .ql-picker-label[data-value="monospace"]::before,
.sa-rich-editor-shell .ql-snow .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before {
    content: "Monospace";
}

.sa-rich-editor-shell .ql-snow .ql-picker.ql-font .ql-picker-label[data-value="arial"]::before,
.sa-rich-editor-shell .ql-snow .ql-picker.ql-font .ql-picker-item[data-value="arial"]::before {
    content: "Arial";
    font-family: Arial, Helvetica, sans-serif;
}

.sa-rich-editor-shell .ql-snow .ql-picker.ql-font .ql-picker-label[data-value="times-new-roman"]::before,
.sa-rich-editor-shell .ql-snow .ql-picker.ql-font .ql-picker-item[data-value="times-new-roman"]::before {
    content: "Times New Roman";
    font-family: "Times New Roman", Times, serif;
}

.sa-rich-editor-shell .ql-snow .ql-picker.ql-font .ql-picker-label[data-value="georgia"]::before,
.sa-rich-editor-shell .ql-snow .ql-picker.ql-font .ql-picker-item[data-value="georgia"]::before {
    content: "Georgia";
    font-family: Georgia, serif;
}

.sa-rich-editor-shell .ql-snow .ql-picker.ql-font .ql-picker-label[data-value="trebuchet-ms"]::before,
.sa-rich-editor-shell .ql-snow .ql-picker.ql-font .ql-picker-item[data-value="trebuchet-ms"]::before {
    content: "Trebuchet MS";
    font-family: "Trebuchet MS", sans-serif;
}

.sa-rich-editor-shell .ql-snow .ql-picker.ql-font .ql-picker-label[data-value="verdana"]::before,
.sa-rich-editor-shell .ql-snow .ql-picker.ql-font .ql-picker-item[data-value="verdana"]::before {
    content: "Verdana";
    font-family: Verdana, Geneva, sans-serif;
}

.sa-rich-editor-shell .ql-snow .ql-picker.ql-font .ql-picker-label[data-value="tahoma"]::before,
.sa-rich-editor-shell .ql-snow .ql-picker.ql-font .ql-picker-item[data-value="tahoma"]::before {
    content: "Tahoma";
    font-family: Tahoma, Geneva, sans-serif;
}

.sa-rich-editor-shell .ql-snow .ql-picker.ql-font .ql-picker-label:not([data-value])::before,
.sa-rich-editor-shell .ql-snow .ql-picker.ql-font .ql-picker-item:not([data-value])::before {
    content: "Padrão";
}

.sa-rich-editor-shell .ql-snow .ql-tooltip {
    left: 50% !important;
    transform: translateX(-50%);
    z-index: 20;
    background: var(--sa-surface);
    border: 1px solid var(--sa-border);
    color: var(--sa-fg);
    border-radius: 14px;
    box-shadow: 0 12px 35px rgba(43, 43, 45, 0.16);
}

.sa-rich-editor-shell .ql-snow .ql-tooltip input[type=text] {
    color: var(--sa-fg);
    background: var(--sa-surface);
    border: 1px solid var(--sa-border);
}

.sa-rich-editor-shell .ql-snow .ql-tooltip a.ql-action,
.sa-rich-editor-shell .ql-snow .ql-tooltip a.ql-remove {
    color: var(--sa-primary);
}

/* Tradução dos textos internos do tooltip do Quill (vêm de pseudo-elementos do snow.css). */
.sa-rich-editor-shell .ql-snow .ql-tooltip::before {
    content: "Visitar URL:";
}

.sa-rich-editor-shell .ql-snow .ql-tooltip[data-mode=link]::before {
    content: "Digite o link:";
}

.sa-rich-editor-shell .ql-snow .ql-tooltip[data-mode=video]::before {
    content: "Digite o link do vídeo:";
}

.sa-rich-editor-shell .ql-snow .ql-tooltip[data-mode=formula]::before {
    content: "Digite a fórmula:";
}

.sa-rich-editor-shell .ql-snow .ql-tooltip a.ql-action::after {
    content: "Editar";
}

.sa-rich-editor-shell .ql-snow .ql-tooltip.ql-editing a.ql-action::after {
    content: "Aplicar";
}

.sa-rich-editor-shell .ql-snow .ql-tooltip a.ql-remove::before {
    content: "Remover";
}

.sa-rich-editor-shell .ql-html::before {
    content: "</>";
    font-size: 0.8rem;
    font-weight: 700;
}

.sa-rich-editor-shell .ql-file::before {
    content: "";
    display: inline-block;
    width: 18px;
    height: 18px;
    background-color: var(--sa-muted-fg);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M16.5 6v11.5a4 4 0 0 1-8 0V5a2.5 2.5 0 0 1 5 0v10.5a1 1 0 0 1-2 0V6H10v9.5a2.5 2.5 0 0 0 5 0V5a4 4 0 0 0-8 0v12.5a5.5 5.5 0 0 0 11 0V6h-1.5z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M16.5 6v11.5a4 4 0 0 1-8 0V5a2.5 2.5 0 0 1 5 0v10.5a1 1 0 0 1-2 0V6H10v9.5a2.5 2.5 0 0 0 5 0V5a4 4 0 0 0-8 0v12.5a5.5 5.5 0 0 0 11 0V6h-1.5z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.sa-rich-editor-shell .ql-file:hover::before {
    background-color: var(--sa-primary);
}

.sa-rich-editor-hidden .ql-editor {
    display: none;
}

.sa-rich-editor-hidden {
    display: none;
}

.sa-rich-editor-source {
    width: 100%;
    min-height: 18rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--sa-border);
    border-top: none;
    border-radius: 0 0 18px 18px;
    background: var(--sa-surface);
    color: var(--sa-fg);
    font: 14px/1.5 Consolas, Monaco, "Courier New", monospace;
    resize: vertical;
    outline: none;
}

.sa-form-field-item {
    width: 100%;
}

.sa-field-width-auto {
    width: auto;
    min-width: 12rem;
}

.sa-field-width-xs {
    max-width: 14rem;
}

.sa-field-width-sm {
    max-width: 18rem;
}

.sa-field-width-md {
    max-width: 28rem;
}

.sa-field-width-lg {
    max-width: 42rem;
}

.sa-field-width-xl {
    max-width: 100%;
}

#blazor-error-ui {
    background: rgba(112, 10, 24, 0.94);
    color: white;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    padding: 0.9rem 3rem 0.9rem 1rem;
    position: fixed;
    border-radius: 18px;
    z-index: 2000;
}

.mud-snackbar-location-top-center {
    top: 1.2rem;
}

.mud-snackbar-container {
    width: min(calc(100vw - 1.5rem), 30rem);
}

.mud-snackbar {
    border-radius: 22px;
    backdrop-filter: blur(14px);
}

.sa-web-content {
    padding-top: 56px;
}

.sa-dashboard-card {
    height: 100%;
    border: 1px solid var(--sa-border);
    border-radius: 18px;
    background: var(--sa-surface);
    box-shadow: var(--sa-shadow-soft);
}

.sa-dashboard-card-tall {
    min-height: 20rem;
}

.sa-analytics-full-chart .mud-chart {
    width: 100% !important;
}

.sa-analytics-full-chart svg {
    width: 100% !important;
    max-width: 100% !important;
    display: block;
}

.sa-analytics-channels svg rect,
.sa-analytics-channels svg path,
.sa-analytics-channels svg circle {
    fill: #ffb020 !important;
    stroke: #ffb020 !important;
}

.sa-analytics-devices svg path,
.sa-analytics-devices svg circle {
    fill: #2dd4bf !important;
    stroke: #2dd4bf !important;
}

.sa-dashboard-subcard {
    border-color: var(--sa-border) !important;
    border-radius: 14px !important;
    background: var(--sa-surface) !important;
}

.sa-dashboard-action-card {
    height: 100%;
    border-color: var(--sa-border) !important;
    border-radius: 14px !important;
    background: var(--sa-surface) !important;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.sa-dashboard-action-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--sa-primary) 40%, transparent) !important;
    background: var(--sa-hover-bg) !important;
}

.sa-code-textarea textarea,
.sa-code-textarea .mud-input-slot {
    font-family: Consolas, "Courier New", monospace !important;
}

.sa-code-editor-shell {
    overflow: hidden;
    border-radius: 14px !important;
    border-color: var(--sa-border) !important;
    background: var(--sa-surface) !important;
}

.sa-code-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--sa-border);
    background: var(--sa-surface);
}

.sa-code-editor-textarea {
    width: 100%;
    min-height: 20rem;
    padding: 1rem 1.1rem;
    border: none;
    background:
        linear-gradient(rgba(43, 43, 45, 0.04) 1px, transparent 1px);
    background-size: 100% 1.6rem;
    background-color: var(--sa-surface);
    color: var(--sa-fg);
    font: 14px/1.6 Consolas, Monaco, "Courier New", monospace;
    resize: vertical;
    outline: none;
    tab-size: 4;
}

.sa-code-editor-textarea:disabled {
    opacity: 0.72;
    cursor: not-allowed;
}

.sa-code-editor-shell .CodeMirror {
    height: auto;
    min-height: 20rem;
    font: 14px/1.6 Consolas, Monaco, "Courier New", monospace;
    border-top: 1px solid var(--sa-border);
}

.sa-code-editor-shell .cm-s-default.CodeMirror,
.sa-code-editor-shell .cm-s-default .CodeMirror-gutters {
    background: var(--sa-surface);
}

.sa-code-editor-shell .CodeMirror-gutters {
    border-right: 1px solid var(--sa-border);
}

.sa-code-editor-shell .CodeMirror-linenumber {
    color: var(--sa-muted-fg);
}

.sa-code-editor-shell .CodeMirror-cursor {
    border-left: 1px solid var(--sa-fg);
}

.sa-dashboard-action-link {
    display: block;
    color: inherit !important;
}

.sa-dashboard-message-row,
.sa-dashboard-recent-row {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.35rem 0;
}

.sa-dashboard-table {
    background: transparent;
}

.sa-dashboard-table .mud-table-container {
    background: transparent;
}

.sa-dashboard-table .mud-table-body .mud-table-row {
    cursor: pointer;
}

.sa-device-preview {
    display: grid;
    place-items: center;
    min-height: 26rem;
}

.sa-device-preview-desktop {
    min-height: 32rem;
}

.sa-device-frame {
    position: relative;
    overflow: hidden;
    background: #050915;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.32);
}

.sa-device-frame-desktop {
    width: min(100%, 52rem);
    aspect-ratio: 16 / 10;
    border: 12px solid #0f172a;
    border-radius: 28px 28px 18px 18px;
}

.sa-device-frame-tablet {
    width: min(100%, 18rem);
    aspect-ratio: 3 / 4;
    border: 12px solid #0f172a;
    border-radius: 28px;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.sa-device-frame-mobile {
    width: min(100%, 13rem);
    aspect-ratio: 9 / 19.5;
    border: 10px solid #0f172a;
    border-radius: 28px;
    padding-top: 1.2rem;
    padding-bottom: 1rem;
}

.sa-device-iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}

.sa-device-stand {
    width: 10rem;
    height: 1rem;
    margin-top: 0.7rem;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(151, 169, 214, 0.55), rgba(76, 90, 126, 0.42));
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}

.sa-device-camera {
    position: absolute;
    top: 0.45rem;
    left: 50%;
    width: 0.55rem;
    height: 0.55rem;
    transform: translateX(-50%);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    z-index: 1;
}

.sa-device-notch {
    position: absolute;
    top: 0.45rem;
    left: 50%;
    width: 4.5rem;
    height: 0.75rem;
    transform: translateX(-50%);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.72);
    z-index: 1;
}

.sa-device-home {
    position: absolute;
    bottom: 0.35rem;
    left: 50%;
    width: 3.25rem;
    height: 0.22rem;
    transform: translateX(-50%);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.3);
    z-index: 1;
}

@media (max-width: 960px) {
    .sa-device-preview-desktop {
        min-height: 24rem;
    }

    .sa-device-preview {
        min-height: 20rem;
    }
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 0.8rem;
}

@media (max-width: 700px) {
    .sa-login-card {
        padding: 1.4rem;
    }
}


.sa-sortable-card-wrapper {
    cursor: grab;
}

.sa-sortable-card {
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.sa-sortable-card-wrapper:active {
    cursor: grabbing;
}

.sa-sortable-card-target .sa-sortable-card {
    border-color: var(--sa-primary) !important;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--sa-primary) 30%, transparent);
}

.sa-drag-handle {
    color: var(--sa-muted-fg);
}

.sa-consent-device-preview {
    position: relative;
    border: 1px solid var(--sa-border);
    border-radius: 22px;
    background: var(--sa-surface);
    overflow: hidden;
}

.sa-consent-device-preview-desktop {
    min-height: 280px;
    padding: 24px;
}

.sa-consent-device-preview-mobile {
    width: min(100%, 320px);
    min-height: 520px;
    margin: 0 auto;
    padding: 20px 16px;
    border-radius: 34px;
    background: var(--sa-muted);
}

.sa-consent-device-preview-mobile::before {
    content: "";
    display: block;
    width: 96px;
    height: 18px;
    margin: 0 auto 16px;
    border-radius: 999px;
    background: var(--sa-border);
}

@keyframes sa-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---------- Assistentes de importação (conteúdo e mídia) ---------- */
.sa-wizard-steps {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    flex-wrap: wrap;
}

.sa-wizard-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1 1 8rem;
    min-width: 0;
    padding: 0.4rem 0.6rem;
    border-radius: 0.5rem;
    border: 1px solid var(--mud-palette-lines-default);
    color: var(--mud-palette-text-secondary);
    font-size: 0.85rem;
}

.sa-wizard-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    flex: none;
    border-radius: 50%;
    border: 1px solid currentColor;
    font-weight: 600;
    font-size: 0.8rem;
}

.sa-wizard-step.is-current {
    color: var(--mud-palette-primary);
    border-color: var(--mud-palette-primary);
    font-weight: 600;
}

.sa-wizard-step.is-done {
    color: var(--mud-palette-success);
}

.sa-wizard-step-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sa-import-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.sa-import-stat {
    min-width: 7rem;
    padding: 0.6rem 0.9rem;
    border-radius: 0.5rem;
    border: 1px solid var(--mud-palette-lines-default);
}

.sa-import-stat strong {
    display: block;
    font-size: 1.4rem;
    line-height: 1.2;
}

.sa-import-stat.is-error strong {
    color: var(--mud-palette-error);
}

.sa-import-stat.is-ok strong {
    color: var(--mud-palette-success);
}

.sa-import-errors {
    max-height: 14rem;
    overflow: auto;
    margin: 0.5rem 0 0;
    padding-left: 1.2rem;
}

.sa-import-scroll {
    overflow-x: auto;
}

.sa-import-row-invalid td {
    background: color-mix(in srgb, var(--mud-palette-error) 8%, transparent);
}

.sa-drop-zone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 9rem;
    padding: 1.5rem;
    text-align: center;
    border: 2px dashed var(--mud-palette-lines-default);
    border-radius: 0.75rem;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.sa-drop-zone:hover,
.sa-drop-zone:focus-within {
    border-color: var(--mud-palette-primary);
    background: color-mix(in srgb, var(--mud-palette-primary) 5%, transparent);
}

.sa-drop-zone.is-disabled {
    opacity: 0.6;
    pointer-events: none;
}

.sa-drop-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.sa-import-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sa-import-thumbs img {
    width: 4.5rem;
    height: 4.5rem;
    object-fit: cover;
    border-radius: 0.4rem;
    border: 1px solid var(--mud-palette-lines-default);
}

/* ---------- Importação: acabamento premium ---------- */
.sa-import-hero {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    margin-bottom: 1.1rem;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--mud-palette-primary) 35%, transparent);
    background:
        radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--mud-palette-primary) 22%, transparent), transparent 60%),
        radial-gradient(100% 140% at 100% 100%, color-mix(in srgb, var(--sa-secondary) 14%, transparent), transparent 55%),
        color-mix(in srgb, var(--mud-palette-surface) 92%, transparent);
}

.sa-import-hero-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 14px;
    color: #fff;
    background: var(--sa-gradient-brand);
    box-shadow: var(--sa-shadow-lift);
}

.sa-import-hero h3 {
    margin: 0 0 0.15rem;
    font-size: 1.15rem;
}

.sa-import-hero p {
    margin: 0;
    color: var(--mud-palette-text-secondary);
    font-size: 0.92rem;
    line-height: 1.45;
}

.sa-import-rules {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.sa-import-rule {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.7rem 0.85rem;
    border-radius: 12px;
    border: 1px solid var(--mud-palette-lines-default);
    background: color-mix(in srgb, var(--mud-palette-surface) 85%, transparent);
    font-size: 0.9rem;
    line-height: 1.35;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.sa-import-rule:hover {
    border-color: color-mix(in srgb, var(--mud-palette-primary) 55%, transparent);
    transform: translateY(-1px);
}

.sa-import-rule .mud-icon-root {
    flex: none;
    margin-top: 0.05rem;
    color: var(--mud-palette-primary);
}

.sa-import-callout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.85rem;
    padding: 0.9rem 1.1rem;
    border-radius: 14px;
    border: 1px dashed color-mix(in srgb, var(--mud-palette-primary) 55%, transparent);
    background: color-mix(in srgb, var(--mud-palette-primary) 7%, transparent);
}

.sa-import-callout > div > strong {
    display: block;
}

.sa-import-callout > div > span {
    color: var(--mud-palette-text-secondary);
    font-size: 0.85rem;
}

.sa-import-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.9rem;
}

.sa-import-pill {
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--mud-palette-lines-default);
    font-size: 0.78rem;
    color: var(--mud-palette-text-secondary);
}

/* Etapas conectadas por uma linha */
.sa-wizard-steps {
    gap: 0;
    margin-bottom: 1.25rem;
}

.sa-wizard-step {
    position: relative;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    text-align: center;
    font-size: 0.8rem;
}

.sa-wizard-step::before {
    content: "";
    position: absolute;
    top: 0.95rem;
    left: -50%;
    width: 100%;
    height: 2px;
    background: var(--mud-palette-lines-default);
    z-index: 0;
}

.sa-wizard-step:first-child::before {
    display: none;
}

.sa-wizard-step.is-done::before,
.sa-wizard-step.is-current::before {
    background: linear-gradient(90deg, var(--mud-palette-success), var(--mud-palette-primary));
}

.sa-wizard-step-number {
    position: relative;
    z-index: 1;
    width: 1.9rem;
    height: 1.9rem;
    background: var(--mud-palette-surface);
}

.sa-wizard-step.is-current .sa-wizard-step-number {
    color: #fff;
    border-color: transparent;
    background: var(--sa-gradient-brand);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--mud-palette-primary) 22%, transparent);
}

.sa-wizard-step.is-done .sa-wizard-step-number {
    color: #fff;
    border-color: transparent;
    background: var(--mud-palette-success);
}

.sa-wizard-step.is-current,
.sa-wizard-step.is-done {
    border: 0;
}

/* Indicadores com mais presença */
.sa-import-stat {
    flex: 1 1 8rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: color-mix(in srgb, var(--mud-palette-surface) 85%, transparent);
    color: var(--mud-palette-text-secondary);
    font-size: 0.82rem;
}

.sa-import-stat strong {
    color: var(--mud-palette-text-primary);
    font-size: 1.6rem;
    font-weight: 700;
}

.sa-import-stat.is-ok {
    border-color: color-mix(in srgb, var(--mud-palette-success) 50%, transparent);
    background: color-mix(in srgb, var(--mud-palette-success) 8%, transparent);
}

.sa-import-stat.is-error {
    border-color: color-mix(in srgb, var(--mud-palette-error) 55%, transparent);
    background: color-mix(in srgb, var(--mud-palette-error) 8%, transparent);
}

.sa-drop-zone {
    border-radius: 18px;
    min-height: 11rem;
    background: color-mix(in srgb, var(--mud-palette-primary) 4%, transparent);
}

.sa-drop-zone .mud-icon-root {
    width: 3rem;
    height: 3rem;
    color: var(--mud-palette-primary);
}

.sa-import-file-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.9rem;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--mud-palette-success) 45%, transparent);
    background: color-mix(in srgb, var(--mud-palette-success) 8%, transparent);
    font-size: 0.9rem;
}

.sa-import-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    padding: 1.6rem 1rem;
    text-align: center;
    border-radius: 18px;
}

.sa-import-result.is-ok {
    border: 1px solid color-mix(in srgb, var(--mud-palette-success) 50%, transparent);
    background: radial-gradient(100% 120% at 50% 0%, color-mix(in srgb, var(--mud-palette-success) 18%, transparent), transparent 70%);
}

.sa-import-result.is-error {
    border: 1px solid color-mix(in srgb, var(--mud-palette-error) 50%, transparent);
    background: radial-gradient(100% 120% at 50% 0%, color-mix(in srgb, var(--mud-palette-error) 16%, transparent), transparent 70%);
}

.sa-import-result .mud-icon-root {
    width: 3.4rem;
    height: 3.4rem;
}

.sa-import-result h3 {
    margin: 0;
    font-size: 1.3rem;
}

.sa-import-result p {
    margin: 0;
    max-width: 38rem;
    color: var(--mud-palette-text-secondary);
}

@media (max-width: 600px) {
    .sa-wizard-step-label { display: none; }
    .sa-wizard-step.is-current .sa-wizard-step-label { display: block; position: absolute; top: 2.4rem; white-space: nowrap; }
    .sa-wizard-steps { margin-bottom: 2.4rem; }
}
