@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700&display=swap');

:root {
    --primary: #0ea5e9;
    --primary-rgb: 14, 165, 233;
    --primary-soft-bg: #e0f2fe;
    --primary-soft-border: #bae6fd;
    --dark: #0f172a;
    --surface: #ffffff;
    --muted: #6b7280;
    --chat-incoming: #eef2ff;
    --chat-outgoing: #dbeafe;
    --sidebar-start: #0f172a;
    --sidebar-end: #0ea5e9;
}

.theme-cliente {
    --primary: #0ea5e9;
    --primary-rgb: 14, 165, 233;
    --primary-soft-bg: #e0f2fe;
    --primary-soft-border: #bae6fd;
    --chat-incoming: #eef2ff;
    --chat-outgoing: #dbeafe;
    --sidebar-start: #0f172a;
    --sidebar-end: #0ea5e9;
}

.theme-operador {
    --primary: #16a34a;
    --primary-rgb: 22, 163, 74;
    --primary-soft-bg: #dcfce7;
    --primary-soft-border: #bbf7d0;
    --chat-incoming: #ecfdf3;
    --chat-outgoing: #dcfce7;
    --sidebar-start: #0f172a;
    --sidebar-end: #16a34a;
}

html, body {
    font-family: 'Manrope', 'Segoe UI', sans-serif;
    background: #f7fbff;
    color: var(--dark);
}
.opening-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.opening-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
}

.opening-text {
    font-weight: 600;
    color: #0f172a;
}


.page {
    min-height: 100vh;
    display: flex;
    flex-direction: row;
    background: #f7fbff;
}

.sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--sidebar-start) 0%, var(--sidebar-end) 100%);
    color: #fff;
    position: sticky;
    top: 0;
    height: 100vh;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.top-row {
    background-color: #ffffff;
    border-bottom: 1px solid #e5e9f2;
    position: sticky;
    top: 0;
    z-index: 2;
    height: 80px;
    min-height: 80px;
    align-items: center;
}

.top-row-inner {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.header-brand {
    gap: 0.75rem;
}

.header-logo {
    height: 45px;
    width: auto;
}

.brand-subtitle {
    line-height: 1.2;
    margin-bottom: 0;
}

.header-user {
    gap: 1rem;
}

@media (min-width: 992px) {
    .top-row .header-brand {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.1rem !important;
    }

    .top-row .brand-subtitle {
        display: block;
    }
}

.user-info {
    min-width: 180px;
}

.user-name-line {
    gap: 0.5rem;
    margin-bottom: 0.15rem;
}

.user-company {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
}

.user-email {
    font-size: 0.8rem;
}

.exit-link {
    color: #6b7280;
    font-size: 0.9rem;
}

.exit-link:hover {
    color: var(--primary);
}

.content {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding-top: 0.5rem;
}

@media (max-width: 768px) {
    .page {
        flex-direction: column;
    }

    .sidebar {
        position: static;
        width: 100%;
        height: auto;
    }

    .nav-scrollable {
        display: block;
    }
}

.nav-wrapper {
    height: 100%;
}

.brand {
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    height: 80px;
    min-height: 80px;
    padding: 0.9rem 1.25rem;
    width: 100%;
}

.brand-row {
    margin: 0;
    padding: 0;
}

.brand .navbar-toggler {
    margin-left: auto;
}

.brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
}

.nav-scrollable {
    padding-top: 0.75rem;
}

