/* WM Oficina — Bootstrap 5 Admin Theme */

:root,
[data-bs-theme="light"] {
    --wm-primary: #206bc4;
    --wm-primary-rgb: 32, 107, 196;
    --wm-primary-dark: #1e3a5f;
    --wm-secondary: #1e3a5f;
    --wm-font-on-theme: #ffffff;
    --wm-gradient: linear-gradient(135deg, var(--wm-primary) 0%, var(--wm-secondary) 100%);
    --wm-primary-soft: #206bc418;
    --wm-accent: #f76707;
    --wm-accent-rgb: 247, 103, 7;
    --wm-sidebar-width: 288px;
    --wm-sidebar-collapsed-width: 76px;
    --wm-navbar-height: 56px;
    --wm-radius: 0.5rem;
    --wm-radius-lg: 0.75rem;
    --wm-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --wm-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    --wm-shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.1);
    --wm-border: #e5e5e5;
    --wm-bg-body: #f5f5f5;
    --wm-bg-surface: #ffffff;
    --wm-bg-sidebar: #ffffff;
    --wm-bg-sidebar-hover: #fafafa;
    --wm-text-sidebar: #525252;
    --wm-text-sidebar-active: var(--wm-primary);
    --wm-sidebar-accent: var(--wm-primary);
    --bs-primary: var(--wm-primary);
    --bs-primary-rgb: var(--wm-primary-rgb);
    --bs-link-color: var(--wm-primary);
    --bs-link-hover-color: var(--wm-primary-dark);
    --bs-border-radius: var(--wm-radius);
    --bs-border-radius-lg: var(--wm-radius-lg);
}

[data-bs-theme="dark"] {
    --wm-bg-body: #0f172a;
    --wm-bg-surface: #1e293b;
    --wm-bg-sidebar: #1e293b;
    --wm-bg-sidebar-hover: rgba(255, 255, 255, 0.05);
    --wm-text-sidebar: rgba(255, 255, 255, 0.65);
    --wm-text-sidebar-active: #ffffff;
    --wm-border: rgba(255, 255, 255, 0.08);
    --wm-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
    --wm-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.35);
}

/* VitaCore theme utilities */
.theme-gradient {
    background: var(--wm-gradient);
    color: var(--wm-font-on-theme);
}

.theme-btn {
    background: var(--wm-gradient);
    color: var(--wm-font-on-theme);
    border: 0;
    transition: filter 0.15s ease;
}

.theme-btn:hover:not(:disabled) {
    filter: brightness(0.92);
    color: var(--wm-font-on-theme);
}

.theme-btn:disabled {
    opacity: 0.5;
}

.theme-text {
    color: var(--wm-primary);
}

/* Base */
body.wm-admin {
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background-color: var(--wm-bg-body);
    color: var(--bs-body-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.wm-admin a {
    text-decoration: none;
}

/* Layout shell */
.wm-wrapper {
    display: flex;
    min-height: 100vh;
}

.wm-main {
    flex: 1;
    min-width: 0;
    margin-left: var(--wm-sidebar-width);
    display: flex;
    flex-direction: column;
    transition: margin-left 0.25s ease;
}

.wm-wrapper.sidebar-collapsed .wm-main {
    margin-left: var(--wm-sidebar-collapsed-width);
}

@media (max-width: 991.98px) {
    .wm-main {
        margin-left: 0;
    }

    .wm-wrapper.sidebar-collapsed .wm-main {
        margin-left: 0;
    }
}

.wm-content {
    flex: 1;
    padding: 1rem 1.25rem 1.75rem;
}

@media (min-width: 768px) {
    .wm-content {
        padding: 1.25rem 1.5rem 2rem;
    }
}

/* Sidebar — padrão VitaCore (claro) */
.wm-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--wm-sidebar-width);
    background: var(--wm-bg-sidebar);
    border-right: 1px solid var(--wm-border);
    display: flex;
    flex-direction: column;
    z-index: 1040;
    transition: width 0.25s ease, transform 0.25s ease;
    overflow: hidden;
    box-shadow: none;
}

.wm-wrapper.sidebar-collapsed .wm-sidebar {
    width: var(--wm-sidebar-collapsed-width);
}

@media (max-width: 991.98px) {
    .wm-sidebar {
        transform: translateX(-100%);
    }

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

.wm-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid #f5f5f5;
    flex-shrink: 0;
}

.wm-sidebar-brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    background: var(--wm-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wm-font-on-theme);
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(var(--wm-primary-rgb), 0.2);
    object-fit: contain;
}

.wm-sidebar-brand-text {
    min-width: 0;
    transition: opacity 0.2s ease;
}

.wm-wrapper.sidebar-collapsed .wm-sidebar-brand-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.wm-sidebar-brand-title {
    color: var(--wm-primary);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
    margin: 0;
}

.wm-sidebar-brand-subtitle {
    color: #a3a3a3;
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0;
}

.wm-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.75rem;
    scrollbar-width: thin;
    scrollbar-color: #c4c4c4 transparent;
}

.wm-sidebar-nav::-webkit-scrollbar-thumb {
    background: #c4c4c4;
    border-radius: 4px;
}

.wm-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    color: var(--wm-text-sidebar);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.15s ease, background 0.15s ease;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}

.wm-nav-link:hover {
    color: var(--wm-primary);
    background: var(--wm-bg-sidebar-hover);
}

.wm-nav-link.active {
    color: var(--wm-primary);
    background: var(--wm-primary-soft);
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--wm-sidebar-accent);
}

.wm-nav-link i {
    width: 1.25rem;
    text-align: center;
    flex-shrink: 0;
    font-size: 1rem;
    opacity: 0.85;
}

.wm-nav-link span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.2s ease;
}

.wm-wrapper.sidebar-collapsed .wm-nav-link span,
.wm-wrapper.sidebar-collapsed .wm-nav-chevron,
.wm-wrapper.sidebar-collapsed .wm-nav-group-label {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.wm-wrapper.sidebar-collapsed .wm-nav-link {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

.wm-nav-group-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.wm-nav-chevron {
    font-size: 0.7rem;
    opacity: 0.5;
    transition: transform 0.2s ease;
}

.wm-nav-group.open .wm-nav-chevron {
    transform: rotate(180deg);
}

.wm-nav-submenu {
    display: none;
    padding-left: 0.5rem;
    margin-left: 1.625rem;
    border-left: 1px solid #e5e5e5;
}

.wm-nav-group.open .wm-nav-submenu {
    display: block;
}

.wm-nav-sublink {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    color: #737373;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.wm-nav-sublink:hover {
    color: var(--wm-primary);
    background: var(--wm-bg-sidebar-hover);
}

.wm-nav-sublink.active {
    color: var(--wm-primary);
    background: var(--wm-primary-soft);
    font-weight: 500;
}

.wm-nav-sublink i {
    width: 1rem;
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.7;
}

.wm-sidebar-footer {
    padding: 0.75rem;
    border-top: 1px solid #f5f5f5;
    flex-shrink: 0;
}

.wm-sidebar-footer .wm-nav-link.text-danger:hover {
    background: rgba(220, 53, 69, 0.15);
    color: #f87171;
}

.wm-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1035;
    backdrop-filter: blur(2px);
}

@media (max-width: 991.98px) {
    .wm-wrapper.sidebar-open .wm-sidebar-overlay {
        display: block;
    }
}

/* Navbar */
.wm-navbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    min-height: var(--wm-navbar-height);
    background: var(--wm-bg-surface);
    border-bottom: 1px solid var(--wm-border);
    padding: 0.5rem 1rem;
    box-shadow: var(--wm-shadow-sm);
}

@media (min-width: 768px) {
    .wm-navbar {
        padding: 0.5rem 1.25rem;
    }
}

.wm-navbar-title {
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.wm-navbar-subtitle {
    font-size: 0.75rem;
    color: var(--bs-secondary-color);
    margin: 0;
}

.wm-navbar-site-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 0.625rem;
    border: 1px solid var(--wm-border);
    background: var(--wm-bg-surface);
    color: var(--bs-body-color);
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    flex-shrink: 0;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.wm-navbar-site-btn-label {
    display: none;
}

@media (min-width: 768px) {
    .wm-navbar-site-btn {
        width: auto;
        height: 38px;
        padding: 0 0.875rem;
        border-radius: 2rem;
        background: var(--wm-bg-body);
    }

    .wm-navbar-site-btn-label {
        display: inline;
    }
}

.wm-navbar-site-btn:hover {
    border-color: rgba(var(--wm-primary-rgb), 0.4);
    color: var(--wm-primary);
    background: rgba(var(--wm-primary-rgb), 0.06);
}

.wm-navbar-btn {
    width: 38px;
    height: 38px;
    border-radius: 0.625rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--wm-border);
    background: var(--wm-bg-surface);
    color: var(--bs-body-color);
    transition: all 0.15s ease;
}

