/**
 * eFixOS — camada sobre Foundation Sites 6
 * Layout da aplicação + aliases para classes usadas nas views
 */

:root {
    --efixos-sidebar-width: 280px;
    --efixos-sidebar-bg: #000a34;
    --efixos-sidebar-active: #10315f;
    --efixos-topbar-height: 3.5rem;
    --efixos-content-bg: #f3f3f3;
}

html,
body {
    height: 100%;
    font-family: "Inter", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
}

body {
    background: var(--efixos-content-bg);
}

/* ——— Shell ——— */
.app-shell {
    min-height: 100vh;
}

.app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    width: var(--efixos-sidebar-width);
    height: 100vh;
    overflow-y: auto;
    background: var(--efixos-sidebar-bg);
    color: #fff;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
}

@media print, screen and (min-width: 64em) {
    .app-sidebar {
        transform: translateX(0);
    }
}

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

.app-main {
    min-height: 100vh;
}

@media print, screen and (min-width: 64em) {
    .app-main {
        margin-left: var(--efixos-sidebar-width);
    }
}

.app-content {
    padding: 1.25rem;
}

@media print, screen and (min-width: 40em) {
    .app-content {
        padding: 1.5rem 2rem;
    }
}

#sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(0, 0, 0, 0.55);
}

#sidebar-overlay.is-visible {
    display: block;
}

/* ——— Sidebar ——— */
.sidebar-brand {
    flex-shrink: 0;
    padding: 1rem 1.15rem 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand-mark {
    display: inline-block;
    padding: 0.45rem 0.55rem;
    border-radius: 0.45rem;
    background: #fff;
    line-height: 0;
}

.sidebar-brand-logo-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.sidebar-brand-logo-link:hover,
.sidebar-brand-logo-link:focus {
    opacity: 0.92;
}

/* ——— Marca eFixOS (logo) ——— */
.brand-logo {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.brand-logo--full {
    max-width: 220px;
}

.brand-logo--sidebar {
    width: 100%;
    max-width: 100%;
    max-height: 2.35rem;
    object-fit: contain;
    object-position: left center;
}

.brand-logo--compact {
    max-width: 7.5rem;
    max-height: 2rem;
}

.brand-logo--mark {
    max-width: 2.5rem;
    max-height: 2.5rem;
    object-position: left center;
    object-fit: cover;
}

.brand-logo-link {
    display: inline-block;
    line-height: 0;
}

.brand-logo-surface {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    background: #fff;
    line-height: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.brand-logo-surface--sidebar {
    display: block;
    width: 100%;
    padding: 0.55rem 0.65rem;
    text-align: center;
}

.brand-logo--auth {
    width: 100%;
    max-width: 260px;
    max-height: 3.25rem;
    object-fit: contain;
    object-position: left center;
    margin-bottom: 1.5rem;
}

.brand-logo--custom {
    width: auto;
    height: auto;
}

.topbar-start {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.topbar-brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 1;
    min-width: 0;
    text-decoration: none;
    line-height: 0;
}

.sidebar-search {
    padding: 0.75rem 1.25rem;
}

.sidebar-search .button {
    width: 100%;
    margin: 0;
    text-align: left;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar-search .button:hover {
    background: rgba(255, 255, 255, 0.12);
}

.sidebar-menu {
    flex: 1;
    padding: 0.5rem 0.75rem 1rem;
    overflow-y: auto;
}

.sidebar-menu .menu {
    background: transparent;
}

.sidebar-menu .menu a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.5rem;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.3;
}

.sidebar-menu .menu a:hover,
.sidebar-menu .menu .is-active > a {
    background: var(--efixos-sidebar-active);
    color: #fff;
}

.sidebar-menu .menu svg {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    opacity: 0.85;
}

.sidebar-footer {
    margin-top: auto;
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer .button,
.sidebar-footer button.button {
    width: 100%;
    margin: 0 0 0.5rem;
    text-align: left;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-footer .button:last-child {
    margin-bottom: 0;
}

.sidebar-footer .button.is-active-footer {
    background: var(--efixos-sidebar-active);
    border-color: rgba(255, 255, 255, 0.2);
}

.sidebar-version {
    margin: 0.65rem 0 0;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.45);
    text-align: center;
}

/* ——— Topbar (apenas mobile/tablet) ——— */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--efixos-topbar-height);
    padding: 0.45rem 0.85rem;
    background: var(--efixos-content-bg);
    border-bottom: 1px solid #e2e8f0;
}

@media print, screen and (min-width: 64em) {
    .topbar {
        display: none;
    }
}

.topbar-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    margin: 0;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    background: #fff;
    color: #0a2540;
    cursor: pointer;
}

.topbar-menu-btn:hover,
.topbar-menu-btn:focus {
    border-color: #00a3c4;
    color: #0884a0;
}

.topbar-brand-mark {
    display: inline-block;
    padding: 0.3rem 0.45rem;
    border-radius: 0.4rem;
    background: #fff;
    line-height: 0;
    box-shadow: 0 1px 2px rgba(10, 37, 64, 0.06);
}

.show-for-mobile-nav {
    display: inline-block;
}

@media print, screen and (min-width: 64em) {
    .show-for-mobile-nav {
        display: none;
    }
}

/* ——— Command palette ——— */
.command-palette {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 70;
    align-items: flex-start;
    justify-content: center;
    padding: 5rem 1rem 1rem;
    background: rgba(10, 10, 30, 0.55);
}

.command-palette.is-open {
    display: flex;
}

.command-palette-panel {
    width: 100%;
    max-width: 36rem;
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.command-palette-list {
    list-style: none;
    margin: 0;
    max-height: 20rem;
    overflow-y: auto;
    padding: 0.5rem;
}

.command-palette-list a {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 0.35rem;
    color: #333;
}

.command-palette-list a:hover {
    background: #f1f1f1;
}

/* ——— Mobile bottom nav ——— */
.mobile-bottom-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 30;
    border-top: 1px solid #e6e6e6;
    background: #fff;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

@media print, screen and (min-width: 64em) {
    .mobile-bottom-nav {
        display: none;
    }

    .app-content {
        padding-bottom: 1.5rem;
    }
}

@media screen and (max-width: 63.99875em) {
    .app-content {
        padding-bottom: 4.5rem;
    }
}

.mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.5rem 0.25rem;
    font-size: 0.65rem;
    font-weight: 600;
    color: #666;
    text-align: center;
}

.mobile-bottom-nav a.is-active {
    color: #1779ba;
}

/* ——— Aliases de componentes (views existentes) ——— */
.card {
    padding: 1.25rem;
    margin-bottom: 1rem;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.btn-primary,
button.btn-primary {
    background-color: #1779ba;
    color: #fff;
}

.btn-primary:hover,
button.btn-primary:hover {
    background-color: #1468a0;
}

.btn-secondary,
button.btn-secondary {
    background-color: #767676;
    color: #fff;
}

.btn-ghost,
button.btn-ghost {
    background: transparent;
    color: #1779ba;
    border: 1px solid transparent;
}

.btn-ghost:hover {
    background: #f1f1f1;
}

.btn-danger,
button.btn-danger {
    background-color: #ec5840;
    color: #fff;
}

.btn-sm {
    font-size: 0.8rem;
    padding: 0.5em 0.85em;
}

.form-label,
label.form-label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.form-control,
.form-input,
.form-select,
.form-textarea {
    display: block;
    width: 100%;
    margin-bottom: 0;
}

.form-field {
    margin-bottom: 1rem;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e6e6e6;
}

.form-section {
    margin-bottom: 1.5rem;
}

.form-section-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e6e6e6;
}

.form-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #666;
}

.form-section-description {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #666;
}

.form-hint {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #666;
}

.form-error {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #ec5840;
}

.form-error-summary {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid #f5adad;
    border-radius: 0.35rem;
    background: #fcecec;
    color: #8a1f11;
}

/* Campo com ícone (busca de cliente, produtos, etc.) */
.input-icon-field {
    position: relative;
}

.input-icon-control {
    padding-right: 2.5rem !important;
}

.input-icon-addon {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    transform: translateY(-50%);
    pointer-events: none;
    color: #9ca3af;
    font-size: 1rem;
    line-height: 1;
}

.input-icon-addon svg {
    display: block;
    width: 1.15rem;
    height: 1.15rem;
}