.navbar-toggler {
    appearance: none;
    cursor: pointer;
    width: 3rem;
    height: 2.3rem;
    color: white;
    position: absolute;
    top: 1rem;
    right: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.12);
    background-image:
        linear-gradient(#ffffff, #ffffff),
        linear-gradient(#ffffff, #ffffff),
        linear-gradient(#ffffff, #ffffff);
    background-repeat: no-repeat;
    background-position:
        center calc(50% - 6px),
        center,
        center calc(50% + 6px);
    background-size:
        60% 2px,
        60% 2px,
        60% 2px;
}

.navbar-toggler:checked {
    background-color: rgba(255, 255, 255, 0.32);
}

.nav-item {
    font-size: 0.95rem;
    padding-bottom: 0.35rem;
}

.nav-item .nav-link {
    color: rgba(255, 255, 255, 0.86);
    border-radius: 10px;
    height: 3rem;
    display: flex;
    align-items: center;
}

.nav-item .nav-link.active {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-weight: 600;
}

.nav-item .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.nav-scrollable {
    display: none;
}

.navbar-toggler:checked ~ .nav-scrollable {
    display: block;
}

@media (min-width: 768px) {
    .navbar-toggler {
        display: none;
    }

    .nav-scrollable {
        display: block;
        height: calc(100vh - 96px);
        overflow-y: auto;
    }
}

a, .btn-link {
    color: var(--primary);
}

.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:active:focus,
.btn-primary:focus-visible,
.btn-primary:not(:disabled):not(.disabled):active:focus {
    color: #fff;
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    filter: brightness(0.97);
}

.btn-primary:disabled,
.btn-primary.disabled,
.btn-primary:disabled:hover {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    opacity: 0.8;
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    color: #fff;
}

.bg-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 0.15rem rgba(var(--primary-rgb), 0.35);
}

h1:focus {
    outline: none;
}

.validation-message {
    color: #e74c3c;
}

.blazor-error-boundary {
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
    background: #b32121;
}

.blazor-error-boundary::after {
    content: "Ocorreu um erro.";
}

.hero-portal {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.16), rgba(15, 23, 42, 0.12));
    border-radius: 1.5rem;
    padding: 2.5rem;
}

.hero-card {
    border: 1px solid #e5e9f2;
}

.about-hero {
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 100%);
    border-radius: 1.5rem;
    padding: 2.25rem;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.2);
}

.about-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.22), transparent 35%),
        radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.12), transparent 30%),
        radial-gradient(circle at 50% 100%, rgba(255, 255, 255, 0.1), transparent 30%);
    pointer-events: none;
}