.wm-navbar-btn:hover {
    background: var(--wm-bg-body);
    border-color: rgba(var(--wm-primary-rgb), 0.25);
    color: var(--wm-primary);
}

.wm-navbar-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(var(--wm-primary-rgb), 0.12);
    color: var(--wm-primary);
    font-weight: 600;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    border: 2px solid rgba(var(--wm-primary-rgb), 0.2);
    flex-shrink: 0;
}

.wm-user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
}

.wm-user-dropdown-toggle:hover {
    background: var(--wm-bg-body);
}

.wm-user-info {
    line-height: 1.2;
    max-width: 160px;
}

.wm-user-name {
    display: block;
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--wm-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wm-user-role {
    display: block;
    font-size: 0.75rem;
    color: var(--wm-text-muted);
}

.wm-dropdown-menu-user {
    border-radius: 12px;
    padding: 0.5rem;
    min-width: 220px;
}

.wm-dropdown-item-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    font-weight: 500;
}

.wm-dropdown-item-user:hover {
    background: var(--wm-bg-body);
}

.wm-dropdown-item-user--logout {
    color: #dc3545;
}

.wm-dropdown-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wm-dropdown-item-icon--profile {
    background: #dcfce7;
    color: #16a34a;
}

.wm-dropdown-item-icon--settings {
    background: #f1f5f9;
    color: #334155;
}

.wm-dropdown-item-icon--logout {
    background: #fee2e2;
    color: #dc2626;
}

.wm-vita-table-footer {
    gap: 1rem;
}

