html, body {
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    background: #f5f7fb;
    color: #1f2937;
}

body {
    min-height: 100vh;
}

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

button {
    cursor: pointer;
}

.mud-main-content {
    min-height: 100vh;
    background: #f5f7fb;
}

.mud-appbar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.mud-drawer {
    border-right: 1px solid #e2e8f0;
}
 
.mud-navmenu {
    padding-top: 0.5rem;
}

.mud-navmenu .mud-nav-link,
.mud-navmenu .mud-nav-group .mud-nav-link {
    margin: 0.2rem 0.75rem;
    border-radius: 10px;
    color: #334155;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.mud-navmenu .mud-nav-link:hover,
.mud-navmenu .mud-nav-group .mud-nav-link:hover {
    background: #eef4fb;
    color: #1f4e79;
}

.mud-navmenu .mud-nav-link.active,
.mud-navmenu .mud-nav-group .mud-nav-link.active {
    background: linear-gradient(90deg, rgba(31, 78, 121, 0.12), rgba(212, 160, 23, 0.12));
    color: #1f4e79;
    font-weight: 600;
}

.mud-navmenu .mud-nav-link.active .mud-nav-link-icon,
.mud-navmenu .mud-nav-group .mud-nav-link.active .mud-nav-link-icon {
    color: #d4a017;
}

.partner-logo-preview {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.partner-logo-preview-image {
    max-height: 72px;
    max-width: 240px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    padding: 8px;
    object-fit: contain;
}

.partner-logo-dropzone {
    display: block;
    position: relative;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 14px;
    background: #ffffff;
    margin-top: 0.5rem;
}

.partner-logo-dropzone:focus-within {
    outline: none;
    border-color: #1f4e79;
    box-shadow: 0 0 0 3px rgba(31, 78, 121, 0.12);
}

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

.partner-logo-dropzone-content {
    pointer-events: none;
}

.mud-nav-group-text {
    font-weight: 600;
}

.app-brand {
    line-height: 1.05;
}

.app-brand-title {
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.app-subtitle {
    margin-left: 0;
    margin-top: 0.15rem;
    line-height: 1;
    color: rgba(255, 255, 255, 0.8);
}

.app-user-name {
    max-width: 18rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.app-user-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.app-user-info {
    min-width: 0;
    align-items: flex-end;
}

.app-user-login {
    max-width: 18rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0.8;
}

.main-content {
    padding: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.mud-paper {
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.page-card {
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
}

.login-card {
    max-width: 1180px;
    margin: 4rem auto;
    padding: 0;
    overflow: hidden;
}

.login-shell {
    min-height: calc(100vh - 5rem);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 460px);
}

.login-hero {
    background:
        radial-gradient(circle at top left, rgba(0, 89, 201, 0.18), transparent 34%),
        radial-gradient(circle at bottom right, rgba(239, 54, 59, 0.16), transparent 28%),
        linear-gradient(135deg, #f8fbff 0%, #eef4fb 58%, #fdfdff 100%);
    padding: 3rem;
    display: grid;
    gap: 1rem;
    align-content: center;
    border-right: 1px solid #e2e8f0;
}

.login-eyebrow {
    color: #0059c9;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.login-title {
    margin: 0;
    color: #0b2f6b;
    font-weight: 800;
    line-height: 1.08;
    max-width: 14ch;
}

.login-subtitle {
    color: #475569;
    max-width: 40rem;
    line-height: 1.65;
}

.login-brand-card {
    margin-top: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(0, 89, 201, 0.12);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
    display: grid;
    gap: 0.75rem;
    max-width: 34rem;
}

.login-brand-card-no-image {
    min-height: 7rem;
    align-content: center;
}

.login-brand-card:not(.login-brand-card-no-image) .login-brand-fallback {
    display: none;
}

.login-brand-image {
    width: 100%;
    max-width: 32rem;
    height: auto;
    object-fit: contain;
}

.login-brand-fallback {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.login-brand-fallback-tm {
    font-size: 2.4rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    color: #0059c9;
}

.login-brand-fallback-text {
    display: grid;
    gap: 0.15rem;
}

.login-brand-fallback-text strong {
    color: #0b2f6b;
    letter-spacing: 0.08em;
}

.login-brand-fallback-text span {
    color: #64748b;
}

.login-brand-caption {
    color: #64748b;
}

.login-highlights {
    display: grid;
    gap: 0.85rem;
    margin-top: 0.75rem;
}

.login-highlight {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #334155;
    font-weight: 500;
    padding: 0.55rem 0.75rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.55);
    width: fit-content;
}

.login-form-panel {
    background: #ffffff;
    padding: 3rem 2.25rem;
    display: grid;
    align-content: center;
    gap: 1rem;
}

.login-form-panel .mud-typography-h4 {
    color: #0f172a;
    font-weight: 700;
}

.login-form-panel .mud-typography-body1 {
    color: #64748b;
}

.login-chip {
    width: fit-content;
    font-weight: 700;
    letter-spacing: 0.04em;
    border-color: rgba(0, 89, 201, 0.25) !important;
    background: rgba(0, 89, 201, 0.05);
    color: #0059c9;
}

.login-form-panel .form-grid .mud-button-root.mud-button-outlined-primary {
    background: linear-gradient(135deg, rgba(0, 89, 201, 0.08), rgba(239, 54, 59, 0.06));
    border-color: rgba(0, 89, 201, 0.24);
}

.login-form-panel .form-grid .mud-button-root.mud-button-outlined-primary:hover {
    background: linear-gradient(135deg, rgba(0, 89, 201, 0.14), rgba(239, 54, 59, 0.08));
    box-shadow: 0 12px 24px rgba(0, 89, 201, 0.12);
}

.page-header {
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.page-header .mud-typography-h4 {
    color: #1f2937;
    font-weight: 700;
}

.page-header .mud-typography-body1 {
    color: #64748b;
}

.mud-table {
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
}

.mud-table .mud-table-container {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.mud-table .mud-table-head th {
    background: #f8fafc;
    color: #334155;
    font-weight: 700;
    border-bottom: 1px solid #e2e8f0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.mud-table .mud-table-body td {
    border-bottom: 1px solid #eef2f7;
    overflow-wrap: anywhere;
    word-break: break-word;
    vertical-align: top;
}

.mud-table .mud-table-row:hover {
    background: rgba(31, 78, 121, 0.03);
}

.form-grid {
    display: grid;
    gap: 0.9rem;
}

.form-grid > * {
    min-width: 0;
}

.form-grid .mud-input-control {
    min-width: 0;
    width: 100%;
}

.form-grid .mud-input-control-input-container,
.form-grid .mud-input-slot,
.form-grid .mud-input-root,
.form-grid .mud-select,
.form-grid .mud-select-input {
    min-width: 0;
    max-width: 100%;
}

.form-grid .mud-select-input,
.form-grid .mud-input-slot .mud-input-root-input {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.responsive-filter-bar {
    align-items: flex-start;
}

.responsive-filter-bar > * {
    flex: 1 1 14rem;
    min-width: 0;
    max-width: 100%;
}

.responsive-filter-bar .responsive-filter-search {
    flex: 999 1 24rem;
}

.inline-input-action {
    align-items: flex-end;
    flex-wrap: wrap;
    min-width: 0;
}

.inline-input-action > * {
    min-width: 0;
}

.inline-input-action .inline-input-action-field {
    flex: 999 1 18rem;
    min-width: 0;
}

.text-break-anywhere {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.csv-template-alert {
    overflow: hidden;
}

.csv-template-header-block {
    display: grid;
    gap: 0.25rem;
    margin-top: 0.5rem;
    min-width: 0;
}

.csv-template-header {
    display: block;
    max-width: 100%;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    background: rgba(15, 23, 42, 0.04);
    border-radius: 8px;
    padding: 0.5rem 0.65rem;
    font-size: 0.8rem;
}

.mud-input-control .mud-input-outlined-border {
    stroke: #cbd5e1;
}

.mud-input-control:hover .mud-input-outlined-border {
    stroke: #94a3b8;
}

.mud-input-control.mud-input-focused .mud-input-outlined-border {
    stroke: #1f4e79;
    stroke-width: 1.8px;
}

.mud-input-label.mud-input-label-inputcontrol {
    color: #64748b;
}

.mud-input-control.mud-input-focused .mud-input-label {
    color: #1f4e79;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 0.5rem;
}

.actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.actions form {
    margin: 0;
}

.vehicle-qr-print-button {
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    border: 1px solid rgba(2, 136, 209, 0.32);
    background: rgba(2, 136, 209, 0.05);
    color: #1565c0;
    padding: 0.4rem 1rem;
    font-size: 0.875rem;
    line-height: 1.75;
}

.vehicle-qr-print-button:hover {
    transform: translateY(-1px);
    background: rgba(2, 136, 209, 0.12);
    box-shadow: 0 8px 20px rgba(2, 136, 209, 0.14);
}

.vehicle-picker {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.vehicle-picker-select {
    flex: 1;
    min-width: 0;
}

.vehicle-picker-action {
    margin-bottom: 2px;
}

.form-actions .mud-button-root,
.actions .mud-button-root,
.mud-table .mud-button-root {
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-actions .mud-button-root:hover,
.actions .mud-button-root:hover,
.mud-table .mud-button-root:hover {
    transform: translateY(-1px);
}

.mud-button-root.mud-button-outlined.mud-button-outlined-primary {
    border-color: rgba(31, 78, 121, 0.28);
    background: rgba(31, 78, 121, 0.04);
}

.mud-button-root.mud-button-outlined.mud-button-outlined-primary:hover {
    background: rgba(31, 78, 121, 0.1);
    box-shadow: 0 8px 20px rgba(31, 78, 121, 0.12);
}

.mud-button-root.mud-button-outlined.mud-button-outlined-secondary {
    border-color: rgba(212, 160, 23, 0.35);
    background: rgba(212, 160, 23, 0.05);
    color: #8a6a12;
}

.mud-button-root.mud-button-outlined.mud-button-outlined-secondary:hover {
    background: rgba(212, 160, 23, 0.12);
    box-shadow: 0 8px 20px rgba(212, 160, 23, 0.14);
}

.mud-button-root.mud-button-outlined.mud-button-outlined-success {
    border-color: rgba(46, 125, 50, 0.3);
    background: rgba(46, 125, 50, 0.05);
}

.mud-button-root.mud-button-outlined.mud-button-outlined-success:hover {
    background: rgba(46, 125, 50, 0.11);
    box-shadow: 0 8px 20px rgba(46, 125, 50, 0.14);
}

.mud-button-root.mud-button-outlined.mud-button-outlined-error {
    border-color: rgba(198, 40, 40, 0.28);
    background: rgba(198, 40, 40, 0.04);
}

.mud-button-root.mud-button-outlined.mud-button-outlined-error:hover {
    background: rgba(198, 40, 40, 0.1);
    box-shadow: 0 8px 20px rgba(198, 40, 40, 0.14);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.dashboard-card {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    min-height: 100%;
}

.dashboard-kpi {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.02), rgba(15, 118, 110, 0.04));
    border-color: rgba(15, 23, 42, 0.08);
}

.dashboard-kpi-row {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
}

.dashboard-kpi-body {
    min-width: 0;
}

.dashboard-kpi-icon {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 1px solid transparent;
}

.dashboard-kpi-icon .mud-icon-root {
    font-size: 1.35rem;
}

.dashboard-kpi-icon-primary {
    background: rgba(0, 89, 201, 0.10);
    border-color: rgba(0, 89, 201, 0.18);
    color: #0059c9;
}

.dashboard-kpi-icon-success {
    background: rgba(46, 125, 50, 0.10);
    border-color: rgba(46, 125, 50, 0.20);
    color: #2e7d32;
}

.dashboard-kpi-icon-warning {
    background: rgba(237, 108, 2, 0.12);
    border-color: rgba(237, 108, 2, 0.22);
    color: #ed6c02;
}

.dashboard-kpi-icon-info {
    background: rgba(2, 136, 209, 0.10);
    border-color: rgba(2, 136, 209, 0.18);
    color: #0288d1;
}

.dashboard-kpi-icon-secondary {
    background: rgba(31, 78, 121, 0.10);
    border-color: rgba(31, 78, 121, 0.18);
    color: #1f4e79;
}

.dashboard-kpi .mud-typography-h5 {
    font-weight: 700;
}

.dashboard-card-highlight {
    background: linear-gradient(135deg, rgba(31, 78, 121, 0.05), rgba(212, 160, 23, 0.08));
    border-color: rgba(31, 78, 121, 0.16);
}

.dashboard-card .mud-typography-h6 {
    color: #1f2937;
    font-weight: 700;
}

.dashboard-muted-text {
    color: #64748b;
}

.dashboard-checklist {
    display: grid;
    gap: 0.75rem;
}

.crm-muted-text {
    color: #64748b;
}

.crm-text-danger {
    color: #c62828;
    font-weight: 600;
}

.crm-lead-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
}

.crm-lead-kpi-card .mud-typography-h5 {
    font-weight: 700;
}

.crm-kanban-board {
    display: grid;
    grid-template-columns: repeat(6, minmax(250px, 1fr));
    gap: 1rem;
    align-items: start;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    margin-top: 0.75rem;
}

.crm-opportunity-board {
    grid-template-columns: repeat(7, minmax(250px, 1fr));
}

.crm-kanban-column {
    border-radius: 18px;
    border: 1px solid #dbe4f0;
    padding: 0.8rem;
    min-height: 100%;
}

.crm-kanban-column-has-overdue {
    border-color: rgba(198, 40, 40, 0.28);
    box-shadow: inset 0 0 0 1px rgba(198, 40, 40, 0.06);
}

.crm-kanban-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.crm-kanban-column-header .mud-typography-subtitle1 {
    font-weight: 700;
}

.crm-kanban-cards {
    display: grid;
    gap: 0.6rem;
}

.crm-kanban-cards > * {
    min-width: 0;
}

.crm-lead-card {
    border-radius: 16px;
    padding: 0.7rem 0.75rem;
    background: #fff;
    border-top-width: 4px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.crm-lead-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.crm-lead-card .mud-stack {
    min-width: 0;
}

.crm-lead-card .mud-tooltip-root {
    display: block;
    max-width: 100%;
}

.crm-lead-card-empty {
    border-top: 1px dashed #cbd5e1;
    background: rgba(248, 250, 252, 0.9);
    color: #64748b;
    text-align: center;
}

.crm-lead-card-title {
    font-weight: 700;
    line-height: 1.25;
    display: block;
    max-width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: anywhere;
}

.crm-lead-card-cnpj {
    font-weight: 600;
    color: #334155;
    font-size: 0.84rem;
}

.crm-lead-card-subtitle {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crm-lead-card-meta {
    display: grid;
    gap: 0.45rem;
}

.crm-lead-card-meta .mud-typography-caption {
    color: #64748b;
    line-height: 1.1;
}

.crm-lead-card-meta .mud-typography-body2 {
    font-size: 0.84rem;
    line-height: 1.2;
}

.crm-opportunity-highlight-probability {
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.32);
}

.crm-opportunity-highlight-value {
    box-shadow: 0 0 0 2px rgba(239, 108, 0, 0.34);
}

.crm-opportunity-highlight-both {
    box-shadow: 0 0 0 2px rgba(106, 27, 154, 0.36), 0 6px 18px rgba(106, 27, 154, 0.14);
}

.crm-opportunity-highlights .mud-chip {
    height: 22px;
    font-size: 0.72rem;
    font-weight: 600;
}

.crm-opportunity-value-high {
    font-weight: 700;
    color: #b45309;
}

.crm-opportunity-prob-high {
    font-weight: 700;
    color: #2e7d32;
}

.crm-kanban-stage-editor {
    display: grid;
    gap: 0.55rem;
    padding: 0.8rem;
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.88);
    border: 1px solid #dbe4f0;
}

.crm-kanban-stage-editor .mud-typography-subtitle2 {
    font-weight: 700;
}

.crm-stage-accent-captado {
    border-top-color: #1565c0;
}

.crm-stage-accent-emcontato {
    border-top-color: #0288d1;
}

.crm-stage-accent-qualificado {
    border-top-color: #2e7d32;
}

.crm-stage-accent-oportunidade {
    border-top-color: #6a1b9a;
}

.crm-stage-accent-perdido {
    border-top-color: #c62828;
}

.crm-stage-accent-descartado {
    border-top-color: #ef6c00;
}

.crm-stage-surface-captado {
    background: linear-gradient(180deg, rgba(21, 101, 192, 0.08), rgba(255, 255, 255, 0.96));
}

.crm-stage-surface-emcontato {
    background: linear-gradient(180deg, rgba(2, 136, 209, 0.08), rgba(255, 255, 255, 0.96));
}

.crm-stage-surface-qualificado {
    background: linear-gradient(180deg, rgba(46, 125, 50, 0.08), rgba(255, 255, 255, 0.96));
}

.crm-stage-surface-oportunidade {
    background: linear-gradient(180deg, rgba(106, 27, 154, 0.08), rgba(255, 255, 255, 0.96));
}

.crm-stage-surface-perdido {
    background: linear-gradient(180deg, rgba(198, 40, 40, 0.08), rgba(255, 255, 255, 0.96));
}

.crm-stage-surface-descartado {
    background: linear-gradient(180deg, rgba(239, 108, 0, 0.08), rgba(255, 255, 255, 0.96));
}

.crm-stage-accent-aberta {
    border-top-color: #1565c0;
}

.crm-stage-accent-emdiagnostico {
    border-top-color: #0288d1;
}

.crm-stage-accent-emproposta {
    border-top-color: #ef6c00;
}

.crm-stage-accent-emnegociacao {
    border-top-color: #6a1b9a;
}

.crm-stage-accent-ganha {
    border-top-color: #2e7d32;
}

.crm-stage-accent-perdida {
    border-top-color: #c62828;
}

.crm-stage-accent-cancelada {
    border-top-color: #455a64;
}

.crm-stage-surface-aberta {
    background: linear-gradient(180deg, rgba(21, 101, 192, 0.08), rgba(255, 255, 255, 0.96));
}

.crm-stage-surface-emdiagnostico {
    background: linear-gradient(180deg, rgba(2, 136, 209, 0.08), rgba(255, 255, 255, 0.96));
}

.crm-stage-surface-emproposta {
    background: linear-gradient(180deg, rgba(239, 108, 0, 0.08), rgba(255, 255, 255, 0.96));
}

.crm-stage-surface-emnegociacao {
    background: linear-gradient(180deg, rgba(106, 27, 154, 0.08), rgba(255, 255, 255, 0.96));
}

.crm-stage-surface-ganha {
    background: linear-gradient(180deg, rgba(46, 125, 50, 0.08), rgba(255, 255, 255, 0.96));
}

.crm-stage-surface-perdida {
    background: linear-gradient(180deg, rgba(198, 40, 40, 0.08), rgba(255, 255, 255, 0.96));
}

.crm-stage-surface-cancelada {
    background: linear-gradient(180deg, rgba(69, 90, 100, 0.08), rgba(255, 255, 255, 0.96));
}

.crm-lead-summary-card {
    background: linear-gradient(135deg, rgba(0, 89, 201, 0.04), rgba(106, 27, 154, 0.05));
    border-color: rgba(0, 89, 201, 0.14);
}

.crm-lead-summary-chips {
    margin-top: 0.25rem;
}

.crm-detail-tabs {
    border: 1px solid #dbe4f0;
    border-radius: 18px;
    padding: 0.25rem;
    background: rgba(248, 250, 252, 0.65);
}

.crm-detail-tabs .mud-tabs-toolbar {
    border-bottom: 1px solid #e2e8f0;
}

.crm-detail-tabs .mud-tab {
    text-transform: none;
    font-weight: 600;
}

@media (max-width: 900px) {
    .main-content {
        padding: 1rem;
    }

    .login-card {
        max-width: 680px;
        margin: 2rem auto;
    }

    .login-layout {
        grid-template-columns: 1fr;
    }

    .login-hero {
        padding: 2rem;
        border-right: 0;
        border-bottom: 1px solid #e2e8f0;
    }

    .login-form-panel {
        padding: 2rem;
    }

    .app-subtitle {
        display: none;
    }

    .app-user-name {
        max-width: 10rem;
    }

    .app-user-login {
        max-width: 10rem;
    }

    .page-card {
        padding: 1rem;
    }

    .dashboard-grid {
        gap: 0.75rem;
    }

    .crm-kanban-board {
        grid-template-columns: repeat(6, minmax(220px, 1fr));
    }

    .crm-opportunity-board {
        grid-template-columns: repeat(7, minmax(220px, 1fr));
    }
}

@media (max-width: 600px) {
    .login-card {
        margin: 1rem auto;
    }

    .login-shell {
        min-height: auto;
    }

    .login-hero,
    .login-form-panel {
        padding: 1.25rem;
    }

    .login-title {
        font-size: 2rem;
    }

    .crm-lead-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ============ Assistente TMOrganizer ============ */
.assistente-painel {
    position: fixed;
    right: 1.5rem;
    bottom: 5.5rem;
    width: 24rem;
    max-width: calc(100vw - 2rem);
    height: 32rem;
    max-height: calc(100vh - 7rem);
    z-index: 1200;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 0.75rem;
}

.assistente-header {
    background: var(--mud-palette-primary);
    color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.assistente-mensagens {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: #f8fafc;
}

.assistente-msg {
    max-width: 85%;
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.assistente-msg-eu {
    align-self: flex-end;
    background: var(--mud-palette-primary);
    color: #fff;
    border-bottom-right-radius: 0.2rem;
}

.assistente-msg-bot {
    align-self: flex-start;
    background: #fff;
    color: #1f2937;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 0.2rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.assistente-avatar-header {
    width: 1.5rem;
    height: 1.5rem;
    max-width: 1.5rem;
    max-height: 1.5rem;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    vertical-align: middle;
    display: inline-block;
}

.assistente-avatar-msg {
    width: 1.75rem;
    height: 1.75rem;
    max-width: 1.75rem;
    max-height: 1.75rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #e2e8f0;
    display: block;
}

/* FAB: a imagem preenche todo o botao (o lobo-guara e o proprio botao). */
.assistente-fab .mud-fab-icon {
    width: 100%;
    height: 100%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.assistente-fab-img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.assistente-input-area {
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

@media (max-width: 600px) {
    .assistente-painel {
        right: 0.5rem;
        left: 0.5rem;
        width: auto;
        bottom: 4.5rem;
        height: 70vh;
    }
}