.about-card {
    background: #fff;
    border: 1px solid #e5e9f2;
    border-radius: 1rem;
    padding: 1.25rem 1.35rem;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.about-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

.about-chip {
    background: rgba(255, 255, 255, 0.753);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    min-width: 230px;
    backdrop-filter: blur(2px);
}

.card {
    border-radius: 1rem;
}

.card-header {
    border-top-left-radius: 1rem !important;
    border-top-right-radius: 1rem !important;
}

.card-footer {
    border-bottom-left-radius: 1rem !important;
    border-bottom-right-radius: 1rem !important;
}

.table > :not(caption) > * > * {
    padding: 0.9rem;
}

code {
    background: #0f172a;
    color: var(--primary);
    padding: 0.15rem 0.35rem;
    border-radius: 0.4rem;
    font-size: 0.85rem;
}

.auth-page {
    max-width: 760px;
    width: 100%;
    margin: 0 auto;
    padding: calc(1.5rem + env(safe-area-inset-top)) 1rem 2rem 1rem;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.fluent-form-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1.25rem;
    width: 100%;
    align-items: start;
}

@media (max-width: 768px) {
    .header-user {
        justify-content: flex-end !important;
        align-items: center !important;
    }

    .header-user-left {
        flex: 1 1 auto;
        min-width: 0;
    }

    .header-user-right {
        flex: 0 0 auto;
        margin-left: auto;
    }

    .user-info,
    .user-name-line,
    .user-email {
        text-align: right !important;
    }

    .exit-link {
        margin-left: auto !important;
    }

    .sidebar,
    .nav-wrapper {
        padding-top: 0 !important;
    }

    .brand-row {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 0.75rem !important;
        padding: 0.4rem 0.75rem !important;
    }

    .navbar-toggler {
        position: static !important;
    }
}

@media (max-width: 992px) {
    .sidebar,
    .nav-wrapper {
        padding-top: calc(0.35rem + env(safe-area-inset-top)) !important;
    }

    .brand {
        height: 50px;
        min-height: 50px;
        padding: calc(0.3rem + env(safe-area-inset-top)) 1.25rem 0.3rem 1.25rem;
        align-items: center;
        margin-top: 0.2rem;
    }
}

.span-7 {
    grid-column: span 7;
}

.span-2 {
    grid-column: span 2;
}

.span-3 {
    grid-column: span 3;
}

.span-4 {
    grid-column: span 4;
}

.span-1 {
    grid-column: span 1;
}

.span-5 {
    grid-column: span 5;
}

.span-6 {
    grid-column: span 6;
}

.span-8 {
    grid-column: span 8;
}

.span-12 {
    grid-column: span 12;
}
.span-5 {
    grid-column: span 5;
}

.fluent-form-grid > div {
    width: 100%;
    min-width: 0;
}

.fluent-form-grid fluent-combobox,
.fluent-form-grid fluent-number-field,
.fluent-form-grid fluent-date-picker,
.fluent-form-grid fluent-time-picker,
.fluent-form-grid fluent-text-field {
    width: 100%;
    display: block;
}

.fluent-form-grid fluent-combobox {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
}


fluent-text-field::part(control),
fluent-number-field::part(control) {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* ==========================================================================
   Estilos do formulário com grid (Desktop)
   ========================================================================== */

/* Remove o gap do FluentStack e controla apenas via CSS */
.form-card > fluent-stack {
    gap: 0 !important;
}

/* Cada linha do grid (fluent-form-grid) recebe margem inferior */
.form-card .fluent-form-grid {
    margin-bottom: 24px;
}

/* Última linha não precisa de margem extra */
.form-card .fluent-form-grid:last-child {
    margin-bottom: 0;
}

/* Unidade Operacional - campo + botão alinhados */
.form-card .unidade-inline {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.form-card .unidade-field {
    flex: 1;
    min-width: 0;
}

.form-card .unidade-search-button {
    flex-shrink: 0;
    height: 32px;
    min-height: 32px;
    margin-bottom: 0;
}

.form-card .unidade-search-button::part(control) {
    height: 32px;
    min-height: 32px;
    padding: 0 10px;
}

@media (max-width: 992px) {
    .fluent-form-grid {
        grid-template-columns: 1fr;
    }

    .fluent-form-grid [class^="span-"],
    .fluent-form-grid [class*=" span-"] {
        grid-column: 1 / -1;
    }
}

fluent-combobox::part(listbox) {
    max-height: var(--combo-list-max-height, 260px);
    overflow-y: auto;
}

fluent-time-picker::part(listbox) {
    max-height: var(--combo-list-max-height, 260px);
    overflow-y: auto;
}

.maui-host fluent-combobox[data-popup-direction="up"]::part(positioning-region),
.maui-host fluent-time-picker[data-popup-direction="up"]::part(positioning-region),
.maui-host fluent-date-picker[data-popup-direction="up"]::part(positioning-region) {
    top: auto !important;
    bottom: 100% !important;
}

.maui-host fluent-date-picker[data-popup-direction="up"]::part(popup),
.maui-host fluent-date-picker[data-popup-direction="up"]::part(dialog),
.maui-host fluent-date-picker[data-popup-direction="up"]::part(calendar) {
    top: auto !important;
    bottom: 100% !important;
}

fluent-autocomplete.autocomplete-fixed {
    width: 100%;
}

fluent-autocomplete.autocomplete-fixed::part(positioning-region),
fluent-autocomplete.autocomplete-fixed::part(listbox) {
    min-width: 100% !important;
    width: 100% !important;
}

.unidade-selector::part(control) {
    cursor: pointer;
}

.unidade-inline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
}

.unidade-action-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
}

.unidade-dialog {
    width: 480px;
    position: relative;
}

.unidade-dialog-content {
    width: 100%;
    padding: 16px;
}

.unidade-dialog-stack {
    width: 100%;
    align-items: stretch;
    gap: 12px;
}

.unidade-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.unidade-dialog-title {
    font-weight: 600;
}

.unidade-search-button::part(control) {
    min-width: 40px;
    padding: 2px 10px;
    background: #f3f6fb;
    border: 1px solid #d0d7de;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    height: auto;
    align-self: start;
}

.unidade-busca-container {
    width: 100%;
    height: 320px;
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid #d0d7de;
    border-radius: 4px;
    padding: 6px;
    box-sizing: border-box;
}

.unidade-busca-list {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.unidade-busca-item::part(control) {
    justify-content: flex-start;
}

.dialog-close-button::part(control) {
    min-width: 28px;
    padding: 4px;
}

.unidade-dialog-close {
    display: flex;
    justify-content: flex-end;
}

.dialog-close-button {
    margin-left: auto;
}

.optional-field {
    width: 100%;
}

.optional-field-inactive {
    opacity: 0.65;
}

fluent-number-field.optional-field-inactive::part(control),
fluent-number-field.optional-field-inactive::part(label),
fluent-text-field.optional-field-inactive::part(control),
fluent-text-field.optional-field-inactive::part(label) {
    color: #6b7280;
}

.fluent-form-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.6rem 1rem;
}

.form-card {
    border-radius: 16px;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
    border: 1px solid #e5e9f2;
    background: #fff;
    width: 100%;
}

.chat-thread {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    align-items: flex-start;
}

.chat-item {
    display: flex;
    flex-direction: column;
    max-width: 80%;
}

.chat-thread .align-self-end {
    align-self: flex-end;
}

.chat-thread .align-self-start {
    align-self: flex-start;
}

.chat-thread .align-center {
    align-self: center;
}

.btn-spinner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

.btn-spinner fluent-progress-ring,
.btn-spinner svg {
    width: 16px;
    height: 16px;
}

.btn-spinner + .send-label {
    margin-left: 0.4rem;
}

.chat-meta {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 0.35rem;
}

.chat-bubble {
    padding: 0.75rem 1rem;
    border-radius: 14px;
    line-height: 1.4;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    max-width: 100%;
    word-break: break-word;
}

.chat-incoming {
    align-self: flex-start;
    background: var(--chat-incoming);
    border: 1px solid #e5e7eb;
}

.chat-outgoing {
    align-self: flex-end;
    background: var(--chat-outgoing);
    border: 1px solid var(--primary-soft-border);
}

.chat-solicitante {
    background: var(--primary-soft-bg);
    border: 1px solid var(--primary-soft-border);
    color: #0f172a;
}

.chat-cliente {
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    color: #0f172a;
}

.chat-operador {
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    color: #0f172a;
}

.chat-agente {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    color: #0f172a;
}


.chat-status {
    background: #f3f4f6;
    color: #6b7280;
    align-self: center;
    font-size: 0.8rem;
}

.chat-container {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 18px;
    padding: 1rem;
    border: 1px solid #e5e9f2;
    max-height: 520px;
    overflow-y: auto;
    width: 100%;
}

.conversa-card {
    border: 1px solid #e5e9f2;
    border-radius: 12px;
    padding: 1rem;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    cursor: pointer;
}

.conversa-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.detail-summary {
    position: relative;
    min-height: auto;
}

fluent-card.detail-summary::part(control) {
    position: relative;
    display: block;
    min-height: 0 !important;
    height: auto !important;
    padding: 1.4rem 1.4rem 1.3rem 1.4rem;
}

.detail-summary .summary-header {
    position: absolute;
    top: 1.05rem;
    right: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
    justify-content: flex-end;
}

.detail-summary .summary-header > span {
    display: inline-flex;
    align-items: center;
}

.card-priority {
    margin-left: 1rem;
    align-self: flex-start;
    display: flex;
    justify-content: flex-end;
}

.detail-summary .summary-body {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    padding: 0.1rem 9.5rem 0.6rem 0;
}

.detail-summary .summary-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    gap: 0.45rem 1.75rem;
    color: #374151;
    font-size: 0.98rem;
    margin-top: 0.2rem;
}