.table-custom-wrapper {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.table-custom {
    margin-bottom: 0;
    border-collapse: collapse;
}

.table-custom thead tr {
    background: linear-gradient(135deg, var(--wm-primary) 0%, var(--wm-secondary) 100%) !important;
    color: var(--wm-font-on-theme, #fff);
}

.table-custom thead th {
    background: transparent !important;
    color: var(--wm-font-on-theme, #fff) !important;
    border-bottom: none;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 8px 10px;
    white-space: nowrap;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    vertical-align: middle;
}

.table-custom thead th:last-child {
    border-right: none;
}

.table-custom tbody tr,
.table-custom-wrapper table.dataTable tbody tr,
.table-custom-wrapper .table tbody tr {
    background: white;
    transition: background 0.15s ease;
}

.table-custom tbody tr:hover,
.table-custom-wrapper table.dataTable tbody tr:hover,
.table-custom-wrapper .table tbody tr:hover,
.table-custom-wrapper table.dataTable.display tbody tr:hover {
    background-color: #f1f5f9 !important;
}

.table-custom tbody td {
    padding: 6px 10px;
    font-size: 0.85rem;
    vertical-align: middle;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
}

.table-custom-wrapper .dataTables_wrapper {
    padding: 0;
}

.table-custom-wrapper .dataTables_wrapper > .row:first-child {
    margin: 0;
    padding: 14px 16px 10px;
    border-bottom: 1px solid #f1f5f9;
    align-items: center;
}

.table-custom-wrapper .dataTables_length label,
.table-custom-wrapper .dataTables_filter label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-custom-wrapper .dataTables_length select,
.table-custom-wrapper .dataTables_filter input {
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 6px 12px !important;
    font-size: 0.875rem !important;
    color: #334155 !important;
    background: #fff !important;
    box-shadow: none !important;
    min-height: 36px;
    outline: none;
}

.table-custom-wrapper .dataTables_filter input {
    min-width: 200px;
    margin-left: 0 !important;
}

.table-custom-wrapper .dataTables_length select {
    min-width: 70px;
    cursor: pointer;
}

.table-custom-wrapper .dataTables_length select:focus,
.table-custom-wrapper .dataTables_filter input:focus {
    border-color: var(--wm-primary) !important;
    box-shadow: 0 0 0 3px rgba(var(--wm-primary-rgb, 37, 99, 235), 0.1) !important;
}

.table-custom-wrapper .dataTables_wrapper .wm-vita-table-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    margin-top: 0;
}

.table-custom-wrapper .dataTables_wrapper .wm-vita-table-footer .dataTables_info,
.table-custom-wrapper .dataTables_wrapper .wm-vita-table-footer .dataTables_paginate {
    padding: 0;
    float: none;
}

.table-custom-wrapper .dataTables_wrapper .wm-vita-table-footer .dataTables_paginate {
    margin-left: auto;
}

.table-custom-wrapper .dataTables_paginate .pagination {
    margin: 0;
    gap: 0;
}

.table-custom-wrapper .dataTables_paginate .page-link {
    color: var(--wm-secondary) !important;
    background-color: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0 !important;
    padding: 6px 12px !important;
    font-size: 0.85rem;
    margin: 0 !important;
    box-shadow: none !important;
}

.table-custom-wrapper .dataTables_paginate .page-item:first-child .page-link {
    border-radius: 6px 0 0 6px !important;
}

.table-custom-wrapper .dataTables_paginate .page-item:last-child .page-link {
    border-radius: 0 6px 6px 0 !important;
}

.table-custom-wrapper .dataTables_paginate .page-item.active .page-link {
    background: linear-gradient(135deg, var(--wm-primary) 0%, var(--wm-secondary) 100%) !important;
    border-color: var(--wm-primary) !important;
    color: var(--wm-font-on-theme, #fff) !important;
}

.table-custom-wrapper .dataTables_paginate .page-item:not(.active):not(.disabled) .page-link:hover {
    background-color: #e2e8f0 !important;
    color: var(--wm-primary) !important;
}

.table-custom-wrapper .dataTables_paginate .page-item.disabled .page-link {
    opacity: 0.55;
    cursor: default;
}

.table-custom-wrapper .dataTables_paginate .paginate_button {
    border-radius: 0 !important;
    border: 1px solid #e2e8f0 !important;
    background: #f8fafc !important;
    color: var(--wm-secondary) !important;
    padding: 6px 12px !important;
    margin: 0 !important;
}

.table-custom-wrapper .dataTables_paginate .paginate_button.current,
.table-custom-wrapper .dataTables_paginate .paginate_button.current:hover {
    background: linear-gradient(135deg, var(--wm-primary) 0%, var(--wm-secondary) 100%) !important;
    border-color: var(--wm-primary) !important;
    color: var(--wm-font-on-theme, #fff) !important;
}

.table-custom-wrapper .dataTables_paginate .paginate_button:hover:not(.current):not(.disabled) {
    background: #e2e8f0 !important;
    color: var(--wm-primary) !important;
    border-color: #e2e8f0 !important;
}

/* Botões com tema da empresa */
.wm-admin .btn-primary,
.wm-admin .btn-primary:hover,
.wm-admin .btn-primary:focus,
.wm-admin .btn-primary:active {
    background: var(--wm-gradient) !important;
    border-color: var(--wm-primary) !important;
    color: var(--wm-font-on-theme, #fff) !important;
    box-shadow: none;
}

.wm-admin .btn-primary:disabled {
    opacity: 0.55;
}

.wm-admin .btn-outline-primary {
    color: var(--wm-primary) !important;
    border-color: var(--wm-primary) !important;
    background: transparent;
}

.wm-admin .btn-outline-primary:hover,
.wm-admin .btn-outline-primary:focus,
.wm-admin .btn-outline-primary:active {
    background: var(--wm-primary) !important;
    border-color: var(--wm-primary) !important;
    color: var(--wm-font-on-theme, #fff) !important;
}

.btn-group-actions .wm-vita-table-action {
    border-radius: 6px;
}

.wm-table-actions-cell {
    min-width: 220px;
    white-space: nowrap;
}

.wm-table-actions-cell .btn-group-actions {
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
}

.wm-vita-table--responsive tbody tr.wm-row-expanded td.wm-table-actions-cell .btn-group-actions {
    flex-wrap: nowrap;
    justify-content: flex-start !important;
    overflow-x: auto;
}

.wm-category-tabs {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 1.25rem;
    scrollbar-width: thin;
}

.wm-category-tab {
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    color: #64748b;
    font-weight: 500;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
}

.wm-category-tab:hover,
.wm-category-tab.active {
    color: var(--wm-primary);
}

.wm-category-tab.active {
    border-bottom-color: var(--wm-primary);
}

@media (max-width: 768px) {
    .wm-vita-table-wrap:not(:has(> .wm-vita-table--responsive)),
    .table-custom-wrapper .table-responsive:not(:has(> .wm-vita-table--responsive)) {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .wm-user-info {
        display: none !important;
    }
}

.wm-notif-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 0.625rem;
    font-weight: 700;
    border-radius: 999px;
    background: #dc3545;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--wm-bg-surface);
}

.wm-platform-banner {
    background: linear-gradient(90deg, var(--wm-primary) 0%, var(--wm-primary-dark) 100%);
    color: #fff;
    font-size: 0.8125rem;
    padding: 0.5rem 1.5rem;
}

.wm-impersonate-banner {
    background: #fffbeb;
    color: #92400e;
    border-bottom: 1px solid #fde68a;
    font-size: 0.8125rem;
    padding: 0.5rem 1.5rem;
}

[data-bs-theme="dark"] .wm-impersonate-banner {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border-bottom-color: rgba(245, 158, 11, 0.25);
}

/* Cards & surfaces */
.wm-card {
    background: var(--wm-bg-surface);
    border: 1px solid var(--wm-border);
    border-radius: var(--wm-radius-lg);
    box-shadow: var(--wm-shadow-sm);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.wm-card:hover {
    box-shadow: var(--wm-shadow);
}

.wm-card-header {
    padding: 1.125rem 1.25rem;
    border-bottom: 1px solid var(--wm-border);
    background: transparent;
}

.wm-card-body {
    padding: 1.25rem;
}

.wm-card-title {
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 0;
}

.wm-kpi-card {
    padding: 0;
    border-radius: var(--wm-radius-lg);
    background: var(--wm-bg-surface);
    border: 1px solid var(--wm-border);
    box-shadow: var(--wm-shadow-sm);
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.wm-kpi-card--link {
    color: inherit;
}

.wm-kpi-card--link:hover {
    transform: translateY(-2px);
    box-shadow: var(--wm-shadow-md);
    color: inherit;
}

.wm-kpi-card__accent {
    width: 4px;
    align-self: stretch;
    flex-shrink: 0;
    border-radius: var(--wm-radius-lg) 0 0 var(--wm-radius-lg);
}

.wm-kpi-card__accent--primary { background: var(--bs-primary); }
.wm-kpi-card__accent--success { background: var(--bs-success); }
.wm-kpi-card__accent--info { background: var(--bs-info); }
.wm-kpi-card__accent--warning { background: var(--bs-warning); }
.wm-kpi-card__accent--danger { background: var(--bs-danger); }
.wm-kpi-card__accent--secondary { background: var(--bs-secondary); }

.wm-kpi-icon--block {
    width: 44px;
    height: 44px;
    border-radius: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.wm-kpi-value {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.wm-kpi-label {
    font-size: 0.68rem;
    color: var(--bs-secondary-color);
    font-weight: 600;
    letter-spacing: 0.04em;
}

.wm-notif-item--alerta:hover {
    background: var(--bs-tertiary-bg);
}

/* WM Vita Table (padrão VitaCore) */
.wm-vita-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--wm-border);
    border-radius: 0.25rem;
    -webkit-overflow-scrolling: touch;
}

.wm-vita-table {
    width: 100%;
    text-align: left;
    border-collapse: collapse;
    font-size: 0.875rem;
    margin-bottom: 0;
}

.wm-vita-table thead tr {
    background: var(--wm-gradient);
    color: var(--wm-font-on-theme);
}

.wm-vita-table thead th {
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.8125rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    white-space: nowrap;
}

.wm-vita-table tbody td {
    padding: 0.5rem 1rem;
    border: 1px solid #e5e5e5;
    color: #404040;
    vertical-align: middle;
}

.wm-vita-table tbody tr {
    background: #fff;
    transition: background 0.15s ease;
}

.wm-vita-table tbody tr:hover {
    background: #fafafa;
}

.wm-vita-table-action {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border: 0;
    transition: opacity 0.15s ease;
    flex-shrink: 0;
    font-size: 0.75rem;
}

.wm-vita-table-action:hover {
    opacity: 0.88;
    color: #fff;
}

.wm-vita-table-action--edit { background: #3498db; }
.wm-vita-table-action--delete { background: #e74c3c; }
.wm-vita-table-action--add { background: #5bc0de; }
.wm-vita-table-action--info { background: #2c3e50; }
.wm-vita-table-action--toggle-on { background: #27ae60; }
.wm-vita-table-action--toggle-off { background: #e67e22; }

.wm-checklist-inline-table .form-control,
.wm-checklist-inline-table .form-select {
    border: none;
    border-bottom: 1px solid var(--bs-border-color);
    border-radius: 0;
    background: transparent;
    padding-left: 0;
    padding-right: 0;
}

.wm-checklist-inline-input:focus,
.wm-checklist-inline-select:focus {
    box-shadow: none;
    border-bottom-color: var(--wm-primary);
}

.wm-status-badge {
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    display: inline-block;
}

.wm-status-badge--active {
    background: #dcfce7;
    color: #166534;
}

.wm-status-badge--inactive {
    background: #fee2e2;
    color: #991b1b;
}

.btn-status-toggle {
    line-height: 1;
    vertical-align: middle;
}

.btn-status-toggle .wm-status-badge {
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.btn-status-toggle:hover .wm-status-badge {
    opacity: 0.85;
}

/* Badges de status da OS (listagem) */
.os-status-badge {
    display: inline-block;
    padding: 0.3rem 0.65rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.35;
    white-space: nowrap;
}

.btn-os-status {
    line-height: 1;
    vertical-align: middle;
    background: transparent;
}

.btn-os-status .os-status-badge {
    cursor: pointer;
    transition: filter 0.15s ease, opacity 0.15s ease;
}

.btn-os-status:hover .os-status-badge {
    filter: brightness(1.08);
    opacity: 0.95;
}

.os-status-badge--aberta { background: #dc3545; }
.os-status-badge--execucao { background: #0d6efd; }
.os-status-badge--pecas { background: #fd7e14; }
.os-status-badge--aprovacao { background: #6f42c1; }
.os-status-badge--finalizada { background: #198754; }
.os-status-badge--cancelada { background: #6c757d; }
.os-status-badge--default { background: #495057; }

.estoque-baixo {
    color: #dc3545;
    font-weight: 600;
}

.estoque-foto-thumb {
    width: 28px;
    height: 28px;
    object-fit: cover;
    border-radius: 0.25rem;
}

.btn-estoque-foto {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.compras-totais {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: flex-end;
    font-size: 0.875rem;
}

.compras-totais__pendente {
    color: #dc3545;
    font-weight: 600;
}

.compras-totais__pago {
    color: #198754;
    font-weight: 600;
}

.conta-pagar-money-input .input-group-text {
    background: #f8f9fa;
    font-size: 0.875rem;
    font-weight: 600;
    color: #495057;
}

.cp-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;
}

@media (max-width: 1200px) {
    .cp-kpi-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 576px) {
    .cp-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.cp-kpi-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding: 0.65rem 0.75rem;
    border: none;
    border-radius: 0.35rem;
    text-align: left;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    min-height: 72px;
}

.cp-kpi-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.cp-kpi-card--active {
    outline: 2px solid rgba(255, 255, 255, 0.85);
    outline-offset: 2px;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.35);
}

.cp-kpi-card__label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.cp-kpi-card__value {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
}

.cp-kpi-card__icon {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.75);
}

.cp-kpi-card--vencidas { background: #e91e8c; }
.cp-kpi-card--hoje { background: #fd7e14; }
.cp-kpi-card--amanha { background: #6c757d; }
.cp-kpi-card--pagas { background: #198754; }
.cp-kpi-card--total { background: #212529; }
.cp-kpi-card--pendentes { background: #dc3545; }

.conta-pagar-view-table th {
    width: 42%;
    background: #0d6efd;
    color: #fff;
    font-weight: 600;
    font-size: 0.8125rem;
    vertical-align: middle;
    padding: 0.45rem 0.65rem;
}

.conta-pagar-view-table td {
    font-weight: 600;
    font-size: 0.8125rem;
    vertical-align: middle;
    padding: 0.45rem 0.65rem;
}

.conta-pagar-view-preview {
    min-height: 280px;
    height: 100%;
    overflow: hidden;
}

.conta-pagar-view-preview__img {
    width: 100%;
    height: 100%;
    min-height: 280px;
    object-fit: contain;
    padding: 0.5rem;
}

.wm-arquivo-preview {
    width: 100%;
    max-width: 120px;
    height: 100px;
    overflow: hidden;
}

.wm-arquivo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.conta-pagar-detail-table__label {
    width: 40%;
    color: #0d6efd;
    font-weight: 600;
    white-space: nowrap;
}

.conta-pagar-preview {
    min-height: 200px;
    max-height: 280px;
    overflow: hidden;
}

.conta-pagar-preview img {
    object-fit: contain;
    max-height: 280px;
}

.checklist-modelo-foto-preview {
    min-height: 120px;
    overflow: hidden;
}

.checklist-modelo-foto-preview__img {
    width: 100%;
    height: 100%;
    max-height: 140px;
    object-fit: contain;
    padding: 0.35rem;
}

.wm-vita-table-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #525252;
}

.wm-vita-table-controls .dataTables_length,
.wm-vita-table-controls .dataTables_filter {
    margin: 0;
}

.wm-vita-table-controls .dataTables_filter {
    margin-left: auto;
}

.wm-vita-table-controls .dataTables_filter label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.wm-vita-table-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #737373;
}

.wm-vita-table-footer .dataTables_info {
    padding: 0;
    margin: 0;
}

.wm-vita-table-footer .dataTables_paginate {
    margin: 0;
    padding: 0;
}

.wm-vita-table-footer .wm-vita-table-info {
    flex-shrink: 0;
}

.wm-vita-table-footer .wm-vita-table-paginate {
    flex-shrink: 0;
    margin-left: auto;
}

.wm-vita-table-footer .wm-vita-table-paginate .pagination .page-link {
    color: var(--wm-secondary);
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 6px 12px;
    font-size: 0.85rem;
    box-shadow: none;
    cursor: pointer;
}

.wm-vita-table-footer .wm-vita-table-paginate .pagination .page-item:first-child .page-link {
    border-radius: 6px 0 0 6px;
}

.wm-vita-table-footer .wm-vita-table-paginate .pagination .page-item:last-child .page-link {
    border-radius: 0 6px 6px 0;
}

.wm-vita-table-footer .wm-vita-table-paginate .pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--wm-primary) 0%, var(--wm-secondary) 100%);
    border-color: var(--wm-primary);
    color: var(--wm-font-on-theme, #fff);
}

.wm-vita-table-footer .wm-vita-table-paginate .pagination .page-item:not(.active):not(.disabled) .page-link:hover {
    background-color: #e2e8f0;
    color: var(--wm-primary);
}

.wm-vita-table-footer .wm-vita-table-paginate .pagination .page-item.disabled .page-link {
    opacity: 0.55;
    cursor: default;
}

.table-custom-wrapper .wm-vita-table-footer .dataTables_paginate {
    margin-left: auto;
}

.wm-vita-table-action--view {
    color: #0369a1;
    border-color: #bae6fd;
    background: #f0f9ff;
}

.wm-vita-table-action--view:hover {
    background: #e0f2fe;
    color: #075985;
}

.wm-vita-table-page-btn {
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    border: 1px solid var(--wm-border);
    border-radius: 0.375rem;
    background: #fff;
    font-size: 0.875rem;
    transition: background 0.15s ease, color 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wm-vita-table-page-btn:hover:not(:disabled):not(.is-active) {
    background: #f5f5f5;
}

.wm-vita-table-page-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.wm-vita-table-page-btn.is-active {
    background: var(--wm-primary);
    color: var(--wm-font-on-theme);
    border-color: var(--wm-primary);
}

@media (max-width: 767.98px) {
    .wm-vita-table-wrap,
    .table-custom-wrapper .table-responsive {
        overflow-x: hidden;
        max-width: 100%;
        -webkit-overflow-scrolling: touch;
    }

    /* ——— Tabelas responsivas (AJAX e DataTables): 1ª coluna + botão + no mobile ——— */
    .wm-vita-table--responsive {
        border-collapse: separate;
        border-spacing: 0;
    }

    .wm-vita-table--responsive thead {
        display: none;
    }

    .wm-vita-table--responsive tbody tr:not(.child) {
        display: block;
        margin-bottom: 0.65rem;
        border: 1px solid var(--wm-border);
        border-radius: var(--wm-radius-lg);
        background: var(--wm-bg-surface);
        box-shadow: var(--wm-shadow-sm);
        overflow: hidden;
    }

    .wm-vita-table--responsive tbody tr:not(.child):hover {
        background: var(--wm-bg-surface);
    }

    .wm-vita-table--responsive tbody tr:not(.wm-row-expanded):not(.child) td:not(:first-child):not(.wm-table-empty) {
        display: none !important;
    }

    .wm-vita-table--responsive tbody tr:not(.wm-row-expanded):not(.child) td:first-child {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.65rem;
        padding: 0.7rem 0.85rem;
        border: 0;
        font-size: 0.875rem;
        font-weight: 500;
    }

    .wm-vita-table--responsive tbody tr:not(.wm-row-expanded):not(.child) td:first-child::before {
        display: none;
        content: none;
    }

    .wm-mobile-primary__inner {
        flex: 1;
        min-width: 0;
        text-align: left;
        word-break: break-word;
    }

    .wm-ag-mobile-primary {
        display: flex;
        flex-direction: column;
        gap: 0.15rem;
        line-height: 1.35;
        min-width: 0;
    }

    .wm-vita-table--responsive tbody tr.wm-row-expanded td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 0.55rem 0.85rem;
        font-size: 0.8125rem;
        border: 0;
        border-bottom: 1px solid var(--wm-border);
        text-align: right;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .wm-vita-table--responsive tbody tr.wm-row-expanded td:last-child {
        border-bottom: 0;
    }

    .wm-vita-table--responsive tbody tr.wm-row-expanded td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.6875rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: var(--bs-secondary-color);
        text-align: left;
        flex: 0 0 42%;
        max-width: 48%;
        padding-right: 0.35rem;
    }

    .wm-vita-table--responsive tbody tr.wm-row-expanded td:first-child::before {
        display: none;
        content: none;
    }

    .wm-vita-table--responsive tbody tr.wm-row-expanded td:first-child {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.65rem;
        font-weight: 600;
        border-bottom: 1px solid var(--wm-border);
        background: rgba(var(--wm-primary-rgb, 13, 110, 253), 0.04);
    }

    .wm-vita-table--responsive tbody td.wm-table-empty {
        display: block;
        text-align: center;
        padding: 1.25rem 0.85rem;
    }

    .wm-vita-table--responsive tbody td.wm-table-empty::before {
        display: none;
        content: none;
    }

    .wm-vita-table--responsive tbody td.text-end .btn-group-actions,
    .wm-vita-table--responsive tbody td.text-end .d-flex {
        justify-content: flex-end !important;
        flex-wrap: wrap;
    }

    .table-custom-wrapper .dataTables_wrapper .wm-vita-table-controls {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .table-custom-wrapper .dataTables_length label,
    .table-custom-wrapper .dataTables_filter label {
        font-size: 0.8125rem;
    }

    .table-custom-wrapper .dataTables_length select,
    .table-custom-wrapper .dataTables_filter input {
        font-size: 0.8125rem;
        max-width: 100%;
    }

    table.dataTable > tbody > tr.child ul.dtr-details > li span.dtr-data {
        text-align: left;
        max-width: 65%;
    }

    table.dataTable > tbody > tr.child {
        padding: 0;
    }

    table.dataTable > tbody > tr.child ul.dtr-details {
        display: block;
        width: 100%;
        margin: 0;
        padding: 0.65rem 0.85rem;
        list-style: none;
        background: var(--wm-bg-body);
        border-top: 1px solid var(--wm-border);
    }

    table.dataTable > tbody > tr.child ul.dtr-details > li {
        display: flex;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.4rem 0;
        border-bottom: 1px solid var(--wm-border);
        font-size: 0.8125rem;
    }

    table.dataTable > tbody > tr.child ul.dtr-details > li:last-child {
        border-bottom: 0;
    }

    table.dataTable > tbody > tr.child span.dtr-title {
        font-weight: 600;
        font-size: 0.6875rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: var(--bs-secondary-color);
        flex: 0 0 42%;
    }

    table.dataTable > tbody > tr.child span.dtr-data {
        text-align: right;
        flex: 1;
        word-break: break-word;
    }
}

/* Botão +/− das tabelas AJAX */
.wm-row-toggle {
    flex-shrink: 0;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 50%;
    border: 0;
    padding: 0;
    background: var(--wm-primary);
    color: var(--wm-font-on-theme, #fff);
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.15s ease;
}

.wm-row-toggle:hover {
    filter: brightness(1.08);
}

.wm-row-toggle:active {
    transform: scale(0.95);
}

@media (max-width: 767.98px) {
    .wm-row-toggle {
        display: inline-flex;
    }
}

/* Tables */
.table.wm-table {
    --bs-table-bg: transparent;
}

@media (max-width: 767.98px) {
    .table.wm-crud-table {
        font-size: 0.8125rem;
    }

    .table.wm-crud-table > :not(caption) > * > * {
        padding: 0.5rem 0.625rem;
    }
}

.table.wm-table > :not(caption) > * > * {
    padding: 0.75rem 1rem;
    vertical-align: middle;
}

.table.wm-table thead th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bs-secondary-color);
    border-bottom-width: 1px;
    background: var(--wm-bg-body);
}

/* DataTables overrides */
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border-radius: 0.5rem;
    border-color: var(--wm-border);
    padding: 0.375rem 0.75rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--wm-primary) !important;
    border-color: var(--wm-primary) !important;
    color: #fff !important;
    border-radius: 0.5rem;
}

/* Select2 overrides */
.select2-container--bootstrap-5 .select2-selection {
    border-radius: var(--wm-radius);
    border-color: var(--wm-border);
    min-height: 38px;
}

/* ------------------------------------------------------------------ */
/* Select2 dentro de .input-group (campo + botão "+")                  */
/* ------------------------------------------------------------------ */

/*
 * O .input-group do Bootstrap distribui a largura entre os filhos diretos
 * usando as regras que ele define para .form-select, .form-control e .btn.
 * O Select2 tira o <select> do fluxo e põe um <span class="select2-container">
 * no lugar — um elemento que o Bootstrap não conhece e para o qual não tem
 * regra. Sem largura definida, o span ocupa a linha inteira e empurra o botão
 * "+" para baixo do campo.
 *
 * `width: 1%` combinado com `flex: 1 1 auto` é o truque padrão do próprio
 * Bootstrap para campos em input-group: a largura base minúscula deixa o
 * flex-grow distribuir o espaço restante, em vez de o conteúdo interno do
 * Select2 ditar o tamanho.
 *
 * O Select2 também escreve `style="width: ..."` no elemento, daí o
 * !important — é o único jeito de vencer um estilo inline.
 */
.input-group > .select2-container--bootstrap-5 {
    flex: 1 1 auto;
    width: 1% !important;
}

/* Cantos retos onde o campo encosta no botão, como qualquer input-group. */
.input-group > .select2-container--bootstrap-5:not(:last-child) .select2-selection {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group > .select2-container--bootstrap-5:not(:first-child) .select2-selection {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin-left: -1px;
}

/*
 * Alinha a altura à do botão vizinho. O .select2-selection tem min-height
 * própria; num input-group quem manda é a altura da linha, senão o campo e o
 * botão ficam com alturas diferentes.
 */
.input-group > .select2-container--bootstrap-5 .select2-selection {
    height: 100%;
}

/*
 * O dropdown NÃO leva regra de largura daqui.
 *
 * Ele é anexado ao <body> (ou ao modal), fora do input-group, e o próprio
 * Select2 mede o campo ao abrir e escreve a largura inline. Uma tentativa de
 * ajudar com `width: auto; min-width: 100%` teve o efeito oposto: sobrescreveu
 * a medida do Select2 e o `100%` passou a valer sobre o elemento posicionado,
 * não sobre o campo — a lista abria com 114px em vez de 434px.
 */

/* Buttons */
.btn-wm-primary {
    background: var(--wm-primary);
    border-color: var(--wm-primary);
    color: #fff;
    font-weight: 500;
    border-radius: 0.625rem;
    padding: 0.5rem 1rem;
}

.btn-wm-primary:hover {
    background: var(--wm-primary-dark);
    border-color: var(--wm-primary-dark);
    color: #fff;
}

/* Toast container */
#wm-toast-container {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 1090;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 360px;
}

.wm-toast {
    padding: 0.875rem 1.125rem;
    border-radius: var(--wm-radius);
    font-size: 0.875rem;
    font-weight: 500;
    color: #fff;
    box-shadow: var(--wm-shadow-lg);
    animation: wmToastIn 0.3s ease;
}

.wm-toast.success { background: #059669; }
.wm-toast.error { background: #dc2626; }
.wm-toast.warning { background: #d97706; }
.wm-toast.info { background: #334155; }

.wm-form-hint {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--wm-radius);
    font-size: 0.8125rem;
    line-height: 1.45;
    animation: wmHintIn 0.28s ease;
}

.wm-form-hint i {
    margin-top: 0.125rem;
    flex-shrink: 0;
    opacity: 0.9;
}

.wm-form-hint--warning {
    background: rgba(217, 119, 6, 0.08);
    color: #92400e;
    border: 1px solid rgba(217, 119, 6, 0.22);
}

[data-bs-theme="dark"] .wm-form-hint--warning {
    background: rgba(251, 191, 36, 0.1);
    color: #fcd34d;
    border-color: rgba(251, 191, 36, 0.22);
}

@keyframes wmHintIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes wmToastIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Auth layout */
.wm-auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
    padding: 1.5rem;
}

.wm-auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--wm-bg-surface);
    border-radius: 1.25rem;
    box-shadow: var(--wm-shadow-lg);
    border: 1px solid var(--wm-border);
    overflow: hidden;
}

.wm-auth-header {
    text-align: center;
    padding: 2rem 2rem 1rem;
}

.wm-auth-logo {
    width: 56px;
    height: 56px;
    border-radius: 1rem;
    background: linear-gradient(135deg, var(--wm-primary) 0%, var(--wm-accent) 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 8px 24px rgba(var(--wm-primary-rgb), 0.35);
}

.wm-auth-body-inner {
    padding: 0 2rem 2rem;
}

/* Utilities */
.text-wm-primary { color: var(--wm-primary) !important; }
.bg-wm-primary { background-color: var(--wm-primary) !important; }

.page-header {
    margin-bottom: 1.5rem;
}

.page-header h2 {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.page-header p {
    color: var(--bs-secondary-color);
    margin: 0;
    font-size: 0.875rem;
}

/* Demo banner */
.wm-demo-banner {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
    color: #1c1917;
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
}

/* Kanban */
.wm-kanban-board {
    min-height: 420px;
}

#agendamentos-kanban-page .wm-kanban-board {
    width: 100%;
    overflow-x: auto;
    padding-right: 1.25rem;
    padding-bottom: 0.75rem;
    scroll-padding-right: 1rem;
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 993px) {
    #agendamentos-kanban-page {
        overflow-x: visible;
    }
}

.wm-kanban-column {
    width: 280px;
    flex-shrink: 0;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.75rem;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 220px);
}

.wm-kanban-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    background: var(--wm-gradient);
    color: var(--wm-font-on-theme);
    border-radius: 0.75rem 0.75rem 0 0;
}

.wm-kanban-column-body {
    padding: 0.75rem;
    overflow-y: auto;
    flex: 1;
    min-height: 120px;
}

.wm-kanban-column-body.drag-over {
    background: rgba(var(--wm-primary-rgb), 0.06);
    outline: 2px dashed rgba(var(--wm-primary-rgb), 0.35);
    outline-offset: -4px;
}

.wm-kanban-card {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.625rem;
    padding: 0.75rem;
    margin-bottom: 0.625rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    cursor: grab;
    word-break: break-word;
    min-width: 0;
}

.wm-kanban-card.dragging {
    opacity: 0.55;
}

.wm-kanban-column-body.drop-allowed {
    background: rgba(var(--wm-primary-rgb), 0.08);
    outline: 2px dashed rgba(var(--wm-primary-rgb), 0.45);
    outline-offset: -4px;
}

.wm-kanban-column-body.drop-denied {
    background: rgba(220, 53, 69, 0.06);
    outline: 2px dashed rgba(220, 53, 69, 0.35);
    outline-offset: -4px;
}

@media (max-width: 768px) {
    #agendamentos-kanban-page {
        padding-inline: 0.5rem;
    }

    #agendamentos-kanban-page .wm-kanban-board {
        flex-direction: column;
        overflow-x: visible;
        overflow-y: visible;
        scroll-snap-type: none;
        gap: 1rem;
        padding-bottom: 1rem;
    }

    #agendamentos-kanban-page .wm-kanban-column {
        width: 100%;
        max-width: 100%;
        flex-shrink: 1;
        scroll-snap-align: none;
        max-height: none;
    }

    #agendamentos-kanban-page .wm-kanban-column-body {
        min-height: 80px;
        max-height: none;
    }
}

@media (min-width: 769px) and (max-width: 992px) {
    .wm-kanban-board {
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.5rem;
    }

    .wm-kanban-column {
        width: min(70vw, 280px);
        scroll-snap-align: start;
    }
}

.wm-calendar-placeholder {
    min-height: 200px;
}

#agenda-fullcalendar {
    min-height: 650px;
}

#agenda-fullcalendar .fc-toolbar-title {
    font-size: 1.125rem;
    font-weight: 600;
}

#agenda-fullcalendar .fc-button {
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.35rem 0.75rem;
}

#agenda-fullcalendar .fc-button-primary {
    background: var(--wm-primary);
    border-color: var(--wm-primary);
}

#agenda-fullcalendar .fc-button-primary:not(:disabled).fc-button-active,
#agenda-fullcalendar .fc-button-primary:not(:disabled):active,
#agenda-fullcalendar .fc-button-primary:hover {
    background: var(--wm-primary-dark, var(--wm-primary));
    border-color: var(--wm-primary-dark, var(--wm-primary));
}

#agenda-fullcalendar .fc-col-header-cell-cushion,
#agenda-fullcalendar .fc-daygrid-day-number {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--bs-body-color);
    text-decoration: none;
}

#agenda-fullcalendar .fc-day-today {
    background: rgba(var(--wm-primary-rgb), 0.06) !important;
}

#agenda-fullcalendar .fc-event {
    border: none !important;
    background: transparent !important;
    padding: 0.125rem 0.2rem;
    font-size: 0.75rem;
    cursor: pointer;
    box-shadow: none !important;
}

#agenda-fullcalendar .fc-timegrid-event .fc-wm-event-card {
    min-height: 2.5rem;
    height: 100%;
}

#agenda-fullcalendar .fc-timegrid-event-harness {
    min-height: 28px;
}

#agenda-fullcalendar .fc-wm-event-card {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    width: 100%;
    padding: 0.35rem 0.4rem 0.35rem 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(32, 107, 196, 0.25);
    border-left: 4px solid #206bc4;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
    color: #1e293b;
    overflow: hidden;
}

#agenda-fullcalendar .fc-wm-event-card--pendente {
    background: #e8f8f0;
    border-color: rgba(47, 179, 68, 0.25);
    border-left-color: #2fb344;
}

#agenda-fullcalendar .fc-wm-event-card--confirmado {
    background: #e8f4fd;
    border-color: rgba(32, 107, 196, 0.25);
    border-left-color: #206bc4;
}

#agenda-fullcalendar .fc-wm-event-card--em_atendimento {
    background: #e0f7fa;
    border-color: rgba(23, 162, 184, 0.25);
    border-left-color: #17a2b8;
}