.input-icon-results {
    position: absolute;
    top: calc(100% + 0.25rem);
    right: 0;
    left: 0;
    z-index: 30;
    max-height: 16rem;
    margin: 0;
    padding: 0.25rem 0;
    overflow-y: auto;
    list-style: none;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.input-icon-results li,
.input-icon-results [role="option"] {
    padding: 0.55rem 0.85rem;
    font-size: 0.875rem;
    cursor: pointer;
}

.input-icon-results li:hover,
.input-icon-results [role="option"]:hover,
.input-icon-results [role="option"].is-active,
.input-icon-results [role="option"][aria-selected="true"] {
    background: #f3f6fb;
}

.input-icon-results .picker-result-title {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
}

.input-icon-results .picker-result-sub {
    margin: 0.1rem 0 0;
    font-size: 0.75rem;
    color: #6b7280;
}

.form-hint.is-warning {
    color: #b45309;
}

.customer-picker-field {
    margin-bottom: 0;
}

.customer-picker-selected {
    margin-top: 0.35rem;
    padding: 0.85rem 1rem;
    border: 1px solid #bfdbfe;
    border-radius: 0.5rem;
    background: #eff6ff;
}

.customer-picker-selected-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.customer-picker-selected-name {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #111827;
}

.customer-picker-selected-sub {
    margin: 0.15rem 0 0;
    font-size: 0.75rem;
    color: #6b7280;
}

.customer-picker-clear {
    flex-shrink: 0;
    margin: 0;
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
}

.alert-success,
.callout.alert-success {
    background: #e1f7e9;
    border-color: #a8ddb5;
    color: #0f5132;
}

.alert-danger,
.callout.alert-danger {
    background: #fcecec;
    border-color: #f5adad;
    color: #8a1f11;
}

.alert-warning {
    background: #fff3cd;
    border-color: #ffe69c;
    color: #664d03;
}

.alert-info {
    background: #e8f4fc;
    border-color: #b8daff;
    color: #0c5460;
}

.alert,
.alert-success,
.alert-danger,
.alert-warning,
.alert-info {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid transparent;
    border-radius: 0.35rem;
}

/* ——— Toasts / mensagens do sistema ——— */
.app-flash-stack {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    pointer-events: none;
}

.app-flash-stack--fixed {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 90;
    width: min(22rem, calc(100vw - 2rem));
}

.app-flash-stack--inline {
    width: 100%;
    margin-bottom: 1rem;
    pointer-events: auto;
}

.app-toast {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.9rem 2.75rem 0.9rem 0.9rem;
    border-radius: 0.65rem;
    border: 1px solid transparent;
    background: #fff;
    box-shadow:
        0 4px 6px -1px rgba(10, 37, 64, 0.08),
        0 12px 28px -8px rgba(10, 37, 64, 0.18);
    overflow: hidden;
    pointer-events: auto;
    animation: appToastIn 0.35s ease-out;
}

.app-toast.is-leaving {
    animation: appToastOut 0.28s ease-in forwards;
}

@keyframes appToastIn {
    from {
        opacity: 0;
        transform: translateX(1rem);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes appToastOut {
    to {
        opacity: 0;
        transform: translateX(0.75rem);
    }
}

.app-toast-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.5rem;
}

.app-toast-body {
    flex: 1;
    min-width: 0;
}

.app-toast-title {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.app-toast-message {
    margin: 0.2rem 0 0;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #334155;
}

.app-toast-message--lead {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
}

.app-toast-close {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0.4rem;
    background: transparent;
    color: inherit;
    opacity: 0.55;
    cursor: pointer;
    transition: opacity 0.15s ease, background 0.15s ease;
}

.app-toast-close:hover,
.app-toast-close:focus {
    opacity: 1;
    background: rgba(0, 0, 0, 0.06);
}

.app-toast-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    transform-origin: left center;
    animation: appToastProgress 6s linear forwards;
}

.app-toast--error .app-toast-progress {
    animation-duration: 9s;
}

@keyframes appToastProgress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

.app-toast--success {
    border-color: #a7f3d0;
    background: linear-gradient(135deg, #fff 0%, #f0fdf4 100%);
}

.app-toast--success .app-toast-icon {
    background: #dcfce7;
    color: #059669;
}

.app-toast--success .app-toast-title {
    color: #047857;
}

.app-toast--success .app-toast-progress {
    background: #34d399;
}

.app-toast--error {
    border-color: #fecaca;
    background: linear-gradient(135deg, #fff 0%, #fef2f2 100%);
}

.app-toast--error .app-toast-icon {
    background: #fee2e2;
    color: #dc2626;
}

.app-toast--error .app-toast-title {
    color: #b91c1c;
}

.app-toast--error .app-toast-progress {
    background: #f87171;
}

.app-toast--warning {
    border-color: #fde68a;
    background: linear-gradient(135deg, #fff 0%, #fffbeb 100%);
}

.app-toast--warning .app-toast-icon {
    background: #fef3c7;
    color: #d97706;
}

.app-toast--warning .app-toast-title {
    color: #b45309;
}

.app-toast--warning .app-toast-progress {
    background: #fbbf24;
}

.app-toast--info {
    border-color: #bae6fd;
    background: linear-gradient(135deg, #fff 0%, #f0f9ff 100%);
}

.app-toast--info .app-toast-icon {
    background: #e0f2fe;
    color: #0284c7;
}

.app-toast--info .app-toast-title {
    color: #0369a1;
}

.app-toast--info .app-toast-progress {
    background: #38bdf8;
}

@media screen and (max-width: 39.99875em) {
    .app-flash-stack--fixed {
        top: auto;
        bottom: 4.75rem;
        left: 1rem;
        right: 1rem;
        width: auto;
    }

    .app-toast {
        animation-name: appToastInMobile;
    }

    @keyframes appToastInMobile {
        from {
            opacity: 0;
            transform: translateY(0.75rem);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

.table-smart,
.table-modern {
    width: 100%;
    margin-bottom: 0;
    border-collapse: collapse;
    background: #fff;
}

.table-smart thead,
.table-modern thead {
    background: #f8f8f8;
    border-bottom: 2px solid #e6e6e6;
}

.table-smart th,
.table-smart td,
.table-modern th,
.table-modern td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #e6e6e6;
}

.badge-status,
.status-chip {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-open { background: #ffda6a; color: #333; }
.status-progress { background: #1779ba; color: #fff; }
.status-pending { background: #ffae00; color: #fff; }
.status-completed { background: #3adb76; color: #fff; }
.status-cancelled { background: #ec5840; color: #fff; }

.kpi-card,
.kpi-inline {
    padding: 1rem 0;
}

.kpi-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.kpi-inline-label {
    margin: 0;
    font-size: 0.95rem;
    color: #666;
}

.kpi-inline-value {
    margin: 0.15rem 0 0;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    color: #0a0a0a;
}

.dashboard-table-wrap {
    background: #fff;
    border: 1px solid #d6d6d6;
    border-radius: 0.5rem;
    overflow: hidden;
}

.btn-view-pill {
    display: inline-block;
    padding: 0.35rem 1rem;
    border-radius: 999px;
    background: #4f46e5;
    color: #fff !important;
    font-size: 0.85rem;
    font-weight: 600;
}

.btn-view-pill:hover {
    background: #4338ca;
}

/* ——— Dashboard ——— */
.dashboard-page {
    max-width: 82rem;
    padding-bottom: 2rem;
}

.dashboard-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 1.35rem;
    padding: 1.35rem 1.5rem;
    border-radius: 0.85rem;
    border: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #fff 0%, #f8fafc 55%, #f0f7fa 100%);
    box-shadow: 0 1px 3px rgba(10, 37, 64, 0.06);
}

.dashboard-greeting {
    margin: 0 0 0.25rem;
    font-size: 0.875rem;
    color: #64748b;
}

.dashboard-greeting strong {
    color: #0f172a;
    font-weight: 600;
}

.dashboard-title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0a2540;
    line-height: 1.2;
}

.dashboard-subtitle {
    margin: 0.35rem 0 0;
    font-size: 0.875rem;
    color: #64748b;
}

.dashboard-hero-actions {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    align-self: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Botões do hero — mesma altura, raio e alinhamento */
.dashboard-hero-actions > .button,
.dashboard-hero-actions > a.button,
.dashboard-hero-actions > button.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin: 0;
    min-height: 2.5rem;
    padding: 0.65rem 1.1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    vertical-align: middle;
}

.dashboard-hero-actions > .button.secondary,
.dashboard-hero-actions > a.button.secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.dashboard-hero-actions > .button.secondary:hover,
.dashboard-hero-actions > .button.secondary:focus,
.dashboard-hero-actions > a.button.secondary:hover,
.dashboard-hero-actions > a.button.secondary:focus {
    background: #e2e8f0;
    color: #334155;
}

.dashboard-hero-actions > .button.hollow,
.dashboard-hero-actions > a.button.hollow,
.dashboard-hero-actions .dashboard-cta-secondary.button {
    background: #fff;
    color: #0a2540;
    border: 1px solid #cbd5e1;
}

.dashboard-hero-actions > .button.hollow:hover,
.dashboard-hero-actions > .button.hollow:focus,
.dashboard-hero-actions > a.button.hollow:hover,
.dashboard-hero-actions > a.button.hollow:focus,
.dashboard-hero-actions .dashboard-cta-secondary.button:hover,
.dashboard-hero-actions .dashboard-cta-secondary.button:focus {
    background: #f8fafc;
    color: #0884a0;
    border-color: #00a3c4;
}

.dashboard-cta-primary.button {
    box-shadow: 0 4px 14px rgba(0, 163, 196, 0.28);
}

.dashboard-shortcuts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
    margin-bottom: 1.25rem;
}

@media print, screen and (min-width: 40em) {
    .dashboard-shortcuts {
        grid-template-columns: repeat(4, 1fr);
    }
}

.dashboard-shortcut {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 0.85rem;
    border-radius: 0.65rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 600;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.dashboard-shortcut:hover {
    border-color: #00a3c4;
    box-shadow: 0 4px 12px rgba(0, 163, 196, 0.12);
    color: #0a2540;
    transform: translateY(-1px);
}

.dashboard-shortcut--alert {
    border-color: #fecaca;
    background: #fffbfb;
}

.dashboard-shortcut--alert:hover {
    border-color: #f87171;
}

.dashboard-shortcut-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    flex-shrink: 0;
    border-radius: 0.5rem;
    background: #f1f5f9;
    color: #475569;
}

.dashboard-shortcut-icon--teal {
    background: rgba(0, 163, 196, 0.12);
    color: #0884a0;
}

.dashboard-shortcut-icon--amber {
    background: #fef3c7;
    color: #b45309;
}

.dashboard-shortcut-icon--navy {
    background: rgba(10, 37, 64, 0.08);
    color: #0a2540;
}

.dashboard-shortcut-badge {
    position: absolute;
    top: 0.4rem;
    right: 0.45rem;
    min-width: 1.25rem;
    padding: 0.1rem 0.35rem;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
}

.dashboard-kpi-row {
    margin-bottom: 1rem;
}

.dashboard-insights {
    margin-bottom: 1.5rem;
}

.dashboard-insights.medium-up-3 .cell {
    margin-bottom: 0.65rem;
}

.kpi-card {
    display: block;
    position: relative;
    height: 100%;
    padding: 1.15rem 1.25rem;
    border-radius: 0.85rem;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.kpi-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #d1d5db;
}

.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
    color: inherit;
}

.kpi-card--primary::before { background: linear-gradient(90deg, #0a2540, #00a3c4); }
.kpi-card--warning::before { background: linear-gradient(90deg, #d97706, #fbbf24); }
.kpi-card--success::before { background: linear-gradient(90deg, #059669, #34d399); }
.kpi-card--revenue::before { background: linear-gradient(90deg, #0884a0, #22d3ee); }

.kpi-card-body {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.kpi-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    font-size: 1.35rem;
    background: #f3f4f6;
    flex-shrink: 0;
}

.kpi-card-icon--svg {
    color: #475569;
}

.kpi-card--primary .kpi-card-icon { background: rgba(0, 163, 196, 0.12); color: #0884a0; }
.kpi-card--warning .kpi-card-icon { background: #fef3c7; color: #b45309; }
.kpi-card--success .kpi-card-icon { background: #dcfce7; color: #059669; }
.kpi-card--revenue .kpi-card-icon { background: rgba(0, 163, 196, 0.1); color: #0884a0; }

.kpi-card-label {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
}

.kpi-card-label--full {
    display: block;
    margin-bottom: 0.85rem;
    white-space: normal;
    line-height: 1.3;
}

.kpi-card--warning {
    padding-bottom: 1rem;
}

.kpi-card--warning:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.kpi-card-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}

.kpi-card-metric {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.75rem 0.65rem;
    border-radius: 0.6rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    color: inherit;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.kpi-card-metric:hover {
    background: #fff;
    border-color: #d1d5db;
    color: inherit;
}

.kpi-card-metric--alert {
    background: #fef2f2;
    border-color: #fecaca;
}

.kpi-card-metric--alert:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}

.kpi-card-metric-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
    color: #111827;
}

.kpi-card-metric--alert .kpi-card-metric-value {
    color: #b91c1c;
}

.kpi-card-metric-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #374151;
    line-height: 1.25;
}

.kpi-card-metric-hint {
    font-size: 0.68rem;
    color: #9ca3af;
    line-height: 1.3;
}

.kpi-card-value {
    margin: 0.2rem 0 0;
    font-size: 2.15rem;
    font-weight: 700;
    line-height: 1.1;
    color: #111827;
}

.kpi-card-value--money {
    font-size: 1.65rem;
}

.kpi-card-hint {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
    color: #9ca3af;
    line-height: 1.35;
}

.kpi-hint-in,
.kpi-hint-out {
    display: inline-block;
    margin-right: 0.5rem;
}

.kpi-hint-in { color: #059669; }
.kpi-hint-out { color: #dc2626; }

.dashboard-insights .insight-pill {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    height: 100%;
    padding: 0.9rem 1rem;
    border-radius: 0.65rem;
    border: 1px solid #e5e7eb;
    background: #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.insight-pill-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    flex-shrink: 0;
    border-radius: 0.5rem;
    background: #f1f5f9;
    color: #64748b;
}

.insight-pill-icon--alert {
    background: #fef2f2;
    color: #dc2626;
}

.insight-pill-content {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-width: 0;
}

.insight-pill--link {
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
}

.insight-pill--link:hover {
    background: #f9fafb;
    color: inherit;
}

.insight-pill--alert {
    border-color: #fecaca;
    background: #fef2f2;
}

.insight-pill-label {
    font-size: 0.8rem;
    color: #6b7280;
}

.insight-pill strong {
    font-size: 1rem;
    color: #111827;
}

.dashboard-panel {
    margin-top: 0.5rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.85rem;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.dashboard-panel:has(.table-scroll--actions) {
    overflow: visible;
}

.dashboard-panel-header {
    padding: 1.35rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
}

.dashboard-panel .table-scroll {
    padding: 0 0.5rem 0.5rem;
}

.dashboard-panel .table-scroll--actions {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem 0 1.25rem;
    margin: 0 0.25rem;
}

.dashboard-panel .callout {
    margin: 1.25rem 1.5rem;
}

.dashboard-panel-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}

.dashboard-panel-sub {
    margin-top: 0.2rem;
    font-size: 0.8125rem;
    color: #64748b;
}

.dashboard-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2.5rem 1.5rem 2.75rem;
}

.dashboard-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    margin-bottom: 1rem;
    border-radius: 50%;
    background: #f1f5f9;
    color: #94a3b8;
}

.dashboard-empty-title {
    margin: 0 0 0.35rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}

.dashboard-empty-text {
    margin: 0 0 1.25rem;
    max-width: 22rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #64748b;
}

.dashboard-table thead {
    background: #f9fafb;
}

.dashboard-table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    font-weight: 700;
    border-bottom: 2px solid #e5e7eb;
}

.dashboard-table td {
    vertical-align: middle;
    font-size: 0.9rem;
    padding: 0.85rem 1rem;
}

.dashboard-table th {
    padding: 0.75rem 1rem;
}

.dashboard-table .os-number {
    font-weight: 600;
    color: #0884a0;
    text-decoration: none;
}

.dashboard-table .os-number:hover {
    text-decoration: underline;
}

.dashboard-table .text-muted {
    color: #6b7280;
    font-size: 0.85rem;
}

.dashboard-table .text-right {
    text-align: right;
}

/* ——— Lista de ordens de serviço ——— */
.os-list-page .dashboard-panel {
    margin-bottom: 0;
}

.os-filters-panel {
    margin-bottom: 1.25rem;
}

.os-filters-body {
    padding: 1.25rem 1.5rem 1.5rem;
}

.os-status-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1.25rem;
}

.os-status-filter.label {
    margin: 0;
    padding: 0.4rem 0.75rem;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 999px;
    text-decoration: none;
    transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

.os-status-filter.label:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}

.os-status-filter.label.hollow {
    opacity: 0.92;
}

.os-status-filter.label:not(.hollow) {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9), 0 2px 8px rgba(15, 23, 42, 0.15);
}

.os-filter-form--search {
    margin: 0;
}

.os-filter-search-label {
    display: block;
    margin: 0 0 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
}

.os-search-bar {
    margin-bottom: 0;
}

.os-search-input.input-group-field {
    margin-bottom: 0;
}

.os-search-submit.button {
    margin-bottom: 0;
}

.os-active-filters {
    margin-top: 1rem !important;
}

.os-active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.os-active-filters-label {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 600;
}

.os-clear-filters {
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.25rem;
}

.os-empty-callout {
    margin: 1.25rem 1.5rem 1.5rem;
}

.os-list-table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.os-list-table th,
.os-list-table td {
    padding: 1.05rem 1.2rem;
    line-height: 1.45;
}

.os-list-table tbody tr:nth-child(even) {
    background: #fafbfc;
}

.os-list-table tbody tr:hover {
    background: #f3f6fb;
}

.os-list-table .os-col-os {
    min-width: 8.5rem;
    white-space: nowrap;
}

.os-list-table .os-col-customer {
    min-width: 10rem;
}

.os-list-table .os-col-equipment {
    min-width: 9rem;
    max-width: 16rem;
    word-break: break-word;
}

.os-list-table .os-col-tech {
    min-width: 7rem;
    white-space: nowrap;
}

.os-list-table .os-col-status {
    min-width: 8.5rem;
    white-space: nowrap;
}

.os-list-table .os-col-date {
    min-width: 6.5rem;
    white-space: nowrap;
}

.os-list-table .os-col-actions {
    position: sticky;
    right: 0;
    z-index: 2;
    min-width: 10.5rem;
    text-align: right;
    vertical-align: middle;
    background: #fff;
    box-shadow: -6px 0 10px rgba(15, 23, 42, 0.06);
}

.os-list-table thead .os-col-actions {
    z-index: 3;
    background: #f9fafb;
}

.os-list-table tbody tr:nth-child(even) .os-col-actions {
    background: #fafbfc;
}

.os-list-table tbody tr:hover .os-col-actions {
    background: #f3f6fb;
}

.os-list-table .os-number {
    font-weight: 700;
    color: #0884a0;
    text-decoration: none;
}

.os-list-table .os-number:hover {
    text-decoration: underline;
}

.os-action-btn--edit.button {
    background: #0a2540;
    border-color: #0a2540;
    color: #fff;
}

.os-action-btn--edit.button:hover {
    background: #10315f;
    color: #fff;
}

.os-row--overdue {
    background: #fffbfb !important;
}

.os-row--overdue:hover {
    background: #fef2f2 !important;
}

.os-row--overdue .os-col-actions {
    background: #fffbfb;
}

.os-row--overdue:hover .os-col-actions {
    background: #fef2f2;
}

.os-deadline-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
}

.os-deadline--late {
    font-weight: 600;
    color: #b91c1c;
}

.os-deadline-badge {
    margin: 0;
    font-size: 0.62rem;
    padding: 0.2rem 0.5rem;
}

.os-row-actions {
    display: inline-flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
}

.os-action-btn {
    margin-bottom: 0;
    padding: 0.5rem 0.9rem !important;
    font-size: 0.8rem !important;
    font-weight: 600;
    white-space: nowrap;
}

.os-action-btn--view {
    background: #1779ba;
}

.os-action-btn--view:hover {
    background: #12679e;
}

.os-action-btn--edit {
    color: #374151;
    border-color: #d1d5db;
}

@media screen and (max-width: 639px) {
    .os-row-actions {
        flex-direction: column;
        align-items: stretch;
        min-width: 5.5rem;
    }

    .os-action-btn {
        width: 100%;
    }
}

/* ——— Formulário de ordem de serviço (criar / editar) ——— */
.os-edit-page .dashboard-hero,
.os-show-page .dashboard-hero,
.os-list-page .dashboard-hero {
    margin-bottom: 1.25rem;
}

.os-edit-eyebrow {
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 0.35rem;
}

.os-edit-eyebrow a {
    color: #1779ba;
    text-decoration: none;
}

.os-edit-eyebrow a:hover {
    text-decoration: underline;
}

.os-edit-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.os-edit-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.os-edit-layout {
    align-items: flex-start;
}

.os-edit-sidebar {
    position: sticky;
    top: 1rem;
    margin-bottom: 1.5rem;
}

.os-edit-sidebar-block {
    padding: 1.25rem 1.35rem 0.5rem;
}

.os-edit-sidebar-title {
    margin: 0 0 0.85rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
}

.os-meta-list {
    margin: 0;
}

.os-meta-list > div {
    margin-bottom: 0.85rem;
}

.os-meta-list dt {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #9ca3af;
}

.os-meta-list dd {
    margin: 0.15rem 0 0;
    font-size: 0.92rem;
    color: #111827;
}

.os-meta-list--alert {
    color: #b91c1c;
    font-weight: 600;
}

.os-edit-sidebar-hint {
    margin: 0 1rem 1.25rem;
    padding: 0.85rem 1rem;
    font-size: 0.85rem;
}

.os-create-steps {
    margin: 0;
    padding: 0 1.35rem 0.5rem;
    list-style: none;
}

.os-create-steps li {
    margin-bottom: 0.5rem;
}

.os-create-step-link {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    width: 100%;
    margin: 0;
    padding: 0.55rem 0.65rem;
    border: 1px solid transparent;
    border-radius: 0.55rem;
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.os-create-step-link:hover {
    background: #f3f6fb;
    border-color: #dbeafe;
}

.os-create-step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.os-create-step-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.os-create-step-text strong {
    font-size: 0.82rem;
    color: #111827;
    line-height: 1.3;
}

.os-create-step-text small {
    font-size: 0.72rem;
    color: #9ca3af;
}

.os-create-layout {
    margin-top: 0;
}

.os-create-sidebar {
    position: sticky;
    top: 1rem;
    padding: 1.15rem 1.1rem;
    margin-bottom: 0;
}

.os-create-sidebar-title {
    margin: 0 0 1rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
}

.os-create-steps {
    margin: 0;
    padding: 0;
    list-style: none;
}

.os-create-step-link.is-active {
    background: rgba(0, 163, 196, 0.1);
    border-color: rgba(0, 163, 196, 0.35);
}

.os-create-step-link.is-active .os-create-step-num {
    background: #00a3c4;
    color: #fff;
}

.os-create-step-link.is-active .os-create-step-text strong {
    color: #0884a0;
}

.os-create-preview {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.os-create-preview-label {
    margin: 0;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.os-create-preview-value {
    margin: 0.25rem 0 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0a2540;
    line-height: 1.1;
}

.os-create-preview-hint {
    margin: 0.35rem 0 0;
    font-size: 0.75rem;
    color: #94a3b8;
}

.os-create-steps-mobile {
    margin-bottom: 0.75rem;
    padding: 0.65rem 0.75rem;
    overflow: hidden;
}

.os-create-steps-mobile-inner {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.os-create-step-pill {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    padding: 0.45rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
}

.os-create-step-pill.is-active {
    border-color: #00a3c4;
    background: rgba(0, 163, 196, 0.12);
    color: #0884a0;
}

.os-create-step-pill .os-create-step-num {
    width: 1.25rem;
    height: 1.25rem;
    font-size: 0.65rem;
}

.os-form-panel--create {
    margin-bottom: 0;
}

.os-form-tabs--create .os-form-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.os-form-tab-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 999px;
    background: #e2e8f0;
    font-size: 0.7rem;
    font-weight: 700;
    color: #475569;
}

.os-form-tab.is-active .os-form-tab-num {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.os-form-block-head {
    margin-bottom: 1.15rem;
}

.os-form-block-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}

.os-form-block-desc {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.45;
}

.os-form-error-banner {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1.15rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 0.88rem;
    font-weight: 500;
}

.os-form-schedule-block {
    margin-top: 0.25rem;
    padding-top: 1.15rem;
    border-top: 1px dashed #e2e8f0;
}

.os-form-footer-sticky {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0;
    padding: 1rem 1.5rem 1.25rem;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
    border-radius: 0 0 0.85rem 0.85rem;
}

.os-form-footer-summary-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.os-form-footer-summary-value {
    display: block;
    margin-top: 0.15rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: #0a2540;
}

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

.os-form-footer-actions .button {
    margin: 0;
}

.os-upload-zone-icon {
    display: block;
    margin: 0 auto 0.75rem;
    color: #94a3b8;
}

.os-create-step-num {
    background: #e0f2f8;
    color: #0884a0;
}

.os-form-subsection {
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}

.os-form-panel {
    overflow: visible;
}

.os-form-panel .os-form {
    padding: 0;
}

.os-form-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    overflow-x: auto;
    padding: 1rem 1.25rem 0.85rem;
    margin-bottom: 0;
    border-bottom: 1px solid #e5e7eb;
    -webkit-overflow-scrolling: touch;
}

.os-form-tab {
    flex-shrink: 0;
    margin: 0;
    padding: 0.55rem 1rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    font-size: 0.85rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.os-form-tab:hover {
    background: #f3f4f6;
    color: #374151;
}

.os-form-tab.is-active {
    background: #00a3c4;
    border-color: #00a3c4;
    color: #fff;
}

.os-form-body {
    padding: 1.25rem 1.5rem 0.5rem;
}

.os-form-section {
    margin-bottom: 1.75rem;
}

.os-form-section.is-hidden {
    display: none !important;
}

.os-form .form-section-header {
    margin-bottom: 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid #f3f4f6;
}

.os-form .form-section-title {
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    text-transform: none;
    color: #111827;
}

.os-form .form-section-description {
    color: #6b7280;
}

.os-form .grid-x .cell {
    margin-bottom: 1rem;
}

.os-form .form-actions {
    margin: 0;
    padding: 1.15rem 1.5rem 1.35rem;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    border-radius: 0 0 0.85rem 0.85rem;
}

.os-upload-zone {
    padding: 2rem 1.5rem;
    border: 2px dashed #d1d5db;
    border-radius: 0.75rem;
    background: #fafbfc;
    text-align: center;
}

.os-upload-zone p:first-child {
    margin-bottom: 0.35rem;
    font-weight: 600;
    color: #374151;
}

.os-items-section {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.os-items-search-panel {
    padding: 1.15rem 1.25rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.65rem;
    background: #fafbfc;
}

.os-items-search-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
}

.os-items-search-field {
    margin-bottom: 1rem;
}

.os-items-search-field .input-icon-control {
    min-height: 2.75rem;
    font-size: 0.95rem;
}

.os-items-add-row .cell {
    margin-bottom: 0;
}

.os-items-list-panel {
    border: 1px solid #e5e7eb;
    border-radius: 0.65rem;
    background: #fff;
    overflow: hidden;
}

.os-items-list-header {
    padding: 0.9rem 1.15rem;
    border-bottom: 1px solid #f3f4f6;
    background: #f9fafb;
}

.os-items-list-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #111827;
}

.os-items-table-wrap {
    position: relative;
    min-height: 6rem;
}

.os-items-table {
    margin-bottom: 0;
}

.os-items-table th,
.os-items-table td {
    padding: 1rem 1.15rem;
    font-size: 0.88rem;
    vertical-align: middle;
}

.os-items-table thead th {
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}

.os-items-table .os-col-product {
    width: 42%;
}

.os-items-table .os-col-qty {
    width: 8%;
    white-space: nowrap;
}

.os-items-table .os-col-price {
    width: 14%;
    white-space: nowrap;
}

.os-items-table .os-col-subtotal {
    width: 14%;
    white-space: nowrap;
}

.os-items-table .os-col-actions {
    width: 12%;
}

.os-items-table .item-cell-qty,
.os-items-table .item-cell-price,
.os-items-table .item-cell-subtotal {
    font-variant-numeric: tabular-nums;
}

.os-items-table .item-cell-qty {
    font-weight: 600;
    color: #374151;
}

.os-items-table .item-cell-price,
.os-items-table .item-cell-subtotal {
    font-weight: 600;
    color: #111827;
}

.os-items-table tbody tr.is-editing {
    background: #eff6ff !important;
}

.os-items-table tbody tr.is-editing td {
    box-shadow: inset 0 0 0 1px #93c5fd;
}

.os-item-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
}

.os-item-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    margin: 0;
    padding: 0;
    border: 1px solid #e5e7eb;
    border-radius: 0.45rem;
    background: #fff;
    color: #6b7280;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.os-item-action svg {
    width: 1.05rem;
    height: 1.05rem;
}

.os-item-action:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #111827;
}

.os-item-action--edit:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1779ba;
}

.os-item-action--remove:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.os-item-edit-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-left: 3px solid #94a3b8;
    border-radius: 0.5rem;
    background: #f8fafc;
    color: #334155;
    font-size: 0.82rem;
    line-height: 1.3;
}

.os-item-edit-banner__text {
    font-weight: 600;
}

.os-item-edit-banner__action {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #475569;
    font-size: 0.79rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: underline;
    cursor: pointer;
}

.os-item-edit-banner__action:hover,
.os-item-edit-banner__action:focus {
    color: #0f172a;
}

.os-items-table .item-display-name {
    margin: 0 0 0.25rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: #111827;
}

.os-items-table .item-display-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.os-items-table .item-display-meta .label {
    margin: 0;
    font-size: 0.62rem;
}

.os-items-table .item-display-sku {
    font-size: 0.75rem;
    color: #6b7280;
}


.os-items-empty {
    display: none;
    padding: 2rem 1.25rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
    border-top: 1px solid #f3f4f6;
}

.os-items-empty.is-visible {
    display: block;
}

.os-items-empty p {
    margin: 0;
}

.os-items-totals {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 1.5rem;
    padding: 0.9rem 1.15rem;
    border-top: 1px solid #e5e7eb;
    background: #f3f6fb;
    font-size: 0.88rem;
}

.os-items-totals > div {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
}

.os-items-totals > div span {
    color: #6b7280;
}

.os-items-totals-grand {
    font-size: 1rem;
}

.os-items-totals-grand strong {
    color: #0884a0;
    font-size: 1.1rem;
}

.os-items-table.is-hidden {
    display: none;
}

/* ——— Detalhes da OS (show) ——— */
.os-show-layout {
    margin-top: 0;
}

.os-show-main {
    overflow: hidden;
    padding: 0;
}

.os-show-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    overflow-x: auto;
    padding: 1rem 1.25rem 0.85rem;
    border-bottom: 1px solid #e5e7eb;
    -webkit-overflow-scrolling: touch;
}

.os-show-tab {
    flex-shrink: 0;
    margin: 0;
    padding: 0.55rem 1rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.os-show-tab:hover {
    background: #f1f5f9;
    color: #334155;
}

.os-show-tab.is-active {
    background: #00a3c4;
    border-color: #00a3c4;
    color: #fff;
}

.os-show-body {
    padding: 1.35rem 1.5rem 1.5rem;
}

.os-show-panel.is-hidden {
    display: none !important;
}

.os-show-section-title {
    margin: 0 0 0.65rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.os-show-lead {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: #0f172a;
}

.os-show-meta {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    color: #64748b;
}

.os-show-text {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #334155;
}

.os-show-dl {
    margin: 0;
}

.os-show-dl dt {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
}

.os-show-dl dd {
    margin: 0.15rem 0 0.85rem;
    font-size: 0.95rem;
    color: #0f172a;
}

.os-show-link-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.os-show-link-list li + li {
    margin-top: 0.35rem;
}

.os-show-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.os-show-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 0;
}

@media (min-width: 640px) {
    .os-show-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.os-show-cards-col {
    min-width: 0;
}

.os-show-info-card {
    height: 100%;
    padding: 1rem 1.1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #f8fafc;
}

.os-show-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.os-show-dl--compact .os-show-dl-row {
    display: grid;
    grid-template-columns: minmax(5.5rem, 38%) 1fr;
    gap: 0.35rem 0.75rem;
    align-items: baseline;
    margin-bottom: 0.65rem;
}

.os-show-dl--compact .os-show-dl-row:last-child {
    margin-bottom: 0;
}

.os-show-dl--compact dt {
    margin: 0;
}

.os-show-dl--compact dd {
    margin: 0;
}

.os-show-budget-card {
    background: #fff;
}

.os-show-budget-total {
    font-size: 1.45rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.os-show-hero-actions {
    flex-wrap: wrap;
}

.os-manage-divider {
    margin: 1rem 0;
    border-color: #e5e7eb;
}

.os-show-notes {
    margin-bottom: 0;
}

.os-show-items-table th.text-right,
.os-show-items-table td.text-right {
    text-align: right;
}

.os-history-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.os-history-list li {
    padding: 0.85rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.os-history-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.os-history-text {
    margin: 0;
    font-size: 0.95rem;
    color: #0f172a;
}

.os-history-meta {
    margin: 0.25rem 0 0;
    font-size: 0.8rem;
    color: #94a3b8;
}

.os-timeline {
    margin: 0;
    padding: 0;
    list-style: none;
}

.os-timeline-step {
    position: relative;
    padding: 0 0 1.1rem 1.25rem;
    border-left: 2px solid #e2e8f0;
}

.os-timeline-step:last-child {
    padding-bottom: 0;
}

.os-timeline-step::before {
    content: "";
    position: absolute;
    left: -0.4rem;
    top: 0.2rem;
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    background: #e2e8f0;
    border: 2px solid #fff;
}

.os-timeline-step--done {
    border-left-color: #99d9e8;
}

.os-timeline-step--done::before {
    background: #00a3c4;
}

.os-timeline-step--current {
    border-left-color: #00a3c4;
}

.os-timeline-step--current::before {
    background: #0a2540;
    box-shadow: 0 0 0 3px rgba(0, 163, 196, 0.25);
}

.os-timeline-step strong {
    display: block;
    font-size: 0.88rem;
    color: #0f172a;
}

.os-timeline-step span {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.8rem;
    color: #64748b;
}

.os-manage-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.os-manage-card {
    padding: 1.15rem 1.25rem;
    margin-bottom: 0;
}

.os-manage-total {
    background: linear-gradient(135deg, #0a2540 0%, #10315f 100%);
    border: none;
    color: #fff;
}

.os-manage-kicker {
    margin: 0;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.7);
}

.os-manage-total-value {
    margin: 0.35rem 0 0;
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.1;
    color: #fff;
}

.os-manage-total-meta {
    margin: 0.5rem 0 0;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.75);
}

.os-manage-title {
    margin: 0 0 0.85rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}

.os-manage-form select,
.os-manage-form input {
    margin-bottom: 0.75rem;
}

.os-manage-actions .button {
    margin-bottom: 0.5rem;
}

.input-icon-results .picker-result-empty {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: #6b7280;
    list-style: none;
}

.is-hidden {
    display: none !important;
}

@media screen and (max-width: 1023px) {
    .os-edit-sidebar {
        position: static;
    }
}

/* ——— Utilitários mínimos (views legadas com classes utilitárias) ——— */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-5 > * + * { margin-top: 1.25rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.w-full { width: 100%; }
.shrink-0 { flex-shrink: 0; }
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-2xl { font-size: 1.5rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.p-0 { padding: 0; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.max-w-xl { max-width: 36rem; }
.max-w-7xl { max-width: 80rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.overflow-x-auto { overflow-x: auto; }
.overflow-hidden { overflow: hidden; }
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.text-slate-500 { color: #666; }
.text-slate-600 { color: #555; }
.text-slate-700 { color: #444; }
.text-slate-900 { color: #0a0a0a; }
.bg-slate-50 { background: #f8f8f8; }
.bg-white { background: #fff; }
.rounded-none { border-radius: 0; }
.border-0 { border: 0; }
.divide-y > * + * { border-top: 1px solid #e6e6e6; }
.min-h-full { min-height: 100%; }
.min-w-0 { min-width: 0; }

@media print, screen and (min-width: 40em) {
    .grid-container { padding-left: 1rem; padding-right: 1rem; }
}

@media print, screen and (min-width: 40em) {
    .sm\:flex-row { flex-direction: row; }
    .sm\:items-center { align-items: center; }
    .sm\:p-5 { padding: 1.25rem; }
}

@media print, screen and (min-width: 64em) {
    .lg\:flex { display: flex !important; }
    .lg\:hidden { display: none !important; }
    .lg\:w-1\/2 { width: 50%; }
    .lg\:px-16 { padding-left: 4rem; padding-right: 4rem; }
}

@media print, screen and (min-width: 40em) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
}

@media print, screen and (min-width: 75em) {
    .xl\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

.grid.gap-4 { gap: 1rem; }
.grid.gap-6 { gap: 1.5rem; }

/* ——— Login ——— */
.auth-body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: #e8edf4;
    background-image:
        radial-gradient(ellipse 80% 50% at 20% 0%, rgba(0, 163, 196, 0.12), transparent),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(10, 37, 64, 0.08), transparent);
}

.auth-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem 1rem 2rem;
}

.auth-frame {
    display: grid;
    width: 100%;
    max-width: 56rem;
    overflow: hidden;
    border-radius: 1rem;
    background: #fff;
    box-shadow:
        0 4px 6px -1px rgba(10, 37, 64, 0.06),
        0 20px 40px -12px rgba(10, 37, 64, 0.14);
}

@media print, screen and (min-width: 64em) {
    .auth-frame {
        grid-template-columns: 1fr 1.05fr;
        min-height: 32rem;
    }
}

.auth-brand {
    display: none;
    position: relative;
    padding: 2.5rem 2.25rem;
    background: #fff;
    border-right: 1px solid #e2e8f0;
}

@media print, screen and (min-width: 64em) {
    .auth-brand {
        display: flex;
        align-items: center;
    }
}

.auth-brand::before {
    display: none;
}

.auth-brand-inner {
    position: relative;
    z-index: 1;
    width: 100%;
}

.auth-brand .brand-logo--auth {
    max-width: min(100%, 22rem);
    max-height: 5.5rem;
    margin-bottom: 2rem;
}

.auth-brand .brand-logo--auth.brand-logo--custom {
    max-width: min(100%, 24rem);
    max-height: 6.5rem;
}

.auth-brand-tagline {
    margin: 0 0 1.75rem;
    max-width: 22rem;
    font-size: 1.05rem;
    line-height: 1.55;
    font-weight: 500;
    color: #334155;
}

.auth-features {
    margin: 0;
    padding: 0;
    list-style: none;
}

.auth-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #475569;
}

.auth-feature-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: rgba(0, 163, 196, 0.12);
    color: #0a7a94;
}

.auth-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 1.75rem 2.25rem;
}

@media print, screen and (min-width: 40em) {
    .auth-main {
        padding: 2.5rem 2.75rem 2.75rem;
    }
}

.auth-main-header {
    margin-bottom: 1.25rem;
    text-align: center;
}

.auth-main-header .brand-logo--compact {
    margin: 0 auto;
    max-width: 9rem;
}

.show-for-small-only {
    display: block;
}

@media print, screen and (min-width: 64em) {
    .show-for-small-only {
        display: none !important;
    }
}

.auth-main-intro {
    margin-bottom: 1.75rem;
}

.auth-title {
    margin: 0 0 0.35rem;
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
    line-height: 1.2;
}

.auth-subtitle {
    margin: 0;
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.5;
}

.auth-form {
    margin: 0;
}

.auth-field {
    margin-bottom: 1.15rem;
}

.auth-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
}

.auth-input {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0.7rem 0.85rem;
    font-size: 1rem;
    line-height: 1.4;
    color: #0f172a;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    box-shadow: none;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-input::placeholder {
    color: #94a3b8;
}

.auth-input:focus {
    outline: none;
    background: #fff;
    border-color: #00a3c4;
    box-shadow: 0 0 0 3px rgba(0, 163, 196, 0.2);
}

.auth-submit.button {
    margin: 0.5rem 0 0;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 0.5rem;
    background: var(--efixos-button-primary-bg);
    color: #fff;
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.1s ease;
}

.auth-submit.button:hover,
.auth-submit.button:focus {
    background: var(--efixos-button-primary-bg-hover);
    color: #fff;
}

.auth-submit:hover:not(:disabled),
.auth-submit:focus:not(:disabled) {
    filter: brightness(1.05);
}

.auth-submit:active:not(:disabled) {
    transform: translateY(1px);
}

.auth-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.auth-form-hint {
    margin: 0.75rem 0 0;
    font-size: 0.8rem;
    text-align: center;
    color: #b45309;
}

.auth-alert {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    line-height: 1.45;
    border-radius: 0.5rem;
}

.auth-alert--error {
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.auth-alert--success {
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.auth-footer-note {
    margin: 1.25rem 0 0;
    font-size: 0.75rem;
    color: #94a3b8;
    text-align: center;
}

.auth-footer-version {
    display: inline-block;
    margin: 0 0.15rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: rgba(100, 116, 139, 0.12);
    font-size: 0.68rem;
    font-weight: 600;
    color: #64748b;
    vertical-align: middle;
}

/* Login: status eContratos (discreto) */
.econtratos-login-badge {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.6rem 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid #e8ecf0;
    background: #fafbfc;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #64748b;
}

.econtratos-login-badge-dot {
    flex-shrink: 0;
    width: 0.4375rem;
    height: 0.4375rem;
    margin-top: 0.35rem;
    border-radius: 50%;
    background: #94a3b8;
}

.econtratos-login-badge-copy {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.econtratos-login-badge-kicker {
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: #94a3b8;
}

.econtratos-login-badge-status {
    font-weight: 500;
    color: #475569;
}

.econtratos-login-badge-client {
    font-size: 0.75rem;
    font-weight: 400;
    color: #94a3b8;
}

.econtratos-login-badge-detail {
    font-size: 0.75rem;
    color: #94a3b8;
}

.econtratos-login-badge-warn {
    font-size: 0.75rem;
    font-weight: 500;
    color: #b45309;
}

.econtratos-login-badge--success .econtratos-login-badge-dot {
    background: #5a9a94;
}

.econtratos-login-badge--success .econtratos-login-badge-status {
    color: #3d6b67;
}

.econtratos-login-badge--warning .econtratos-login-badge-dot {
    background: #d4a012;
}

.econtratos-login-badge--warning .econtratos-login-badge-status {
    color: #92680a;
}

.econtratos-login-badge--alert .econtratos-login-badge-dot {
    background: #c45c5c;
}

.econtratos-login-badge--alert .econtratos-login-badge-status {
    color: #9b4040;
}

.econtratos-login-badge--secondary .econtratos-login-badge-dot {
    background: #94a3b8;
}

/* ——— Catálogo: filtros (clientes + produtos) ——— */
.catalog-filters-panel,
.customers-filters-panel,
.products-filters-panel {
    margin-bottom: 1.25rem;
}

.catalog-filters-body,
.customers-filters-body {
    padding: 1.25rem 1.5rem 1.5rem;
}

.catalog-type-chips,
.customers-role-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.catalog-type-filter.label,
.customers-role-filter.label {
    margin: 0;
    padding: 0.4rem 0.75rem;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 999px;
    text-decoration: none;
}

.catalog-filter-label,
.customers-filter-label {
    display: block;
    margin: 0 0 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.catalog-search-bar,
.customers-search-bar {
    margin-bottom: 0;
}

.catalog-search-input.input-group-field,
.customers-search-input.input-group-field {
    margin-bottom: 0;
}

.catalog-search-submit.button,
.customers-search-submit.button {
    margin-bottom: 0;
}

.catalog-active-filters,
.customers-active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.catalog-active-filters-label,
.customers-active-filters-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
}

.catalog-clear-filters,
.customers-clear-filters {
    font-size: 0.8rem;
    font-weight: 600;
}

.catalog-filter-row {
    align-items: flex-start;
}

.catalog-filter-row--with-actions {
    align-items: flex-end;
}

.catalog-filter-actions .catalog-filter-label--spacer {
    display: none;
}

.catalog-filter-actions .catalog-filter-field {
    gap: 0;
}

.catalog-filter-actions .catalog-search-submit.button,
.catalog-filter-actions .catalog-filter-clear.button {
    min-height: 2.65rem;
    height: 2.65rem;
}

.catalog-filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.catalog-filter-form .catalog-filter-label {
    margin: 0;
    min-height: 1.125rem;
    line-height: 1.125rem;
}

.catalog-filter-label--spacer {
    visibility: hidden;
    pointer-events: none;
    user-select: none;
}

.catalog-filter-form .catalog-search-bar,
.catalog-filter-form .catalog-search-bar.input-group {
    margin-bottom: 0;
}

.catalog-filter-form .catalog-filter-select {
    min-height: 2.65rem;
    height: 2.65rem;
    margin-bottom: 0;
    padding: 0 0.75rem;
    border-radius: var(--efixos-control-radius);
}

.catalog-filter-form .input-group .catalog-search-input.input-group-field {
    min-height: 2.65rem;
    margin-bottom: 0;
}

.catalog-filter-form .catalog-search-submit.button {
    height: 2.65rem;
    display: inline-flex;
    align-items: center;
}

.catalog-filter-clear.button {
    min-height: 2.65rem;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

/* ——— Clientes e fornecedores ——— */
.customers-filters-panel {
    margin-bottom: 1.25rem;
}

.customers-filters-body {
    padding: 1.25rem 1.5rem 1.5rem;
}

.customers-role-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.customers-table .cust-col-name {
    min-width: 11rem;
}

.customers-name {
    display: block;
    font-weight: 600;
    color: #0884a0;
}

.customers-name-meta {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.78rem;
    color: #94a3b8;
}

.customers-role-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.customers-role-badges .label {
    margin: 0;
}

.customers-contact-email {
    font-size: 0.8rem;
    color: #94a3b8;
}

.customers-row-actions .button {
    margin: 0;
}

.customers-action-btn.button {
    background: #0a2540;
    border-color: #0a2540;
    color: #fff;
}

.customers-action-btn.button:hover {
    background: #10315f;
    color: #fff;
}

.customers-form-panel {
    padding: 0;
    overflow: visible;
    margin-bottom: 0;
}

.customer-form {
    padding: 0;
}

.customer-form-section {
    padding: 1.35rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.customer-form-section:last-of-type {
    border-bottom: none;
}

.customer-form .form-actions {
    margin: 0;
    padding: 1.15rem 1.5rem 1.35rem;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
    border-radius: 0 0 0.85rem 0.85rem;
}

.customer-role-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 0.75rem;
}

.customer-role-option {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin: 0;
    padding: 0.85rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    background: #fafbfc;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.customer-role-option:hover {
    border-color: #00a3c4;
    background: #f0f9fb;
}

.customer-role-option input {
    margin: 0.2rem 0 0;
}

.customer-role-option-text strong {
    display: block;
    font-size: 0.9rem;
    color: #0f172a;
}

.customer-role-option-text small {
    display: block;
    margin-top: 0.1rem;
    font-size: 0.78rem;
    color: #64748b;
}

.customer-type-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.customer-form label:not(.customer-role-option):not(.choice-card) {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
}

.customer-form-hint {
    margin: 0.35rem 0 0;
    font-size: 0.8rem;
    color: #64748b;
}

.customer-form-hint--error {
    color: #b91c1c;
}

.customer-form-hint--success {
    color: #047857;
}

.customers-create-layout {
    align-items: flex-start;
}

.customers-create-page .customers-form-panel--create {
    padding: 0;
    overflow: hidden;
}

.customer-form--wizard .customer-form-tabs {
    margin: 0;
    padding: 0.85rem 1rem 0;
    border-bottom: 1px solid #e5e7eb;
    background: #fafbfc;
}

.customer-form--wizard .customer-form-body {
    min-height: 12rem;
}

.customer-form--wizard .customer-form-panel,
.customer-form--wizard .customer-form-panel[data-customer-form-panel] {
    margin: 0;
}

.customer-form--wizard .customer-form-section.customer-form-panel {
    border-bottom: none;
}

.customer-form--wizard .customer-form-panel-inner {
    padding: 1.35rem 1.5rem 0;
    border-bottom: none;
}

.customer-form--wizard .customer-form-panel-inner--divider {
    padding-top: 0.5rem;
    padding-bottom: 1.35rem;
    border-top: 1px solid #f1f5f9;
}

.customer-form--wizard .os-form-footer-sticky {
    margin: 0;
    border-radius: 0 0 0.85rem 0.85rem;
}

.customers-create-preview {
    margin-top: 1.25rem;
}

.customer-active-check {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #334155;
}

.customers-form-sidebar {
    position: sticky;
    top: 1rem;
    padding: 1.15rem 1.1rem;
    margin-bottom: 0;
}

.customers-sidebar-title {
    margin: 0 0 0.85rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
}

.customers-sidebar-tips {
    margin: 0;
    padding: 0;
    list-style: none;
}

.customers-sidebar-tips li {
    margin-bottom: 0.75rem;
    font-size: 0.82rem;
    line-height: 1.45;
    color: #475569;
}

.customers-sidebar-tips li:last-child {
    margin-bottom: 0;
}

.customers-form-layout {
    margin-top: 0;
}

.fade-in {
    animation: efixosFadeIn 0.4s ease-out;
}

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

.choice-card {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    border: 1px solid #cacaca;
    border-radius: 0.35rem;
    background: #fff;
    cursor: pointer;
}

.choice-card-active {
    border-color: #1779ba;
    background: #e8f4fc;
    color: #0c4a6e;
}

/* ——— Produtos e serviços ——— */
.products-name {
    display: block;
    font-weight: 600;
    color: #0884a0;
}

.products-name-meta {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.78rem;
    color: #94a3b8;
}

.products-stock-qty {
    display: block;
    font-size: 0.85rem;
    color: #334155;
}

.products-stock-badge.label {
    margin: 0.25rem 0 0;
}

.products-row-actions .button {
    margin: 0;
}

.products-action-btn.button {
    background: #0a2540;
    border-color: #0a2540;
    color: #fff;
}

.products-action-btn.button:hover {
    background: #10315f;
    color: #fff;
}

.products-form-panel {
    padding: 0;
    overflow: visible;
    margin-bottom: 0;
}

.products-create-layout {
    align-items: flex-start;
}

.products-create-page .products-form-panel--create {
    padding: 0;
    overflow: hidden;
}

.product-form {
    padding: 0;
}

.product-form-section {
    padding: 1.35rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.product-form-section:last-of-type {
    border-bottom: none;
}

.product-type-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.product-form-hint {
    margin: 0.35rem 0 0;
    font-size: 0.8rem;
    color: #64748b;
}

.product-form-hint a {
    font-weight: 600;
    color: #0884a0;
}

.product-margin-display {
    display: flex;
    align-items: center;
    min-height: 2.5rem;
    padding: 0 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #f8fafc;
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
}

.product-margin-display--positive {
    color: #047857;
}

.product-margin-display--negative {
    color: #b91c1c;
}

.product-stock-check,
.product-active-check {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.65rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #334155;
}

.product-stock-skip {
    margin: 0 0 1rem;
}

.product-form--wizard .product-form-tabs {
    margin: 0;
    padding: 0.85rem 1rem 0;
    border-bottom: 1px solid #e5e7eb;
    background: #fafbfc;
}

.product-form--wizard .product-form-body {
    min-height: 12rem;
}

.product-form--wizard .product-form-section.product-form-panel {
    border-bottom: none;
}

.product-form--wizard .os-form-footer-sticky {
    margin: 0;
    border-radius: 0 0 0.85rem 0.85rem;
}

.products-create-preview {
    margin-top: 1.25rem;
}

/* ——— Categorias ——— */
.categories-name {
    display: block;
    font-weight: 600;
    color: #0884a0;
}

.categories-count-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: #0884a0;
}

.categories-count-link:hover {
    color: #0a2540;
}

.categories-row-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
}

.categories-row-actions .button {
    margin: 0;
}

.categories-action-btn.button {
    background: #0a2540;
    border-color: #0a2540;
    color: #fff;
}

.categories-action-btn.button:hover {
    background: #10315f;
    color: #fff;
}

.categories-form-panel {
    padding: 0;
    overflow: visible;
    margin-bottom: 0;
}

.categories-create-layout {
    align-items: flex-start;
}

.categories-create-page .categories-form-panel--create {
    padding: 0;
    overflow: hidden;
}

.category-form {
    padding: 0;
}

.category-form-section {
    padding: 1.35rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.category-form-section:last-of-type {
    border-bottom: none;
}

.category-active-check {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #334155;
}

.category-form-note {
    margin: 1rem 0 0;
    font-size: 0.82rem;
    color: #64748b;
}

.category-form-note a {
    font-weight: 600;
    color: #0884a0;
}

.category-form--wizard .category-form-tabs {
    margin: 0;
    padding: 0.85rem 1rem 0;
    border-bottom: 1px solid #e5e7eb;
    background: #fafbfc;
}

.category-form--wizard .category-form-body {
    min-height: 8rem;
}

.category-form--wizard .category-form-section.category-form-panel {
    border-bottom: none;
}

.category-form--wizard .os-form-footer-sticky {
    margin: 0;
    border-radius: 0 0 0.85rem 0.85rem;
}

.categories-create-preview {
    margin-top: 1.25rem;
}

.categories-create-sidebar + .categories-context-sidebar {
    margin-top: 1rem;
}

.categories-context-sidebar {
    padding: 1.15rem 1.1rem;
    margin-bottom: 0;
}

.categories-context-title {
    margin: 0 0 0.85rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
}

.categories-context-meta {
    margin: 0 0 1rem;
}

.categories-context-meta > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.categories-context-meta > div:last-child {
    border-bottom: none;
}

.categories-context-meta dt {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
}

.categories-context-meta dd {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0f172a;
    text-align: right;
}

.categories-context-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.categories-context-hint {
    margin: 0 0 0.85rem;
    font-size: 0.82rem;
    line-height: 1.45;
    color: #64748b;
}

.categories-context-callout {
    margin: 1rem 0 0;
    padding: 0.75rem 0.85rem;
    font-size: 0.82rem;
}

.categories-context-callout p {
    margin: 0;
}

.categories-context-tips {
    margin: 0;
    padding: 0 0 0 1rem;
    font-size: 0.82rem;
    line-height: 1.5;
    color: #475569;
}

.categories-context-tips li {
    margin-bottom: 0.65rem;
}

.categories-context-examples {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

.categories-context-examples-label {
    margin: 0 0 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
}

.categories-context-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.categories-context-chips .label {
    margin: 0;
    cursor: pointer;
}

.categories-edit-layout {
    align-items: flex-start;
}

.category-field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.category-field-head label {
    margin: 0;
}

.category-char-count {
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
}

.category-char-count--warn {
    color: #b45309;
}

.category-status-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 0.75rem;
}

.category-status-option-text {
    display: block;
}

.category-status-option-text strong {
    display: block;
    font-size: 0.9rem;
    color: #0f172a;
}

.category-status-option-text small {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 400;
}

.category-form-footer-wizard {
    flex-wrap: wrap;
}

.category-form-step-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-form-step-nav .button.is-hidden,
.os-form-footer-actions .button.is-hidden {
    display: none;
}

@media (max-width: 639px) {
    .category-form-footer-wizard {
        flex-direction: column;
        align-items: stretch;
    }

    .category-form-step-nav,
    .os-form-footer-actions {
        width: 100%;
        justify-content: stretch;
    }

    .category-form-step-nav .button,
    .os-form-footer-actions .button {
        flex: 1;
    }
}

.os-edit-badges a.label {
    text-decoration: none;
}

.os-edit-badges a.label:hover {
    opacity: 0.9;
}

/* ——— Financeiro ——— */
.finance-kpi-row {
    margin-bottom: 1.25rem;
}

.kpi-card--finance-in::before {
    background: linear-gradient(90deg, #059669, #34d399);
}

.kpi-card--finance-out::before {
    background: linear-gradient(90deg, #dc2626, #f87171);
}

.kpi-card--finance-in .kpi-card-icon {
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
}

.kpi-card--finance-out .kpi-card-icon {
    background: rgba(220, 38, 38, 0.08);
    color: #dc2626;
}

.kpi-card--finance-negative .kpi-card-value--money {
    color: #b91c1c;
}

.finance-period-chips {
    margin-bottom: 1rem;
}

.finance-period-custom {
    margin: 0;
}

.finance-filters-panel .catalog-filter-form input[type="date"] {
    min-height: 2.65rem;
    margin-bottom: 0;
    border-radius: 0.5rem;
}

.finance-extract-panel {
    padding: 0;
    overflow: hidden;
}

.finance-extract-head {
    padding: 1.15rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.finance-extract-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.finance-extract-desc {
    margin: 0.25rem 0 0;
    font-size: 0.82rem;
    color: #64748b;
}

.finance-empty {
    padding: 2.5rem 1.5rem;
}

.finance-tx-desc {
    display: block;
    font-weight: 500;
    color: #334155;
}

.finance-tx-os-link {
    display: inline-block;
    margin-top: 0.2rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #0884a0;
}

.finance-tx-os-link:hover {
    color: #0a2540;
}

.finance-amount {
    font-size: 0.9rem;
    white-space: nowrap;
}

.finance-amount--in {
    color: #047857;
}

.finance-amount--out {
    color: #b91c1c;
}

.finance-page .dashboard-hero,
.finance-ledger-page .dashboard-hero,
.finance-setup-page .dashboard-hero {
    margin-bottom: 0;
}

.finance-nav-panel {
    margin: 1rem 0 1.25rem;
    padding: 0.5rem 0.75rem;
    overflow: hidden;
}

.finance-nav-scroll {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    list-style: none;
    margin: 0;
    padding: 0;
}

.finance-nav-tab {
    flex-shrink: 0;
    padding: 0.55rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    border-radius: 0.35rem 0.35rem 0 0;
    background: transparent;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.finance-nav-tab:hover,
.finance-nav-tab:focus {
    color: #0884a0;
    background: #f0f9fb;
}

.finance-nav-tab.is-active {
    color: #0884a0;
    border-bottom-color: #00a3c4;
    background: #f0f9fb;
}

.finance-ledger-kpi-row {
    margin-bottom: 1rem;
}

.finance-ledger-table tbody tr.finance-ledger-row--overdue {
    background: rgba(254, 242, 242, 0.55);
}

.finance-ledger-detail-panel {
    padding: 1.15rem 1.5rem;
}

.finance-ledger-dl {
    display: grid;
    gap: 0.85rem;
    margin: 0;
}

.finance-ledger-dl div {
    display: grid;
    grid-template-columns: 8rem 1fr;
    gap: 0.75rem;
    align-items: start;
}

.finance-ledger-dl dt {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.finance-ledger-dl dd {
    margin: 0;
    color: #0f172a;
}

.finance-ledger-settle-panel {
    position: sticky;
    top: 1rem;
}

.finance-form-panel {
    padding: 1.25rem 1.5rem 1.5rem;
}

.finance-table .fin-col-desc {
    min-width: 12rem;
}

.finance-table-foot td {
    padding: 0.85rem 1rem;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
    font-size: 0.85rem;
}

.finance-setup-grid {
    margin-bottom: 1.25rem;
}

.finance-setup-panel {
    height: 100%;
    padding: 1.15rem 1.25rem;
}

.finance-setup-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.finance-setup-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.finance-setup-desc {
    margin: 0.25rem 0 0;
    font-size: 0.82rem;
    color: #64748b;
}

.finance-setup-table th,
.finance-setup-table td {
    font-size: 0.88rem;
}

.finance-setup-form-panel {
    padding: 0;
    overflow: visible;
}

.finance-form-alert {
    padding: 1rem 1.5rem 0;
}

.finance-form-section {
    padding: 1.35rem 1.5rem;
    margin-bottom: 0;
    border-bottom: 1px solid #f1f5f9;
}

.finance-form-section:last-of-type {
    border-bottom: none;
}

.finance-form-section .form-section-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.finance-form-fields .cell {
    margin-bottom: 1rem;
}

@media (min-width: 640px) {
    .finance-form-fields .cell {
        margin-bottom: 0;
    }
}

.finance-status-options {
    display: grid;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .finance-status-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.finance-status-options .choice-card {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    width: 100%;
    margin: 0;
    padding: 0.85rem 1rem;
    border-radius: 0.65rem;
}

.finance-status-options .choice-card:has(input:checked) {
    border-color: #00a3c4;
    background: #e8f8fc;
    box-shadow: 0 0 0 1px rgba(0, 163, 196, 0.12);
}

.finance-status-options .choice-card input {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.finance-status-option-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.finance-status-option-text strong {
    font-size: 0.92rem;
    color: #0f172a;
}

.finance-status-option-text small {
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.35;
}

.finance-form-footer {
    padding: 1.15rem 1.5rem 1.35rem;
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
    border-radius: 0 0 0.85rem 0.85rem;
}

.finance-form-footer .form-actions,
.finance-form-footer .os-form-actions {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.finance-setup-page .dashboard-hero + .grid-x {
    margin-top: 0.25rem;
}

/* ——— Garantias ——— */
.warranty-kpi-row {
    margin-bottom: 1rem;
}

.warranty-kpi-card {
    display: block;
    padding: 1rem 1.1rem;
    margin-bottom: 0;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.warranty-kpi-card:hover,
.warranty-kpi-card:focus {
    border-color: #99d9e8;
    box-shadow: 0 4px 14px rgba(0, 163, 196, 0.12);
    color: inherit;
}

.warranty-kpi-card.is-active {
    border-color: #00a3c4;
    box-shadow: 0 0 0 1px rgba(0, 163, 196, 0.2);
}

.warranty-kpi-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.warranty-kpi-value {
    display: block;
    margin-top: 0.35rem;
    font-size: 1.65rem;
    line-height: 1.1;
    color: #0a2540;
}

.warranty-filters-panel {
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.warranty-filter-chips {
    flex-wrap: wrap;
}

.warranty-list-panel {
    padding: 0;
    overflow: hidden;
}

.warranty-list-panel .dashboard-empty {
    padding: 2.5rem 1.5rem;
}

.warranty-os-link {
    display: inline-block;
    font-weight: 600;
    color: #0884a0;
    margin-right: 0.35rem;
}

.warranty-os-link:hover {
    color: #0a2540;
}

.warranty-col-asset {
    max-width: 12rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.warranty-days-left {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.75rem;
    color: #64748b;
}

.warranty-row-actions {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
}

.warranty-table td,
.warranty-table th {
    font-size: 0.88rem;
    vertical-align: middle;
}

.choice-card-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    cursor: pointer;
    font-weight: 600;
    color: #334155;
}

/* ——— Relatórios ——— */
.reports-cards-row,
.settings-cards-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin: 0 0 1.25rem;
    width: 100%;
}

@media screen and (min-width: 40em) {
    .settings-cards-row,
    .reports-cards-row--2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .reports-cards-row--3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.reports-cards-cell,
.settings-cards-cell {
    min-width: 0;
}

.reports-cards-cell .report-card,
.settings-cards-cell .report-card {
    width: 100%;
    height: 100%;
}

.report-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 1.35rem;
    margin-bottom: 0;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.report-card:hover {
    border-color: #00a3c4;
    box-shadow: 0 8px 24px rgba(8, 132, 160, 0.12);
    transform: translateY(-2px);
    color: inherit;
}

.report-card--alert {
    border-color: #fcd34d;
    background: linear-gradient(180deg, #fffbeb 0%, #fff 40%);
}

.report-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.65rem;
}

.report-card-icon--teal {
    background: rgba(0, 163, 196, 0.1);
    color: #0884a0;
}

.report-card-icon--amber {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
}

.report-card-icon--navy {
    background: rgba(10, 37, 64, 0.08);
    color: #0a2540;
}

.report-card-icon--green {
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
}

.report-card-body {
    flex: 1;
    min-width: 0;
}

.report-card-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}

.report-card-desc {
    margin: 0.35rem 0 0;
    font-size: 0.82rem;
    line-height: 1.45;
    color: #64748b;
}

.report-card-metric {
    margin: 0.65rem 0 0;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #0884a0;
}

.report-card--alert .report-card-metric {
    color: #b45309;
}

.report-card-arrow {
    flex-shrink: 0;
    color: #94a3b8;
    margin-top: 0.35rem;
}

.report-card:hover .report-card-arrow {
    color: #0884a0;
}

.reports-tips-panel {
    padding: 1.15rem 1.5rem 1.35rem;
}

.reports-tips-title {
    margin: 0 0 0.75rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
}

.reports-tips-list {
    margin: 0;
    padding: 0 0 0 1.1rem;
    font-size: 0.85rem;
    line-height: 1.55;
    color: #475569;
}

.reports-tips-list li {
    margin-bottom: 0.5rem;
}

.reports-status-panel {
    margin-bottom: 1.25rem;
    padding: 1rem 1.25rem;
}

.reports-status-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.reports-status-chips .label {
    margin: 0;
}

.reports-os-number {
    font-weight: 600;
    color: #0884a0;
}

.reports-os-number:hover {
    color: #0a2540;
}

.reports-action-btn.button {
    margin: 0;
    background: #0a2540;
    border-color: #0a2540;
    color: #fff;
}

.reports-action-btn.button:hover {
    background: #10315f;
    color: #fff;
}

.reports-receipts-kpi,
.reports-stock-kpi {
    margin-bottom: 1.25rem;
}

.reports-eyebrow {
    margin-bottom: 0.35rem !important;
}

/* ——— Configurações ——— */
.settings-page .dashboard-hero {
    margin-bottom: 0;
}

.settings-nav-panel {
    margin: 1rem 0 1.25rem;
    padding: 0.5rem 0.75rem;
    overflow: hidden;
}

.settings-nav-scroll {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.settings-nav-tab {
    flex-shrink: 0;
    padding: 0.55rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    border-radius: 0.35rem 0.35rem 0 0;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.settings-nav-tab:hover {
    color: #0884a0;
    background: #f0f9fb;
}

.settings-nav-tab.is-active {
    color: #0884a0;
    border-bottom-color: #00a3c4;
    background: #f0f9fb;
}

.settings-card {
    height: 100%;
    display: flex;
}

.settings-form-panel {
    padding: 0;
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.settings-form {
    padding: 0;
}

.company-logo-upload {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1.25rem;
}

.company-logo-preview {
    flex: 0 0 9rem;
    width: 9rem;
    height: 9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #cbd5e1;
    border-radius: 0.5rem;
    background: #f8fafc;
    overflow: hidden;
}

.company-logo-preview-img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 0.5rem;
}

.company-logo-preview-empty {
    padding: 0.75rem;
    text-align: center;
    font-size: 0.75rem;
    color: #94a3b8;
    line-height: 1.4;
}

.company-logo-fields {
    flex: 1 1 14rem;
    min-width: 0;
}

.company-logo-fields input[type="file"] {
    display: block;
    width: 100%;
    max-width: 24rem;
    padding: 0.45rem 0;
    font-size: 0.875rem;
    color: #334155;
}

.company-logo-remove {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    color: #64748b;
    cursor: pointer;
}

.company-logo-remove input {
    margin: 0;
}

.settings-user-name {
    color: #0884a0;
    font-weight: 600;
}

.settings-user-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.settings-user-roles .label {
    margin: 0;
}

.settings-readonly-list {
    display: grid;
    gap: 1rem;
    margin: 0;
}

.settings-readonly-list > div {
    display: grid;
    gap: 0.25rem;
}

.settings-readonly-list dt {
    color: #64748b;
    font-size: 0.8125rem;
    font-weight: 600;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.settings-readonly-list dd {
    color: #0f172a;
    font-size: 1rem;
    margin: 0;
}

.settings-eyebrow a {
    color: #0884a0;
    font-weight: 600;
}

.settings-econtratos-layout {
    align-items: flex-start;
}

.settings-econtratos-output {
    margin: 0 1.5rem 1.25rem;
    padding: 0.85rem;
    font-size: 0.75rem;
    max-height: 16rem;
    overflow: auto;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
}

.settings-api-steps {
    list-style: decimal;
}

.settings-mapos-warning {
    margin-bottom: 1.25rem;
}

.settings-mapos-warning p {
    margin: 0;
    font-size: 0.88rem;
}

.settings-mapos-form,
.settings-mapos-run-form {
    padding: 0 1.5rem 1.25rem;
}

.settings-summary-tile {
    padding: 0.85rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #fafbfc;
    margin-bottom: 0.75rem;
}

.settings-summary-label {
    margin: 0;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
}

.settings-summary-value {
    margin: 0.25rem 0 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}

.settings-context-sidebar {
    margin-bottom: 0;
}

/* ——— Configurações: ordens de serviço (layout compacto) ——— */
.settings-os-page .dashboard-hero--compact {
    margin-bottom: 0.75rem;
}

.settings-os-panel {
    padding: 0;
    overflow: hidden;
}

.settings-os-form {
    display: flex;
    flex-direction: column;
}

.settings-os-alert {
    margin: 1rem 1.25rem 0;
}

.settings-os-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding: 0 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    background: #fafbfc;
}

.settings-os-tab {
    margin: 0;
    padding: 0.75rem 1rem;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.settings-os-tab:hover {
    color: #0884a0;
}

.settings-os-tab.is-active {
    color: #0884a0;
    border-bottom-color: #0884a0;
    background: #fff;
}

.settings-os-panels {
    padding: 1.15rem 1.25rem 0.5rem;
    min-height: 12rem;
}

.settings-os-panel-section.is-hidden {
    display: none;
}

.settings-os-grid {
    display: grid;
    gap: 0.85rem 1rem;
}

.settings-os-grid--5 {
    grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
}

.settings-os-text-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.settings-os-impressao-layout {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.25rem;
    align-items: start;
}

.settings-os-field label {
    margin-bottom: 0.3rem;
    font-size: 0.78rem;
}

.settings-os-field .settings-form-hint {
    margin-top: 0.25rem;
    font-size: 0.72rem;
}

.settings-os-textarea {
    min-height: 5.5rem;
    max-height: 10rem;
    resize: vertical;
}

.settings-os-field--checkbox {
    padding-top: 1.75rem;
}

.settings-os-check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #475569;
    cursor: pointer;
}

.settings-os-check input {
    margin: 0.15rem 0 0;
}

.settings-os-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    padding: 0.85rem 1.25rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.settings-os-footer-note {
    margin: 0;
    flex: 1 1 12rem;
    font-size: 0.72rem;
    color: #94a3b8;
}

.settings-os-footer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

@media screen and (max-width: 63.9375em) {
    .settings-os-text-grid {
        grid-template-columns: 1fr;
    }

    .settings-os-impressao-layout {
        grid-template-columns: 1fr;
    }

    .settings-os-field--checkbox {
        padding-top: 0;
    }
}

/* ——— Configurações: fiscal / NFS-e ——— */
.settings-fiscal-page .dashboard-hero--compact {
    margin-bottom: 0.75rem;
}

.settings-fiscal-kpi-row {
    margin-bottom: 0.75rem;
}

.settings-fiscal-kpi {
    margin-bottom: 0;
    height: 100%;
}

.settings-fiscal-kpi-text {
    font-size: 1rem;
}

.settings-fiscal-env-banner {
    margin-bottom: 0.75rem;
}

.settings-fiscal-panel {
    padding: 0;
    overflow: hidden;
}

.settings-fiscal-form,
.settings-fiscal-cert-form {
    display: flex;
    flex-direction: column;
}

.settings-fiscal-panels {
    padding: 1.25rem 1.5rem 0;
}

.settings-fiscal-cert-status {
    margin-bottom: 1rem;
}

.settings-fiscal-cert-note {
    margin: 0 0 1rem;
}

.settings-fiscal-cert-form.is-hidden {
    display: none;
}

.settings-fiscal-footer.is-hidden {
    display: none;
}

.settings-fiscal-cert-footer {
    border-top: 1px solid #e5e7eb;
    padding: 1rem 1.5rem 1.25rem;
}

.settings-fiscal-footer {
    margin-top: 0;
}

.settings-fiscal-test-summary {
    padding: 0 1.5rem 0.75rem;
}

.settings-fiscal-checklist {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0;
}

.settings-fiscal-checklist-item {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    margin-bottom: 0.65rem;
    color: #64748b;
    font-size: 0.9rem;
}

.settings-fiscal-checklist-item.is-done {
    color: #0f766e;
}

.settings-fiscal-check-icon {
    flex-shrink: 0;
    width: 1.1rem;
    font-weight: 700;
    line-height: 1.35;
}

.settings-fiscal-checklist-item.is-done .settings-fiscal-check-icon {
    color: #0d9488;
}

.settings-fiscal-company-card {
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    box-shadow: none;
}

.settings-fiscal-company-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}