.summary-title {
    margin: 0;
    color: #0f172a;
}

.summary-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.4rem;
    align-items: baseline;
}

.summary-label {
    font-weight: 700;
    color: #1f2937;
}

.summary-value {
    color: #111827;
}

.summary-priority {
    justify-self: end;
    font-weight: 600;
    color: #0f172a;
    padding: 0.1rem 0.6rem;
    border-radius: 999px;
    background: var(--primary-soft-bg);
    border: 1px solid var(--primary-soft-border);
    font-size: 0.85rem;
}

.priority-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    background: var(--primary-soft-bg);
    color: #0f172a;
    border: 1px solid var(--primary-soft-border);
    font-weight: 600;
}

.conversa-card {
    position: relative;
}

.right-meta {
    min-width: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
}

.detail-right-meta {
    min-width: 180px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.35rem;
}
.detail-chat .chat-thread {
    padding: 0.25rem 0.35rem;
}

.detail-chat .chat-item {
    max-width: 72%;
}

.detail-compose fluent-text-area {
    width: 100%;
}

fluent-card.detail-compose::part(control) {
    min-height: 0 !important;
    height: auto !important;
    padding: 1rem 1.25rem;
}

.detail-compose fluent-text-area,
.detail-chat fluent-text-area {
    width: 100%;
}