#agenda-fullcalendar .fc-wm-event-card--finalizado {
    background: #e8f5e9;
    border-color: rgba(47, 179, 68, 0.2);
    border-left-color: #198754;
}

#agenda-fullcalendar .fc-wm-event-card--cancelado {
    background: #fdecea;
    border-color: rgba(214, 57, 57, 0.2);
    border-left-color: #d63939;
}

#agenda-fullcalendar .fc-wm-event-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem;
}

#agenda-fullcalendar .fc-wm-event-time-wrap {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #206bc4;
    font-weight: 700;
    font-size: 0.6875rem;
}

#agenda-fullcalendar .fc-wm-event-time-wrap i {
    font-size: 0.625rem;
}

#agenda-fullcalendar .fc-wm-event-row {
    display: flex;
    align-items: flex-start;
    gap: 0.3rem;
    font-size: 0.625rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#agenda-fullcalendar .fc-wm-event-row i {
    width: 0.75rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

#agenda-fullcalendar .fc-wm-event-row .text-purple { color: #6f42c1; }
#agenda-fullcalendar .fc-wm-event-row .text-warning { color: #fd7e14; }

#agenda-fullcalendar .fc-event-delete {
    line-height: 1;
    text-decoration: none;
    color: #d63939 !important;
    background: transparent;
    border: 0;
    padding: 0;
    font-size: 0.75rem;
    flex-shrink: 0;
}

#agenda-fullcalendar .fc-event-delete:hover {
    color: #b02a2a !important;
}

.ag-event-popover {
    position: fixed;
    z-index: 1080;
    width: min(320px, calc(100vw - 2rem));
    background: #fff;
    border-radius: 0.625rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
    overflow: hidden;
}

.ag-event-popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid #e9ecef;
    background: #f8fafc;
}

.ag-event-popover-time {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: #206bc4;
    font-weight: 700;
    font-size: 0.875rem;
}

.ag-event-popover-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.ag-popover-btn {
    width: 1.75rem;
    height: 1.75rem;
    border: 0;
    border-radius: 0.375rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
    background: #e9ecef;
    color: #495057;
}

.ag-popover-btn--edit { background: #e8f4fd; color: #206bc4; }
.ag-popover-btn--confirm { background: #d4edda; color: #198754; }
.ag-popover-btn--close { background: transparent; color: #6c757d; }

.ag-event-popover-body {
    padding: 0.65rem 0.75rem 0.75rem;
    font-size: 0.8125rem;
}

.ag-popover-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
    line-height: 1.4;
    word-break: break-word;
}

.ag-popover-row:last-child {
    margin-bottom: 0;
}

.ag-popover-row i {
    width: 1rem;
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.ag-popover-row .text-purple { color: #6f42c1; }

#ag-horarios-grid .ag-horarios-empty {
    font-weight: 600;
    color: var(--wm-primary-dark, var(--wm-secondary));
    padding: 0.5rem 0;
    line-height: 1.45;
}

#ag-horarios-grid .ag-slot-btn {
    min-width: 4.25rem;
    font-weight: 500;
    border-radius: 0.5rem;
}

#ag-horarios-grid .btn-check + .ag-slot-btn {
    color: var(--wm-primary) !important;
    border-color: var(--wm-primary) !important;
    background: transparent !important;
}

#ag-horarios-grid .btn-check + .ag-slot-btn:hover,
#ag-horarios-grid .btn-check + .ag-slot-btn:focus {
    color: var(--wm-primary) !important;
    border-color: var(--wm-primary) !important;
    background: var(--wm-primary-soft) !important;
    box-shadow: none;
}