@media (max-width: 768px) {
    .detail-summary .summary-header {
        position: static;
        justify-self: flex-start;
        margin-bottom: 0.35rem;
        padding-top: 0.7rem;
        padding-left: 0.7rem;
    }

    .detail-summary .summary-meta {
        grid-template-columns: 1fr;
    }

    .detail-summary .summary-body {
        padding-right: 0;
    }

    .detail-chat .chat-item {
        max-width: 100%;
    }
}

.badge-soft {
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8rem;
}

.status-open { background: var(--primary-soft-bg); color: var(--primary); }
.status-pending { background: #fef9c3; color: #854d0e; }
.status-resolved { background: #dcfce7; color: #166534; }
.status-snoozed { background: #ede9fe; color: #5b21b6; }

/* Shared styles (MAUI fallback for scoped CSS) */
.nav-label {
    color: rgba(255, 255, 255, 0.86);
    border-radius: 10px;
    height: 3rem;
    display: flex;
    align-items: center;
    font-weight: 600;
    gap: 0.5rem;
}

.detail-compose .compose-actions {
    width: 100%;
}

.detail-compose .compose-back {
    margin-left: auto;
}

.nav-submenu {
    display: flex;
    flex-direction: column;
    margin-left: 1.5rem;
    padding-top: 0.2rem;
    gap: 0.15rem;
}

.nav-sublink {
    height: 2.6rem;
    font-size: 0.9rem;
}

.nav-item .nav-sublink.active {
    background: rgba(255, 255, 255, 0.1);
}

.badge-status {
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    font-weight: 700;
    border: 1px solid transparent;
}

.badge-status.status-open,
.badge-status.status-pending {
    background-color: #e7f5ff;
    color: #0b60a0;
    border-color: #b6ddff;
}

.badge-status.status-resolved {
    background-color: #e7f8f0;
    color: #1b7b46;
    border-color: #b4e3c7;
}

.badge-status.status-snoozed {
    background-color: #f4f4f5;
    color: #4b5563;
    border-color: #e5e7eb;
}

.badge-atribuido {
    background-color: #f1e8ff;
    color: #5b21b6;
    border: 1px solid #d9c4ff;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.priority-chip {
    background-color: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
    border-radius: 999px;
    padding: 2px 10px;
    font-weight: 700;
    letter-spacing: 0.03em;
    font-size: 0.75rem;
}

.badge-novo {
    background: linear-gradient(90deg, #dc2626, #ef4444);
    color: #fff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    flex: 0 0 24px;
    align-self: center;
    padding: 0;
    font-size: 0;
    line-height: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 16px rgba(220, 38, 38, 0.28);
}

.badge-novo::before {
    content: "";
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}

.tag-row {
    gap: 0.4rem;
    align-items: center;
}

.tag-chips {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .nova-mensagem-wrap {
        scroll-margin-bottom: calc(240px + var(--keyboard-offset, 0px));
    }

    .maui-host .content {
        padding-bottom: calc(1rem + var(--keyboard-offset, 0px));
    }

    .maui-host .page {
        min-height: 100dvh;
    }
}