#ag-horarios-grid .btn-check:checked + .ag-slot-btn,
#ag-horarios-grid .btn-check:active + .ag-slot-btn {
    background: var(--wm-gradient) !important;
    border-color: var(--wm-primary) !important;
    color: var(--wm-font-on-theme) !important;
    box-shadow: 0 2px 6px rgba(var(--wm-primary-rgb), 0.25);
}

/* Modais VitaCore (BS5) */
.wm-modal-header {
    background: var(--wm-gradient);
    color: var(--wm-font-on-theme);
}

.wm-modal-content {
    border-radius: 1rem;
    overflow: hidden;
}

.wm-modal-content--gradient-border {
    position: relative;
    border: 0;
    border-radius: 1rem;
    overflow: hidden;
}

.wm-modal-content--gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    border-radius: inherit;
    background: var(--wm-gradient);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 1;
}

.modal-dialog-scrollable .modal-content > form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.modal-dialog-scrollable .modal-content > form > .modal-body {
    overflow-y: auto;
}

.wm-modal-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--wm-primary);
    margin-bottom: 0.35rem;
}

.wm-view-value.form-control {
    min-height: calc(1.5em + 0.75rem + 2px);
    background-color: var(--bs-body-bg);
    display: flex;
    align-items: center;
}

.wm-modal-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.wm-input-icon {
    background: var(--wm-gradient);
    color: var(--wm-font-on-theme);
    border-color: var(--bs-border-color);
}

/* Pré-visualização do Hero (admin) — mesmo efeito escuro do site */
.wm-hero-admin-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #1b2124;
    border: 1px solid var(--bs-border-color);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.wm-hero-admin-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    display: block;
}

.wm-hero-admin-preview__scrim {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(to right, #1b2124 0%, rgba(27, 33, 36, 0.86) 38%, rgba(27, 33, 36, 0.3) 100%);
}

.wm-hero-admin-preview__fade {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 35%;
    pointer-events: none;
    background: linear-gradient(to top, #1b2124, transparent);
}

.wm-hero-admin-preview__badge {
    position: absolute;
    left: 0.65rem;
    bottom: 0.65rem;
    z-index: 2;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    padding: 0.2rem 0.45rem;
    border-radius: 0.35rem;
}

.wm-hero-admin-preview__delete {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 3;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(220, 53, 69, 0.92);
    color: #fff;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.wm-hero-admin-preview__delete:hover {
    background: #dc3545;
    transform: scale(1.05);
}

.relatorio-modal-period-links {
    font-size: 0.85em;
    opacity: 0.95;
}

.relatorio-modal-period-link {
    background: none;
    border: 0;
    padding: 0;
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    font-weight: 400;
}

.relatorio-modal-period-link:hover,
.relatorio-modal-period-link:focus {
    color: #fff;
    text-decoration: underline;
}

.relatorio-modal-period-link.active {
    color: #0d3b66;
    font-weight: 700;
    text-decoration: none;
}

.wm-profile-avatar-preview {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--bs-tertiary-bg) center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--wm-primary);
    border: 3px solid var(--bs-border-color);
}

.wm-profile-avatar-camera {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--wm-gradient);
    color: var(--wm-font-on-theme);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    border: 2px solid #fff;
}

.wm-theme-preview-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    background: var(--wm-gradient);
    color: var(--wm-font-on-theme);
    font-size: 0.875rem;
    font-weight: 500;
}

.wm-theme-preview-inner .theme-btn {
    pointer-events: none;
}

/* Dashboard Master */
.wm-master-kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.wm-master-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: min(100%, 320px);
}

.wm-master-search-wrap i {
    position: absolute;
    left: 0.85rem;
    color: var(--bs-secondary-color);
    pointer-events: none;
}

.wm-master-search-wrap .form-control {
    padding-left: 2.25rem;
    border-radius: 2rem;
    background: var(--wm-primary);
    color: #fff;
    border: none;
}

.wm-master-search-wrap .form-control::placeholder {
    color: rgba(255, 255, 255, 0.75);
}

.wm-master-search-wrap .badge {
    background: var(--wm-secondary);
    color: #fff;
    white-space: nowrap;
}

.wm-master-empresa-card {
    overflow: hidden;
    border-radius: 1rem !important;
}

.wm-master-empresa-card-header {
    height: 72px;
    position: relative;
    background: linear-gradient(135deg, rgba(32, 107, 196, 0.12), rgba(32, 107, 196, 0.04));
    background-image: radial-gradient(circle, rgba(0, 0, 0, 0.06) 1px, transparent 1px);
    background-size: 12px 12px;
}

.wm-master-empresa-card-header .badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
}

.wm-master-empresa-logo {
    width: 72px;
    height: 72px;
    margin: -36px auto 0;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.wm-master-empresa-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.35rem;
}

.wm-master-card--blue .wm-master-empresa-card-header { background-color: rgba(59, 130, 246, 0.12); }
.wm-master-card--green .wm-master-empresa-card-header { background-color: rgba(16, 185, 129, 0.12); }
.wm-master-card--peach .wm-master-empresa-card-header { background-color: rgba(251, 146, 60, 0.12); }
.wm-master-card--lavender .wm-master-empresa-card-header { background-color: rgba(167, 139, 250, 0.12); }

.wm-cfg-image-thumb {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    background: var(--bs-tertiary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.wm-cfg-image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Login split-card VitaCore */
.wm-auth-body.wm-auth-split {
    min-height: 100vh;
    background: radial-gradient(ellipse at center, color-mix(in srgb, var(--wm-primary) 85%, #000) 0%, color-mix(in srgb, var(--wm-primary-dark) 90%, #000) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.wm-auth-split-wrap {
    width: 100%;
    max-width: 1100px;
}

.wm-login-split-card {
    background: #fff;
    border-radius: 1.25rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

@media (min-width: 992px) {
    .wm-login-split-card {
        min-height: 580px;
    }

    .wm-login-split-card > .row {
        min-height: 580px;
    }
}

.wm-login-form-panel {
    padding: 2rem 1.5rem;
    background: #fff;
    display: flex;
    align-items: center;
}

@media (min-width: 992px) {
    .wm-login-form-panel {
        padding: 2.75rem 3.25rem;
    }
}

.wm-login-form-inner {
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
}

.wm-login-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wm-login-access-label {
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 600;
}

.wm-login-brand-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.wm-login-brand-fallback {
    width: 64px;
    height: 64px;
    border-radius: 0.85rem;
    background: linear-gradient(135deg, var(--wm-primary) 0%, var(--wm-primary-dark) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.15rem;
    box-shadow: 0 8px 20px rgba(var(--wm-primary-rgb), 0.28);
}

.wm-login-input-group .form-control:focus {
    box-shadow: none;
    border-color: #ced4da;
}

.wm-login-input-group:focus-within {
    box-shadow: 0 0 0 0.2rem rgba(var(--wm-primary-rgb), 0.15);
    border-radius: 0.5rem;
}

.wm-login-brand-panel {
    background: linear-gradient(160deg, var(--wm-primary) 0%, var(--wm-primary-dark) 100%);
    color: #fff;
    padding: 2.5rem 2rem;
    min-height: 300px;
    display: flex;
    align-items: center;
}

@media (min-width: 992px) {
    .wm-login-brand-panel {
        padding: 3rem 2.75rem;
        min-height: 580px;
    }
}

.wm-login-brand-bg {
    position: absolute;
    inset: 0;
    opacity: 0.18;
    background-size: cover;
    background-position: center;
}

.wm-login-brand-content {
    position: relative;
    z-index: 1;
}

.wm-login-brand-content .display-6 {
    font-size: clamp(1.6rem, 2.4vw, 2.15rem);
    line-height: 1.25;
}

.wm-login-features li {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 0.92rem;
}

.wm-login-features li:last-child {
    border-bottom: 0;
}

.wm-login-feature-icon {
    width: 34px;
    height: 34px;
    border-radius: 0.55rem;
    background: rgba(251, 191, 36, 0.95);
    color: #78350f;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.wm-login-submit {
    background: linear-gradient(135deg, var(--wm-primary) 0%, var(--wm-primary-dark) 100%);
    border: 0;
    box-shadow: 0 6px 16px rgba(var(--wm-primary-rgb), 0.35);
    font-weight: 600;
}

/* Modal Visualizar Cliente — estilo anexo1 */
.wm-detail-grid {
    border-collapse: collapse;
}

.wm-detail-grid th,
.wm-detail-grid td {
    padding: 8px 12px;
    font-size: 0.875rem;
    border: 1px solid #dee2e6;
    vertical-align: middle;
}

.wm-detail-grid th {
    background: var(--wm-gradient);
    color: var(--wm-font-on-theme);
    font-weight: 600;
    width: 42%;
    white-space: nowrap;
}

.wm-detail-grid td {
    background-color: #fff;
    color: #333;
}

.wm-cliente-detalhe-veiculos {
    background: #f8fafc;
    font-size: 0.875rem;
}

.wm-cliente-veiculo-item:last-child {
    border-bottom: 0 !important;
}

#modalLinkCopiado {
    z-index: 1065 !important;
}

.wm-anexo-preview {
    min-height: 180px;
    background: #f8fafc;
}

.wm-anexo-thumb {
    width: 64px;
    height: 64px;
    min-width: 64px;
    min-height: 64px;
    object-fit: contain;
    border-radius: 4px;
    background: #f1f5f9;
    padding: 4px;
}

.wm-anexo-thumb-sm {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
    background: #f1f5f9;
    padding: 2px;
}

.wm-anexo-thumb--icon {
    object-fit: contain;
}

.wm-anexo-fa-thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    min-width: 64px;
    min-height: 64px;
    border-radius: 8px;
    background: linear-gradient(145deg, #f8fafc, #eef2f7);
    border: 1px solid #e2e8f0;
    color: var(--fa-color, #64748b);
    gap: 2px;
}

.wm-anexo-fa-thumb i {
    font-size: 1.65rem;
    line-height: 1;
}

.wm-anexo-fa-thumb span {
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .03em;
    opacity: .85;
}

.wm-anexo-fa-thumb--sm {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 6px;
}

.wm-anexo-fa-thumb--sm i {
    font-size: 1.1rem;
}

.wm-anexo-fa-thumb--sm span {
    font-size: .5rem;
}

.wm-anexo-fa-thumb--preview {
    width: 100%;
    max-width: 220px;
    height: 180px;
    margin: 0 auto;
}

.wm-anexo-fa-thumb--preview i {
    font-size: 3rem;
}

.wm-anexo-fa-thumb--preview span {
    font-size: .75rem;
}

.wm-anexo-preview-img {
    max-height: 220px;
    object-fit: contain;
    background: #f8fafc;
    padding: 8px;
    border-radius: 4px;
}

.wm-anexos-grade .wm-anexo-card {
    cursor: pointer;
    transition: box-shadow .15s;
}

.wm-anexos-grade .wm-anexo-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

/* Modal checklist veículo — largura intermediária entre lg e xl */
.modal-checklist-veiculo {
    max-width: min(960px, 94vw);
}

#modalChecklistVeiculo .form-select,
#modalChecklistVeiculo .form-control {
    min-height: 38px;
}

#modalChecklistVeiculo .table-custom th,
#modalChecklistVeiculo .table-custom td {
    white-space: nowrap;
}

#modalChecklistVeiculo .table-custom td:first-child {
    white-space: normal;
    min-width: 140px;
}

/* Modal OS — tabelas de itens (produtos/serviços) */
.os-itens-section-title {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
}

.os-itens-section-title--produtos {
    color: var(--wm-primary);
}

.os-itens-section-title--servicos {
    color: var(--wm-secondary);
}

.os-itens-table {
    font-size: 0.8125rem;
}

.os-itens-table.table-custom thead tr {
    background: var(--wm-gradient) !important;
}

.os-itens-table.table-custom thead th {
    background: transparent !important;
    color: var(--wm-font-on-theme, #fff) !important;
    box-shadow: none !important;
    --bs-table-bg: transparent;
    --bs-table-color: var(--wm-font-on-theme, #fff);
}

.os-itens-table tbody td {
    padding: 0.4rem 0.65rem;
    vertical-align: middle;
}

.os-itens-table .os-item-total {
    font-weight: 600;
}

#os-itens-listagem {
    margin-bottom: 1.5rem;
}

/* Modal OS — respiro entre linhas do formulário */
.os-modal-form > .row {
    margin-bottom: 1.25rem;
}

.os-modal-form .form-label {
    margin-bottom: 0.4rem;
    font-size: 0.8125rem;
}

.os-modal-form #os-itens-listagem {
    margin-bottom: 1.75rem;
}

/* Modal visualizar OS */
.os-view-modal-body {
    padding-top: 1.25rem;
}

.os-view-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.os-view-info-label,
.os-view-section-title {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--wm-text-muted, #64748b);
}

.os-view-info-value {
    font-size: 0.875rem;
    color: var(--wm-text, #1e293b);
}

.os-view-text-box {
    margin-top: 0.25rem;
    padding: 0.65rem 0.75rem;
    min-height: 2.5rem;
    border: 1px solid var(--wm-border, #e2e8f0);
    border-radius: 0.5rem;
    background: #f8fafc;
    font-size: 0.8125rem;
    color: var(--wm-text, #1e293b);
    white-space: pre-wrap;
}

.os-view-section-title {
    margin-bottom: 0.35rem;
}

.os-view-section-title--produtos {
    color: var(--wm-primary);
}

.os-view-section-title--servicos {
    color: var(--wm-secondary);
}

.os-itens-table .os-col-qty {
    width: 8.5rem;
    text-align: center;
}

.os-itens-table .os-col-remove {
    width: 4rem;
    text-align: center;
}

.os-itens-table .os-item-qty {
    width: 2.75rem;
    min-width: 2.25rem;
    max-width: 3rem;
    margin: 0;
    padding: 0.25rem 0.2rem;
    border-left: 0;
    border-right: 0;
    font-weight: 600;
}

.os-itens-table .os-qty-control {
    max-width: 7.5rem;
}

.os-itens-table .os-qty-control .btn-qty {
    width: 1.75rem;
    min-width: 1.75rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.os-itens-table .os-qty-control .btn-qty i {
    font-size: 0.65rem;
}

.os-itens-table .os-item-valor-wrap {
    margin-left: auto;
    max-width: 7rem;
}

.os-itens-table .os-item-valor {
    max-width: 5.5rem;
    flex: 1 1 auto;
}

.os-itens-table .os-item-valor-icon {
    font-size: 0.7rem;
    flex-shrink: 0;
}

.os-itens-table input[type=number]::-webkit-inner-spin-button,
.os-itens-table input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.os-itens-table input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.os-itens-table tbody tr {
    border-bottom: 1px solid var(--wm-border, #e5e5e5);
}

/* Modal recuperar senha (login) */
.wm-forgot-modal .modal-footer {
    justify-content: space-between;
}

.wm-forgot-success {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: 12px;
    padding: 14px 16px;
}

.wm-forgot-success--inline {
    text-align: left;
}

.wm-forgot-success__icon {
    color: #16a34a;
    font-size: 1.25rem;
    line-height: 1;
    flex-shrink: 0;
}

.wm-forgot-success--inline .wm-forgot-success__icon.text-warning {
    color: #d97706;
}

/* Tela redefinir senha (link do e-mail) */
.wm-auth-reset-card {
    max-width: 480px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
    background: #fff;
}

.wm-auth-reset-logo {
    max-height: 56px;
    width: auto;
    object-fit: contain;
}

.wm-auth-reset-body .input-group-text {
    border-right: 0;
}

.wm-auth-reset-body .form-control {
    border-left: 0;
}

.wm-auth-reset-body .input-group:focus-within .input-group-text,
.wm-auth-reset-body .input-group:focus-within .form-control {
    border-color: var(--bs-primary);
    box-shadow: none;
}

/* Dashboard — gráficos responsivos */
.wm-dashboard-chart {
    position: relative;
    width: 100%;
    min-height: 220px;
    height: clamp(200px, 42vw, 280px);
}

.wm-dashboard-chart canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

@media (max-width: 576px) {
    .wm-dashboard-chart {
        min-height: 240px;
        height: clamp(220px, 55vw, 300px);
    }
}

/* ------------------------------------------------------------------ */
/* Navegação — feedback imediato ao clique (wm-nav-turbo.js)           */
/* ------------------------------------------------------------------ */

/*
 * Fica acima de tudo (inclusive de modal, 1055) porque é indicação de
 * estado do navegador, não conteúdo: precisa aparecer mesmo com um
 * diálogo aberto na frente.
 */
#wm-nav-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    z-index: 2000;
    background: linear-gradient(90deg, var(--wm-primary, #206bc4), var(--wm-secondary, #1e3a5f));
    box-shadow: 0 0 8px rgba(var(--wm-primary-rgb, 32, 107, 196), 0.6);
    opacity: 0;
    pointer-events: none;
    border-radius: 0 2px 2px 0;
}

/* O item clicado já responde antes da página trocar. */
.wm-nav-link.is-carregando,
.wm-nav-sublink.is-carregando {
    position: relative;
}

.wm-nav-link.is-carregando::after,
.wm-nav-sublink.is-carregando::after {
    content: '';
    position: absolute;
    right: 0.75rem;
    top: 50%;
    width: 0.75rem;
    height: 0.75rem;
    margin-top: -0.375rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    opacity: 0.75;
    animation: wm-nav-spin 0.6s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
    #wm-nav-progress { transition: none !important; }

    .wm-nav-link.is-carregando::after,
    .wm-nav-sublink.is-carregando::after {
        animation: none;
    }
}
