:root {
    --bg: #f4f6fb;
    --surface: #ffffff;
    --primary: #2b6cb0;
    --primary-dark: #1f4f8b;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #d1d5db;
    --shadow: 0 18px 30px rgba(15, 23, 42, 0.08);
}

/* Backup V1.1 - ajustes visuais escopados */
.backup-page .backup-generate-form {
    flex-shrink: 0;
}

.backup-page .backup-generate-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 138px;
    min-height: 42px;
    border: 1px solid #1d4ed8;
    background: #2563eb;
    color: #ffffff;
    font-weight: 700;
    white-space: nowrap;
}

.backup-page .backup-generate-button:hover {
    background: #1d4ed8;
    color: #ffffff;
}

.backup-page .backup-file-name {
    max-width: 440px;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.92rem;
    line-height: 1.45;
}

.backup-page .backup-download-link {
    min-width: 76px;
    text-align: center;
}

.backup-page .backup-delete-button {
    min-width: 76px;
    border: 1px solid #fecaca;
    background: #fff5f5;
    color: #b91c1c;
}

.backup-page .backup-delete-button:hover {
    background: #fee2e2;
    color: #991b1b;
}

.backup-page .action-column {
    align-items: center;
    gap: 8px;
}

@media (max-width: 720px) {
    .backup-page .panel-header-row {
        align-items: stretch;
    }

    .backup-page .backup-generate-form,
    .backup-page .backup-generate-button {
        width: 100%;
    }

    .backup-page .backup-file-name {
        max-width: 100%;
    }
}

* {
    box-sizing: border-box;
}

/* Comissões Master V2 */
.commissions-master-page {
    display: grid;
    width: 100%;
    max-width: 100%;
    gap: 18px;
    border-radius: 8px;
}

.commissions-master-page .commissions-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.commissions-master-page .commissions-hero h2 {
    margin: 4px 0 6px;
    color: #0f172a;
    font-size: clamp(1.45rem, 2vw, 2rem);
    letter-spacing: 0;
}

.commissions-master-page .commissions-hero p {
    max-width: 720px;
    color: #64748b;
    line-height: 1.55;
}

.commissions-master-page .commissions-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.commissions-master-page .commissions-master-badge,
.commissions-master-page .commissions-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 5px 11px;
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.76rem;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.commissions-master-page .commissions-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 13px;
    border-radius: 8px;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}

.commissions-master-page .commissions-alert {
    border-radius: 8px;
}

.commissions-master-page .commissions-filter-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    align-items: end;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 16px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.commissions-master-page .commissions-filter-card label,
.commissions-master-page .commissions-default-card label {
    display: grid;
    gap: 8px;
    color: #334155;
    font-weight: 850;
}

.commissions-master-page .commissions-filter-card input,
.commissions-master-page .commissions-filter-card select,
.commissions-master-page .commissions-default-card input,
.commissions-master-page .commissions-settings-table input {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    border-radius: 8px;
}

.commissions-master-page .commissions-filter-card .commissions-action-btn {
    width: 100%;
}

.commissions-master-page .commissions-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 14px;
}

.commissions-master-page .commissions-summary-card {
    position: relative;
    display: grid;
    gap: 8px;
    overflow: hidden;
    min-height: 132px;
    padding: 18px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
    transition: transform 150ms ease, box-shadow 150ms ease;
}

.commissions-master-page .commissions-summary-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #2563eb;
}

.commissions-master-page .commissions-summary-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.commissions-master-page .commissions-summary-featured {
    border-color: rgba(37, 99, 235, 0.20);
    background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
}

.commissions-master-page .commissions-summary-label {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.commissions-master-page .commissions-summary-value {
    color: #0f172a;
    font-size: clamp(1.28rem, 2vw, 1.65rem);
    font-weight: 950;
    line-height: 1.12;
}

.commissions-master-page .commissions-summary-meta {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 750;
    line-height: 1.35;
}

.commissions-master-page .commissions-section {
    display: grid;
    gap: 16px;
    padding: 18px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.commissions-master-page .commissions-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.commissions-master-page .commissions-section-header h2,
.commissions-master-page .commissions-card-title h3 {
    margin: 0 0 5px;
    color: #0f172a;
    font-size: 1.08rem;
    letter-spacing: 0;
}

.commissions-master-page .commissions-section-header p,
.commissions-master-page .commissions-card-title p,
.commissions-master-page .commissions-default-card p {
    margin: 0;
    color: #64748b;
    line-height: 1.45;
}

.commissions-master-page .commissions-settings-form {
    display: grid;
    grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.commissions-master-page .commissions-default-card,
.commissions-master-page .commissions-sellers-card {
    display: grid;
    gap: 14px;
    min-width: 0;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    background: #f8fafc;
}

.commissions-master-page .commissions-default-card input {
    max-width: 180px;
}

.commissions-master-page .commissions-sellers-card {
    background: #ffffff;
}

.commissions-master-page .commissions-settings-footer {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    padding-top: 2px;
}

.commissions-master-page .commissions-settings-footer .commissions-action-btn {
    min-width: 190px;
}

.commissions-master-page .commissions-table {
    width: 100%;
    min-width: 640px;
}

.commissions-master-page .commissions-table th,
.commissions-master-page .commissions-table td {
    padding: 12px 13px;
    vertical-align: middle;
}

.commissions-master-page .commissions-table th {
    background: #f8fafc;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
    white-space: nowrap;
}

.commissions-master-page .commissions-table tbody tr:hover {
    background: #f8fafc;
}

.commissions-master-page .commissions-table td {
    color: #334155;
    font-weight: 750;
}

.commissions-master-page .commissions-money,
.commissions-master-page .commissions-percent-value {
    color: #0f172a;
    font-variant-numeric: tabular-nums;
    font-weight: 950;
    white-space: nowrap;
}

.commissions-master-page .commissions-settings-table {
    min-width: 0;
    table-layout: fixed;
}

.commissions-master-page .commissions-settings-table input {
    max-width: 132px;
}

.commissions-master-page .commissions-settings-table th,
.commissions-master-page .commissions-settings-table td {
    white-space: normal;
}

.commissions-master-page .commissions-settings-table th:nth-child(1) {
    width: 34%;
}

.commissions-master-page .commissions-settings-table th:nth-child(2) {
    width: 18%;
}

.commissions-master-page .commissions-settings-table th:nth-child(3) {
    width: 26%;
}

.commissions-master-page .commissions-settings-table th:nth-child(4) {
    width: 22%;
}

.commissions-master-page .commissions-settings-table td:nth-child(3),
.commissions-master-page .commissions-settings-table td:nth-child(4) {
    text-align: right;
}

.commissions-master-page .commissions-empty-row {
    padding: 20px;
    color: #64748b;
    font-weight: 850;
    text-align: center;
}

@media (max-width: 1180px) {
    .commissions-master-page .commissions-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .commissions-master-page .commissions-settings-form {
        grid-template-columns: 1fr;
    }

    .commissions-master-page .commissions-default-card input {
        max-width: 220px;
    }
}

@media (max-width: 900px) {
    .commissions-master-page .commissions-table,
    .commissions-master-page .commissions-table tbody,
    .commissions-master-page .commissions-table tr,
    .commissions-master-page .commissions-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .commissions-master-page .commissions-table thead {
        display: none;
    }

    .commissions-master-page .commissions-table tr {
        margin-bottom: 12px;
        padding: 12px;
        border: 1px solid rgba(15, 23, 42, 0.10);
        border-radius: 8px;
        background: #ffffff;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
    }

    .commissions-master-page .commissions-table td {
        display: flex;
        justify-content: space-between;
        gap: 14px;
        padding: 9px 0;
        border-bottom: 1px solid rgba(148, 163, 184, 0.16);
        text-align: right;
    }

    .commissions-master-page .commissions-table td:last-child {
        border-bottom: 0;
    }

    .commissions-master-page .commissions-table td::before {
        content: attr(data-label);
        color: #64748b;
        font-size: 0.72rem;
        font-weight: 900;
        text-align: left;
        text-transform: uppercase;
    }

    .commissions-master-page .commissions-table td input {
        max-width: 150px;
    }

    .commissions-master-page .commissions-empty-row {
        display: block;
        text-align: center;
    }

    .commissions-master-page .commissions-empty-row::before {
        display: none;
    }
}

@media (max-width: 760px) {
    .commissions-master-page .commissions-hero,
    .commissions-master-page .commissions-section-header {
        align-items: stretch;
        flex-direction: column;
    }

    .commissions-master-page .commissions-hero-actions {
        justify-content: stretch;
    }

    .commissions-master-page .commissions-summary-grid,
    .commissions-master-page .commissions-filter-card {
        grid-template-columns: 1fr;
    }

    .commissions-master-page .commissions-action-btn,
    .commissions-master-page .commissions-section-header form,
    .commissions-master-page .commissions-section-header button,
    .commissions-master-page .commissions-settings-footer .commissions-action-btn {
        width: 100%;
    }

    .commissions-master-page .commissions-section,
    .commissions-master-page .commissions-default-card,
    .commissions-master-page .commissions-sellers-card {
        padding: 15px;
    }

    .commissions-master-page .commissions-default-card input {
        max-width: none;
    }

}

.fiscal-module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.fiscal-module-card {
    min-height: 86px;
    padding: 14px;
    border: 1px solid #d9e2ef;
    border-radius: 8px;
    background: #fff;
    display: grid;
    align-content: start;
    gap: 6px;
    text-decoration: none;
}

.fiscal-module-card strong {
    color: #0f172a;
    font-size: 0.95rem;
}

.fiscal-module-card span {
    color: #64748b;
    font-size: 0.84rem;
    line-height: 1.35;
}

.fiscal-product-panel {
    border-color: #2563eb;
    background: #f8fbff;
}

.fiscal-product-panel h3,
.fiscal-corrections-panel h3 {
    margin-bottom: 6px;
}

.section-hint {
    margin: 0 0 14px;
    color: #64748b;
    font-size: 0.9rem;
}

.fiscal-corrections-panel {
    border-color: #f59e0b;
    background: #fffbeb;
}

.fiscal-pending-list {
    margin: 12px 0 0;
    padding-left: 20px;
    color: #92400e;
}

.fiscal-status-summary {
    border-color: #d9e2ef;
    background: #f8fafc;
}

.fiscal-status-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fiscal-quick-table input,
.fiscal-quick-table select {
    width: 100%;
    min-width: 96px;
}

/* Fiscal Master V2 */
.fiscal-master {
    display: grid;
    gap: 18px;
    border-radius: 8px;
}

.fiscal-master .fiscal-hero {
    display: grid;
    grid-template-columns: minmax(260px, 0.9fr) minmax(360px, 1.35fr);
    gap: 22px;
    align-items: start;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.20);
}

.fiscal-master .fiscal-hero h2 {
    margin-bottom: 9px;
    color: #0f172a;
    letter-spacing: 0;
}

.fiscal-master .fiscal-hero p {
    max-width: 680px;
    margin: 0;
    color: #64748b;
    line-height: 1.55;
}

.fiscal-master .fiscal-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-items: stretch;
}

.fiscal-master .fiscal-nav-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 12px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    white-space: normal;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.fiscal-master .fiscal-nav-primary {
    grid-column: span 3;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.fiscal-master .fiscal-card-grid {
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    gap: 12px;
    margin: 0;
}

.fiscal-master .fiscal-card {
    position: relative;
    min-height: 122px;
    padding: 16px;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.fiscal-master .fiscal-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #e2e8f0;
}

.fiscal-master .fiscal-card:hover {
    border-color: rgba(37, 99, 235, 0.26);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.fiscal-master .fiscal-card-featured {
    border-color: rgba(37, 99, 235, 0.20);
    background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
}

.fiscal-master .fiscal-card-featured::before {
    background: #2563eb;
}

.fiscal-master .fiscal-card-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin-bottom: 2px;
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 8px;
    background: #eff6ff;
    color: #1d4ed8 !important;
    font-size: 0.72rem !important;
    font-weight: 900;
}

.fiscal-master .fiscal-card strong {
    color: #0f172a;
    font-size: 0.98rem;
    line-height: 1.25;
}

.fiscal-master .fiscal-card span:last-child {
    color: #64748b;
    line-height: 1.38;
}

.fiscal-master .fiscal-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
    padding: 15px 16px;
    border: 1px solid rgba(245, 158, 11, 0.30);
    border-radius: 8px;
    background: #fffbeb;
    color: #78350f;
    box-shadow: 0 8px 18px rgba(120, 53, 15, 0.05);
}

.fiscal-master .fiscal-alert-icon {
    display: inline-flex;
    flex: 0 0 28px;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: 8px;
    background: #ffffff;
    color: #b45309;
    font-weight: 900;
}

.fiscal-master .fiscal-form {
    display: grid;
    gap: 16px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.fiscal-master .fiscal-section {
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.fiscal-master .fiscal-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 17px 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.fiscal-master .fiscal-section-icon {
    display: inline-flex;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 8px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.76rem;
    font-weight: 900;
}

.fiscal-master .fiscal-section-header h3 {
    margin: 0;
    color: #0f172a;
    letter-spacing: 0;
}

.fiscal-master .fiscal-section-header p {
    margin: 3px 0 0;
    color: #64748b;
    font-size: 0.86rem;
    line-height: 1.4;
}

.fiscal-master .fiscal-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
    padding: 18px;
}

.fiscal-master .fiscal-form-grid label {
    min-width: 0;
    gap: 8px;
    color: #334155;
    font-weight: 800;
}

.fiscal-master .fiscal-label-text {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px;
    line-height: 1.25;
}

.fiscal-master .required {
    display: inline;
    color: #dc2626;
    font-weight: 900;
}

.fiscal-master .fiscal-form-grid input,
.fiscal-master .fiscal-form-grid select,
.fiscal-master .fiscal-form-grid textarea {
    width: 100%;
    min-width: 0;
    border-color: rgba(148, 163, 184, 0.38);
    border-radius: 8px;
    background: #ffffff;
}

.fiscal-master .fiscal-form-grid input:focus,
.fiscal-master .fiscal-form-grid select:focus,
.fiscal-master .fiscal-form-grid textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    outline: none;
}

.fiscal-master .fiscal-subsection {
    padding: 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.fiscal-master .fiscal-section-header + .fiscal-subsection {
    border-top: 0;
}

.fiscal-master .fiscal-subsection h4 {
    margin: 0 0 12px;
    color: #0f172a;
    font-size: 0.92rem;
    font-weight: 900;
    letter-spacing: 0;
}

.fiscal-master .fiscal-subsection .fiscal-form-grid {
    padding: 0;
}

.fiscal-master .fiscal-save-row {
    display: flex;
    justify-content: flex-end;
    padding: 4px 0 0;
}

.fiscal-master .fiscal-save-button {
    min-width: 260px;
    min-height: 48px;
    border-radius: 8px;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.fiscal-master .fiscal-save-button:hover {
    transform: translateY(-1px);
}

@media (max-width: 1180px) {
    .fiscal-master .fiscal-hero {
        grid-template-columns: 1fr;
    }

    .fiscal-master .fiscal-card-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .fiscal-master .fiscal-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fiscal-master .fiscal-nav-primary {
        grid-column: span 2;
    }

    .fiscal-master .fiscal-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fiscal-master .fiscal-form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .fiscal-master {
        gap: 14px;
    }

    .fiscal-master .fiscal-nav,
    .fiscal-master .fiscal-card-grid {
        grid-template-columns: 1fr;
    }

    .fiscal-master .fiscal-nav-primary {
        grid-column: auto;
    }

    .fiscal-master .fiscal-section-header,
    .fiscal-master .fiscal-alert {
        align-items: flex-start;
    }

    .fiscal-master .fiscal-form-grid,
    .fiscal-master .fiscal-subsection {
        padding: 16px;
    }

    .fiscal-master .fiscal-save-button {
        width: 100%;
        min-width: 0;
    }
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(180deg, #eef4ff 0%, #f8fafc 100%);
    color: var(--text);
}

.page-wrapper {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 24px;
}

.login-card {
    width: min(480px, 100%);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 36px;
    box-shadow: var(--shadow);
}

.brand h1 {
    margin: 0 0 8px;
    font-size: 2rem;
}

.brand p {
    margin: 0;
    color: var(--muted);
}

.form-group {
    display: grid;
    gap: 8px;
    margin-top: 20px;
}

label {
    font-size: 0.95rem;
    font-weight: 600;
}

input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f8fafc;
    font-size: 1rem;
    color: var(--text);
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(66, 153, 225, 0.12);
}

.btn-primary {
    width: 100%;
    margin-top: 28px;
    border: none;
    border-radius: 14px;
    padding: 14px 18px;
    background: var(--primary);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.helper-text {
    margin: 20px 0 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.alert {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.alert ul {
    margin: 0;
    padding-left: 20px;
}

.app-shell {
    display: flex;
    min-height: 100vh;
    background: #f4f7fb;
    max-width: 100%;
    overflow-x: hidden;
}

.sidebar {
    width: 280px;
    min-height: 100vh;
    max-height: 100vh;
    background: #0f172a;
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 28px 20px;
    position: fixed;
    left: 0;
    top: 0;
    box-shadow: 4px 0 24px rgba(15, 23, 42, 0.08);
    overflow-y: auto;
    gap: 16px;
}

.mobile-menu-toggle,
.sidebar-backdrop {
    display: none;
}

.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: #2563eb;
    display: grid;
    place-items: center;
    font-weight: 700;
    color: #ffffff;
    font-size: 1.1rem;
}

.brand-name,
.brand-tag {
    display: block;
}

.brand-name {
    font-size: 1.15rem;
    font-weight: 700;
}

.brand-tag {
    color: #94a3b8;
    font-size: 0.9rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    text-decoration: none;
    color: #e2e8f0;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.sidebar-link-feature {
    justify-content: space-between;
    border: 1px solid rgba(94, 234, 212, 0.24);
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.18), rgba(37, 99, 235, 0.14));
}

.sidebar-link-feature:hover,
.sidebar-link-feature.active {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.30), rgba(37, 99, 235, 0.24));
}

.sidebar-badge-new {
    flex: 0 0 auto;
    padding: 4px 7px;
    border-radius: 8px;
    background: #5eead4;
    color: #042f2e;
    font-size: 0.68rem;
    font-weight: 900;
}

.sidebar-link-legacy {
    display: grid;
    gap: 3px;
    color: #cbd5e1;
}

.sidebar-link-legacy small {
    color: #94a3b8;
    font-size: 0.74rem;
    font-weight: 600;
}

.sidebar-footer {
    margin-top: auto;
}

.logout-link {
    color: #f8fafc;
}

.main-area {
    margin-left: 280px;
    width: calc(100% - 280px);
    max-width: calc(100% - 280px);
    padding: 32px 40px;
    min-width: 0;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.topbar-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
    min-width: 0;
}

.topbar-info h1 {
    margin: 0;
    font-size: clamp(1.6rem, 2vw, 2.4rem);
    color: #0f172a;
}

.topbar-subtitle {
    display: block;
    color: #64748b;
    margin-bottom: 6px;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #334155;
}

.topbar-user strong {
    color: #0f172a;
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 22px;
    border-radius: 14px;
    background: #2563eb;
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    transition: background 0.2s ease;
}

.btn-logout:hover {
    background: #1d4ed8;
}

.dashboard-content {
    display: grid;
    gap: 24px;
    max-width: 100%;
    min-width: 0;
}

.app,
.main,
.main-content,
.content,
.container,
.dashboard,
.card,
.panel,
.form-card,
.report-card,
.report-cards,
.dashboard-panel,
.page-panel,
.indicator-card,
.shortcut-card,
.chart-card,
.settings-panel,
.cashier-card,
.cashier-summary,
.cashier-notes,
.cashier-card-item,
.fiscal-item-card,
.pdv-panel,
.stock-panel {
    max-width: 100%;
    min-width: 0;
}

.page-panel {
    background: #ffffff;
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(15, 23, 42, 0.05);
    max-width: 100%;
    min-width: 0;
}

.panel-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    min-width: 0;
}

.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    min-width: 0;
}

.panel-header > *,
.panel-header-row > *,
.panel-section-header > * {
    min-width: 0;
}

.panel-header > div:last-child {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.panel-header > div:last-child a {
    white-space: nowrap;
}

.page-label {
    display: block;
    color: #64748b;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: 8px;
}

.search-panel {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
    max-width: 100%;
    min-width: 0;
}

.search-input {
    flex: 1;
    padding: 14px 18px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 16px;
    background: #f8fafc;
    color: #0f172a;
    min-width: 0;
}

.data-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    background: #ffffff;
}

.data-table thead {
    background: #f8fafc;
}

.data-table th,
.data-table td {
    padding: 16px 18px;
    text-align: left;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.data-table th {
    color: #475569;
    font-size: 0.95rem;
    font-weight: 600;
}

.data-table tr:hover {
    background: rgba(37, 99, 235, 0.04);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

.cashier-table-responsive {
    max-width: 100%;
}

.cashier-history-table th,
.cashier-history-table td {
    padding: 12px 14px;
    white-space: nowrap;
}

.empty-row {
    text-align: center;
    color: #64748b;
    padding: 32px 0;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    text-transform: capitalize;
    letter-spacing: 0.02em;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.status-pill.success {
    background: #dcfce7;
    color: #166534;
}

.status-pill.warning {
    background: #fef3c7;
    color: #92400e;
}

.status-active {
    background: #ecfdf5;
    color: #166534;
}

.status-inactive {
    background: #f8fafc;
    color: #475569;
}

.status-open {
    background: #ecfdf5;
    color: #166534;
}

.status-closed {
    background: #eff6ff;
    color: #1e40af;
}

.status-warning {
    background: #fffbeb;
    color: #92400e;
}

.status-danger {
    background: #fee2e2;
    color: #991b1b;
}

.report-filter-panel {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 22px;
}

.report-filter-panel label {
    display: grid;
    gap: 8px;
    min-width: 180px;
}

.report-filter-panel .btn-secondary {
    min-height: 52px;
}

.report-cards {
    margin-bottom: 24px;
}

.report-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.report-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.report-section:first-of-type {
    border-top: none;
}

.report-cashier-table th,
.report-cashier-table td {
    padding: 12px 14px;
    white-space: nowrap;
}

.action-column {
    display: flex;
    align-items: center;
    gap: 10px;
}

.link-button {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.link-button:hover {
    text-decoration: underline;
}

.link-danger {
    color: #dc2626;
}

.tag-inactive {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-size: 0.85rem;
}

.form-card {
    display: grid;
    gap: 24px;
    max-width: 100%;
    min-width: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    max-width: 100%;
}

.form-grid label,
.full-width {
    display: grid;
    gap: 10px;
    font-weight: 600;
    color: #0f172a;
}

input[type="text"],
input[type="search"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(15, 23, 42, 0.13);
    border-radius: 16px;
    background: #f8fafc;
    color: #0f172a;
    font-size: 1rem;
    max-width: 100%;
}

/* Produtos: listagem, filtros, formulario e detalhes. */
.products-page {
    border-radius: 8px;
}

.products-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.products-summary > div {
    display: grid;
    gap: 5px;
    padding: 14px 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    background: #f8fafc;
}

.products-summary span {
    color: #64748b;
    font-size: 0.82rem;
}

.products-summary strong {
    color: #0f172a;
    font-size: 1.35rem;
}

.products-filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1.8fr) minmax(130px, 0.7fr) minmax(180px, 1fr) auto auto;
    align-items: end;
    gap: 10px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    background: #f8fafc;
}

.products-filter-panel label {
    display: grid;
    gap: 7px;
    min-width: 0;
    color: #334155;
    font-size: 0.86rem;
    font-weight: 700;
}

.products-filter-panel input,
.products-filter-panel select,
.products-filter-panel .btn-secondary {
    min-height: 48px;
}

.products-clear-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.products-list-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 0;
    color: #64748b;
    font-size: 0.88rem;
}

.products-table .product-name,
.products-table .product-code,
.products-table .product-price-cell strong,
.products-table .product-price-cell small,
.products-table td[data-label="Estoque"] small {
    display: block;
}

.products-table .product-name {
    color: #0f172a;
}

.products-table .product-code,
.products-table td small,
.text-muted {
    margin-top: 4px;
    color: #64748b;
    font-size: 0.76rem;
}

.stock-warning {
    color: #b45309;
    font-weight: 800;
}

.products-table td {
    word-break: normal;
    overflow-wrap: normal;
}

.products-table td:first-child,
.products-table td:nth-child(2) {
    overflow-wrap: anywhere;
}

.products-actions form {
    margin: 0;
}

.products-actions button.link-button {
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.products-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 18px;
}

.products-pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 38px;
    padding: 7px 11px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 6px;
    color: #334155;
    text-decoration: none;
    font-weight: 700;
}

.products-pagination a.active {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
}

.product-form {
    gap: 16px;
}

.product-form-section,
.product-detail-section {
    display: grid;
    gap: 16px;
    padding: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    background: #ffffff;
}

.product-form-section.fiscal-product-panel {
    border-color: rgba(37, 99, 235, 0.3);
    background: #f8fbff;
}

.product-form-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.product-form-heading > div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-form-heading h3,
.product-form-heading p,
.product-detail-section h3,
.product-detail-section p {
    margin: 0;
}

.product-form-heading h3,
.product-detail-section h3 {
    font-size: 1rem;
    color: #0f172a;
}

.product-form-heading p {
    color: #64748b;
    font-size: 0.86rem;
}

.product-section-icon {
    display: inline-flex;
    flex: 0 0 30px;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 800;
}

.product-margin-preview {
    padding: 11px 13px;
    border-radius: 6px;
    background: #ecfdf5;
    color: #166534;
    font-size: 0.88rem;
    font-weight: 700;
}

.product-margin-preview.is-negative {
    background: #fee2e2;
    color: #991b1b;
}

.product-form-actions,
.product-show-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.product-detail-section dl {
    display: grid;
    gap: 0;
    margin: 0;
}

.product-detail-section dl > div {
    display: grid;
    grid-template-columns: minmax(110px, 0.8fr) minmax(0, 1.2fr);
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.product-detail-section dl > div:last-child {
    border-bottom: 0;
}

.product-detail-section dt {
    color: #64748b;
    font-size: 0.84rem;
}

.product-detail-section dd {
    min-width: 0;
    margin: 0;
    color: #0f172a;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.product-description {
    margin-top: 14px;
}

@media (max-width: 1120px) {
    .products-page .panel-header-row {
        align-items: stretch;
        flex-direction: column;
    }

    .products-page .panel-header-row .btn-primary,
    .products-page .panel-header-row .btn-secondary {
        width: 100%;
    }

    .products-filter-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .products-filter-panel .btn-secondary {
        width: 100%;
    }

    .product-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .products-summary,
    .products-filter-panel {
        grid-template-columns: 1fr;
    }

    .products-list-meta,
    .product-form-heading,
    .product-form-actions,
    .product-show-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .product-form-actions .btn-primary,
    .product-form-actions .btn-secondary,
    .product-show-actions .btn-primary,
    .product-show-actions .btn-secondary {
        width: 100%;
    }

    .product-detail-section dl > div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .products-actions form,
    .products-actions button.link-button {
        width: auto;
    }
}

/* Stock Master V2 - override final contra regras globais posteriores. */
.stock-page {
    overflow: visible !important;
}

.stock-page .stock-filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(180px, 240px) auto;
    gap: 12px;
    align-items: end;
}

.stock-page .stock-grid {
    display: grid;
    grid-template-columns: minmax(300px, 380px) minmax(760px, 1fr) !important;
    gap: 22px;
    align-items: start;
    margin-top: 22px;
}

.stock-page .stock-panel {
    min-width: 0;
    border-radius: var(--premium-radius, 8px);
}

.stock-page .stock-movements-panel {
    min-width: 0;
}

.stock-page .stock-movements-scroll {
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: visible;
}

.stock-page .stock-movement-table {
    width: 100%;
    min-width: 820px !important;
    table-layout: auto !important;
}

.stock-page .stock-movement-table th,
.stock-page .stock-movement-table td {
    word-break: normal !important;
    overflow-wrap: normal !important;
    white-space: normal;
}

.stock-page .stock-movement-table .stock-col-date,
.stock-page .stock-movement-table .stock-col-type,
.stock-page .stock-movement-table .stock-col-qty,
.stock-page .stock-movement-table .stock-col-user {
    white-space: nowrap !important;
}

.stock-page .stock-movement-table .stock-col-date {
    min-width: 128px;
}

.stock-page .stock-movement-table .stock-col-type {
    min-width: 92px;
}

.stock-page .stock-movement-table .stock-col-qty {
    min-width: 112px;
    text-align: right;
}

.stock-page .stock-movement-table .stock-col-user {
    min-width: 126px;
}

.stock-page .stock-movement-table .stock-col-product {
    min-width: 190px;
    overflow-wrap: break-word !important;
}

.stock-page .stock-movement-table .stock-col-reason {
    min-width: 170px;
    overflow-wrap: break-word !important;
}

.stock-page .stock-entry-form {
    display: grid;
    gap: 14px;
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.stock-page .stock-entry-form label {
    display: grid;
    gap: 7px;
}

.stock-page .stock-entry-form select,
.stock-page .stock-entry-form input,
.stock-page .stock-entry-form textarea,
.stock-page .stock-entry-form .btn-primary {
    width: 100%;
}

.stock-page .stock-pagination-info {
    margin: 14px 0 0;
}

.stock-page .stock-pagination {
    justify-content: center;
    margin-top: 12px;
}

.stock-page .stock-page-link {
    min-width: 40px;
}

.stock-page .stock-page-link.disabled {
    pointer-events: none;
}

@media (max-width: 1500px) {
    .stock-page .stock-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 900px) {
    .stock-page .stock-filter-panel {
        grid-template-columns: 1fr;
    }

    .stock-page .stock-filter-panel .btn-secondary {
        width: 100%;
    }

    .stock-page .stock-movement-table {
        min-width: 760px !important;
    }
}

@media (max-width: 768px) {
    .stock-page {
        overflow-x: hidden !important;
    }

    .stock-page .stock-movements-scroll {
        overflow-x: auto !important;
        padding-bottom: 4px;
    }

    .stock-page .stock-movement-table,
    .stock-page .stock-movement-table thead,
    .stock-page .stock-movement-table tbody,
    .stock-page .stock-movement-table tr,
    .stock-page .stock-movement-table td {
        display: revert !important;
        width: auto;
    }

    .stock-page .stock-movement-table thead {
        display: table-header-group !important;
    }

    .stock-page .stock-movement-table tr {
        box-shadow: none;
    }

    .stock-page .stock-movement-table td::before {
        display: none !important;
    }
}

/* Visual Master V2 - camada global de acabamento, sem alterar fluxos. */
:root {
    --master-bg: #eef3f8;
    --master-bg-strong: #e6edf5;
    --master-surface: #ffffff;
    --master-surface-soft: #f8fbff;
    --master-ink: #111827;
    --master-muted: #64748b;
    --master-line: rgba(15, 23, 42, 0.10);
    --master-line-strong: rgba(15, 23, 42, 0.18);
    --master-primary: #2563eb;
    --master-primary-strong: #1d4ed8;
    --master-accent: #0f766e;
    --master-success: #16a34a;
    --master-warning: #d97706;
    --master-danger: #dc2626;
    --master-info: #0284c7;
    --master-radius: 8px;
    --master-radius-sm: 6px;
    --master-shadow-sm: 0 8px 18px rgba(15, 23, 42, 0.06);
    --master-shadow: 0 16px 34px rgba(15, 23, 42, 0.09);
    --master-shadow-hover: 0 20px 44px rgba(15, 23, 42, 0.12);
    --master-focus: 0 0 0 4px rgba(37, 99, 235, 0.16);
    --master-transition: 150ms ease;
}

body {
    background:
        linear-gradient(180deg, rgba(37, 99, 235, 0.05) 0%, rgba(15, 118, 110, 0.035) 38%, transparent 72%),
        var(--master-bg);
    color: var(--master-ink);
    text-rendering: optimizeLegibility;
}

.main-content,
.content-area,
main {
    min-width: 0;
}

.page-panel,
.dashboard-panel,
.report-section,
.form-card,
.settings-panel,
.financial-section,
.cashier-current-card,
.cashier-card,
.client-detail-section,
.client-history-section,
.product-form-section,
.product-detail-section,
.category-form-section,
.category-detail-section,
.purchase-form-section,
.purchase-detail-section,
.fiscal-module-card,
.fiscal-status-summary,
.fiscal-product-panel,
.fiscal-corrections-panel,
.support-card,
.license-card,
.empty-state {
    border: 1px solid var(--master-line);
    border-radius: var(--master-radius);
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: var(--master-shadow-sm);
}

.page-panel,
.dashboard-panel,
.report-section,
.form-card,
.settings-panel {
    padding-top: clamp(18px, 2vw, 28px);
}

.panel-header-row,
.panel-header,
.dashboard-section-heading,
.product-form-heading,
.client-section-heading,
.financial-section-heading,
.fiscal-section-heading {
    gap: 14px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.07);
}

.panel-header-row h1,
.panel-header-row h2,
.panel-header h2,
.dashboard-section-heading h2,
.financial-section-heading h2,
.form-card h2,
.report-section h2 {
    color: #0f172a;
    font-weight: 900;
    letter-spacing: 0;
}

.panel-header-row p,
.panel-header p,
.dashboard-section-heading p,
.financial-section-heading p,
.form-card p,
.report-section p {
    color: var(--master-muted);
    line-height: 1.55;
}

.page-label,
.section-label,
.indicator-title {
    letter-spacing: 0;
}

.indicator-card,
.shortcut-card,
.cashier-card-item,
.dashboard-card,
.products-summary > div,
.clients-summary > div,
.categories-summary > div,
.financial-flow-card,
.fiscal-module-card {
    border: 1px solid var(--master-line);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: var(--master-shadow-sm);
}

.indicator-card,
.shortcut-card,
.cashier-card-item,
.products-summary > div,
.clients-summary > div,
.categories-summary > div,
.fiscal-module-card {
    transition: transform var(--master-transition), box-shadow var(--master-transition), border-color var(--master-transition);
}

.indicator-card:hover,
.shortcut-card:hover,
.cashier-card-item:hover,
.products-summary > div:hover,
.clients-summary > div:hover,
.categories-summary > div:hover,
.fiscal-module-card:hover {
    border-color: rgba(37, 99, 235, 0.24);
    box-shadow: var(--master-shadow-hover);
    transform: translateY(-1px);
}

.indicator-value,
.dashboard-metric-value,
.financial-flow-card strong {
    color: #0f172a;
    letter-spacing: 0;
}

.btn-primary,
.btn-secondary,
.btn-success,
.btn-warning,
.btn-danger,
.btn-muted,
.link-button,
.pagination-link,
.pagination-item,
.products-pagination a,
.financial-pagination a,
.cashier-pagination a,
.report-pagination a,
button {
    border-radius: var(--master-radius);
    text-decoration: none;
}

.btn-primary,
.btn-secondary,
.btn-success,
.btn-warning,
.btn-danger,
.btn-muted,
.link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 850;
    line-height: 1.2;
    transition: transform var(--master-transition), box-shadow var(--master-transition), background var(--master-transition), border-color var(--master-transition), color var(--master-transition);
}

.btn-primary {
    border-color: rgba(37, 99, 235, 0.18);
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.20);
}

.btn-secondary,
.link-button {
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #ffffff;
    color: #334155;
    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.05);
}

.btn-success {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: #ffffff;
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #111827;
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #ffffff;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-success:hover,
.btn-warning:hover,
.btn-danger:hover,
.btn-muted:hover,
.link-button:hover {
    text-decoration: none;
    box-shadow: var(--master-shadow-sm);
    transform: translateY(-1px);
}

.btn-sm,
.action-column .btn-primary,
.action-column .btn-secondary,
.action-column .btn-success,
.action-column .btn-warning,
.action-column .btn-danger,
.action-column .btn-muted,
.action-column .link-button {
    min-height: 34px;
    padding: 7px 11px;
    font-size: 0.82rem;
    white-space: nowrap;
}

.search-panel,
.products-filter-panel,
.clients-filter-panel,
.categories-filter-panel,
.sale-filter-panel,
.purchase-filter-panel,
.report-filter-panel,
.financial-filters,
.cashier-filters {
    border: 1px solid var(--master-line);
    border-radius: var(--master-radius);
    background: linear-gradient(180deg, #f8fbff 0%, #f3f7fc 100%);
}

label,
.form-label {
    color: #334155;
    font-weight: 800;
}

input[type="text"],
input[type="search"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="tel"],
select,
textarea {
    border-color: rgba(15, 23, 42, 0.14);
    border-radius: var(--master-radius-sm);
    background: #ffffff;
    color: #111827;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
    outline: 0;
    border-color: var(--master-primary);
    box-shadow: var(--master-focus);
}

.table-responsive {
    border-radius: var(--master-radius);
}

.data-table {
    border: 1px solid var(--master-line);
    border-radius: var(--master-radius);
    background: #ffffff;
    overflow: hidden;
}

.data-table thead {
    background: linear-gradient(180deg, #eef5ff 0%, #e6eef8 100%);
}

.data-table th {
    color: #334155;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

.data-table td {
    border-color: rgba(15, 23, 42, 0.07);
}

.data-table tbody tr:hover {
    background: #f8fbff;
}

.data-table th:nth-child(2),
.data-table td[data-label="Vencimento"],
.data-table td[data-label="Data"],
.data-table td[data-label="Criado em"],
.data-table td[data-label="Atualizado em"],
.data-table td[data-label="SKU"],
.data-table td[data-label="Código"],
.data-table td[data-label="Status"] {
    white-space: nowrap;
    overflow-wrap: normal;
}

.action-column,
.actions-column,
.table-actions,
.products-actions,
.clients-actions,
.categories-actions,
.purchase-actions {
    gap: 8px;
}

.action-column,
.table-actions {
    align-items: center;
    justify-content: flex-end;
}

.action-column a,
.action-column button,
.table-actions a,
.table-actions button {
    white-space: nowrap;
}

.badge-status,
.badge-active,
.badge-inactive,
.badge-open,
.badge-closed,
.badge-paid,
.badge-pending,
.badge-danger,
.status-pill,
.tag-inactive {
    border-radius: 999px;
    font-weight: 900;
    letter-spacing: 0;
}

.alert,
.alert-success,
.alert-danger,
.alert-warning,
.alert-info,
.report-integrity-alert,
.financial-integrity-alert,
.fiscal-corrections-panel {
    border-radius: var(--master-radius);
    box-shadow: var(--master-shadow-sm);
}

.empty-row,
.empty-state,
.panel-body.empty-state {
    border-radius: var(--master-radius);
    background: #f8fbff;
    color: var(--master-muted);
}

.pagination,
.products-pagination,
.financial-pagination,
.cashier-pagination,
.report-pagination > div {
    gap: 8px;
}

.pagination-link,
.pagination-item,
.products-pagination a,
.financial-pagination a,
.cashier-pagination a,
.report-pagination a {
    border-color: var(--master-line-strong);
    background: #ffffff;
    color: #334155;
    font-weight: 900;
    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.04);
}

.pagination-active,
.products-pagination a.active,
.financial-pagination a.is-active,
.cashier-pagination a.is-active,
.report-pagination a.is-active {
    border-color: var(--master-primary);
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
}

.sidebar {
    box-shadow: 10px 0 32px rgba(15, 23, 42, 0.16);
}

.sidebar a,
.sidebar .nav-link {
    border-radius: var(--master-radius);
}

.sidebar a:hover,
.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.10);
}

@media (max-width: 768px) {
    .page-panel,
    .dashboard-panel,
    .report-section,
    .form-card,
    .settings-panel {
        border-radius: var(--master-radius);
    }

    .data-table th {
        white-space: normal;
    }

    .table-responsive tr {
        border: 1px solid var(--master-line);
        background: #ffffff;
    }

    .table-responsive td {
        min-width: 0;
    }

    .table-responsive .action-column,
    .table-responsive .table-actions {
        align-items: stretch;
        justify-content: flex-end;
        flex-wrap: wrap;
        width: 100%;
    }

    .table-responsive .action-column a,
    .table-responsive .action-column button,
    .table-responsive .action-column .link-button,
    .table-responsive .table-actions a,
    .table-responsive .table-actions button {
        flex: 1 1 auto;
        min-width: 86px;
        width: auto;
        white-space: normal;
    }
}

@media print {
    body {
        background: #ffffff;
    }

    .page-panel,
    .dashboard-panel,
    .report-section,
    .form-card,
    .settings-panel,
    .data-table {
        box-shadow: none;
    }
}

/* Stock Master V2 - Controle de Estoque. */
.stock-page {
    overflow: visible;
}

.stock-page .panel-header-row {
    margin-bottom: 2px;
}

.stock-filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(180px, 240px) auto;
    gap: 12px;
    align-items: end;
    padding: 16px;
    margin-bottom: 18px;
}

.stock-filter-panel .search-input,
.stock-filter-panel .select-filter,
.stock-filter-panel .btn-secondary {
    min-height: 44px;
}

.stock-filter-panel .btn-secondary {
    min-width: 118px;
}

.stock-products-table {
    table-layout: auto;
}

.stock-products-table th,
.stock-products-table td {
    word-break: normal;
}

.stock-status-badge {
    min-width: 88px;
}

.stock-grid {
    grid-template-columns: minmax(300px, 380px) minmax(760px, 1fr);
    align-items: start;
    gap: 22px;
    margin-top: 22px;
}

.stock-panel {
    border: 1px solid var(--master-line, rgba(15, 23, 42, 0.10));
    border-radius: var(--master-radius, 8px);
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: var(--master-shadow-sm, 0 8px 18px rgba(15, 23, 42, 0.06));
}

.stock-panel .panel-section-header {
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.07);
}

.stock-panel .panel-section-header h3 {
    color: #0f172a;
    font-size: 1.08rem;
    font-weight: 900;
}

.stock-panel .panel-section-header p {
    color: var(--master-muted, #64748b);
}

.stock-entry-form {
    display: grid;
    gap: 14px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.stock-entry-form label {
    display: grid;
    gap: 7px;
}

.stock-entry-form select,
.stock-entry-form input,
.stock-entry-form textarea {
    width: 100%;
}

.stock-entry-form textarea {
    min-height: 96px;
    resize: vertical;
}

.stock-entry-form .btn-primary {
    width: 100%;
    min-height: 46px;
}

.stock-movements-panel {
    min-width: 0;
}

.stock-movements-scroll {
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: visible;
    scrollbar-width: thin;
}

.stock-movement-table {
    min-width: 820px;
    table-layout: auto !important;
}

.stock-movement-table th,
.stock-movement-table td {
    word-break: normal !important;
    overflow-wrap: normal !important;
    vertical-align: middle;
}

.stock-movement-table .stock-col-date {
    min-width: 128px;
    white-space: nowrap;
}

.stock-movement-table .stock-col-type {
    min-width: 92px;
    white-space: nowrap;
}

.stock-movement-table .stock-col-qty {
    min-width: 112px;
    text-align: right;
    white-space: nowrap;
}

.stock-movement-table .stock-col-user {
    min-width: 126px;
    white-space: nowrap;
}

.stock-movement-table .stock-col-product {
    min-width: 190px;
    white-space: normal;
    overflow-wrap: break-word !important;
}

.stock-movement-table .stock-col-reason {
    min-width: 170px;
    white-space: normal;
    overflow-wrap: break-word !important;
}

@media (max-width: 1500px) {
    .stock-grid {
        grid-template-columns: 1fr;
    }

    .stock-movements-panel {
        width: 100%;
    }
}

@media (max-width: 900px) {
    .stock-filter-panel {
        grid-template-columns: 1fr;
    }

    .stock-filter-panel .btn-secondary {
        width: 100%;
    }

    .stock-movement-table {
        min-width: 760px;
    }
}

@media (max-width: 768px) {
    .stock-page {
        overflow-x: hidden;
    }

    .stock-panel {
        padding: 16px;
    }

    .stock-movements-scroll {
        overflow-x: auto !important;
        margin-inline: -4px;
        padding-bottom: 4px;
    }

    .stock-movement-table,
    .stock-movement-table thead,
    .stock-movement-table tbody,
    .stock-movement-table tr,
    .stock-movement-table td {
        display: revert;
        width: auto;
    }

    .stock-movement-table thead {
        display: table-header-group;
    }

    .stock-movement-table tr {
        box-shadow: none;
    }

    .stock-movement-table td::before {
        display: none;
    }

    .stock-movement-table th {
        white-space: nowrap;
    }
}

/* Clientes: listagem, formularios, detalhes e historico. */
.clients-page {
    border-radius: 8px;
}

.clients-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.clients-summary > div {
    display: grid;
    gap: 5px;
    padding: 14px 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    background: #f8fafc;
}

.clients-summary span {
    color: #64748b;
    font-size: 0.82rem;
}

.clients-summary strong {
    color: #0f172a;
    font-size: 1.35rem;
}

.clients-filter-panel {
    display: grid;
    grid-template-columns: minmax(230px, 1.5fr) minmax(130px, 0.65fr) minmax(170px, 0.9fr) auto auto;
    align-items: end;
    gap: 10px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    background: #f8fafc;
}

.clients-filter-panel label {
    display: grid;
    gap: 7px;
    min-width: 0;
    color: #334155;
    font-size: 0.86rem;
    font-weight: 700;
}

.clients-filter-panel input,
.clients-filter-panel select,
.clients-filter-panel .btn-secondary {
    min-height: 48px;
}

.clients-clear-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.clients-list-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 0;
    color: #64748b;
    font-size: 0.88rem;
}

.clients-table .client-name,
.clients-table td small,
.clients-table td[data-label="Contato"] span,
.clients-table td[data-label="Histórico"] strong,
.clients-table td[data-label="Financeiro"] strong {
    display: block;
}

.clients-table td small {
    margin-top: 4px;
    color: #64748b;
    font-size: 0.76rem;
}

.clients-actions form {
    margin: 0;
}

.clients-actions button.link-button {
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.clients-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 18px;
}

.clients-pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 38px;
    padding: 7px 11px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 6px;
    color: #334155;
    text-decoration: none;
    font-weight: 700;
}

.clients-pagination a.active {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
}

.client-form {
    gap: 16px;
}

.client-form-section,
.client-detail-section,
.client-history-section {
    display: grid;
    gap: 16px;
    padding: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    background: #ffffff;
}

.client-form-heading {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.client-form-heading h3,
.client-form-heading p,
.client-detail-section h3,
.client-section-heading h3 {
    margin: 0;
}

.client-form-heading h3,
.client-detail-section h3,
.client-section-heading h3 {
    color: #0f172a;
    font-size: 1rem;
}

.client-form-heading p {
    margin-top: 4px;
    color: #64748b;
    font-size: 0.86rem;
}

.client-section-icon {
    display: inline-flex;
    flex: 0 0 32px;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 800;
}

.client-form-actions,
.client-show-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.client-detail-grid,
.client-history-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.client-history-grid {
    grid-template-columns: 1fr;
}

.client-detail-section dl {
    display: grid;
    gap: 0;
    margin: 0;
}

.client-detail-section dl > div {
    display: grid;
    grid-template-columns: minmax(140px, 0.8fr) minmax(0, 1.2fr);
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.client-detail-section dl > div:last-child {
    border-bottom: 0;
}

.client-detail-section dt {
    color: #64748b;
    font-size: 0.84rem;
}

.client-detail-section dd {
    min-width: 0;
    margin: 0;
    color: #0f172a;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.client-history-grid {
    margin-top: 14px;
    align-items: start;
}

@media (max-width: 1120px) {
    .clients-page .panel-header-row {
        align-items: stretch;
        flex-direction: column;
    }

    .clients-page .panel-header-row .btn-primary,
    .clients-page .panel-header-row .btn-secondary {
        width: 100%;
    }

    .clients-filter-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .clients-filter-panel .btn-secondary {
        width: 100%;
    }

    .client-detail-grid,
    .client-history-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .clients-summary,
    .clients-filter-panel {
        grid-template-columns: 1fr;
    }

    .clients-list-meta,
    .client-form-actions,
    .client-show-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .client-form-actions .btn-primary,
    .client-form-actions .btn-secondary,
    .client-show-actions .btn-primary,
    .client-show-actions .btn-secondary {
        width: 100%;
    }

    .client-detail-section dl > div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .clients-actions form,
    .clients-actions button.link-button {
        width: auto;
    }
}

/* Fornecedores: historico de compras e acoes responsivas. */
.sales-page {
    border-radius: 8px;
}

.sale-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.sale-summary > div {
    display: grid;
    gap: 5px;
    padding: 14px 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    background: #f8fafc;
}

.sale-summary span {
    color: #64748b;
    font-size: 0.82rem;
}

.sale-summary strong {
    color: #0f172a;
    font-size: 1.25rem;
}

.sale-filter-panel {
    display: grid;
    grid-template-columns: minmax(190px, 1.25fr) repeat(5, minmax(125px, 0.75fr)) auto auto;
    align-items: end;
    gap: 10px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    background: #f8fafc;
}

.sale-filter-panel label,
.sale-void-form label {
    display: grid;
    gap: 7px;
    min-width: 0;
    color: #334155;
    font-size: 0.86rem;
    font-weight: 700;
}

.sale-filter-panel input,
.sale-filter-panel select,
.sale-filter-panel .btn-secondary {
    min-height: 46px;
}

.sales-table td strong,
.sales-table td small {
    display: block;
}

.sales-table td small {
    margin-top: 4px;
    color: #64748b;
    font-size: 0.75rem;
}

.sale-void-form {
    display: grid;
    gap: 12px;
    max-width: 640px;
    padding: 18px;
    margin-top: 16px;
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 8px;
    background: #fff7f7;
}

.sale-void-form textarea {
    min-height: 90px;
}

@media (max-width: 1120px) {
    .sale-summary,
    .sale-filter-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sale-filter-panel .btn-secondary {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .sale-summary,
    .sale-filter-panel {
        grid-template-columns: 1fr;
    }

    .sale-void-form .btn-secondary {
        width: 100%;
    }
}

/* Fornecedores: historico de compras e acoes responsivas. */
.purchases-page {
    border-radius: 8px;
}

.purchase-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.purchase-summary > div,
.purchase-total-card,
.purchase-finalize-card {
    display: grid;
    gap: 6px;
    padding: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    background: #f8fafc;
}

.purchase-summary span,
.purchase-total-card > span {
    color: #64748b;
    font-size: 0.82rem;
}

.purchase-summary strong {
    color: #0f172a;
    font-size: 1.25rem;
}

.purchase-filter-panel {
    display: grid;
    grid-template-columns: minmax(190px, 1.3fr) repeat(4, minmax(130px, 0.8fr)) auto auto;
    align-items: end;
    gap: 10px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    background: #f8fafc;
}

.purchase-filter-panel label,
.purchase-item-form label,
.purchase-finalize-card label {
    display: grid;
    gap: 7px;
    min-width: 0;
    color: #334155;
    font-size: 0.86rem;
    font-weight: 700;
}

.purchase-filter-panel input,
.purchase-filter-panel select,
.purchase-filter-panel .btn-secondary,
.purchase-item-form input,
.purchase-item-form select {
    min-height: 46px;
}

.purchases-table td strong,
.purchases-table td small,
.purchase-items-table td strong,
.purchase-items-table td small {
    display: block;
}

.purchases-table td small,
.purchase-items-table td small {
    margin-top: 4px;
    color: #64748b;
    font-size: 0.75rem;
}

.purchase-actions form,
.purchase-items-table form {
    margin: 0;
}

.purchase-actions button.link-button,
.purchase-items-table button.link-button {
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.purchase-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    gap: 16px;
    align-items: start;
}

.purchase-main-column,
.purchase-side-column {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.purchase-item-form {
    display: grid;
    grid-template-columns: minmax(210px, 1.5fr) minmax(110px, 0.55fr) minmax(140px, 0.75fr) auto;
    align-items: end;
    gap: 10px;
}

.purchase-total-card {
    background: #ffffff;
}

.purchase-total-card > strong {
    color: #0f172a;
}

.purchase-total-card > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-top: 12px;
    margin-top: 6px;
    border-top: 1px solid rgba(15, 23, 42, 0.1);
    color: #0f172a;
    font-size: 1.05rem;
}

.purchase-finalize-card {
    background: #ffffff;
}

.purchase-finalize-card h3,
.purchase-finalize-card p {
    margin: 0;
}

.purchase-finalize-card p,
.purchase-finalize-card small,
.purchase-empty-note {
    color: #64748b;
    font-size: 0.82rem;
}

.purchase-finalize-card .btn-primary,
.purchase-cancel-button {
    width: 100%;
}

@media (max-width: 1120px) {
    .purchase-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .purchase-filter-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .purchase-filter-panel .btn-secondary {
        width: 100%;
    }

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

@media (max-width: 768px) {
    .purchase-summary,
    .purchase-filter-panel,
    .purchase-item-form {
        grid-template-columns: 1fr;
    }

    .purchase-item-form .btn-primary {
        width: 100%;
    }

    .purchase-total-card > div {
        align-items: flex-end;
        flex-direction: column;
    }

    .purchase-actions form,
    .purchase-actions button.link-button,
    .purchase-items-table form,
    .purchase-items-table button.link-button {
        width: auto;
    }
}

/* Compras Master V2 */
.purchases-master {
    border-radius: 8px;
}

.purchases-master .panel-header-row {
    gap: 14px;
}

.purchases-master .purchases-summary {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.purchases-master .purchase-summary > div,
.purchases-master .purchase-total-card,
.purchases-master .purchase-finalize-card,
.purchases-master .purchase-form-section,
.purchases-master .purchase-profile-card {
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.purchases-master .purchase-summary span {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.purchases-master .purchase-summary strong {
    font-size: 1.34rem;
    line-height: 1.15;
}

.purchases-master .purchase-filter-panel {
    grid-template-columns: minmax(220px, 1.4fr) minmax(130px, 0.8fr) repeat(2, minmax(140px, 0.8fr)) minmax(150px, 0.85fr) auto auto;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.purchases-master .purchases-pagination-info {
    align-items: center;
    margin: 14px 0;
}

.purchases-master .purchases-table-wrap {
    overflow-x: auto;
}

.purchases-master .purchases-table,
.purchases-master .purchase-items-table {
    width: 100%;
    min-width: 980px;
    table-layout: auto;
}

.purchases-master .purchases-table th,
.purchases-master .purchases-table td,
.purchases-master .purchase-items-table th,
.purchases-master .purchase-items-table td {
    vertical-align: middle;
    word-break: normal;
    overflow-wrap: normal;
}

.purchases-master .purchases-table th,
.purchases-master .purchase-items-table th {
    white-space: nowrap;
}

.purchases-master .purchases-table th.actions-col,
.purchases-master .purchases-table td.purchase-actions,
.purchases-master .purchase-items-table th.actions-col,
.purchases-master .purchase-items-table td.purchase-actions {
    min-width: 210px;
    text-align: right;
    white-space: normal;
}

.purchases-master .purchases-table td[data-label="Data"],
.purchases-master .purchases-table td[data-label="Total"],
.purchases-master .purchase-items-table td[data-label="Quantidade"],
.purchases-master .purchase-items-table td[data-label="Custo unitário"],
.purchases-master .purchase-items-table td[data-label="Subtotal"] {
    white-space: nowrap;
}

.purchases-master .purchase-muted-badge {
    display: inline-flex;
    width: fit-content;
    padding: 3px 7px;
    border: 1px solid rgba(100, 116, 139, 0.18);
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
}

.purchases-master .purchases-actions-row,
.purchases-master .purchases-actions-row form {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin: 0;
}

.purchases-master .purchases-actions-row {
    flex-wrap: wrap;
    max-width: 100%;
}

.purchases-master .purchase-action-btn {
    flex: 0 0 auto;
    min-width: 78px;
    min-height: 34px;
    padding: 7px 10px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

.purchases-master button.purchase-action-btn {
    font: inherit;
    cursor: pointer;
}

.purchases-master .purchase-cancel-btn,
.purchases-master .purchase-delete-btn {
    border-color: rgba(220, 38, 38, 0.22);
    background: #fff1f2;
    color: #b91c1c;
}
.purchase-admin-cancel-form { display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
.purchase-admin-cancel-form input[type="text"] { min-width:180px; max-width:240px; }
.purchase-stock-reversal { color:#b91c1c; }
.purchase-cancellation-alert { border-left:4px solid #ea580c; background:#fff7ed; color:#7c2d12; }

.purchases-master .purchases-pagination {
    justify-content: center;
    margin-top: 18px;
}

.purchases-master .purchases-pagination .pagination-link,
.purchases-master .purchases-pagination .pagination-item {
    min-width: 38px;
    min-height: 38px;
    padding: 7px 11px;
    white-space: nowrap;
}

.purchases-master .purchases-pagination .pagination-disabled {
    color: #94a3b8;
    cursor: default;
}

.purchases-master .purchase-form,
.purchases-master .purchase-items-section {
    border-radius: 8px;
}

.purchases-master .purchase-form-section-title {
    margin-bottom: 14px;
}

.purchases-master .purchase-show-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.purchases-master.purchase-detail-page {
    display: grid;
    gap: 18px;
}

.purchases-master .purchase-detail-header {
    align-items: flex-start;
    padding-bottom: 2px;
}

.purchases-master .purchase-back-button {
    position: relative;
    min-width: 104px;
    border-color: rgba(15, 23, 42, 0.14);
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    font-weight: 800;
}

.purchases-master .purchase-back-button::before {
    content: "<";
    margin-right: 7px;
    color: #64748b;
    font-weight: 900;
}

.purchases-master .purchase-detail-grid {
    gap: 16px;
}

.purchases-master .purchase-detail-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    border-radius: 8px;
}

.purchases-master .purchase-card-heading {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.purchases-master .purchase-card-heading h3,
.purchases-master .purchase-section-header h3 {
    margin: 0;
    color: #0f172a;
    letter-spacing: 0;
}

.purchases-master .purchase-card-kicker {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.purchases-master .purchase-detail-card dl,
.purchases-master .purchase-payable-card dl {
    display: grid;
    gap: 0;
    margin: 0;
}

.purchases-master .purchase-detail-card dl > div,
.purchases-master .purchase-payable-card dl > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.purchases-master .purchase-detail-card dl > div:first-child,
.purchases-master .purchase-payable-card dl > div:first-child {
    border-top: 0;
    padding-top: 0;
}

.purchases-master .purchase-detail-card dt,
.purchases-master .purchase-payable-card dt {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.purchases-master .purchase-detail-card dd,
.purchases-master .purchase-payable-card dd {
    margin: 0;
    color: #0f172a;
    font-weight: 800;
    text-align: right;
}

.purchases-master .purchase-total-highlight {
    margin: 4px -8px;
    padding: 15px 8px !important;
    border: 1px solid rgba(14, 165, 233, 0.18) !important;
    border-radius: 8px;
    background: #f0f9ff;
}

.purchases-master .purchase-total-highlight dt {
    color: #0369a1;
}

.purchases-master .purchase-total-highlight dd {
    color: #075985;
    font-size: 1.45rem;
    line-height: 1.1;
}

.purchases-master .purchase-sections-grid {
    display: grid;
    gap: 16px;
}

.purchases-master .purchase-section {
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.purchases-master .purchase-section-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 17px 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.purchases-master .purchase-section-header p {
    margin: 3px 0 0;
    color: #64748b;
    font-size: 0.84rem;
}

.purchases-master .purchase-section-icon {
    display: inline-flex;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(14, 165, 233, 0.20);
    border-radius: 8px;
    background: #f0f9ff;
    color: #0369a1;
    font-size: 0.76rem;
    font-weight: 900;
}

.purchases-master .purchase-detail-table-wrap {
    margin: 0;
    overflow-x: auto;
}

.purchases-master .purchase-detail-table {
    min-width: 760px;
}

.purchases-master .purchase-detail-table th,
.purchases-master .purchase-detail-table td {
    padding: 13px 16px;
    vertical-align: middle;
}

.purchases-master .purchase-detail-table th {
    background: #f8fafc;
    color: #475569;
    font-size: 0.74rem;
    letter-spacing: 0;
    text-transform: uppercase;
    white-space: nowrap;
}

.purchases-master .purchase-detail-table td[data-label="Quantidade"],
.purchases-master .purchase-detail-table td[data-label="Custo unitário"],
.purchases-master .purchase-detail-table td[data-label="Subtotal"],
.purchases-master .purchase-detail-table td[data-label="Data"] {
    white-space: nowrap;
}

.purchases-master .purchase-payable-section {
    padding-bottom: 18px;
}

.purchases-master .purchase-payable-card {
    margin: 18px;
    padding: 18px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 8px;
    background: #f8fafc;
    box-shadow: none;
}

.purchases-master .purchase-payable-value {
    margin: 4px -8px;
    padding: 14px 8px !important;
    border: 1px solid rgba(22, 163, 74, 0.18) !important;
    border-radius: 8px;
    background: #f0fdf4;
}

.purchases-master .purchase-payable-value dt {
    color: #15803d;
}

.purchases-master .purchase-payable-value dd {
    color: #166534;
    font-size: 1.2rem;
}

.purchases-master .purchase-status-badge,
.purchases-master .purchase-payable-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 900;
    line-height: 1;
}

.purchases-master .purchase-payable-status {
    border: 1px solid rgba(22, 163, 74, 0.20);
    background: #dcfce7;
    color: #166534;
}

.purchases-master .purchase-payable-section .purchase-empty-note {
    margin: 18px;
    padding: 14px 16px;
    border: 1px dashed rgba(100, 116, 139, 0.26);
    border-radius: 8px;
    background: #f8fafc;
}

@media (max-width: 1280px) {
    .purchases-master .purchases-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .purchases-master .purchase-filter-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .purchases-master .purchase-filter-panel .btn-secondary {
        width: 100%;
    }

    .purchases-master .purchases-table th.actions-col,
    .purchases-master .purchases-table td.purchase-actions,
    .purchases-master .purchase-items-table th.actions-col,
    .purchases-master .purchase-items-table td.purchase-actions {
        min-width: 190px;
    }
}

@media (max-width: 768px) {
    .purchases-master .panel-header-row {
        align-items: stretch;
    }

    .purchases-master .purchases-summary,
    .purchases-master .purchase-filter-panel {
        grid-template-columns: 1fr;
    }

    .purchases-master .purchases-pagination-info {
        align-items: flex-start;
        flex-direction: column;
    }

    .purchases-master .purchases-table,
    .purchases-master .purchase-items-table {
        min-width: 0;
    }

    .purchases-master .purchases-table th.actions-col,
    .purchases-master .purchases-table td.purchase-actions,
    .purchases-master .purchase-items-table th.actions-col,
    .purchases-master .purchase-items-table td.purchase-actions {
        min-width: 0;
        text-align: left;
    }

    .purchases-master .purchases-actions-row,
    .purchases-master .purchases-actions-row form {
        justify-content: stretch;
        width: 100%;
    }

    .purchases-master .purchase-action-btn {
        flex: 1 1 112px;
        min-width: 112px;
    }

    .purchases-master .purchases-pagination .pagination-link,
    .purchases-master .purchases-pagination .pagination-item {
        flex: 1 1 42px;
    }

    .purchases-master .purchase-show-actions,
    .purchases-master .client-form-actions {
        justify-content: stretch;
    }

    .purchases-master .purchase-show-actions a,
    .purchases-master .client-form-actions a,
    .purchases-master .client-form-actions button {
        width: 100%;
    }

    .purchases-master .purchase-detail-card,
    .purchases-master .purchase-section-header,
    .purchases-master .purchase-payable-card {
        padding: 16px;
    }

    .purchases-master .purchase-detail-card dl > div,
    .purchases-master .purchase-payable-card dl > div {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .purchases-master .purchase-detail-card dd,
    .purchases-master .purchase-payable-card dd {
        text-align: left;
    }

    .purchases-master .purchase-total-highlight dd {
        font-size: 1.25rem;
    }

    .purchases-master .purchase-detail-table {
        min-width: 0;
    }
}

/* Fornecedores: historico de compras e acoes responsivas. */
.suppliers-table td[data-label="Compras"] strong,
.suppliers-table td[data-label="Compras"] small {
    display: block;
}

.suppliers-table td[data-label="Compras"] small {
    margin-top: 4px;
    color: #64748b;
    font-size: 0.76rem;
}

.suppliers-actions form {
    margin: 0;
}

.suppliers-actions button.link-button {
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

@media (max-width: 768px) {
    .suppliers-actions form,
    .suppliers-actions button.link-button {
        width: auto;
    }
}

/* Categorias: listagem, formularios e detalhes. */
.categories-page {
    border-radius: 8px;
}

.categories-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.categories-summary > div {
    display: grid;
    gap: 5px;
    padding: 14px 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    background: #f8fafc;
}

.categories-summary span {
    color: #64748b;
    font-size: 0.82rem;
}

.categories-summary strong {
    color: #0f172a;
    font-size: 1.35rem;
}

.categories-filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1.8fr) minmax(150px, 0.7fr) auto auto;
    align-items: end;
    gap: 10px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    background: #f8fafc;
}

.categories-filter-panel label {
    display: grid;
    gap: 7px;
    min-width: 0;
    color: #334155;
    font-size: 0.86rem;
    font-weight: 700;
}

.categories-filter-panel input,
.categories-filter-panel select,
.categories-filter-panel .btn-secondary {
    min-height: 48px;
}

.categories-clear-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.categories-list-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 0;
    color: #64748b;
    font-size: 0.88rem;
}

.categories-table td[data-label="Produtos"] strong,
.categories-table td[data-label="Produtos"] small {
    display: block;
}

.categories-table td[data-label="Produtos"] small {
    margin-top: 3px;
    color: #64748b;
    font-size: 0.76rem;
}

.categories-actions form {
    margin: 0;
}

.categories-actions button.link-button {
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.category-linked-tag {
    color: #92400e;
    font-size: 0.78rem;
    font-weight: 700;
}

.categories-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 18px;
}

.categories-pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 38px;
    padding: 7px 11px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 6px;
    color: #334155;
    text-decoration: none;
    font-weight: 700;
}

.categories-pagination a.active {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
}

.category-form {
    gap: 16px;
}

.category-form-section,
.category-detail-section,
.category-products-section {
    display: grid;
    gap: 16px;
    padding: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    background: #ffffff;
}

.category-form-heading {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.category-form-heading h3,
.category-form-heading p,
.category-detail-section h3,
.category-detail-section p,
.category-section-heading h3,
.category-section-heading p {
    margin: 0;
}

.category-form-heading h3,
.category-detail-section h3,
.category-section-heading h3 {
    color: #0f172a;
    font-size: 1rem;
}

.category-form-heading p,
.category-section-heading p {
    margin-top: 4px;
    color: #64748b;
    font-size: 0.86rem;
}

.category-section-icon {
    display: inline-flex;
    flex: 0 0 32px;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 800;
}

.category-form-actions,
.category-show-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.category-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.category-detail-section dl {
    display: grid;
    gap: 0;
    margin: 0;
}

.category-detail-section dl > div {
    display: grid;
    grid-template-columns: minmax(130px, 0.8fr) minmax(0, 1.2fr);
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.category-detail-section dl > div:last-child {
    border-bottom: 0;
}

.category-detail-section dt {
    color: #64748b;
    font-size: 0.84rem;
}

.category-detail-section dd {
    margin: 0;
    color: #0f172a;
    font-weight: 700;
}

.category-products-section {
    margin-top: 14px;
}

@media (max-width: 1120px) {
    .categories-page .panel-header-row {
        align-items: stretch;
        flex-direction: column;
    }

    .categories-page .panel-header-row .btn-primary,
    .categories-page .panel-header-row .btn-secondary {
        width: 100%;
    }

    .categories-filter-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .categories-filter-panel .btn-secondary {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .categories-summary,
    .categories-filter-panel,
    .category-detail-grid {
        grid-template-columns: 1fr;
    }

    .categories-list-meta,
    .category-form-actions,
    .category-show-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .category-form-actions .btn-primary,
    .category-form-actions .btn-secondary,
    .category-show-actions .btn-primary,
    .category-show-actions .btn-secondary {
        width: 100%;
    }

    .category-detail-section dl > div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .categories-actions form,
    .categories-actions button.link-button {
        width: auto;
    }
}

textarea {
    resize: vertical;
}

.settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(320px, 1fr);
    gap: 24px;
    max-width: 100%;
}

.settings-aside {
    display: grid;
    gap: 24px;
}

.settings-panel {
    background: #ffffff;
    border-radius: 24px;
    padding: 24px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.06);
}

.logo-preview {
    width: 100%;
    max-height: 240px;
    object-fit: contain;
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #f8fafc;
    padding: 20px;
}

.empty-logo {
    display: grid;
    place-items: center;
    min-height: 240px;
    color: #64748b;
    background: #f8fafc;
    border: 1px dashed rgba(100, 116, 139, 0.35);
    border-radius: 20px;
    text-align: center;
    padding: 24px;
}

.required {
    color: #dc2626;
    margin-left: 4px;
}

.alert-success {
    margin-bottom: 18px;
    padding: 16px 20px;
    border-radius: 18px;
    background: #ecfdf5;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    margin-bottom: 18px;
    padding: 16px 20px;
    border-radius: 18px;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-info {
    margin-bottom: 18px;
    padding: 16px 20px;
    border-radius: 18px;
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.alert-warning {
    margin-bottom: 18px;
    padding: 16px 20px;
    border-radius: 18px;
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.actions-row,
.form-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.actions-row .btn-primary,
.actions-row .btn-secondary,
.form-actions .btn-primary,
.form-actions .btn-secondary,
.panel-header-row .btn-primary,
.panel-header-row .btn-secondary {
    width: auto;
    margin-top: 0;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 14px 18px;
    border-radius: 14px;
    background: #f8fafc;
    color: #1f2937;
    border: 1px solid rgba(15, 23, 42, 0.13);
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #eef2f7;
}

.btn-primary.btn-disabled,
.btn-primary.btn-disabled:hover,
.btn-secondary.btn-disabled,
.btn-secondary.btn-disabled:hover,
.btn-disabled,
.btn-disabled:hover {
    background: #e5e7eb !important;
    color: #64748b !important;
    border: 1px solid rgba(100, 116, 139, 0.35) !important;
    cursor: not-allowed !important;
    opacity: 0.75;
    pointer-events: none;
    box-shadow: none;
    text-decoration: none;
}

.form-panel {
    display: grid;
    gap: 20px;
}

.form-panel label {
    display: grid;
    gap: 10px;
}

.cashier-card,
.cashier-summary,
.cashier-notes {
    display: grid;
    gap: 14px;
    margin-bottom: 22px;
    padding: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    background: #ffffff;
}

.cashier-status {
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
}

.cashier-status-open {
    background: #ecfdf5;
    color: #166534;
}

.cashier-details {
    display: grid;
    gap: 10px;
    color: #334155;
}

.cashier-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.cashier-summary-row:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.cashier-summary-total {
    font-size: 1.05rem;
    color: #0f172a;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding-top: 28px;
}

.checkbox-label input {
    width: auto;
}

.cashier-notes p {
    margin: 0;
    line-height: 1.6;
}

.dashboard-topcards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    max-width: 100%;
}

.indicator-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(15, 23, 42, 0.05);
    min-width: 0;
}

.indicator-title {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.indicator-value {
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 10px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.indicator-meta {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.dashboard-shortcuts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    max-width: 100%;
}

.shortcut-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 28px;
    border: 1px solid rgba(15, 23, 42, 0.05);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
}

.shortcut-card h3 {
    margin: 0;
    font-size: 1.05rem;
}

.shortcut-card p {
    margin: 0;
    color: #475569;
    line-height: 1.7;
}

.dashboard-panel {
    background: #ffffff;
    border-radius: 24px;
    padding: 28px;
    border: 1px solid rgba(15, 23, 42, 0.05);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
    min-width: 0;
}

.dashboard-visuals {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.chart-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 24px;
    border: 1px solid rgba(15, 23, 42, 0.05);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
    min-height: 320px;
    display: flex;
    flex-direction: column;
}

.chart-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}

.chart-card-header h3 {
    margin: 0;
    font-size: 1.05rem;
}

.chart-card-header p {
    margin: 0;
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.5;
}

.chart-wrapper {
    flex: 1;
    min-height: 240px;
    position: relative;
}

.chart-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
}

.chart-empty {
    flex: 1;
    display: grid;
    place-items: center;
    text-align: center;
    color: #475569;
    border: 1px dashed rgba(100, 116, 139, 0.35);
    border-radius: 20px;
    background: #f8fafc;
    padding: 24px;
}

.cashier-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 10px;
}

.cashier-card-item {
    background: #f8fafc;
    border-radius: 20px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 1px solid rgba(15, 23, 42, 0.05);
    min-width: 0;
}

.cashier-card-item span {
    color: #64748b;
    font-size: 0.95rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.cashier-card-item strong {
    color: #0f172a;
    font-size: 1.25rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.pdv-grid,
.stock-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 20px;
    max-width: 100%;
    min-width: 0;
}

.pdv-panel,
.stock-panel {
    display: grid;
    gap: 18px;
    align-content: start;
    padding: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    background: #ffffff;
}

.panel-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    max-width: 100%;
    min-width: 0;
}

.panel-section-header h3,
.panel-section-header p {
    margin: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.panel-section-header h3 {
    color: #0f172a;
    font-size: 1.05rem;
}

.panel-section-header p {
    color: #64748b;
    line-height: 1.5;
}

.cart-area,
.cart-summary,
.cart-totals,
.cart-actions,
.empty-state {
    max-width: 100%;
    min-width: 0;
}

.cart-summary {
    display: grid;
    gap: 16px;
}

.cart-summary label,
#cash-fields,
#credit-fields {
    display: grid;
    gap: 10px;
}

.cart-totals {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.cart-total-row,
.cashier-summary-row {
    min-width: 0;
}

.cart-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cart-total-row span,
.cart-total-row strong,
.cashier-summary-row span,
.cashier-summary-row strong {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.total-final {
    font-size: 1.08rem;
    color: #0f172a;
}

.empty-state {
    display: grid;
    place-items: center;
    text-align: center;
    color: #475569;
    border: 1px dashed rgba(100, 116, 139, 0.35);
    border-radius: 18px;
    background: #f8fafc;
    padding: 24px;
}

.hidden {
    display: none !important;
}

.select-filter {
    min-width: 180px;
}

h1,
h2,
h3,
p,
label,
.topbar-subtitle,
.topbar-user,
.page-label,
.helper-text,
.shortcut-card,
.dashboard-panel,
.page-panel,
.settings-panel,
.cashier-card,
.cashier-details,
.cashier-notes,
.panel-header,
.panel-header-row,
.panel-body,
.link-button,
.btn-primary,
.btn-secondary,
.btn-logout {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.fiscal-item-card {
    display: grid;
    gap: 16px;
    padding: 18px;
    margin-top: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    background: #f8fafc;
}

.fiscal-item-card:first-child {
    margin-top: 0;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.panel-header h2 {
    margin: 0;
    font-size: 1.35rem;
}

.panel-header p {
    margin: 0;
    color: #64748b;
}

.panel-body.empty-state {
    min-height: 190px;
    display: grid;
    place-items: center;
    text-align: center;
    color: #475569;
    border: 1px dashed rgba(100, 116, 139, 0.35);
    border-radius: 20px;
    padding: 28px;
    background: #f8fafc;
}

.panel-body.empty-state strong {
    display: block;
    margin-bottom: 10px;
    font-size: 1.05rem;
    color: #0f172a;
}

.app-footer {
    margin-top: 40px;
    color: #64748b;
    font-size: 0.95rem;
    text-align: center;
}

@media (max-width: 1120px) {
    .dashboard-topcards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-shortcuts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .report-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body.sidebar-open {
        overflow: hidden;
    }

    body.sidebar-open .mobile-menu-toggle {
        display: none;
    }

    .app-shell {
        display: block;
        width: 100%;
    }

    .mobile-menu-toggle {
        position: fixed;
        top: 8px;
        left: 16px;
        right: 16px;
        z-index: 1100;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: auto;
        min-height: 46px;
        margin: 0;
        padding: 12px 16px;
        border: 1px solid rgba(15, 23, 42, 0.12);
        border-radius: 14px;
        background: #0f172a;
        color: #ffffff;
        font-weight: 700;
        cursor: pointer;
        box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1200;
        width: min(300px, 86vw);
        max-width: 86vw;
        height: 100vh;
        min-height: 100vh;
        max-height: 100vh;
        padding: 24px 16px;
        transform: translateX(-105%);
        transition: transform 0.25s ease;
    }

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

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1150;
        background: rgba(15, 23, 42, 0.42);
    }

    body.sidebar-open .sidebar-backdrop {
        display: block;
    }

    .main-area {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
        padding: 76px 14px 24px;
    }

    .topbar,
    .topbar-info,
    .panel-header,
    .panel-header-row {
        align-items: stretch;
        flex-direction: column;
    }

    .topbar {
        gap: 14px;
    }

    .topbar-user {
        flex-wrap: wrap;
    }

    .btn-dashboard-local,
    .btn-logout,
    .btn-primary,
    .btn-secondary,
    .panel-header a,
    .panel-header button,
    .panel-section-header a,
    .panel-section-header button,
    .actions-row .btn-primary,
    .actions-row .btn-secondary,
    .form-actions .btn-primary,
    .form-actions .btn-secondary,
    .search-panel .btn-primary,
    .search-panel .btn-secondary,
    .report-filter-panel .btn-primary,
    .report-filter-panel .btn-secondary,
    .cart-actions .btn-primary,
    .cart-actions .btn-secondary {
        width: 100%;
        margin-top: 0;
    }

    .page-panel,
    .dashboard-panel,
    .indicator-card,
    .shortcut-card,
    .chart-card,
    .settings-panel,
    .pdv-panel,
    .stock-panel,
    .cashier-card,
    .cashier-summary,
    .cashier-notes {
        border-radius: 18px;
        padding: 18px;
    }

    .dashboard-topcards,
    .dashboard-shortcuts,
    .dashboard-visuals,
    .cashier-card-grid,
    .form-grid,
    .report-grid,
    .settings-grid,
    .pdv-grid,
    .stock-grid {
        grid-template-columns: 1fr;
    }

    .search-panel,
    .report-filter-panel,
    .actions-row,
    .form-actions,
    .action-column,
    .panel-section-header,
    .chart-card-header,
    .cart-total-row,
    .cashier-summary-row {
        align-items: stretch;
        flex-direction: column;
    }

    .search-input,
    .select-filter,
    .report-filter-panel label,
    .report-filter-panel .btn-secondary,
    .report-filter-panel .btn-primary {
        width: 100%;
        min-width: 0;
    }

    .data-table {
        min-width: 0;
    }

    .table-responsive {
        overflow-x: visible;
    }

    .table-responsive table,
    .table-responsive thead,
    .table-responsive tbody,
    .table-responsive th,
    .table-responsive td,
    .table-responsive tr {
        display: block;
    }

    .table-responsive thead {
        display: none;
    }

    .table-responsive tbody {
        display: grid;
        gap: 14px;
    }

    .table-responsive tr {
        width: 100%;
        margin: 0;
        padding: 14px;
        border: 1px solid #e5e7eb;
        border-radius: 16px;
        background: #ffffff;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    }

    .table-responsive tr:hover {
        background: #ffffff;
    }

    .table-responsive td {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        width: 100%;
        padding: 9px 0;
        border-bottom: 1px solid #eef2f7;
        text-align: right;
        white-space: normal;
        word-break: normal;
        overflow-wrap: break-word;
    }

    .table-responsive td:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .table-responsive td::before {
        content: attr(data-label);
        flex: 0 0 116px;
        max-width: 46%;
        min-width: 100px;
        text-align: left;
        font-weight: 700;
        color: #64748b;
        word-break: normal;
        overflow-wrap: break-word;
    }

    .table-responsive td:empty::before,
    .table-responsive td.empty-row::before {
        content: none;
    }

    .table-responsive .empty-row {
        display: block;
        text-align: center;
        padding: 14px 0;
    }

    .table-responsive .action-column {
        align-items: flex-end;
        flex-direction: column;
    }

    .table-responsive td input,
    .table-responsive td select,
    .table-responsive td button {
        max-width: 100%;
    }

    .table-responsive td input[type="number"],
    .table-responsive td input[type="date"] {
        width: min(170px, 100%);
    }

    .table-responsive .status-pill {
        justify-content: center;
        text-align: center;
    }

    .table-responsive .btn-primary,
    .table-responsive .btn-secondary {
        width: auto;
        min-width: 120px;
    }

    .topbar-info h1 {
        font-size: 1.45rem;
    }

    .panel-header h2,
    .panel-header-row h2 {
        font-size: 1.2rem;
    }

    .indicator-value {
        font-size: 1.45rem;
    }

    .dashboard-content {
        gap: 18px;
    }

    .report-section {
        margin-top: 18px;
        padding-top: 18px;
    }

    .cart-totals,
    .empty-state {
        padding: 14px;
    }

    .app-footer {
        margin-top: 28px;
    }
}

@media (max-width: 640px) {
    .dashboard-topcards,
    .dashboard-shortcuts {
        grid-template-columns: 1fr;
    }

    .sidebar {
        padding: 24px 16px;
    }

    .btn-logout {
        width: 100%;
    }

    .report-filter-panel {
        align-items: stretch;
    }

    .report-filter-panel label,
    .report-filter-panel .btn-secondary {
        width: 100%;
    }
}

/* Ajustes globais de responsividade para tabelas e area principal. */
.main-area {
    width: auto;
    max-width: none;
    min-width: 0;
}

.page-panel,
.dashboard-content,
.panel-body,
.table-responsive {
    min-width: 0;
}

.table-responsive {
    display: block;
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.table-responsive table,
.data-table {
    width: max-content;
    min-width: 100%;
}

table:not(.data-table) {
    max-width: 100%;
    overflow-x: auto;
}

table th,
table td,
.data-table th,
.data-table td {
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
}

.action-column,
.actions-row,
td:last-child {
    white-space: nowrap;
}

.action-column {
    min-width: max-content;
}

.link-button,
.btn-primary,
.btn-secondary,
.btn-logout,
.btn-dashboard-local,
.action-column a,
.action-column button,
.actions-row a,
.actions-row button {
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
}

@media (max-width: 768px) {
    .app-shell {
        overflow-x: hidden;
    }

    .sidebar {
        width: min(280px, 86vw);
        max-width: 86vw;
    }

    .main-area {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
        padding: 72px 16px 24px;
    }

    .page-panel {
        padding: 20px 16px;
    }

    .table-responsive {
        overflow-x: auto !important;
    }

    .table-responsive table,
    .table-responsive thead,
    .table-responsive tbody,
    .table-responsive th,
    .table-responsive td,
    .table-responsive tr {
        display: revert;
    }

    .table-responsive thead {
        display: table-header-group;
    }

    .table-responsive tbody {
        display: table-row-group;
    }

    .table-responsive tr {
        display: table-row;
        width: auto;
        padding: 0;
        box-shadow: none;
        border: 0;
        border-radius: 0;
    }

    .table-responsive th,
    .table-responsive td {
        display: table-cell;
        width: auto;
        padding: 12px 14px;
    }

    .table-responsive td::before {
        content: none;
    }

    .table-responsive .action-column {
        display: table-cell;
    }

    .table-responsive .btn-primary,
    .table-responsive .btn-secondary,
    .table-responsive .link-button {
        width: auto;
        min-width: max-content;
    }
}

@media (min-width: 769px) {
    .data-table th,
    .data-table td {
        font-size: 0.9rem;
    }

    .data-table th {
        font-size: 0.855rem;
    }

    .data-table .action-column {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        line-height: 1.2;
    }
}

/* Dashboard: hierarchy, compact cards and responsive tables. */
.dashboard-audit {
    gap: 22px;
}

.dashboard-audit .dashboard-panel,
.dashboard-audit .indicator-card,
.dashboard-audit .shortcut-card,
.dashboard-audit .cashier-card-item {
    border-radius: 8px;
}

.dashboard-audit .dashboard-panel {
    padding: 24px;
}

.dashboard-filter-panel {
    display: grid;
    gap: 20px;
}

.dashboard-title-row {
    align-items: center;
}

.dashboard-title-row h2,
.dashboard-section-heading h2 {
    margin: 0;
    color: #0f172a;
    font-size: 1.25rem;
}

.dashboard-title-row p,
.dashboard-section-heading p {
    margin: 5px 0 0;
    color: #64748b;
    line-height: 1.5;
}

.dashboard-period-badge,
.dashboard-count-badge {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 6px;
    background: #eff6ff;
    color: #1e40af;
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
}

.dashboard-filter-form {
    display: grid;
    grid-template-columns: minmax(160px, 0.9fr) repeat(2, minmax(160px, 1fr)) auto;
    align-items: end;
    gap: 12px;
    margin: 0;
}

.dashboard-filter-form label {
    min-width: 0;
}

.dashboard-filter-form select,
.dashboard-filter-form input {
    width: 100%;
}

.dashboard-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.dashboard-section-heading.compact {
    margin-bottom: 12px;
}

.dashboard-shortcuts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-audit .shortcut-card {
    gap: 14px;
    padding: 18px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.shortcut-card-heading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.shortcut-card-heading h3 {
    min-width: 0;
}

.shortcut-icon {
    display: inline-flex;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 6px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 1rem;
    font-weight: 800;
}

.dashboard-audit .shortcut-card .btn-secondary {
    width: 100%;
    margin-top: auto;
}

.dashboard-primary-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-secondary-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.dashboard-audit .indicator-card {
    position: relative;
    min-height: 134px;
    padding: 18px;
    border-left: 4px solid #cbd5e1;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.dashboard-audit .indicator-card-primary {
    border-left-color: #2563eb;
}

.dashboard-audit .indicator-card-success {
    border-left-color: #16a34a;
}

.dashboard-audit .indicator-card-warning {
    border-left-color: #d97706;
}

.dashboard-audit .indicator-card-neutral {
    border-left-color: #475569;
}

.dashboard-audit .indicator-title {
    margin-bottom: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.dashboard-audit .indicator-value {
    margin-bottom: 7px;
    font-size: clamp(1.3rem, 2vw, 1.75rem);
    line-height: 1.15;
}

.dashboard-audit .indicator-meta {
    font-size: 0.82rem;
    line-height: 1.4;
}

.dashboard-financial-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.dashboard-indicator-group {
    min-width: 0;
}

.dashboard-audit .cashier-card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.dashboard-audit .cashier-card-item {
    padding: 14px;
    gap: 7px;
}

.dashboard-audit .cashier-card-item strong {
    font-size: 1.08rem;
}

.dashboard-lists-grid {
    align-items: start;
}

.dashboard-audit .dashboard-table .status-pill {
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.78rem;
}

.dashboard-audit .status-pill.neutral {
    background: #f1f5f9;
    color: #475569;
}

.dashboard-audit .status-pill.danger {
    background: #fee2e2;
    color: #991b1b;
}

@media (max-width: 1120px) {
    .topbar {
        flex-wrap: wrap;
    }

    .topbar-info {
        flex: 1 1 100%;
    }

    .topbar-info h1 {
        white-space: nowrap;
    }

    .dashboard-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-filter-form .btn-secondary {
        width: 100%;
    }

    .dashboard-shortcuts,
    .dashboard-primary-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-financial-groups {
        grid-template-columns: 1fr;
    }

    .dashboard-audit .cashier-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .dashboard-audit {
        gap: 18px;
    }

    .dashboard-audit .dashboard-panel {
        padding: 18px;
    }

    .dashboard-title-row {
        align-items: stretch;
    }

    .dashboard-period-badge,
    .dashboard-count-badge {
        width: 100%;
        justify-content: center;
        white-space: normal;
        text-align: center;
    }

    .dashboard-filter-form,
    .dashboard-shortcuts,
    .dashboard-primary-kpis,
    .dashboard-secondary-kpis,
    .dashboard-audit .cashier-card-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-audit .indicator-card {
        min-height: 0;
    }

    .dashboard-audit .dashboard-table td::before {
        min-width: 100px;
    }
}

@media (max-width: 768px) {
    .table-responsive {
        overflow-x: visible !important;
        overflow-y: visible;
    }

    .table-responsive .data-table,
    .table-responsive table {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .table-responsive thead {
        display: none;
    }

    .table-responsive tbody {
        display: grid;
        width: 100%;
        gap: 14px;
    }

    .table-responsive tr {
        display: block;
        width: 100%;
        padding: 14px;
        border: 1px solid rgba(15, 23, 42, 0.08);
        border-radius: 14px;
        background: #ffffff;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    }

    .table-responsive th,
    .table-responsive td {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 14px;
        width: 100%;
        padding: 9px 0;
        border-bottom: 1px solid rgba(15, 23, 42, 0.08);
        white-space: normal;
        word-break: normal;
        overflow-wrap: anywhere;
        text-align: right;
    }

    .table-responsive td:last-child {
        border-bottom: 0;
        padding-bottom: 0;
        white-space: normal;
    }

    .table-responsive td::before {
        content: attr(data-label);
        flex: 0 0 112px;
        max-width: 44%;
        color: #64748b;
        font-weight: 700;
        text-align: left;
        white-space: normal;
    }

    .table-responsive td:empty::before,
    .table-responsive td.empty-row::before {
        content: none;
    }

    .table-responsive .empty-row {
        display: block;
        text-align: center;
        padding: 14px 0;
    }

    .table-responsive .action-column {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 8px;
        min-width: 0;
    }

    .table-responsive .action-column::before {
        align-self: flex-start;
    }

    .table-responsive .action-column .link-button,
    .table-responsive .action-column a,
    .table-responsive .action-column button {
        width: auto;
        min-width: 0;
        white-space: nowrap;
        text-align: right;
    }

    .table-responsive .status-pill {
        justify-content: center;
        text-align: center;
        white-space: nowrap;
    }
}

@media (min-width: 769px) {
    .page-panel {
        overflow: hidden;
    }

    .table-responsive {
        overflow-x: visible !important;
        overflow-y: visible;
        max-width: 100%;
    }

    .table-responsive table,
    .data-table {
        width: 100%;
        min-width: 0;
        table-layout: fixed;
    }

    .data-table th,
    .data-table td {
        padding: 10px 11px;
        font-size: 0.82rem;
        line-height: 1.3;
        white-space: normal;
        word-break: normal;
        overflow-wrap: anywhere;
        vertical-align: top;
    }

    .data-table th {
        font-size: 0.78rem;
        line-height: 1.2;
    }

    .data-table td[data-label="SKU"],
    .data-table td[data-label="Telefone"],
    .data-table td[data-label="CPF/CNPJ"],
    .data-table td[data-label="Preco venda"],
    .data-table td[data-label="PreÃ§o venda"],
    .data-table td[data-label="Estoque atual"],
    .data-table td[data-label="Reservado"],
    .data-table td[data-label="Disponivel"],
    .data-table td[data-label="DisponÃ­vel"],
    .data-table td[data-label="Saldo devedor"],
    .data-table td[data-label="Fiados em aberto"],
    .data-table td[data-label="Status"],
    .data-table td[data-label="AÃ§Ãµes"],
    .data-table td[data-label="Ações"] {
        white-space: nowrap;
        overflow-wrap: normal;
    }

    .data-table .status-pill,
    .data-table .tag-inactive,
    .data-table .link-button {
        white-space: nowrap;
    }

    .data-table .action-column {
        min-width: 0;
        gap: 6px;
    }
}
/* Financeiro auditado */
.financial-page { display: grid; gap: 24px; }
.financial-premium { scroll-behavior: smooth; }
.financial-hero { align-items: flex-start; }
.financial-cards { margin: 0; }
.financial-summary { display: grid; gap: 16px; }
.financial-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; border: 1px solid rgba(15, 23, 42, 0.10); border-radius: 8px; background: #f8fafc; }
.financial-tabs a { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 8px 12px; border: 1px solid rgba(15, 23, 42, 0.10); border-radius: 8px; background: #fff; color: #334155; font-weight: 800; text-decoration: none; }
.financial-tabs a:hover { border-color: rgba(37, 99, 235, 0.28); background: #eff6ff; color: #1d4ed8; text-decoration: none; }
.financial-flow-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.financial-flow-card { display: grid; gap: 6px; padding: 16px; border: 1px solid rgba(15, 23, 42, 0.10); border-radius: 8px; background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%); }
.financial-flow-card span { color: #64748b; font-size: 0.82rem; font-weight: 800; text-transform: uppercase; }
.financial-flow-card strong { color: #0f172a; font-size: 1.35rem; line-height: 1.15; }
.financial-flow-card small { color: #64748b; font-weight: 700; }
.financial-section { display: grid; gap: 16px; scroll-margin-top: 16px; }
.financial-section-heading { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; border-bottom: 1px solid rgba(15, 23, 42, 0.06); padding-bottom: 14px; }
.financial-section-heading h2 { margin-bottom: 4px; }
.financial-back-top { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 7px 10px; border: 1px solid rgba(15, 23, 42, 0.12); border-radius: 8px; background: #fff; color: #334155; font-size: 0.82rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.financial-back-top:hover { border-color: rgba(37, 99, 235, 0.28); background: #eff6ff; color: #1d4ed8; text-decoration: none; }
.financial-filter-card { border: 1px solid rgba(15, 23, 42, 0.10); border-radius: 8px; background: #ffffff; overflow: hidden; }
.financial-filter-card summary { cursor: pointer; padding: 12px 14px; background: #f8fafc; color: #334155; font-weight: 800; list-style-position: inside; }
.financial-filter-card .financial-filters { border: 0; border-top: 1px solid rgba(15, 23, 42, 0.08); border-radius: 0; box-shadow: none; }
.financial-filters { display: grid; grid-template-columns: repeat(5, minmax(140px, 1fr)); gap: 12px; align-items: end; }
.financial-filters .btn-primary,
.financial-filters .btn-secondary { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.financial-table {
    table-layout: auto;
}
.financial-table th,
.financial-table td { vertical-align: middle; }
.financial-table .financial-money { text-align: right; white-space: nowrap; }
.financial-table .financial-date { white-space: nowrap; }
.financial-table th.due-date-col,
.financial-table td.due-date-col {
    min-width: 126px;
    width: 126px;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}
.financial-table th.actions-col,
.financial-table td.actions-col {
    min-width: 260px;
    width: 260px;
    text-align: right;
    white-space: nowrap;
}
.financial-table .action-column { min-width: 260px; overflow: visible; }
.financial-table .table-actions,
.financial-table .table-actions form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.financial-table .table-actions { min-width: max-content; }
.financial-table .table-actions form { margin: 0; }
.financial-table .table-actions .link-button,
.financial-table .table-actions .btn-secondary,
.financial-table .table-actions a,
.financial-table .table-actions button { flex: 0 0 auto; max-width: none; white-space: nowrap; overflow: visible; text-overflow: clip; }
.financial-integrity-alert { line-height: 1.55; scroll-margin-top: 16px; }
.financial-list-meta { color: var(--text-muted, #64748b); font-size: .875rem; }
.financial-pagination { display: flex; flex-wrap: wrap; gap: 6px; }
.financial-pagination a,
.financial-pagination span { min-width: 36px; min-height: 36px; padding: 7px 10px; border: 1px solid var(--border-color, #dbe2ea); border-radius: 8px; text-align: center; text-decoration: none; }
.financial-pagination a.is-active { background: var(--primary-color, #2563eb); border-color: var(--primary-color, #2563eb); color: #fff; }
.financial-pagination-info { margin-top: 0; }
.financial-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.financial-notes { margin: 12px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; color: inherit; }
.financial-detail-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.financial-detail-actions form { width: min(100%, 520px); display: grid; gap: 12px; }
.financial-detail-actions textarea { width: 100%; min-height: 90px; }

@media (max-width: 1024px) {
    .financial-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .financial-filters,
    .financial-flow-grid,
    .financial-detail-grid { grid-template-columns: 1fr; }
    .financial-tabs a { flex: 1 1 calc(50% - 8px); }
    .financial-section-heading { align-items: stretch; flex-direction: column; }
    .financial-back-top { width: 100%; }
    .financial-table thead { display: none; }
    .financial-table,
    .financial-table tbody,
    .financial-table tr,
    .financial-table td { display: block; width: 100%; }
    .financial-table tr { padding: 12px 0; border-bottom: 1px solid var(--border-color, #dbe2ea); }
    .financial-table td { display: grid; grid-template-columns: minmax(105px, 38%) 1fr; gap: 12px; padding: 7px 12px; border: 0; text-align: right; overflow-wrap: anywhere; }
    .financial-table td::before { content: attr(data-label); font-weight: 700; text-align: left; color: var(--text-muted, #64748b); }
    .financial-table th.actions-col,
    .financial-table td.actions-col,
    .financial-table th.due-date-col,
    .financial-table td.due-date-col {
        min-width: 0;
        width: 100%;
        white-space: normal;
    }
    .financial-table td.action-column { display: flex; min-width: 0; justify-content: flex-end; padding-top: 12px; }
    .financial-table td.action-column::before { width: 100%; }
    .financial-table .table-actions { justify-content: flex-end; min-width: 0; width: 100%; }
    .financial-table .table-actions .link-button,
    .financial-table .table-actions .btn-secondary,
    .financial-table .table-actions a,
    .financial-table .table-actions button { min-width: 78px; justify-content: center; }
    .financial-table .financial-money { text-align: right; white-space: normal; }
    .financial-table .empty-row { display: block; text-align: center; }
    .financial-table .empty-row::before { display: none; }
}

/* Relatórios: filtros extensos, alertas de integridade e paginação */
.reports-page .report-filter-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    align-items: end;
}

.reports-page .report-filter-panel label {
    min-width: 0;
}

.reports-page .report-filter-panel input,
.reports-page .report-filter-panel select {
    width: 100%;
}

.report-integrity-alert {
    line-height: 1.55;
}

.report-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
}

.report-pagination > div {
    display: flex;
    gap: 8px;
}

@media (max-width: 700px) {
    .reports-page .report-filter-panel {
        grid-template-columns: 1fr;
    }

    .report-pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .report-pagination > div,
    .report-pagination .btn-secondary {
        width: 100%;
    }
}

/* Relatorios Master V2 */
.reports-master-page {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    justify-items: stretch;
    gap: 22px;
    overflow-x: hidden;
}

.reports-master-page .reports-hero {
    align-items: flex-start;
    position: relative;
    isolation: isolate;
    padding: 30px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background:
        linear-gradient(135deg, rgba(240, 253, 250, 0.92), rgba(255, 255, 255, 0.98) 46%, rgba(239, 246, 255, 0.82)),
        #fff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.reports-master-page .reports-hero::after {
    content: "";
    position: absolute;
    inset: 0 0 auto auto;
    z-index: -1;
    width: min(280px, 42%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.12), rgba(37, 99, 235, 0.08));
}

.reports-master-page .reports-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.reports-master-page .reports-master-badge,
.reports-master-page .reports-period-chip,
.reports-master-page .reports-section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
}

.reports-master-page .reports-master-badge {
    padding: 7px 10px;
    color: #065f46;
    border: 1px solid rgba(16, 185, 129, 0.28);
    background: #d1fae5;
}

.reports-master-page .reports-period-chip {
    margin-top: 14px;
    padding: 8px 11px;
    color: #334155;
    border: 1px solid rgba(148, 163, 184, 0.32);
    background: rgba(255, 255, 255, 0.82);
}

.reports-master-page .reports-section-kicker {
    margin-bottom: 6px;
    padding: 6px 9px;
    color: #0369a1;
    border: 1px solid rgba(14, 165, 233, 0.24);
    background: #e0f2fe;
}

.reports-master-page .reports-filter-card {
    display: grid;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    grid-template-columns: repeat(auto-fit, minmax(156px, 1fr));
    gap: 16px;
    align-items: end;
    margin: 0;
    padding: 20px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.06);
}

.reports-master-page .reports-filter-card label {
    min-width: 0;
    gap: 7px;
    color: #475569;
    font-size: 0.8rem;
    font-weight: 800;
}

.reports-master-page .reports-filter-card input,
.reports-master-page .reports-filter-card select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    min-height: 42px;
    border-color: #dbe3ee;
    border-radius: 8px;
    background: #f8fafc;
}

.reports-master-page .reports-filter-card input:focus,
.reports-master-page .reports-filter-card select:focus {
    border-color: rgba(20, 184, 166, 0.58);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.12);
}

.reports-master-page .reports-filter-actions {
    display: grid;
    grid-column: span 2;
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    gap: 8px;
    width: 100%;
    min-width: 0;
    align-self: end;
}

.reports-master-page .reports-filter-actions .btn-primary,
.reports-master-page .reports-filter-actions .btn-secondary,
.reports-master-page .reports-section-actions .btn-primary,
.reports-master-page .reports-section-actions .btn-secondary {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    height: auto;
    padding: 10px 12px;
    margin-top: 0;
    max-width: 100%;
    box-sizing: border-box;
    justify-content: center;
    white-space: nowrap;
    line-height: 1.1;
    text-align: center;
}

.reports-master-page .reports-filter-actions .btn-primary,
.reports-master-page .reports-section-actions .btn-primary {
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.16);
}

.reports-master-page .reports-filter-actions .btn-secondary,
.reports-master-page .reports-section-actions .btn-secondary {
    color: #0f172a;
    border-color: rgba(148, 163, 184, 0.32);
    background: #ffffff;
}

.reports-master-page .reports-filter-note {
    margin: -6px 0 0;
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: #f8fafc;
}

.reports-master-page .reports-section-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: #f8fafc;
}

.reports-master-page .reports-section-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 8px 11px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    color: #334155;
    background: #ffffff;
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
}

.reports-master-page .reports-section-nav a:hover {
    color: #0f766e;
    border-color: rgba(20, 184, 166, 0.34);
    background: #f0fdfa;
}

.reports-master-page .reports-kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
    gap: 14px;
}

.reports-master-page .reports-financial-grid {
    grid-template-columns: repeat(auto-fit, minmax(164px, 1fr));
}

.reports-master-page .reports-kpi-card {
    position: relative;
    overflow: hidden;
    min-height: 126px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: #ffffff;
    border-radius: 8px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.reports-master-page .reports-kpi-card:hover {
    transform: translateY(-1px);
    border-color: rgba(20, 184, 166, 0.28);
    box-shadow: 0 14px 26px rgba(15, 23, 42, 0.08);
}

.reports-master-page .reports-kpi-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #0ea5e9;
}

.reports-master-page .reports-kpi-success::before { background: #10b981; }
.reports-master-page .reports-kpi-warning::before { background: #f59e0b; }
.reports-master-page .reports-kpi-danger::before { background: #ef4444; }
.reports-master-page .reports-kpi-primary::before { background: #2563eb; }

.reports-master-page .reports-section,
.reports-master-page .reports-subsection {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.reports-master-page .report-grid {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.reports-master-page .reports-subsection {
    box-shadow: none;
    background: #fbfdff;
}

.reports-master-page .report-section {
    margin-top: 0;
    padding-top: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.reports-master-page .panel-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    min-width: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    padding-bottom: 14px;
}

.reports-master-page .reports-section-heading h2,
.reports-master-page .panel-header h2 {
    margin: 0;
    color: #0f172a;
    font-size: 1.15rem;
    line-height: 1.25;
}

.reports-master-page .reports-section-heading p,
.reports-master-page .panel-header p {
    margin: 5px 0 0;
    color: #64748b;
    line-height: 1.5;
}

.reports-master-page .reports-section-heading {
    flex: 1 1 auto;
    min-width: 0;
}

.reports-master-page .reports-section-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    flex: 0 1 280px;
    min-width: 0;
    max-width: 100%;
}

.reports-master-page .reports-export-form {
    display: flex;
    flex: 1 1 126px;
    min-width: 0;
}

.reports-master-page .reports-export-form .btn-secondary {
    width: 100%;
}

.reports-master-page .reports-section-actions a {
    flex: 1 1 126px;
}

.reports-master-page .table-responsive {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: visible;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    background: #ffffff;
}

.reports-master-page .data-table {
    width: 100%;
    min-width: 0;
    margin: 0;
    table-layout: auto;
}

.reports-master-page .data-table thead {
    background: #eef4f8;
}

.reports-master-page .data-table th {
    color: #334155;
    font-size: 0.73rem;
    line-height: 1.25;
    padding: 11px 12px;
    white-space: normal;
}

.reports-master-page .data-table td {
    color: #334155;
    line-height: 1.45;
    padding: 11px 12px;
    vertical-align: middle;
    word-break: normal;
    overflow-wrap: anywhere;
}

.reports-master-page .data-table td:first-child,
.reports-master-page .data-table th:first-child {
    padding-left: 16px;
}

.reports-master-page .data-table td:last-child,
.reports-master-page .data-table th:last-child {
    padding-right: 16px;
}

.reports-master-page .data-table tbody tr:hover {
    background: #f8fbfc;
}

.reports-master-page .reports-money-cell {
    color: #0f766e;
    font-weight: 800;
    white-space: nowrap;
}

.reports-master-page .reports-status-badge,
.reports-master-page .status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.reports-master-page .reports-status-badge.is-success {
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.28);
    background: #d1fae5;
}

.reports-master-page .reports-status-badge.is-warning {
    color: #92400e;
    border: 1px solid rgba(245, 158, 11, 0.32);
    background: #fef3c7;
}

.reports-master-page .reports-status-badge.is-danger {
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.28);
    background: #fee2e2;
}

.reports-master-page .reports-status-badge.is-neutral {
    color: #475569;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: #f1f5f9;
}

.reports-master-page .empty-row {
    min-height: 56px;
    padding: 18px !important;
    color: #64748b;
    font-weight: 700;
    text-align: center;
    white-space: normal;
}

.reports-master-page .report-pagination {
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    background: #f8fafc;
}

@media (min-width: 901px) {
    .reports-master-page .report-grid {
        grid-template-columns: 1fr;
    }

    .reports-master-page .report-cashier-table {
        table-layout: fixed;
    }

    .reports-master-page .report-cashier-table th {
        font-size: 0.66rem;
        padding: 9px 7px;
        white-space: normal;
    }

    .reports-master-page .report-cashier-table td {
        font-size: 0.74rem;
        padding: 9px 7px;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .reports-master-page .report-cashier-table .reports-money-cell,
    .reports-master-page .report-cashier-table td {
        white-space: normal;
    }
}

@media (min-width: 1500px) {
    .reports-master-page .report-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .reports-master-page .report-grid {
        grid-template-columns: 1fr;
    }

    .reports-master-page .table-responsive {
        overflow-x: auto;
        overflow-y: hidden;
    }

    .reports-master-page .reports-hero,
    .reports-master-page .reports-filter-card,
    .reports-master-page .reports-section,
    .reports-master-page .reports-subsection {
        border-radius: 14px;
    }

    .reports-master-page .panel-header {
        flex-direction: column;
        align-items: stretch;
    }

    .reports-master-page .reports-section-actions {
        justify-content: flex-start;
        min-width: 0;
        width: 100%;
    }

    .reports-master-page .reports-section-actions .btn-primary,
    .reports-master-page .reports-section-actions .btn-secondary {
        flex: 1 1 160px;
    }
}

@media (max-width: 720px) {
    .reports-master-page .reports-filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .reports-master-page .data-table {
        min-width: 0;
        table-layout: auto;
    }
}

@media (max-width: 820px) {
    .reports-master-page {
        gap: 16px;
    }

    .reports-master-page .reports-hero {
        padding: 20px;
    }

    .reports-master-page .reports-filter-card {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
        padding: 14px;
    }

    .reports-master-page .reports-filter-actions {
        grid-column: 1 / -1;
        grid-template-columns: repeat(2, 1fr);
    }

    .reports-master-page .reports-section-actions {
        flex-direction: column;
        width: 100%;
    }

    .reports-master-page .reports-section-actions .btn-primary,
    .reports-master-page .reports-section-actions .btn-secondary {
        width: 100%;
    }

    .reports-master-page .data-table {
        min-width: 0;
        font-size: 0.72rem;
    }

    .reports-master-page .data-table th {
        font-size: 0.7rem;
        padding: 8px 6px;
    }

    .reports-master-page .data-table td {
        padding: 8px 6px;
        font-size: 0.72rem;
    }

    .reports-master-page .data-table td:first-child,
    .reports-master-page .data-table th:first-child {
        padding-left: 10px;
    }

    .reports-master-page .data-table td:last-child,
    .reports-master-page .data-table th:last-child {
        padding-right: 10px;
    }
}

@media (max-width: 720px) {
    .reports-master-page .reports-filter-card {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .reports-master-page .reports-filter-actions {
        grid-column: 1 / -1;
        grid-template-columns: 1fr;
    }

    .reports-master-page .reports-kpi-grid,
    .reports-master-page .reports-financial-grid {
        grid-template-columns: repeat(2, minmax(130px, 1fr));
    }

    .reports-master-page .reports-section-nav {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
        padding: 8px;
    }

    .reports-master-page .reports-section-nav a {
        font-size: 0.76rem;
        padding: 7px 9px;
        min-height: 34px;
    }
}

@media (max-width: 640px) {
    .reports-master-page {
        gap: 14px;
    }

    .reports-master-page .reports-hero {
        padding: 16px;
        border-radius: 12px;
    }

    .reports-master-page .reports-title-row {
        flex-direction: column;
        gap: 8px;
    }

    .reports-master-page .reports-filter-card {
        grid-template-columns: 1fr;
        padding: 12px;
        border-radius: 12px;
    }

    .reports-master-page .reports-filter-actions {
        grid-column: 1 / -1;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .reports-master-page .reports-filter-actions .btn-primary,
    .reports-master-page .reports-filter-actions .btn-secondary {
        width: 100%;
        min-height: 44px;
    }

    .reports-master-page .reports-section-nav {
        display: grid;
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 8px;
        border-radius: 12px;
    }

    .reports-master-page .reports-section-nav a {
        width: 100%;
        font-size: 0.78rem;
        padding: 10px;
        min-height: 36px;
    }

    .reports-master-page .reports-kpi-grid,
    .reports-master-page .reports-financial-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .reports-master-page .reports-kpi-card {
        min-height: 110px;
    }

    .reports-master-page .reports-section,
    .reports-master-page .reports-subsection {
        border-radius: 12px;
    }

    .reports-master-page .panel-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding-bottom: 12px;
    }

    .reports-master-page .reports-section-heading {
        flex: 1 1 auto;
    }

    .reports-master-page .reports-section-actions {
        flex: 1 1 auto;
        width: 100%;
    }

    .reports-master-page .reports-section-actions .btn-primary,
    .reports-master-page .reports-section-actions .btn-secondary {
        width: 100%;
        min-height: 42px;
    }

    .reports-master-page .data-table {
        min-width: 0;
        font-size: 0.7rem;
    }

    .reports-master-page .data-table th {
        font-size: 0.68rem;
        padding: 7px 5px;
    }

    .reports-master-page .data-table td {
        padding: 7px 5px;
        font-size: 0.7rem;
    }

    .reports-master-page .data-table td:first-child,
    .reports-master-page .data-table th:first-child {
        padding-left: 8px;
    }

    .reports-master-page .data-table td:last-child,
    .reports-master-page .data-table th:last-child {
        padding-right: 8px;
    }

    .reports-master-page .table-responsive {
        border-radius: 12px;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .reports-master-page .reports-money-cell {
        font-weight: 700;
        white-space: normal;
    }

    .reports-master-page .empty-row {
        min-height: 44px;
        padding: 12px !important;
        font-size: 0.72rem;
    }
}

@media (max-width: 520px) {
    .reports-master-page {
        gap: 14px;
    }

    .reports-master-page .reports-hero {
        padding: 14px;
    }

    .reports-master-page .reports-filter-card {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .reports-master-page .reports-filter-actions {
        grid-template-columns: 1fr;
    }

    .reports-master-page .reports-section-nav {
        display: grid;
        grid-template-columns: 1fr;
    }

    .reports-master-page .reports-section-nav a,
    .reports-master-page .reports-section-actions .btn-primary,
    .reports-master-page .reports-section-actions .btn-secondary {
        width: 100%;
    }

    .reports-master-page .table-responsive {
        overflow-x: auto;
        overflow-y: hidden;
    }

    .reports-master-page .data-table {
        min-width: 0;
    }

    .reports-master-page #reports-payments .data-table,
    .reports-master-page #reports-products .data-table,
    .reports-master-page #reports-stock .data-table {
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .reports-master-page {
        gap: 12px;
    }

    .reports-master-page .reports-hero {
        padding: 12px;
        border-radius: 10px;
    }

    .reports-master-page .reports-master-badge,
    .reports-master-page .reports-period-chip,
    .reports-master-page .reports-section-kicker {
        font-size: 0.7rem;
        padding: 5px 8px;
    }

    .reports-master-page .reports-filter-card {
        grid-template-columns: 1fr;
        padding: 10px;
        border-radius: 10px;
        gap: 10px;
    }

    .reports-master-page .reports-filter-card label {
        font-size: 0.76rem;
    }

    .reports-master-page .reports-filter-card input,
    .reports-master-page .reports-filter-card select {
        min-height: 40px;
        border-radius: 8px;
        font-size: 0.88rem;
    }

    .reports-master-page .reports-filter-actions {
        grid-column: 1 / -1;
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .reports-master-page .reports-filter-actions .btn-primary,
    .reports-master-page .reports-filter-actions .btn-secondary {
        min-height: 40px;
        padding: 8px 10px;
        font-size: 0.8rem;
        border-radius: 8px;
    }

    .reports-master-page .reports-section-nav {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 6px;
        border-radius: 10px;
    }

    .reports-master-page .reports-section-nav a {
        font-size: 0.75rem;
        padding: 8px 10px;
        min-height: 32px;
        border-radius: 8px;
    }

    .reports-master-page .reports-kpi-grid,
    .reports-master-page .reports-financial-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .reports-master-page .reports-kpi-card {
        min-height: 100px;
        padding: 12px;
    }

    .reports-master-page .reports-section,
    .reports-master-page .reports-subsection {
        border-radius: 10px;
    }

    .reports-master-page .panel-header {
        padding-bottom: 10px;
        gap: 10px;
    }

    .reports-master-page .reports-section-heading h2 {
        font-size: 1rem;
    }

    .reports-master-page .reports-section-actions {
        gap: 6px;
    }

    .reports-master-page .reports-section-actions .btn-primary,
    .reports-master-page .reports-section-actions .btn-secondary {
        min-height: 40px;
        padding: 8px 10px;
        font-size: 0.8rem;
        border-radius: 8px;
    }

    .reports-master-page .data-table {
        min-width: 0;
        font-size: 0.68rem;
    }

    .reports-master-page .data-table th {
        font-size: 0.66rem;
        padding: 6px 4px;
    }

    .reports-master-page .data-table td {
        padding: 6px 4px;
        font-size: 0.68rem;
        line-height: 1.3;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .reports-master-page .data-table td:first-child,
    .reports-master-page .data-table th:first-child {
        padding-left: 6px;
    }

    .reports-master-page .data-table td:last-child,
    .reports-master-page .data-table th:last-child {
        padding-right: 6px;
    }

    .reports-master-page .table-responsive {
        border-radius: 10px;
    }

    .reports-master-page .reports-status-badge,
    .reports-master-page .status-pill {
        font-size: 0.68rem;
        min-height: 24px;
        padding: 4px 7px;
    }

    .reports-master-page .empty-row {
        min-height: 40px;
        padding: 10px !important;
        font-size: 0.7rem;
    }

    .reports-master-page .report-pagination {
        padding: 10px;
        border-radius: 10px;
    }
}

@media (max-width: 390px) {
    .reports-master-page {
        gap: 10px;
        padding: 0;
    }

    .reports-master-page .reports-hero {
        padding: 10px;
        border-radius: 8px;
        margin: 0;
    }

    .reports-master-page .reports-hero h2 {
        font-size: 1.1rem;
        margin-bottom: 4px;
    }

    .reports-master-page .reports-hero p {
        font-size: 0.8rem;
        line-height: 1.4;
        margin: 0;
    }

    .reports-master-page .reports-title-row {
        gap: 6px;
    }

    .reports-master-page .reports-master-badge {
        font-size: 0.65rem;
        padding: 4px 6px;
    }

    .reports-master-page .reports-period-chip {
        font-size: 0.65rem;
        padding: 4px 6px;
        margin-top: 6px;
    }

    .reports-master-page .reports-filter-card {
        grid-template-columns: 1fr;
        padding: 8px;
        border-radius: 8px;
        gap: 8px;
    }

    .reports-master-page .reports-filter-card label {
        font-size: 0.7rem;
        gap: 4px;
    }

    .reports-master-page .reports-filter-card input,
    .reports-master-page .reports-filter-card select {
        min-height: 36px;
        border-radius: 6px;
        font-size: 0.85rem;
    }

    .reports-master-page .reports-filter-actions {
        grid-column: 1 / -1;
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .reports-master-page .reports-filter-actions .btn-primary,
    .reports-master-page .reports-filter-actions .btn-secondary {
        min-height: 36px;
        padding: 6px 8px;
        font-size: 0.75rem;
        border-radius: 6px;
    }

    .reports-master-page .reports-section-nav {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 4px;
        border-radius: 8px;
    }

    .reports-master-page .reports-section-nav a {
        font-size: 0.7rem;
        padding: 6px 8px;
        min-height: 30px;
        border-radius: 6px;
    }

    .reports-master-page .reports-kpi-grid,
    .reports-master-page .reports-financial-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .reports-master-page .reports-kpi-card {
        min-height: 90px;
        padding: 10px;
        border-radius: 8px;
    }

    .reports-master-page .reports-section,
    .reports-master-page .reports-subsection {
        border-radius: 8px;
    }

    .reports-master-page .panel-header {
        padding-bottom: 8px;
        gap: 8px;
        border-radius: 8px;
    }

    .reports-master-page .reports-section-heading h2 {
        font-size: 0.95rem;
        margin: 0;
    }

    .reports-master-page .reports-section-heading p {
        font-size: 0.75rem;
        margin: 3px 0 0;
    }

    .reports-master-page .reports-section-actions {
        gap: 4px;
    }

    .reports-master-page .reports-section-actions .btn-primary,
    .reports-master-page .reports-section-actions .btn-secondary {
        min-height: 36px;
        padding: 6px 8px;
        font-size: 0.75rem;
        border-radius: 6px;
        width: 100%;
    }

    .reports-master-page .data-table {
        min-width: 0;
        font-size: 0.65rem;
    }

    .reports-master-page .data-table th {
        font-size: 0.62rem;
        padding: 5px 3px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .reports-master-page .data-table td {
        padding: 5px 3px;
        font-size: 0.65rem;
        line-height: 1.25;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .reports-master-page .data-table td:first-child,
    .reports-master-page .data-table th:first-child {
        padding-left: 4px;
    }

    .reports-master-page .data-table td:last-child,
    .reports-master-page .data-table th:last-child {
        padding-right: 4px;
    }

    .reports-master-page .table-responsive {
        border-radius: 8px;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .reports-master-page .reports-money-cell {
        font-weight: 700;
        white-space: normal;
    }

    .reports-master-page .reports-status-badge,
    .reports-master-page .status-pill {
        font-size: 0.62rem;
        min-height: 20px;
        padding: 3px 5px;
    }

    .reports-master-page .empty-row {
        min-height: 36px;
        padding: 8px !important;
        font-size: 0.68rem;
    }

    .reports-master-page .report-pagination {
        padding: 8px;
        border-radius: 8px;
        font-size: 0.7rem;
    }

    .reports-master-page .report-pagination > div {
        flex-wrap: wrap;
        gap: 4px;
    }

    .reports-master-page .indicator-title {
        font-size: 0.65rem;
        margin-bottom: 2px;
    }

    .reports-master-page .indicator-value {
        font-size: 1.1rem;
        margin-bottom: 3px;
    }

    .reports-master-page .indicator-meta {
        font-size: 0.65rem;
        line-height: 1.25;
    }
}
/* Caixa auditado */
.cashier-page { display: grid; gap: 22px; }
.cashier-current-card { display: grid; gap: 20px; }
.cashier-dashboard-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.cashier-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.cashier-detail-section { display: grid; gap: 12px; }
.cashier-filters { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 12px; align-items: end; }
.cashier-filters .btn-primary,
.cashier-filters .btn-secondary { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.cashier-pagination { display: flex; flex-wrap: wrap; gap: 6px; }
.cashier-pagination a { min-width: 36px; min-height: 36px; padding: 7px 10px; text-align: center; text-decoration: none; border: 1px solid var(--border-color, #dbe2ea); border-radius: 8px; }
.cashier-pagination a.is-active { color: #fff; background: var(--primary-color, #2563eb); border-color: var(--primary-color, #2563eb); }

@media (max-width: 1024px) {
    .cashier-dashboard-grid,
    .cashier-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .cashier-dashboard-grid,
    .cashier-detail-grid,
    .cashier-filters { grid-template-columns: 1fr; }
    .cashier-responsive-table thead,
    .cashier-history-table thead { display: none; }
    .cashier-responsive-table,
    .cashier-responsive-table tbody,
    .cashier-responsive-table tr,
    .cashier-responsive-table td,
    .cashier-history-table,
    .cashier-history-table tbody,
    .cashier-history-table tr,
    .cashier-history-table td { display: block; width: 100%; }
    .cashier-responsive-table tr,
    .cashier-history-table tr { padding: 12px 0; border-bottom: 1px solid var(--border-color, #dbe2ea); }
    .cashier-responsive-table td,
    .cashier-history-table td { display: grid; grid-template-columns: minmax(105px, 38%) 1fr; gap: 12px; padding: 7px 12px; border: 0; text-align: right; overflow-wrap: anywhere; }
    .cashier-responsive-table td::before,
    .cashier-history-table td::before { content: attr(data-label); font-weight: 700; text-align: left; color: var(--text-muted, #64748b); }
    .cashier-responsive-table .empty-row,
    .cashier-history-table .empty-row { display: block; text-align: center; }
    .cashier-responsive-table .empty-row::before,
    .cashier-history-table .empty-row::before { display: none; }
}

/* Inline Forms - For toggle/action buttons */
.inline-form {
    display: inline;
    margin: 0;
    padding: 0;
}

.inline-form button {
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.action-column .inline-form button.link-button {
    display: inline;
}

/* Paginacao Premium V1.2 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.pagination-item,
.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 8px;
    background: #ffffff;
    color: #334155;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
}

.pagination-link:hover {
    border-color: rgba(37, 99, 235, 0.28);
    background: #eff6ff;
    color: #1d4ed8;
    text-decoration: none;
}

.pagination-active,
.pagination-active:hover {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
}

.pagination-disabled,
.pagination-disabled:hover {
    border-color: rgba(15, 23, 42, 0.08);
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.pagination-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 12px;
    padding: 12px 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    background: #f8fafc;
    color: #475569;
    font-size: 0.9rem;
    font-weight: 700;
}

.per-page-select {
    min-width: 120px;
}

.audit-pagination-info {
    margin-top: 18px;
}

@media (max-width: 700px) {
    .pagination {
        justify-content: stretch;
    }

    .pagination-link,
    .pagination-item {
        flex: 1 1 auto;
        min-width: 42px;
    }

    .pagination-info {
        align-items: stretch;
        flex-direction: column;
    }
}

/* Refino Premium UI V1.1 - padroes visuais reutilizaveis. */
:root {
    --premium-surface: #ffffff;
    --premium-surface-soft: #f8fafc;
    --premium-border: rgba(15, 23, 42, 0.10);
    --premium-border-strong: rgba(15, 23, 42, 0.16);
    --premium-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
    --premium-shadow-hover: 0 18px 36px rgba(15, 23, 42, 0.10);
    --premium-radius: 8px;
    --premium-focus: 0 0 0 4px rgba(37, 99, 235, 0.16);
}

.page-panel,
.dashboard-panel,
.indicator-card,
.shortcut-card,
.chart-card,
.form-card,
.settings-panel,
.cashier-current-card,
.cashier-card,
.cashier-card-item,
.cashier-summary,
.cashier-notes,
.product-form-section,
.product-detail-section,
.category-form-section,
.category-detail-section,
.client-form-section,
.client-detail-section,
.fiscal-module-card,
.fiscal-status-summary,
.fiscal-product-panel,
.fiscal-corrections-panel,
.financial-section,
.report-section,
.empty-state,
.panel-body.empty-state {
    border: 1px solid var(--premium-border);
    border-radius: var(--premium-radius);
    box-shadow: var(--premium-shadow);
}

.page-panel,
.dashboard-panel,
.form-card,
.settings-panel,
.financial-section,
.report-section {
    background: var(--premium-surface);
}

.indicator-card,
.shortcut-card,
.cashier-card-item,
.products-summary > div,
.clients-summary > div,
.categories-summary > div,
.fiscal-module-card {
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.indicator-card:hover,
.shortcut-card:hover,
.products-summary > div:hover,
.clients-summary > div:hover,
.categories-summary > div:hover,
.fiscal-module-card:hover {
    border-color: rgba(37, 99, 235, 0.22);
    box-shadow: var(--premium-shadow-hover);
    transform: translateY(-1px);
}

.panel-header-row,
.panel-header,
.dashboard-section-heading,
.product-form-heading {
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    padding-bottom: 14px;
}

.panel-header-row h2,
.panel-header h2,
.dashboard-section-heading h2,
.product-form-heading h3,
.product-detail-section h3 {
    letter-spacing: 0;
}

.page-label {
    color: #2563eb;
    font-weight: 800;
    letter-spacing: 0;
}

.btn-primary,
.btn-secondary,
.btn-success,
.btn-warning,
.btn-danger,
.btn-muted,
.btn-icon,
.btn-sm,
.link-button,
.products-pagination a,
.financial-pagination a,
.cashier-pagination a,
.report-pagination a {
    border-radius: var(--premium-radius);
    transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}

.btn-primary,
.btn-secondary,
.btn-success,
.btn-warning,
.btn-danger,
.btn-muted {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    border: 1px solid transparent;
    font-weight: 800;
    text-decoration: none;
}

.btn-primary:not(.btn-disabled):hover,
.btn-secondary:not(.btn-disabled):hover,
.btn-success:not(.btn-disabled):hover,
.btn-warning:not(.btn-disabled):hover,
.btn-danger:not(.btn-disabled):hover,
.btn-muted:not(.btn-disabled):hover,
.link-button:hover,
.products-pagination a:hover,
.financial-pagination a:hover,
.cashier-pagination a:hover,
.report-pagination a:hover {
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.10);
    transform: translateY(-1px);
}

.btn-success {
    background: #16a34a;
    color: #ffffff;
}

.btn-warning {
    background: #f59e0b;
    color: #111827;
}

.btn-danger {
    background: #dc2626;
    color: #ffffff;
}

.btn-muted {
    background: #e2e8f0;
    color: #334155;
}

.btn-sm,
.action-column .btn-primary,
.action-column .btn-secondary,
.action-column .btn-success,
.action-column .btn-warning,
.action-column .btn-danger,
.action-column .btn-muted,
.action-column .link-button {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 0.82rem;
    line-height: 1.2;
}

.btn-icon {
    min-width: 36px;
    min-height: 36px;
    padding: 8px;
}

.link-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 5px 8px;
    border: 1px solid transparent;
}

.link-danger,
.action-column .link-danger,
.inline-form .link-danger {
    color: #b91c1c;
}

.link-danger:hover,
.action-column .link-danger:hover,
.inline-form .link-danger:hover {
    border-color: rgba(220, 38, 38, 0.22);
    background: #fef2f2;
    text-decoration: none;
}

.action-column,
.actions-row,
.products-actions,
.clients-actions,
.categories-actions {
    align-items: center;
    gap: 6px;
}

.badge-status,
.badge-active,
.badge-inactive,
.badge-open,
.badge-closed,
.badge-paid,
.badge-pending,
.badge-danger,
.status-pill,
.status-active,
.status-inactive,
.status-open,
.status-closed,
.status-warning,
.status-danger,
.tag-inactive {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 28px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.2;
    text-transform: none;
}

.badge-active,
.status-active,
.status-open,
.badge-open,
.badge-paid,
.status-pill.success {
    border-color: rgba(22, 163, 74, 0.22);
    background: #dcfce7;
    color: #166534;
}

.badge-inactive,
.status-inactive,
.status-closed,
.badge-closed,
.tag-inactive {
    border-color: rgba(71, 85, 105, 0.18);
    background: #f1f5f9;
    color: #475569;
}

.badge-pending,
.status-warning,
.status-pill.warning {
    border-color: rgba(217, 119, 6, 0.24);
    background: #fef3c7;
    color: #92400e;
}

.badge-danger,
.status-danger,
.status-pill.danger {
    border-color: rgba(220, 38, 38, 0.24);
    background: #fee2e2;
    color: #991b1b;
}

.alert,
.alert-success,
.alert-danger,
.alert-warning,
.alert-info,
.report-integrity-alert,
.financial-integrity-alert,
.fiscal-corrections-panel {
    border-radius: var(--premium-radius);
    border: 1px solid var(--premium-border);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
    line-height: 1.55;
}

.alert-success {
    border-color: rgba(22, 163, 74, 0.24);
    background: #ecfdf5;
    color: #166534;
}

.alert-danger {
    border-color: rgba(220, 38, 38, 0.24);
    background: #fef2f2;
    color: #991b1b;
}

.alert-warning {
    border-color: rgba(217, 119, 6, 0.24);
    background: #fffbeb;
    color: #92400e;
}

.alert-info {
    border-color: rgba(37, 99, 235, 0.22);
    background: #eff6ff;
    color: #1e40af;
}

.search-panel,
.products-filter-panel,
.clients-filter-panel,
.categories-filter-panel,
.sale-filter-panel,
.purchase-filter-panel,
.report-filter-panel,
.financial-filters,
.cashier-filters {
    border: 1px solid var(--premium-border);
    border-radius: var(--premium-radius);
    background: var(--premium-surface-soft);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

input[type="text"],
input[type="search"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="tel"],
select,
textarea {
    border-radius: var(--premium-radius);
    transition: border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
    outline: 0;
    border-color: #2563eb;
    box-shadow: var(--premium-focus);
}

.data-table {
    border: 1px solid var(--premium-border);
    border-radius: var(--premium-radius);
    overflow: hidden;
}

.data-table thead {
    background: #eef4ff;
}

.data-table th {
    color: #334155;
    font-weight: 800;
}

.data-table tr {
    transition: background 0.14s ease;
}

.data-table tbody tr:hover {
    background: #f8fbff;
}

.data-table td {
    color: #1f2937;
}

.empty-row,
.empty-state,
.panel-body.empty-state {
    color: #64748b;
    text-align: center;
}

.empty-row {
    background: #f8fafc;
}

.products-pagination,
.financial-pagination,
.cashier-pagination,
.report-pagination > div {
    align-items: center;
    gap: 7px;
}

.products-pagination a,
.financial-pagination a,
.cashier-pagination a,
.report-pagination a {
    border-color: var(--premium-border-strong);
    background: #ffffff;
    color: #334155;
    font-weight: 800;
}

.products-pagination a.active,
.financial-pagination a.is-active,
.cashier-pagination a.is-active,
.report-pagination a.is-active {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
}

.dashboard-audit .indicator-card,
.dashboard-audit .shortcut-card,
.dashboard-audit .cashier-card-item {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.dashboard-audit .indicator-card::after {
    content: "";
    position: absolute;
    inset: 12px 12px auto auto;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.18;
}

.fiscal-module-card {
    min-height: 104px;
}

.fiscal-module-card::before {
    content: "";
    width: 28px;
    height: 4px;
    border-radius: 999px;
    background: #2563eb;
}

.fiscal-corrections-panel {
    border-color: rgba(217, 119, 6, 0.24);
}

@media (max-width: 768px) {
    .panel-header-row,
    .panel-header,
    .dashboard-section-heading,
    .product-form-heading {
        align-items: stretch;
    }

    .btn-primary,
    .btn-secondary,
    .btn-success,
    .btn-warning,
    .btn-danger,
    .btn-muted {
        min-height: 44px;
    }

    .table-responsive tr {
        border-radius: var(--premium-radius);
        box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
    }

    .table-responsive td {
        align-items: center;
    }

    .table-responsive .action-column {
        align-items: stretch;
    }

    .table-responsive .action-column a,
    .table-responsive .action-column button,
    .table-responsive .action-column .link-button {
        justify-content: center;
        width: 100%;
        text-align: center;
        white-space: normal;
    }

    .products-pagination a,
    .financial-pagination a,
    .cashier-pagination a {
        flex: 1 1 42px;
    }
}

/* Products Master V2 */
.products-page .products-filter-panel {
    align-items: end;
}

.products-page .products-table-wrap {
    max-height: none;
    overflow-y: visible;
    overflow-x: auto;
}

/* Zero Grau shared list pattern: desktop table, mobile cards. */
.zg-list-wrap { overflow-y: visible; }
.zg-standard-list .zg-list-table,
.zg-stock-list .zg-list-table { width: 100%; min-width: 0; }
.zg-standard-list .pagination,
.zg-stock-list .pagination,
.users-pagination { justify-content: center; }
.users-filter-panel { display: grid; grid-template-columns: minmax(220px, 1.5fr) minmax(150px, .8fr) minmax(140px, .7fr) auto auto; gap: 12px; align-items: end; }
.users-filter-panel input, .users-filter-panel select, .users-filter-panel button, .users-filter-panel a { min-height: 42px; width: 100%; }
.users-list-meta { display: flex; justify-content: space-between; gap: 12px; margin: 14px 0; }
.users-actions { min-width: 230px; }
.users-actions-row { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.users-actions-row form { margin: 0; }
.stock-products-pagination { justify-content: center; margin: 14px 0 4px; }

@media (max-width: 767px) {
    .zg-list-wrap { overflow-x: visible; }
    .zg-list-table, .zg-list-table thead, .zg-list-table tbody, .zg-list-table tr, .zg-list-table th, .zg-list-table td { display: block; width: 100%; }
    .zg-list-table { border: 0; }
    .zg-list-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
    .zg-list-table tbody { display: grid; gap: 12px; }
    .zg-list-table tbody tr:not(.users-empty-row) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; padding: 16px; border: 1px solid var(--master-line, #dbe5f0); border-radius: var(--master-radius, 14px); background: #fff; box-shadow: 0 5px 16px rgba(15,23,42,.05); }
    .zg-list-table td { display: grid; grid-template-columns: minmax(74px, .48fr) minmax(0, 1fr); gap: 9px; align-items: start; min-width: 0; padding: 9px 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
    .zg-list-table td::before { content: attr(data-label); color: #64748b; font-size: .76rem; font-weight: 800; }
    .zg-list-table td.action-column { grid-column: 1 / -1; display: block; min-width: 0; padding-top: 14px; margin-top: 6px; border-top: 1px solid #e5edf5; }
    .zg-list-table td.action-column::before { display: block; margin-bottom: 10px; }
    .zg-list-table .action-column > div, .zg-list-table .zg-actions-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; width: 100%; }
    .zg-list-table .action-column a, .zg-list-table .action-column button { width: 100%; min-width: 0; min-height: 42px; white-space: nowrap; text-align: center; }
    .users-filter-panel { grid-template-columns: 1fr; }
    .users-list-meta { align-items: flex-start; flex-direction: column; }
    .users-actions { min-width: 0; }
}

@media (max-width: 420px) {
    .zg-list-table tbody tr:not(.users-empty-row) { padding: 14px; }
    .zg-list-table td { grid-template-columns: 66px minmax(0, 1fr); }
    .zg-list-table .action-column > div, .zg-list-table .zg-actions-grid { grid-template-columns: 1fr; }
}

/* Usuários: no mobile, cada par ocupa uma linha para manter rótulo e valor próximos. */
@media (max-width: 767px) {
    .users-table tbody tr:not(.users-empty-row) {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .users-table td {
        grid-template-columns: 64px minmax(0, 1fr);
        gap: 6px;
        align-items: start;
        padding: 8px 0;
        text-align: left;
    }

    .users-table td::before {
        line-height: 1.35;
    }

    .users-table td > strong,
    .users-table td > .status-pill,
    .users-table td > a,
.users-table td > span:not(.status-pill) {
        min-width: 0;
        text-align: left;
    }
}

/* Estoque: mantém o mesmo alinhamento compacto dos cards de Usuários no mobile. */
@media (max-width: 767px) {
    .zg-stock-list .stock-products-table tbody tr:not(.empty-row) {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .zg-stock-list .stock-products-table td {
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 6px;
        align-items: start;
        padding: 8px 0;
        text-align: left;
    }

    .zg-stock-list .stock-products-table td::before {
        line-height: 1.35;
        white-space: nowrap;
    }

    .zg-stock-list .stock-products-table td > .stock-status-badge,
    .zg-stock-list .stock-products-table td > span:not(.stock-status-badge) {
        min-width: 0;
        max-width: 100%;
        text-align: left;
    }

    .zg-stock-list .stock-products-table td > .stock-status-badge {
        width: fit-content;
        justify-self: start;
    }
}

.products-page .products-actions,
.products-page .products-actions-row {
    min-width: 390px;
}

/* Pedidos/Orçamentos: hierarquia visual sem alterar dimensões ou comportamento. */
.commercial-document-form .add-commercial-item {
    border-color: #ea580c;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #ffffff;
}

.commercial-document-form .add-commercial-item:hover {
    border-color: #c2410c;
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
}

.commercial-document-form .add-commercial-item:focus-visible,
.commercial-document-form .remove-commercial-item:focus-visible,
.commercial-document-form .btn-primary:focus-visible {
    outline: 3px solid rgba(249, 115, 22, 0.38);
    outline-offset: 2px;
}

.commercial-document-form .remove-commercial-item {
    border-color: #dc2626;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
}

.commercial-document-form .remove-commercial-item:hover {
    border-color: #b91c1c;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.products-page .products-actions-row {
    flex-wrap: nowrap;
    white-space: nowrap;
}

.products-page .products-actions-row form {
    flex: 0 0 auto;
    white-space: nowrap;
}

.products-page .products-pagination {
    width: 100%;
    justify-content: center;
    padding: 4px 0 2px;
}

.products-page .products-list-meta:focus {
    outline: none;
}

@media (max-width: 768px) {
    .products-page .products-actions,
    .products-page .products-actions-row {
        min-width: 0;
    }

    .products-page .products-actions-row {
        flex-wrap: wrap;
        white-space: normal;
    }
}

.products-page .products-table-wrap {
    overflow-x: auto;
}

/* Relatórios: destaque operacional Zero Grau sem alterar o layout aprovado. */
.reports-master-page .reports-kpi-primary::before,
.reports-master-page .reports-section-actions .btn-primary,
.reports-master-page .reports-filter-actions .btn-primary {
    background: #ea580c;
    border-color: #ea580c;
}

.reports-master-page .reports-section-actions .btn-primary:hover,
.reports-master-page .reports-filter-actions .btn-primary:hover {
    background: #c2410c;
    border-color: #c2410c;
}

.products-page .products-table {
    width: 100%;
    min-width: 0;
    table-layout: auto;
}

.products-page .products-table th,
.products-page .products-table td {
    vertical-align: middle;
    word-break: normal;
    overflow-wrap: normal;
}

.products-page .products-table th:last-child,
.products-page .products-table td.products-actions {
    min-width: 180px;
    white-space: normal;
    text-align: right;
}

.products-page .products-table td:first-child,
.products-page .products-table td:nth-child(2) {
    white-space: normal;
    overflow-wrap: anywhere;
}

.products-page .products-actions-row,
.products-page .products-actions-row form {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin: 0;
}

.products-page .products-actions-row {
    flex-wrap: nowrap;
}

.products-page .btn-action-product {
    min-width: 74px;
    white-space: nowrap;
}

.products-page .btn-product-inactivate {
    color: #111827;
}

.products-page .products-pagination-info {
    align-items: center;
    margin: 14px 0;
}

.products-page .products-pagination {
    justify-content: center;
    margin-top: 18px;
}

.products-page .products-pagination .pagination-item,
.products-page .products-pagination .pagination-link {
    min-width: 38px;
    min-height: 38px;
    padding: 7px 11px;
    white-space: nowrap;
}

.products-page .products-pagination .pagination-disabled {
    color: #94a3b8;
    cursor: default;
}

@media (max-width: 768px) {
    .products-page .products-list-meta,
    .products-page .products-pagination-info {
        align-items: flex-start;
        flex-direction: column;
    }

    .products-page .products-table {
        min-width: 0;
    }

    .products-page .products-table th:last-child,
    .products-page .products-table td.products-actions {
        min-width: 0;
        white-space: normal;
        text-align: left;
    }

    .products-page .products-actions-row,
    .products-page .products-actions-row form {
        justify-content: stretch;
        width: 100%;
    }

    .products-page .btn-action-product {
        flex: 1 1 112px;
        min-width: 112px;
        white-space: nowrap;
    }

    .products-page .table-responsive .action-column .btn-action-product {
        white-space: nowrap;
    }

    .products-page .products-pagination .pagination-item,
    .products-page .products-pagination .pagination-link {
        flex: 1 1 42px;
    }
}

/* Produtos mobile: a tabela vira cards sem alterar o layout desktop. */
@media (max-width: 767px) {
    .products-page .products-table-wrap {
        overflow-x: visible;
        width: 100%;
    }

    .products-page .products-table,
    .products-page .products-table thead,
    .products-page .products-table tbody,
    .products-page .products-table tr,
    .products-page .products-table th,
    .products-page .products-table td {
        display: block;
        width: 100%;
    }

    .products-page .products-table {
        border: 0;
        min-width: 0;
    }

    .products-page .products-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .products-page .products-table tbody {
        display: grid;
        gap: 12px;
    }

    .products-page .products-table tbody tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 0 16px;
        padding: 16px;
        border: 1px solid var(--master-line, #dbe5f0);
        border-radius: var(--master-radius, 14px);
        background: #fff;
        box-shadow: 0 5px 16px rgba(15, 23, 42, .05);
    }

    .products-page .products-table tbody tr.products-empty-row {
        display: block;
    }

    .products-page .products-table td {
        display: grid;
        grid-template-columns: minmax(76px, .45fr) minmax(0, 1fr);
        align-items: start;
        gap: 10px;
        min-width: 0;
        padding: 9px 0;
        border: 0;
        white-space: normal;
        overflow-wrap: anywhere;
        text-align: left;
    }

    .products-page .products-table td::before {
        content: attr(data-label);
        color: #64748b;
        font-size: .76rem;
        font-weight: 800;
        letter-spacing: .01em;
    }

    .products-page .products-table td.products-actions {
        grid-column: 1 / -1;
        display: block;
        min-width: 0;
        padding-top: 14px;
        margin-top: 6px;
        border-top: 1px solid #e5edf5;
    }

    .products-page .products-table td.products-actions::before {
        display: block;
        margin-bottom: 10px;
    }

    .products-page .products-table .product-name,
    .products-page .products-table .product-code,
    .products-page .products-table td small {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .products-page .products-table .product-name {
        font-size: 1rem;
        line-height: 1.35;
    }

    .products-page .products-actions-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
        width: 100%;
        min-width: 0;
    }

    .products-page .products-actions-row form,
    .products-page .products-actions-row a,
    .products-page .products-actions-row button {
        width: 100%;
        min-width: 0;
        min-height: 42px;
        margin: 0;
        white-space: nowrap;
        text-align: center;
    }

    .products-page .products-pagination {
        max-width: 100%;
        overflow: hidden;
        gap: 6px;
    }

    .products-page .products-pagination .pagination-item,
    .products-page .products-pagination .pagination-link {
        flex: 0 1 auto;
        min-width: 38px;
    }

    .products-page .products-pagination .products-page-number:not(.pagination-active),
    .products-page .products-pagination .products-page-ellipsis {
        display: none;
    }

    .products-page .products-pagination > :first-child,
    .products-page .products-pagination > :last-child {
        min-width: 78px;
    }
}

@media (max-width: 420px) {
    .products-page .products-table tbody tr {
        padding: 14px;
    }

    .products-page .products-table td {
        grid-template-columns: 68px minmax(0, 1fr);
        gap: 8px;
    }

    .products-page .products-actions-row {
        grid-template-columns: 1fr;
    }
}

/* Dashboard Master V2 */
.dashboard-master {
    gap: 18px;
}

.dashboard-master .dashboard-panel,
.dashboard-master .indicator-card,
.dashboard-master .shortcut-card,
.dashboard-master .cashier-card-item {
    border: 1px solid var(--premium-border, rgba(15, 23, 42, 0.10));
    border-radius: var(--premium-radius, 8px);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.dashboard-master .dashboard-panel {
    padding: 18px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.dashboard-master .dashboard-hero {
    gap: 14px;
    padding: 20px;
    border-color: rgba(37, 99, 235, 0.18);
    background: linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
}

.dashboard-master .dashboard-title-row {
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 12px;
}

.dashboard-master .dashboard-title-row h2 {
    font-size: clamp(1.45rem, 2vw, 1.9rem);
    line-height: 1.1;
}

.dashboard-master .dashboard-hero-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.dashboard-master .dashboard-period-badge,
.dashboard-master .dashboard-count-badge {
    min-height: 32px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
}

.dashboard-master .dashboard-filter-card {
    grid-template-columns: minmax(140px, 0.8fr) repeat(2, minmax(140px, 1fr)) minmax(130px, auto);
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: none;
}

.dashboard-master .dashboard-filter-card label {
    color: #475569;
    font-size: 0.78rem;
    font-weight: 800;
}

.dashboard-master .dashboard-filter-card select,
.dashboard-master .dashboard-filter-card input,
.dashboard-master .dashboard-filter-card .btn-secondary {
    min-height: 38px;
}

.dashboard-master .dashboard-section-heading {
    margin-bottom: 10px;
    padding-bottom: 8px;
}

.dashboard-master .dashboard-section-heading h2 {
    font-size: 1.05rem;
}

.dashboard-master .dashboard-section-heading p {
    font-size: 0.86rem;
}

.dashboard-master .dashboard-quick-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.dashboard-master .dashboard-quick-card {
    min-height: 0;
    gap: 10px;
    padding: 13px;
}

.dashboard-master .dashboard-quick-card p {
    min-height: 36px;
    margin: 0;
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.35;
}

.dashboard-master .dashboard-quick-card .btn-secondary {
    min-height: 34px;
    padding: 7px 9px;
    font-size: 0.8rem;
}

.dashboard-master .shortcut-card-heading {
    gap: 8px;
}

.dashboard-master .shortcut-card-heading h3 {
    font-size: 0.95rem;
    line-height: 1.2;
}

.dashboard-master .shortcut-icon {
    flex-basis: 30px;
    width: 30px;
    height: 30px;
    border-radius: 8px;
}

.dashboard-master .dashboard-kpi-grid {
    gap: 10px;
}

.dashboard-master .dashboard-primary-kpis {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.dashboard-master .dashboard-secondary-kpis {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.dashboard-master .dashboard-mini-kpi-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
    align-items: stretch;
}

.dashboard-master .dashboard-kpi-card {
    min-height: 0;
    padding: 14px;
}

.dashboard-master .dashboard-mini-kpi-card {
    min-width: 0;
    padding: 13px 14px;
}

.dashboard-master .indicator-title {
    margin-bottom: 6px;
    font-size: 0.72rem;
    letter-spacing: 0;
}

.dashboard-master .dashboard-mini-kpi-card .indicator-title {
    white-space: nowrap;
    word-break: keep-all;
    overflow-wrap: normal;
    font-size: 0.7rem;
}

.dashboard-master .indicator-value {
    margin-bottom: 5px;
    font-size: clamp(1.08rem, 1.45vw, 1.45rem);
}

.dashboard-master .dashboard-mini-kpi-card .indicator-value {
    font-size: clamp(1.05rem, 1.25vw, 1.32rem);
}

.dashboard-master .indicator-meta {
    font-size: 0.76rem;
    line-height: 1.3;
}

.dashboard-master .dashboard-mini-kpi-card .indicator-meta {
    font-size: 0.72rem;
    overflow-wrap: normal;
}

.dashboard-master .dashboard-financial-groups {
    gap: 14px;
}

.dashboard-master .dashboard-indicator-group {
    padding: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    background: #ffffff;
}

.dashboard-master .dashboard-section-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

.dashboard-master .dashboard-operation-grid {
    grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
}

.dashboard-master .dashboard-cash-card {
    gap: 14px;
}

.dashboard-master .dashboard-cash-card .panel-header,
.dashboard-master .dashboard-table-card .panel-header {
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 10px;
}

.dashboard-master .dashboard-cash-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.dashboard-master .dashboard-cash-grid .cashier-card-item {
    min-height: 0;
    padding: 11px;
}

.dashboard-master .dashboard-cash-grid .cashier-card-item span {
    font-size: 0.72rem;
}

.dashboard-master .dashboard-cash-grid .cashier-card-item strong {
    font-size: 0.98rem;
}

.dashboard-master .dashboard-table-card {
    min-width: 0;
}

.dashboard-master .table-responsive {
    overflow-x: auto;
}

.dashboard-master .dashboard-table {
    width: 100%;
    table-layout: auto;
}

.dashboard-master .dashboard-table th,
.dashboard-master .dashboard-table td {
    padding: 9px 10px;
    vertical-align: middle;
}

.dashboard-master .dashboard-table th {
    white-space: nowrap;
    font-size: 0.76rem;
}

.dashboard-master .dashboard-table td {
    font-size: 0.84rem;
}

.dashboard-master .dashboard-table td[data-label="Data"],
.dashboard-master .dashboard-table td[data-label="Vencimento"],
.dashboard-master .dashboard-table td[data-label="Total"],
.dashboard-master .dashboard-table td[data-label="Recebido"],
.dashboard-master .dashboard-table td[data-label="Pago"],
.dashboard-master .dashboard-table td[data-label="Saldo"] {
    white-space: nowrap;
}

.dashboard-master .dashboard-empty-state {
    padding: 18px;
    border-radius: 8px;
    background: #f8fafc;
    color: #64748b;
    font-weight: 700;
    text-align: center;
}

.dashboard-master .status-pill.success {
    border-color: rgba(22, 163, 74, 0.22);
    background: #dcfce7;
    color: #166534;
}

.dashboard-master .status-pill.warning {
    border-color: rgba(217, 119, 6, 0.24);
    background: #fef3c7;
    color: #92400e;
}

.dashboard-master .status-pill.neutral {
    border-color: rgba(71, 85, 105, 0.18);
    background: #f1f5f9;
    color: #475569;
}

.dashboard-master .status-pill.danger {
    border-color: rgba(220, 38, 38, 0.24);
    background: #fee2e2;
    color: #991b1b;
}

@media (min-width: 1600px) {
    .dashboard-master .dashboard-section-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dashboard-master .dashboard-operation-grid {
        grid-template-columns: minmax(420px, 0.8fr) minmax(0, 1.2fr);
    }

    .dashboard-master .dashboard-mini-kpi-grid {
        grid-template-columns: repeat(5, minmax(140px, 1fr));
    }
}

@media (max-width: 1280px) {
    .dashboard-master .dashboard-quick-grid,
    .dashboard-master .dashboard-primary-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dashboard-master .dashboard-secondary-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dashboard-master .dashboard-mini-kpi-grid {
        grid-template-columns: repeat(3, minmax(145px, 1fr));
    }

    .dashboard-master .dashboard-operation-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .dashboard-master .dashboard-filter-card {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-master .dashboard-section-grid,
    .dashboard-master .dashboard-financial-groups {
        grid-template-columns: 1fr;
    }

    .dashboard-master .dashboard-mini-kpi-grid {
        grid-template-columns: repeat(3, minmax(145px, 1fr));
    }
}

@media (max-width: 768px) {
    .dashboard-master {
        gap: 14px;
    }

    .dashboard-master .dashboard-panel,
    .dashboard-master .dashboard-hero {
        padding: 14px;
    }

    .dashboard-master .dashboard-title-row,
    .dashboard-master .dashboard-cash-card .panel-header,
    .dashboard-master .dashboard-table-card .panel-header {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-master .dashboard-hero-badges {
        justify-content: stretch;
    }

    .dashboard-master .dashboard-filter-card,
    .dashboard-master .dashboard-quick-grid,
    .dashboard-master .dashboard-primary-kpis,
    .dashboard-master .dashboard-secondary-kpis,
    .dashboard-master .dashboard-cash-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-master .dashboard-mini-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-master .dashboard-mini-kpi-card .indicator-title {
        font-size: 0.68rem;
    }

    .dashboard-master .dashboard-mini-kpi-card .indicator-meta {
        min-height: 0;
    }

    .dashboard-master .dashboard-quick-card p {
        min-height: 0;
    }

    .dashboard-master .dashboard-table th,
    .dashboard-master .dashboard-table td {
        white-space: normal;
    }

    .dashboard-master .dashboard-table td[data-label="Vencimento"] {
        white-space: nowrap;
    }
}

/* Audit Master V2 */
.audit-master {
    display: grid;
    gap: 18px;
}

.audit-master .panel-header-row {
    align-items: flex-start;
    padding: 18px;
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.audit-master .panel-header-row h2 {
    margin: 2px 0 4px;
    color: #0f172a;
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    line-height: 1.12;
}

.audit-master .panel-header-row p {
    margin: 0;
    color: #64748b;
    line-height: 1.45;
}

.audit-master .audit-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.audit-master .audit-kpi-card {
    position: relative;
    min-height: 0;
    padding: 14px 14px 14px 48px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-left: 4px solid #2563eb;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.audit-master .audit-kpi-warning {
    border-left-color: #d97706;
}

.audit-master .audit-kpi-icon {
    position: absolute;
    top: 14px;
    left: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 8px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.82rem;
    font-weight: 900;
}

.audit-master .audit-kpi-card h3 {
    margin: 0 0 6px;
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
    white-space: nowrap;
}

.audit-master .audit-kpi-card strong {
    display: block;
    color: #0f172a;
    font-size: clamp(1.08rem, 1.6vw, 1.55rem);
    line-height: 1.15;
    word-break: normal;
}

.audit-master .audit-filter-card {
    padding: 14px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.audit-master .audit-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 12px;
    align-items: end;
}

.audit-master .audit-filter-grid .form-group {
    min-width: 0;
}

.audit-master .audit-filter-grid label {
    color: #475569;
    font-size: 0.78rem;
    font-weight: 800;
}

.audit-master .audit-filter-grid input,
.audit-master .audit-filter-grid select {
    width: 100%;
    min-height: 40px;
}

.audit-master .audit-filter-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
}

.audit-master .audit-filter-actions .btn-primary,
.audit-master .audit-filter-actions .btn-secondary {
    min-height: 38px;
}

.audit-master .audit-pagination-info {
    margin: 0;
}

.audit-master .audit-table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 8px;
    background: #ffffff;
}

.audit-master .audit-table {
    min-width: 980px;
    border: 0;
    border-radius: 0;
    table-layout: auto;
}

.audit-master .audit-table thead {
    background: #eef4ff;
}

.audit-master .audit-table th,
.audit-master .audit-table td {
    vertical-align: middle;
}

.audit-master .audit-table th {
    padding: 10px 12px;
    color: #334155;
    font-size: 0.77rem;
    font-weight: 900;
    white-space: nowrap;
}

.audit-master .audit-table td {
    padding: 10px 12px;
    color: #1f2937;
    font-size: 0.86rem;
}

.audit-master .audit-table tbody tr:hover {
    background: #f8fbff;
}

.audit-master .audit-date-cell,
.audit-master .audit-user-cell {
    white-space: nowrap;
}

.audit-master .audit-user-cell {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.audit-master .audit-description-cell {
    min-width: 280px;
    max-width: 520px;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.45;
}

.audit-master .audit-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    min-height: 26px;
    padding: 5px 9px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1.15;
    white-space: nowrap;
}

.audit-master .audit-module-badge {
    background: #eff6ff;
    color: #1d4ed8;
}

.audit-master .audit-action-badge {
    background: #ecfdf5;
    color: #166534;
}

.audit-master .audit-ip-badge {
    background: #f1f5f9;
    color: #475569;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.audit-master .audit-empty-state {
    padding: 22px;
    border-radius: 8px;
    background: #f8fafc;
    color: #64748b;
    font-weight: 800;
    text-align: center;
}

.audit-master .audit-pagination {
    justify-content: center;
    margin-top: 0;
}

.audit-master .audit-pagination .pagination-link,
.audit-master .audit-pagination .pagination-item {
    min-width: 38px;
    min-height: 38px;
    white-space: nowrap;
}

.audit-master .audit-pagination .pagination-disabled {
    color: #94a3b8;
}

@media (max-width: 1120px) {
    .audit-master .audit-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .audit-master .audit-filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .audit-master {
        gap: 14px;
    }

    .audit-master .panel-header-row {
        padding: 14px;
    }

    .audit-master .audit-kpi-grid,
    .audit-master .audit-filter-grid {
        grid-template-columns: 1fr;
    }

    .audit-master .audit-kpi-card {
        padding: 13px 13px 13px 46px;
    }

    .audit-master .audit-filter-actions {
        justify-content: stretch;
    }

    .audit-master .audit-filter-actions .btn-primary,
    .audit-master .audit-filter-actions .btn-secondary {
        width: 100%;
    }

    .audit-master .audit-table {
        min-width: 860px;
    }

    .audit-master .audit-pagination {
        justify-content: stretch;
    }

    .audit-master .audit-pagination .pagination-link,
    .audit-master .audit-pagination .pagination-item {
        flex: 1 1 42px;
    }
}

/* Auditoria V1.1 - refino visual seguro escopado */
.audit-master-page {
    overflow-x: hidden;
}

.audit-master-page .panel-header-row {
    position: relative;
    isolation: isolate;
    padding: 22px;
    background:
        linear-gradient(135deg, rgba(239, 246, 255, 0.94), rgba(255, 255, 255, 0.98) 46%, rgba(240, 253, 250, 0.88)),
        #ffffff;
}

.audit-master-page .panel-header-row::after {
    content: "";
    position: absolute;
    inset: 0 0 auto auto;
    z-index: -1;
    width: min(280px, 40%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.10), rgba(20, 184, 166, 0.08));
}

.audit-master-page .audit-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 6px;
}

.audit-master-page .audit-readonly-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 5px 9px;
    border: 1px solid rgba(20, 184, 166, 0.26);
    border-radius: 8px;
    color: #0f766e;
    background: #ecfdf5;
    font-size: 0.74rem;
    font-weight: 900;
    line-height: 1;
}

.audit-master-page .audit-card-heading,
.audit-master-page .audit-list-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.audit-master-page .audit-card-heading h3,
.audit-master-page .audit-list-heading h3 {
    margin: 0;
    color: #0f172a;
    font-size: 1rem;
    line-height: 1.25;
}

.audit-master-page .audit-card-heading p,
.audit-master-page .audit-list-heading p {
    margin: 4px 0 0;
    color: #64748b;
    line-height: 1.45;
}

.audit-master-page .audit-kpi-card {
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.audit-master-page .audit-kpi-card:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.24);
    box-shadow: 0 14px 26px rgba(15, 23, 42, 0.08);
}

.audit-master-page .audit-filter-card,
.audit-master-page .audit-table-wrap,
.audit-master-page .audit-pagination-info,
.audit-master-page .audit-pagination {
    border-radius: 8px;
}

.audit-master-page .audit-filter-grid input:focus,
.audit-master-page .audit-filter-grid select:focus {
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

.audit-master-page .audit-filter-actions .btn-primary {
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.16);
}

.audit-master-page .audit-pagination-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 11px 13px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: #f8fafc;
    color: #475569;
    font-weight: 800;
}

.audit-master-page .audit-list-heading {
    margin-bottom: -6px;
}

.audit-master-page .audit-action-badge.is-success {
    color: #047857;
    border-color: rgba(16, 185, 129, 0.28);
    background: #d1fae5;
}

.audit-master-page .audit-action-badge.is-warning {
    color: #92400e;
    border-color: rgba(245, 158, 11, 0.32);
    background: #fef3c7;
}

.audit-master-page .audit-action-badge.is-danger {
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.28);
    background: #fee2e2;
}

.audit-master-page .audit-action-badge.is-neutral {
    color: #475569;
    border-color: rgba(148, 163, 184, 0.30);
    background: #f1f5f9;
}

@media (max-width: 768px) {
    .audit-master-page .panel-header-row {
        padding: 16px;
    }

    .audit-master-page .audit-title-row {
        gap: 8px;
    }

    .audit-master-page .audit-table-wrap {
        overflow-x: hidden;
        border: 0;
        background: transparent;
    }

    .audit-master-page .audit-table,
    .audit-master-page .audit-table thead,
    .audit-master-page .audit-table tbody,
    .audit-master-page .audit-table tr,
    .audit-master-page .audit-table th,
    .audit-master-page .audit-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .audit-master-page .audit-table {
        border-spacing: 0;
        background: transparent;
    }

    .audit-master-page .audit-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    .audit-master-page .audit-table tbody {
        display: grid;
        gap: 10px;
    }

    .audit-master-page .audit-table tbody tr {
        border: 1px solid rgba(15, 23, 42, 0.10);
        border-radius: 8px;
        background: #ffffff;
        box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
        overflow: hidden;
    }

    .audit-master-page .audit-table td {
        display: grid;
        grid-template-columns: minmax(86px, 0.42fr) minmax(0, 1fr);
        gap: 8px;
        align-items: start;
        padding: 9px 11px;
        border-bottom: 1px solid rgba(15, 23, 42, 0.06);
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .audit-master-page .audit-table td:last-child {
        border-bottom: 0;
    }

    .audit-master-page .audit-table td::before {
        content: attr(data-label);
        color: #64748b;
        font-size: 0.7rem;
        font-weight: 900;
        text-transform: uppercase;
    }

    .audit-master-page .audit-table .audit-empty-state {
        display: block;
        text-align: center;
    }

    .audit-master-page .audit-table .audit-empty-state::before {
        content: none;
    }

    .audit-master-page .audit-description-cell,
    .audit-master-page .audit-user-cell {
        max-width: none;
        min-width: 0;
        overflow: visible;
        text-overflow: clip;
    }
}

/* Clients Master V2 */
.clients-master {
    display: grid;
    gap: 18px;
}

.clients-master .panel-header-row {
    align-items: flex-start;
}

.clients-master .clients-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.clients-master .clients-summary > div {
    padding: 16px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-left: 4px solid #2563eb;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.clients-master .clients-summary span {
    display: block;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.clients-master .clients-summary strong {
    display: block;
    margin-top: 6px;
    color: #0f172a;
    font-size: 1.65rem;
    line-height: 1.1;
}

.clients-master .clients-filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) minmax(140px, 0.7fr) minmax(170px, 0.8fr) auto auto;
    align-items: end;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.clients-master .clients-filter-panel label {
    min-width: 0;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 800;
}

.clients-master .clients-filter-panel input,
.clients-master .clients-filter-panel select,
.clients-master .clients-filter-panel .btn-secondary {
    width: 100%;
    min-height: 40px;
}

.clients-master .clients-list-meta {
    margin: 0;
}

.clients-master .clients-table-wrap {
    overflow-x: auto;
}

.clients-master .clients-table {
    width: 100%;
    min-width: 0;
    table-layout: auto;
}

.clients-master .clients-table th,
.clients-master .clients-table td {
    vertical-align: middle;
    word-break: normal;
    overflow-wrap: normal;
}

.clients-master .clients-table th {
    white-space: nowrap;
}

.clients-master .clients-table .client-name,
.clients-master .clients-table small,
.clients-master .clients-table td[data-label="Histórico"] strong,
.clients-master .clients-table td[data-label="Financeiro"] strong {
    display: block;
}

.clients-master .clients-actions {
    min-width: 220px;
    text-align: right;
}

.clients-master .clients-actions-row,
.clients-master .clients-actions-row form {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin: 0;
}

.clients-master .clients-actions-row {
    flex-wrap: wrap;
    max-width: 100%;
}

.clients-master .client-action-btn {
    min-width: 74px;
    flex: 0 0 auto;
    white-space: nowrap;
}

.clients-master .clients-pagination {
    justify-content: center;
    margin-top: 0;
}

.clients-master .clients-pagination .pagination-link,
.clients-master .clients-pagination .pagination-item {
    min-width: 38px;
    min-height: 38px;
    white-space: nowrap;
}

.clients-master .client-show-actions,
.clients-master .client-form-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.clients-master .client-detail-grid,
.clients-master .client-history-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.clients-master .client-profile-card,
.clients-master .client-history-section,
.clients-master .client-form-section {
    padding: 18px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.clients-master .client-profile-card h3,
.clients-master .client-history-section h3,
.clients-master .client-form-section h3 {
    margin: 0;
    color: #0f172a;
    font-size: 1rem;
}

.clients-master .client-detail-section dl {
    display: grid;
    gap: 10px;
    margin: 12px 0 0;
}

.clients-master .client-detail-section dl div {
    display: grid;
    grid-template-columns: minmax(130px, 0.7fr) minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.clients-master .client-detail-section dt {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
}

.clients-master .client-detail-section dd {
    margin: 0;
    color: #0f172a;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.clients-master .client-history-table {
    min-width: 620px;
}

.clients-master .client-history-table th,
.clients-master .client-history-table td {
    vertical-align: middle;
}

.clients-master .client-history-table td[data-label="Data"],
.clients-master .client-history-table td[data-label="Vencimento"],
.clients-master .client-history-table td[data-label="Valor"],
.clients-master .client-history-table td[data-label="Saldo"] {
    white-space: nowrap;
}

.clients-master .client-form {
    display: grid;
    gap: 14px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.clients-master .client-form-heading {
    align-items: flex-start;
    margin-bottom: 12px;
}

.clients-master .client-form-heading p {
    margin: 3px 0 0;
    color: #64748b;
    font-size: 0.85rem;
}

.clients-master .client-section-icon {
    border-radius: 8px;
}

.clients-master .client-form .form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.clients-master .client-form label {
    min-width: 0;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 800;
}

.clients-master .client-form input,
.clients-master .client-form select,
.clients-master .client-form textarea {
    width: 100%;
}

.clients-master .client-form .full-width {
    display: grid;
}

.clients-master .client-history-alert {
    margin: 0;
}

@media (max-width: 1280px) {
    .clients-master .clients-filter-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .clients-master .clients-table {
        min-width: 0;
    }

    .clients-master .clients-actions {
        min-width: 190px;
    }

    .clients-master .clients-actions-row {
        width: min(100%, 168px);
        margin-left: auto;
    }
}

@media (max-width: 900px) {
    .clients-master .client-detail-grid,
    .clients-master .client-history-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .clients-master .panel-header-row {
        align-items: stretch;
    }

    .clients-master .clients-summary,
    .clients-master .clients-filter-panel,
    .clients-master .client-form .form-grid {
        grid-template-columns: 1fr;
    }

    .clients-master .clients-table {
        min-width: 0;
    }

    .clients-master .clients-actions {
        min-width: 0;
        text-align: left;
    }

    .clients-master .clients-actions-row,
    .clients-master .clients-actions-row form {
        justify-content: stretch;
        width: 100%;
    }

    .clients-master .client-action-btn {
        flex: 1 1 112px;
        min-width: 112px;
        white-space: nowrap;
    }

    .clients-master .table-responsive .action-column .client-action-btn {
        white-space: nowrap;
    }

    .clients-master .clients-pagination .pagination-link,
    .clients-master .clients-pagination .pagination-item {
        flex: 1 1 42px;
    }

    .clients-master .client-show-actions,
    .clients-master .client-form-actions {
        justify-content: stretch;
    }

    .clients-master .client-show-actions a,
    .clients-master .client-form-actions a,
    .clients-master .client-form-actions button {
        width: 100%;
    }

    .clients-master .client-detail-section dl div {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

/* Suppliers Master V2 */
.suppliers-master {
    display: grid;
    gap: 18px;
}

.suppliers-master .suppliers-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.suppliers-master .suppliers-summary > div {
    padding: 16px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-left: 4px solid #2563eb;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.suppliers-master .suppliers-summary span {
    display: block;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.suppliers-master .suppliers-summary strong {
    display: block;
    margin-top: 6px;
    color: #0f172a;
    font-size: 1.65rem;
    line-height: 1.1;
}

.suppliers-master .suppliers-filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) minmax(140px, 0.7fr) minmax(170px, 0.8fr) auto auto;
    align-items: end;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.suppliers-master .suppliers-filter-panel label {
    min-width: 0;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 800;
}

.suppliers-master .suppliers-filter-panel input,
.suppliers-master .suppliers-filter-panel select,
.suppliers-master .suppliers-filter-panel .btn-secondary {
    width: 100%;
    min-height: 40px;
}

.suppliers-master .suppliers-list-meta {
    margin: 0;
}

.suppliers-master .suppliers-table-wrap {
    overflow-x: auto;
}

.suppliers-master .suppliers-table {
    width: 100%;
    min-width: 0;
    table-layout: auto;
}

.suppliers-master .suppliers-table th,
.suppliers-master .suppliers-table td {
    vertical-align: middle;
    word-break: normal;
    overflow-wrap: normal;
}

.suppliers-master .suppliers-table th {
    white-space: nowrap;
}

.suppliers-master .suppliers-table .client-name,
.suppliers-master .suppliers-table small,
.suppliers-master .suppliers-table td[data-label="Compras"] strong {
    display: block;
}

.suppliers-master .suppliers-actions {
    min-width: 220px;
    text-align: right;
}

.suppliers-master .suppliers-actions-row,
.suppliers-master .suppliers-actions-row form {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin: 0;
}

.suppliers-master .suppliers-actions-row {
    flex-wrap: wrap;
    max-width: 100%;
}

.suppliers-master .supplier-action-btn {
    flex: 0 0 auto;
    min-width: 74px;
    white-space: nowrap;
}

.suppliers-master .suppliers-pagination {
    justify-content: center;
    margin-top: 0;
}

.suppliers-master .suppliers-pagination .pagination-link,
.suppliers-master .suppliers-pagination .pagination-item {
    min-width: 38px;
    min-height: 38px;
    white-space: nowrap;
}

.suppliers-master .client-show-actions,
.suppliers-master .client-form-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.suppliers-master .client-detail-section,
.suppliers-master .client-history-section,
.suppliers-master .client-form-section {
    border-radius: 8px;
}

@media (max-width: 1280px) {
    .suppliers-master .suppliers-filter-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .suppliers-master .suppliers-actions {
        min-width: 190px;
    }

    .suppliers-master .suppliers-actions-row {
        width: min(100%, 168px);
        margin-left: auto;
    }
}

@media (max-width: 768px) {
    .suppliers-master .panel-header-row {
        align-items: stretch;
    }

    .suppliers-master .suppliers-summary,
    .suppliers-master .suppliers-filter-panel {
        grid-template-columns: 1fr;
    }

    .suppliers-master .suppliers-actions {
        min-width: 0;
        text-align: left;
    }

    .suppliers-master .suppliers-actions-row,
    .suppliers-master .suppliers-actions-row form {
        justify-content: stretch;
        width: 100%;
    }

    .suppliers-master .supplier-action-btn {
        flex: 1 1 112px;
        min-width: 112px;
        white-space: nowrap;
    }

    .suppliers-master .table-responsive .action-column .supplier-action-btn {
        white-space: nowrap;
    }

    .suppliers-master .suppliers-pagination .pagination-link,
    .suppliers-master .suppliers-pagination .pagination-item {
        flex: 1 1 42px;
    }

    .suppliers-master .client-show-actions,
    .suppliers-master .client-form-actions {
        justify-content: stretch;
    }

    .suppliers-master .client-show-actions a,
    .suppliers-master .client-form-actions a,
    .suppliers-master .client-form-actions button {
        width: 100%;
    }
}

/* Financeiro Master V2 - revisao final */
.financial-master {
    display: grid;
    gap: 18px;
    border-radius: 8px;
}

.financial-master .financial-hero {
    align-items: flex-start;
    gap: 18px;
    padding-bottom: 18px;
}

.financial-master .financial-hero h2 {
    color: #0f172a;
    letter-spacing: 0;
}

.financial-master .financial-hero p {
    max-width: 720px;
    color: #64748b;
    line-height: 1.55;
}

.financial-master .financial-hero-action {
    min-width: 190px;
    border-color: rgba(15, 23, 42, 0.12);
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    white-space: nowrap;
}

.financial-master .financial-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 10px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 8px;
    background: #f8fafc;
}

.financial-master .financial-nav a {
    flex: 1 1 150px;
    min-height: 38px;
    border-color: rgba(15, 23, 42, 0.10);
    background: #ffffff;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.04);
}

.financial-master .financial-cards {
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 14px;
}

.financial-master .financial-card,
.financial-master .financial-filter-card,
.financial-master .financial-record-card {
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.financial-master .indicator-card.financial-card,
.financial-master .financial-flow-card.financial-card {
    position: relative;
    overflow: hidden;
}

.financial-master .indicator-card.financial-card::before,
.financial-master .financial-flow-card.financial-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #2563eb;
}

.financial-master .financial-card-warning::before {
    background: #f59e0b !important;
}

.financial-master .financial-card-success::before {
    background: #16a34a !important;
}

.financial-master .financial-card-danger::before {
    background: #dc2626 !important;
}

.financial-master .financial-card-balance::before {
    background: #0891b2 !important;
}

.financial-master .indicator-title,
.financial-master .financial-flow-card span {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.financial-master .indicator-value,
.financial-master .financial-flow-card strong {
    color: #0f172a;
    font-size: 1.46rem;
    line-height: 1.12;
}

.financial-master .indicator-meta,
.financial-master .financial-flow-card small {
    color: #64748b;
    font-weight: 700;
}

.financial-master .financial-section {
    padding: 18px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.financial-master .financial-section-heading {
    align-items: flex-start;
    margin-bottom: 0;
    border-bottom-color: rgba(148, 163, 184, 0.20);
}

.financial-master .financial-filter-card {
    margin-top: 0;
    overflow: hidden;
}

.financial-master .financial-filter-card summary {
    padding: 13px 15px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    color: #334155;
    font-weight: 900;
}

.financial-master .financial-filter-panel {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 12px;
    padding: 14px;
    border: 0;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
}

.financial-master .financial-filter-panel input,
.financial-master .financial-filter-panel select {
    min-width: 0;
    border-radius: 8px;
}

.financial-master .financial-filter-panel .btn-primary,
.financial-master .financial-filter-panel .btn-secondary {
    min-height: 42px;
}

.financial-master .financial-table-wrap {
    margin-top: 0;
    overflow-x: auto;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    background: #ffffff;
}

.financial-master .financial-table {
    min-width: 980px;
}

.financial-master .financial-table th,
.financial-master .financial-table td {
    padding: 13px 14px;
    vertical-align: middle;
}

.financial-master .financial-table th {
    background: #f8fafc;
    color: #475569;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.financial-master .financial-money {
    color: #0f172a;
    font-weight: 900;
}

.financial-master .financial-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 900;
    line-height: 1;
}

.financial-master .financial-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 10px;
    border-radius: 8px;
    font-weight: 900;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

.financial-master .financial-action-primary {
    border-color: rgba(37, 99, 235, 0.20);
    background: #eff6ff;
    color: #1d4ed8;
}

.financial-master .financial-action-danger {
    border-color: rgba(220, 38, 38, 0.22);
    background: #fff1f2;
    color: #b91c1c;
}

.financial-master .financial-record-card {
    gap: 0;
    padding: 18px;
}

.financial-master .financial-record-card .cashier-summary-row {
    padding: 13px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.financial-master .financial-record-card .cashier-summary-row:last-child {
    border-bottom: 0;
}

.financial-master .financial-record-card .cashier-summary-row strong {
    color: #64748b;
    font-size: 0.78rem;
    letter-spacing: 0;
    text-transform: uppercase;
}

.financial-master .financial-record-card .cashier-summary-row span {
    color: #0f172a;
    font-weight: 900;
}

.financial-master .financial-movement-form {
    display: grid;
    gap: 16px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.financial-master .financial-movement-form .form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.financial-master .financial-movement-form label {
    gap: 8px;
    color: #334155;
    font-weight: 800;
}

.financial-master .financial-save-button {
    width: fit-content;
    min-width: 230px;
    min-height: 46px;
    border-radius: 8px;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.financial-master .financial-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.financial-master .financial-cancel-form {
    display: grid;
    flex: 1 1 320px;
    gap: 10px;
    margin: 0;
}

@media (max-width: 1180px) {
    .financial-master .financial-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .financial-master .financial-filter-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .financial-master .financial-hero {
        align-items: stretch;
    }

    .financial-master .financial-hero-action,
    .financial-master .financial-nav a,
    .financial-master .financial-back-top,
    .financial-master .financial-filter-panel .btn-primary,
    .financial-master .financial-filter-panel .btn-secondary {
        width: 100%;
    }

    .financial-master .financial-cards,
    .financial-master .financial-flow-grid,
    .financial-master .financial-filter-panel,
    .financial-master .financial-movement-form .form-grid {
        grid-template-columns: 1fr;
    }

    .financial-master .financial-section,
    .financial-master .financial-record-card,
    .financial-master .financial-movement-form {
        padding: 16px;
    }

    .financial-master .financial-table {
        min-width: 0;
    }

    .financial-master .financial-table-wrap {
        border: 0;
    }

    .financial-master .financial-table .table-actions,
    .financial-master .financial-table .table-actions form {
        justify-content: stretch;
        width: 100%;
    }

    .financial-master .financial-action-btn,
    .financial-master .financial-save-button {
        width: 100%;
        min-width: 0;
    }
}

/* Configuracoes Master V2 */
.settings-master {
    display: grid;
    gap: 18px;
    border-radius: 8px;
}

.settings-master .settings-hero {
    display: grid;
    grid-template-columns: minmax(260px, 0.95fr) minmax(320px, 1.05fr);
    gap: 20px;
    align-items: start;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.20);
}

.settings-master .settings-hero h2 {
    color: #0f172a;
    letter-spacing: 0;
}

.settings-master .settings-hero p {
    max-width: 720px;
    margin: 0;
    color: #64748b;
    line-height: 1.55;
}

.settings-master .settings-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-items: stretch;
}

.settings-master .settings-nav-link,
.settings-master .settings-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 8px;
    background: #ffffff;
    color: #334155;
    font-weight: 900;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.settings-master .settings-nav-link.is-active {
    border-color: rgba(37, 99, 235, 0.28);
    background: #eff6ff;
    color: #1d4ed8;
}

.settings-master .settings-nav .btn-primary {
    grid-column: 1 / -1;
    color: #ffffff;
}

.settings-master .settings-form-card {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.settings-master .settings-layout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.34fr);
    gap: 16px;
    align-items: start;
}

.settings-master .settings-main-column {
    display: grid;
    gap: 16px;
}

.settings-master .settings-section,
.settings-master .settings-card,
.settings-master .settings-table-section {
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.settings-master .settings-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 17px 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.settings-master .settings-section-header.compact {
    padding: 15px 16px;
}

.settings-master .settings-section-icon {
    display: inline-flex;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 8px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.76rem;
    font-weight: 900;
}

.settings-master .settings-section-header h3 {
    margin: 0;
    color: #0f172a;
    letter-spacing: 0;
}

.settings-master .settings-section-header p {
    margin: 3px 0 0;
    color: #64748b;
    font-size: 0.86rem;
    line-height: 1.4;
}

.settings-master .settings-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
    padding: 18px;
}

.settings-master .settings-form-grid label {
    min-width: 0;
    gap: 8px;
    color: #334155;
    font-weight: 800;
}

.settings-master .settings-label-text {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px;
    line-height: 1.25;
}

.settings-master .required {
    display: inline;
    color: #dc2626;
    font-weight: 900;
}

.settings-master .settings-form-grid input,
.settings-master .settings-form-grid select,
.settings-master .settings-form-grid textarea {
    width: 100%;
    min-width: 0;
    border-color: rgba(148, 163, 184, 0.38);
    border-radius: 8px;
    background: #ffffff;
}

.settings-master .settings-form-grid input:focus,
.settings-master .settings-form-grid select:focus,
.settings-master .settings-form-grid textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    outline: none;
}

.settings-master .settings-aside {
    display: grid;
    gap: 16px;
}

.settings-master .settings-card-body {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.settings-master .settings-card-body p {
    margin: 0;
    color: #64748b;
    line-height: 1.5;
}

.settings-master .logo-preview {
    max-width: 100%;
    border-radius: 8px;
}

.settings-master .empty-logo {
    display: grid;
    min-height: 112px;
    place-items: center;
    border: 1px dashed rgba(100, 116, 139, 0.30);
    background: #f8fafc;
    color: #64748b;
    font-weight: 800;
}

.settings-master .settings-save-button {
    width: 100%;
    min-height: 48px;
    border-radius: 8px;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.settings-master .settings-table-wrap {
    margin: 0;
    overflow-x: auto;
}

.settings-master .settings-table {
    min-width: 980px;
}

.settings-master .settings-companies-table {
    min-width: 860px;
    table-layout: fixed;
}

.settings-master .settings-companies-table th:nth-child(1),
.settings-master .settings-companies-table td:nth-child(1) {
    width: 58px;
}

.settings-master .settings-companies-table th:nth-child(2),
.settings-master .settings-companies-table td:nth-child(2) {
    width: 25%;
}

.settings-master .settings-companies-table th:nth-child(3),
.settings-master .settings-companies-table td:nth-child(3) {
    width: 118px;
    white-space: nowrap;
}

.settings-master .settings-companies-table th:nth-child(4),
.settings-master .settings-companies-table td:nth-child(4) {
    width: 17%;
}

.settings-master .settings-companies-table th:nth-child(5),
.settings-master .settings-companies-table td:nth-child(5) {
    width: 110px;
}

.settings-master .settings-companies-table th:nth-child(6),
.settings-master .settings-companies-table td:nth-child(6) {
    width: 132px;
}

.settings-master .settings-companies-table th:nth-child(7),
.settings-master .settings-companies-table td:nth-child(7) {
    width: 86px;
}

.settings-master .settings-companies-table th:nth-child(8),
.settings-master .settings-companies-table td:nth-child(8) {
    width: 128px;
}

.settings-master .settings-table th,
.settings-master .settings-table td {
    padding: 11px 12px;
    vertical-align: middle;
}

.settings-master .settings-table th {
    background: #f8fafc;
    color: #475569;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.settings-master .settings-table td strong,
.settings-master .settings-table td small {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.settings-master .settings-table td small {
    margin-top: 3px;
    color: #64748b;
    font-size: 0.76rem;
    line-height: 1.28;
}

.settings-master .settings-status-badge {
    display: inline-flex;
    width: fit-content;
    margin-top: 5px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 900;
}

.settings-master .settings-table-actions {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 6px;
    justify-content: flex-start;
    min-width: 116px;
}

.settings-master .settings-company-delete-form {
    display: flex;
    margin: 0;
    width: 100%;
}

.settings-master .settings-table-actions .settings-action-btn {
    width: 100%;
    min-height: 29px;
    padding: 5px 8px;
    box-shadow: none;
    font-size: 0.75rem;
    line-height: 1.1;
    white-space: normal;
}

.settings-master .settings-company-action-btn {
    max-width: 112px;
    align-self: flex-end;
}

.settings-master .settings-action-danger,
.settings-master .settings-danger-btn {
    border-color: rgba(220, 38, 38, 0.22);
    background: #fff1f2;
    color: #b91c1c;
}

.settings-master .settings-danger-btn:hover {
    border-color: rgba(220, 38, 38, 0.36);
    background: #ffe4e6;
    color: #991b1b;
}

.settings-master .settings-form-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.settings-master .settings-form-actions .settings-action-btn,
.settings-master .settings-form-actions .settings-save-button {
    width: auto;
    min-width: 170px;
}

@media (max-width: 1180px) {
    .settings-master .settings-hero,
    .settings-master .settings-layout-grid {
        grid-template-columns: 1fr;
    }

    .settings-master .settings-aside {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .settings-master .settings-nav,
    .settings-master .settings-form-grid,
    .settings-master .settings-aside {
        grid-template-columns: 1fr;
    }

    .settings-master .settings-section-header {
        align-items: flex-start;
    }

    .settings-master .settings-form-grid,
    .settings-master .settings-card-body {
        padding: 16px;
    }

    .settings-master .settings-nav-link,
    .settings-master .settings-action-btn,
    .settings-master .settings-form-actions .settings-action-btn,
    .settings-master .settings-form-actions .settings-save-button {
        width: 100%;
    }

    .settings-master .settings-table {
        min-width: 0;
    }

    .settings-master .settings-table-actions {
        justify-content: stretch;
        min-width: 0;
    }

    .settings-master .settings-company-delete-form {
        width: 100%;
    }

    .settings-master .settings-company-action-btn {
        max-width: none;
        align-self: stretch;
    }
}

/* Caixa Master V2 */
.cash-master {
    display: grid;
    width: 100%;
    max-width: 100%;
    justify-self: stretch;
    gap: 18px;
    border-radius: 8px;
}

.cash-master.cash-history-page {
    width: 100%;
    max-width: none;
    justify-self: stretch;
}

.main-area:has(.cash-history-page) {
    flex: 1 1 auto;
    width: auto;
    max-width: none;
}

.cash-master .cash-hero {
    align-items: flex-start;
    gap: 18px;
    padding-bottom: 18px;
}

.cash-master .cash-hero h2 {
    color: #0f172a;
    letter-spacing: 0;
}

.cash-master .cash-hero p {
    max-width: 720px;
    color: #64748b;
    line-height: 1.55;
}

.cash-master .cash-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

.cash-master .cash-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}

.cash-master .cash-danger-soft {
    border-color: rgba(220, 38, 38, 0.22);
    background: #fff1f2;
    color: #b91c1c;
}

.cash-master .cash-section,
.cash-master .cash-summary-card,
.cash-master .cash-form {
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.cash-master .cash-section {
    display: grid;
    gap: 16px;
    padding: 18px;
}

.cash-master .cash-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 28px;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1;
}

.cash-master .cash-summary-grid,
.cash-master .cashier-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 14px;
}

.cash-master .cash-card,
.cash-master .indicator-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.cash-master .cash-card::before,
.cash-master .indicator-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #2563eb;
}

.cash-master .indicator-title {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.cash-master .indicator-value {
    color: #0f172a;
    font-size: 1.42rem;
    line-height: 1.12;
}

.cash-master .indicator-meta {
    color: #64748b;
    font-weight: 700;
}

.cash-master .cashier-details,
.cash-master .cash-summary-card {
    display: grid;
    gap: 0;
    padding: 16px;
}

.cash-master .cashier-details > div,
.cash-master .cash-summary-row {
    padding: 11px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.cash-master .cashier-details > div:last-child,
.cash-master .cash-summary-row:last-child {
    border-bottom: 0;
}

.cash-master .cash-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.cash-master .cash-summary-row strong {
    color: #64748b;
    font-size: 0.78rem;
    letter-spacing: 0;
    text-transform: uppercase;
}

.cash-master .cash-summary-row span {
    color: #0f172a;
    font-weight: 900;
    text-align: right;
}

.cash-master .cashier-summary-total {
    margin-top: 4px;
    padding: 14px 10px;
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 8px;
    background: #eff6ff;
}

.cash-master .cash-filter-panel {
    display: grid;
    grid-template-columns: minmax(170px, 1.2fr) minmax(130px, 0.8fr) minmax(160px, 1fr) repeat(2, minmax(130px, 0.8fr)) minmax(150px, 0.9fr) auto auto;
    gap: 12px;
    align-items: end;
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.cash-master .cash-filter-panel input,
.cash-master .cash-filter-panel select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    border-radius: 8px;
}

.cash-master .cash-history-filters {
    width: 100%;
    max-width: 100%;
    justify-self: stretch;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.cash-master .cash-history-filters .btn-primary,
.cash-master .cash-history-filters .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 40px;
    box-sizing: border-box;
    white-space: nowrap;
}

.cash-master .cash-history-list {
    display: grid;
    width: 100%;
    max-width: 100%;
    justify-self: stretch;
    gap: 14px;
}

.cash-master .cash-history-empty {
    padding: 20px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 8px;
    background: #ffffff;
    color: #64748b;
    font-weight: 800;
    text-align: center;
}

.cash-master .cash-history-card {
    display: grid;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    justify-self: stretch;
    gap: 16px;
    padding: 18px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.055);
}

.cash-master .cash-history-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.cash-master .cash-history-card-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: #0f172a;
    font-size: 1.02rem;
    font-weight: 950;
    line-height: 1.2;
}

.cash-master .cash-history-actions {
    flex: 0 0 auto;
}

.cash-master .cash-history-meta-grid,
.cash-master .cash-history-money-grid {
    display: grid;
    gap: 12px;
}

.cash-master .cash-history-meta-grid {
    grid-template-columns: minmax(220px, 1.15fr) repeat(2, minmax(150px, 0.85fr));
}

.cash-master .cash-history-money-grid {
    grid-template-columns: repeat(5, minmax(130px, 1fr));
}

.cash-master .cash-history-meta-item,
.cash-master .cash-history-money-item {
    display: grid;
    gap: 7px;
    min-width: 0;
    padding: 13px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    background: #ffffff;
}

.cash-master .cash-history-meta-item strong,
.cash-master .cash-history-money-item strong {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.2;
    text-transform: uppercase;
}

.cash-master .cash-history-meta-item span {
    min-width: 0;
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 900;
    line-height: 1.25;
    overflow-wrap: break-word;
}

.cash-master .cash-history-money-item span {
    color: #0f172a;
    font-size: 1.02rem;
    font-variant-numeric: tabular-nums;
    font-weight: 950;
    line-height: 1.2;
    white-space: nowrap;
}

.cash-master .cash-history-money-featured {
    border-color: rgba(37, 99, 235, 0.20);
    background: #eff6ff;
}

.cash-master .cash-history-money-featured span {
    color: #1d4ed8;
}

.cash-master .cash-history-difference {
    border-color: rgba(15, 23, 42, 0.12);
    background: #f8fafc;
}

.cash-master .cash-table {
    min-width: 920px;
}

.cash-master .cash-history-wrap {
    overflow-x: auto;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    background: #ffffff;
}

.cash-master .cash-history-table {
    min-width: 1040px;
    table-layout: fixed;
}

.cash-master .cash-history-table .cash-col-id {
    width: 58px;
}

.cash-master .cash-history-table .cash-col-date {
    width: 124px;
}

.cash-master .cash-history-table .cash-col-operator {
    width: 150px;
}

.cash-master .cash-history-table .cash-col-money {
    width: 112px;
}

.cash-master .cash-history-table .cash-col-wide {
    width: 136px;
}

.cash-master .cash-history-table .cash-col-status {
    width: 98px;
}

.cash-master .cash-history-table .cash-col-actions {
    width: 104px;
}

.cash-master .cash-table th,
.cash-master .cash-table td {
    padding: 12px 13px;
    vertical-align: middle;
}

.cash-master .cash-table th {
    background: #f8fafc;
    color: #475569;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
    white-space: nowrap;
}

.cash-master .cash-history-table th,
.cash-master .cash-history-table td {
    padding-right: 15px;
    padding-left: 15px;
}

.cash-master .cash-history-table th {
    font-size: 0.68rem;
    line-height: 1.2;
}

.cash-master .cash-cell-date {
    color: #334155;
    font-size: 0.86rem;
    font-weight: 800;
    line-height: 1.25;
    white-space: nowrap;
}

.cash-master .cash-cell-operator {
    color: #0f172a;
    font-weight: 900;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.cash-master .cash-cell-money {
    color: #0f172a;
    font-variant-numeric: tabular-nums;
    font-weight: 900;
    text-align: right;
    white-space: nowrap;
}

.cash-master .cash-cell-actions {
    text-align: right;
}

.cash-master .cash-table td[data-label*="Valor"],
.cash-master .cash-table td[data-label="Inicial"],
.cash-master .cash-table td[data-label="Recebido"],
.cash-master .cash-table td[data-label="Gaveta esperada"],
.cash-master .cash-table td[data-label="Informado"],
.cash-master .cash-table td[data-label="Diferença"],
.cash-master .cash-table td[data-label="Total"] {
    color: #0f172a;
    font-weight: 900;
    white-space: nowrap;
}

.cash-master .cash-details-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 16px;
}

.cash-master .cash-detail-item {
    display: grid;
    align-content: start;
    gap: 7px;
    min-height: 78px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    background: #f8fafc;
}

.cash-master .cash-detail-item strong {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.2;
    text-transform: uppercase;
}

.cash-master .cash-detail-item span {
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 900;
    line-height: 1.25;
}

.cash-master .cash-detail-status {
    justify-items: start;
}

.cash-master .cash-money-item span {
    font-variant-numeric: tabular-nums;
}

.cash-master .cash-detail-total {
    border-color: rgba(37, 99, 235, 0.20);
    background: #eff6ff;
}

.cash-master .cash-detail-total span {
    color: #1d4ed8;
    font-size: 1.08rem;
}

.cash-master .cash-close-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
}

.cash-master .cash-close-summary .cashier-summary-row {
    min-height: 50px;
}

.cash-master .cash-close-highlight {
    grid-column: 1 / -1;
    margin-top: 10px;
    padding: 18px;
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
}

.cash-master .cash-close-highlight strong {
    color: #1e40af;
}

.cash-master .cash-close-highlight span {
    color: #1d4ed8;
    font-size: 1.25rem;
}

.cash-master .cash-close-form {
    gap: 18px;
}

.cash-master .cash-close-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.cash-master .cash-close-observation {
    grid-column: 1 / -1;
}

.cash-master .cash-form {
    display: grid;
    gap: 16px;
    padding: 18px;
}

.cash-master .cash-form label {
    gap: 8px;
    color: #334155;
    font-weight: 800;
}

.cash-master .cash-form input,
.cash-master .cash-form textarea,
.cash-master .cash-form select {
    width: 100%;
    border-radius: 8px;
}

.cash-master .cash-form-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.cash-master .cashier-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.cash-master .cashier-pagination a {
    min-width: 36px;
    min-height: 36px;
    padding: 7px 10px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 8px;
    background: #ffffff;
    text-align: center;
    text-decoration: none;
}

@media (max-width: 1180px) {
    .cash-master .cash-summary-grid,
    .cash-master .cashier-dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cash-master .cash-filter-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cash-master .cash-history-filters,
    .cash-master .cash-history-money-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cash-master .cash-history-meta-grid {
        grid-template-columns: 1fr 1fr;
    }

    .cash-master .cash-details-grid,
    .cash-master .cash-close-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .cash-master .cash-hero {
        align-items: stretch;
    }

    .cash-master .cash-summary-grid,
    .cash-master .cashier-dashboard-grid,
    .cash-master .cash-filter-panel,
    .cash-master .cash-history-filters,
    .cash-master .cash-history-meta-grid,
    .cash-master .cash-history-money-grid,
    .cash-master .cash-details-grid,
    .cash-master .cash-close-summary,
    .cash-master .cash-close-fields {
        grid-template-columns: 1fr;
    }

    .cash-master .cash-actions-row,
    .cash-master .cash-form-actions {
        justify-content: stretch;
    }

    .cash-master .cash-action-btn,
    .cash-master .cash-form-actions .btn-primary,
    .cash-master .cash-form-actions .btn-secondary,
    .cash-master .cash-filter-panel .btn-primary,
    .cash-master .cash-filter-panel .btn-secondary {
        width: 100%;
    }

    .cash-master .cash-section,
    .cash-master .cash-form,
    .cash-master .cash-summary-card {
        padding: 16px;
    }

    .cash-master .cash-summary-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .cash-master .cash-summary-row span {
        text-align: left;
    }

    .cash-master .cash-table {
        min-width: 0;
    }

    .cash-master .cash-history-wrap {
        border: 0;
        background: transparent;
    }

    .cash-master .cash-history-table {
        min-width: 0;
        table-layout: auto;
    }

    .cash-master .cash-history-table thead {
        display: none;
    }

    .cash-master .cash-history-table,
    .cash-master .cash-history-table tbody,
    .cash-master .cash-history-table tr,
    .cash-master .cash-history-table td {
        display: block;
        width: 100%;
    }

    .cash-master .cash-history-table tr {
        margin-bottom: 12px;
        padding: 12px;
        border: 1px solid rgba(15, 23, 42, 0.10);
        border-radius: 8px;
        background: #ffffff;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
    }

    .cash-master .cash-history-table td {
        display: flex;
        justify-content: space-between;
        gap: 14px;
        padding: 9px 0;
        border-bottom: 1px solid rgba(148, 163, 184, 0.16);
        text-align: right;
    }

    .cash-master .cash-history-table td:last-child {
        border-bottom: 0;
    }

    .cash-master .cash-history-table td::before {
        content: attr(data-label);
        color: #64748b;
        font-size: 0.72rem;
        font-weight: 900;
        text-align: left;
        text-transform: uppercase;
    }

    .cash-master .cash-cell-actions {
        justify-content: stretch;
        text-align: left;
    }

    .cash-master .cash-cell-actions::before {
        display: none;
    }

    .cash-master .cash-detail-item {
        min-height: 0;
    }

    .cash-master .cash-history-card {
        padding: 15px;
    }

    .cash-master .cash-history-card-header {
        align-items: stretch;
        flex-direction: column;
    }

    .cash-master .cash-history-actions,
    .cash-master .cash-history-actions .cash-action-btn {
        width: 100%;
    }

    .cash-master .cash-history-meta-item,
    .cash-master .cash-history-money-item {
        padding: 12px;
    }

    .cash-master .cash-history-money-item span {
        white-space: normal;
    }

    .cash-master .cash-close-highlight {
        grid-column: auto;
    }

    .cash-master .cash-close-observation {
        grid-column: auto;
    }
}

/* Comissões Master V2.1 - ajustes finais de escopo */
.commissions-master-page .commissions-settings-footer .commissions-action-btn {
    width: auto;
    max-width: 100%;
}

@media (max-width: 760px) {
    .commissions-master-page .commissions-settings-footer .commissions-action-btn {
        width: 100%;
    }
}

/* Suporte Online Master V2 */
.support-master-page {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    overflow-x: hidden;
}

.support-master-page,
.support-master-page * {
    box-sizing: border-box;
}

.support-master-page .panel-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    min-width: 0;
    padding: 26px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(236, 253, 245, 0.9), rgba(255, 255, 255, 0.98) 48%, rgba(239, 246, 255, 0.78)),
        #ffffff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.support-master-page .panel-header-row > div:first-child {
    min-width: 0;
}

.support-master-page .page-label {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: #0f766e;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.support-master-page .page-label::after {
    content: "Master V2";
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 5px 9px;
    border: 1px solid rgba(16, 185, 129, 0.26);
    border-radius: 999px;
    color: #065f46;
    background: #d1fae5;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: none;
}

.support-master-page .panel-header-row h2 {
    margin-top: 8px;
    color: #0f172a;
    font-size: 1.72rem;
    line-height: 1.18;
}

.support-master-page .panel-header-row p {
    max-width: 760px;
    margin-top: 8px;
    color: #475569;
    line-height: 1.55;
}

.support-master-page .panel-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    flex: 0 1 330px;
    min-width: 0;
}

.support-master-page .panel-actions .btn-primary,
.support-master-page .panel-actions .btn-secondary,
.support-master-page > .panel-header-row > .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    max-width: 100%;
    padding: 10px 14px;
    white-space: nowrap;
}

.support-master-page .dashboard-topcards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
}

.support-master-page .indicator-card,
.support-master-page .shortcut-card,
.support-master-page .dashboard-panel,
.support-master-page .form-card {
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.support-master-page .indicator-card {
    position: relative;
    overflow: hidden;
    min-height: 122px;
}

.support-master-page .indicator-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #14b8a6;
}

.support-master-page .indicator-title {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 900;
}

.support-master-page .indicator-value {
    color: #0f172a;
    font-size: 1.78rem;
    font-weight: 900;
}

.support-master-page .indicator-meta {
    color: #0f766e;
    font-weight: 800;
}

.support-master-page .dashboard-shortcuts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin: 0;
}

.support-master-page .shortcut-card {
    display: grid;
    gap: 10px;
    align-content: start;
    padding: 18px;
}

.support-master-page .shortcut-card h3 {
    color: #0f172a;
    font-size: 1rem;
}

.support-master-page .shortcut-card p {
    color: #64748b;
    line-height: 1.5;
}

.support-master-page .shortcut-card .btn-secondary {
    justify-self: start;
}

.support-master-page .dashboard-panel,
.support-master-page .form-card {
    display: grid;
    gap: 16px;
    padding: 20px;
}

.support-master-page .panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.support-master-page .panel-header h2,
.support-master-page .settings-panel h3 {
    color: #0f172a;
    font-size: 1.08rem;
}

.support-master-page .panel-header p {
    color: #64748b;
    line-height: 1.5;
}

.support-master-page .report-filter-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    align-items: end;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    background: #f8fafc;
}

.support-master-page .report-filter-panel label,
.support-master-page .settings-panel label {
    min-width: 0;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 800;
}

.support-master-page .report-filter-panel select,
.support-master-page .settings-panel input,
.support-master-page .settings-panel select,
.support-master-page .settings-panel textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border-color: #dbe3ee;
    border-radius: 10px;
    background: #f8fafc;
}

.support-master-page .report-filter-panel .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    margin-top: 0;
}

.support-master-page .table-responsive {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: visible;
    overflow-y: visible;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    background: #ffffff;
}

.support-master-page .data-table {
    width: 100%;
    min-width: 0;
    margin: 0;
}

.support-master-page .data-table thead {
    background: #f1f5f9;
}

.support-master-page .data-table th,
.support-master-page .data-table td {
    padding: 12px 14px;
    color: #334155;
    line-height: 1.45;
    vertical-align: middle;
    word-break: normal;
    overflow-wrap: anywhere;
}

.support-master-page .data-table th {
    color: #475569;
    font-size: 0.74rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0;
}

.support-master-page .data-table tbody tr:hover {
    background: #f8fafc;
}

.support-master-page .data-table small {
    display: block;
    margin-top: 4px;
    color: #0f766e;
    font-weight: 800;
}

.support-master-page .table-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.support-master-page .btn-small {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 0.82rem;
}

.support-master-page .status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 5px 9px;
    border: 1px solid rgba(16, 185, 129, 0.28);
    border-radius: 999px;
    color: #047857;
    background: #d1fae5;
    font-size: 0.74rem;
    font-weight: 900;
    white-space: nowrap;
}

.support-master-page .empty-row {
    padding: 18px !important;
    color: #64748b;
    font-weight: 800;
    text-align: center;
    white-space: normal;
}

.support-master-page .settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    width: 100%;
    max-width: 100%;
}

.support-master-page .settings-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.support-master-page .settings-panel .full-width,
.support-master-page .settings-panel h3,
.support-master-page .settings-panel button {
    grid-column: 1 / -1;
}

.support-master-page .settings-panel textarea {
    resize: vertical;
}

.support-master-page .cashier-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.support-master-page .cashier-card-item {
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
    background: #f8fafc;
}

.support-master-page .cashier-card-item span {
    display: block;
    margin-bottom: 5px;
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 900;
}

.support-master-page .cashier-card-item strong {
    display: block;
    color: #0f172a;
    overflow-wrap: anywhere;
}

.support-master-page .dashboard-panel > p {
    margin: 0;
    color: #334155;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

@media (max-width: 980px) {
    .support-master-page .dashboard-topcards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .support-master-page .panel-header-row {
        flex-direction: column;
        align-items: stretch;
    }

    .support-master-page .panel-actions {
        justify-content: flex-start;
        width: 100%;
        flex-basis: auto;
    }
}

@media (max-width: 720px) {
    .support-master-page {
        gap: 16px;
    }

    .support-master-page .panel-header-row,
    .support-master-page .dashboard-panel,
    .support-master-page .form-card {
        padding: 16px;
        border-radius: 14px;
    }

    .support-master-page .dashboard-topcards,
    .support-master-page .settings-panel {
        grid-template-columns: 1fr;
    }

    .support-master-page .panel-actions,
    .support-master-page .report-filter-panel {
        grid-template-columns: 1fr;
    }

    .support-master-page .panel-actions .btn-primary,
    .support-master-page .panel-actions .btn-secondary,
    .support-master-page > .panel-header-row > .btn-secondary,
    .support-master-page .report-filter-panel .btn-secondary,
    .support-master-page .settings-panel button,
    .support-master-page .shortcut-card .btn-secondary {
        width: 100%;
    }

    .support-master-page .table-responsive {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .support-master-page .data-table {
        min-width: 640px;
    }

    .support-master-page .table-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 420px) {
    .support-master-page .panel-header-row h2 {
        font-size: 1.42rem;
    }

    .support-master-page .data-table {
        min-width: 580px;
    }
}
/* Suporte Online Master V2.1 - Ajuste seguro dos asteriscos */
.support-master-page .form-card label > .required {
    display: inline !important;
    margin-left: 4px;
    color: #ef4444;
    font-weight: 900;
    line-height: 1;
    vertical-align: baseline;
}

/* Suporte V1.1 - refino visual seguro e escopado */
.support-master-page .support-hero-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.support-master-page .support-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    min-height: 24px;
    padding: 4px 9px;
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 999px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1;
}

.support-master-page .support-action-card {
    border-color: rgba(37, 99, 235, 0.16);
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.support-master-page .support-action-card h3 {
    margin-top: 2px;
}

.support-master-page .support-card-tone-aberto::before {
    background: #2563eb;
}

.support-master-page .support-card-tone-em-analise::before {
    background: #d97706;
}

.support-master-page .support-card-tone-respondido::before {
    background: #7c3aed;
}

.support-master-page .support-card-tone-resolvido::before {
    background: #16a34a;
}

.support-master-page .support-list-panel {
    gap: 14px;
}

.support-master-page .support-filter-panel {
    background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.support-master-page .support-ticket-form {
    background:
        linear-gradient(180deg, rgba(248, 250, 252, 0.72), #ffffff),
        #ffffff;
}

.support-master-page .support-form-intro {
    display: grid;
    gap: 8px;
    padding: 0 0 4px;
}

.support-master-page .support-form-intro h3 {
    margin: 0;
    color: #0f172a;
}

.support-master-page .support-form-intro p,
.support-master-page .support-form-footer small {
    margin: 0;
    color: #64748b;
    line-height: 1.5;
}

.support-master-page .support-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 4px;
}

.support-master-page .support-form-footer .btn-primary {
    width: auto;
}

.support-master-page .priority-badge,
.support-master-page .status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
    min-height: 26px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 900;
    line-height: 1.1;
    white-space: nowrap;
}

.support-master-page .status-aberto {
    border-color: rgba(37, 99, 235, 0.24);
    color: #1d4ed8;
    background: #dbeafe;
}

.support-master-page .status-em-analise {
    border-color: rgba(217, 119, 6, 0.28);
    color: #92400e;
    background: #fef3c7;
}

.support-master-page .status-respondido {
    border-color: rgba(124, 58, 237, 0.24);
    color: #6d28d9;
    background: #ede9fe;
}

.support-master-page .status-resolvido,
.support-master-page .status-fechado {
    border-color: rgba(22, 163, 74, 0.24);
    color: #15803d;
    background: #dcfce7;
}

.support-master-page .priority-baixa {
    color: #166534;
    background: #dcfce7;
}

.support-master-page .priority-media {
    color: #1d4ed8;
    background: #dbeafe;
}

.support-master-page .priority-alta {
    color: #92400e;
    background: #fef3c7;
}

.support-master-page .priority-urgente {
    color: #b91c1c;
    background: #fee2e2;
}

.support-master-page .support-detail-panel .cashier-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.support-master-page .support-message-box {
    width: 100%;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
    color: #334155;
    background: #f8fafc;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.support-master-page .support-response-box {
    border-color: rgba(37, 99, 235, 0.18);
    background: #f8fbff;
}

.support-master-page .support-attachment-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(217, 119, 6, 0.2);
    border-radius: 12px;
    color: #92400e;
    background: #fffbeb;
    font-weight: 800;
}

.support-master-page .support-tech-panel .data-table th {
    width: 34%;
}

@media (max-width: 720px) {
    .support-master-page .support-form-footer {
        align-items: stretch;
    }

    .support-master-page .support-form-footer .btn-primary,
    .support-master-page .support-attachment-box .btn-secondary {
        width: 100%;
    }

    .support-master-page .support-attachment-box {
        align-items: stretch;
    }
}

/* Licenca V1.1 - refino visual seguro e escopado */
.license-master-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.license-master-page,
.license-master-page * {
    box-sizing: border-box;
}

.license-master-page .license-hero {
    align-items: flex-start;
    border: 1px solid rgba(37, 99, 235, 0.16);
    background:
        linear-gradient(135deg, rgba(239, 246, 255, 0.92), rgba(255, 255, 255, 0.98) 54%, rgba(240, 253, 250, 0.72)),
        #ffffff;
}

.license-master-page .license-security-badge,
.license-master-page .license-event-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
    min-height: 26px;
    padding: 5px 10px;
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 999px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 0.74rem;
    font-weight: 900;
    line-height: 1.1;
}

.license-master-page .license-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
    min-width: 0;
}

.license-master-page .license-info-card,
.license-master-page .license-card-grid .cashier-card-item {
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 15px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
    background: #f8fafc;
}

.license-master-page .license-info-card span,
.license-master-page .license-card-grid .cashier-card-item span {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 900;
}

.license-master-page .license-info-card strong,
.license-master-page .license-card-grid .cashier-card-item strong {
    color: #0f172a;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.license-master-page .license-info-card small,
.license-master-page .license-card-grid .cashier-card-item small,
.license-master-page .license-sensitive-field small {
    color: #64748b;
    line-height: 1.45;
}

.license-master-page .license-status-card,
.license-master-page .status-ativo {
    border-color: rgba(22, 163, 74, 0.22);
    background: #f0fdf4;
}

.license-master-page .status-teste {
    border-color: rgba(217, 119, 6, 0.24);
    background: #fffbeb;
}

.license-master-page .status-vencido,
.license-master-page .status-bloqueado,
.license-master-page .status-suspenso {
    border-color: rgba(220, 38, 38, 0.2);
    background: #fef2f2;
}

.license-master-page .license-key-card {
    border-color: rgba(37, 99, 235, 0.2);
    background: #f8fbff;
}

.license-master-page .license-summary-panel,
.license-master-page .license-activation-panel,
.license-master-page .license-history-panel,
.license-master-page .license-admin-form {
    min-width: 0;
}

.license-master-page .license-inline-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
    align-items: end;
    gap: 14px;
    width: 100%;
    min-width: 0;
}

.license-master-page .license-inline-form label,
.license-master-page .license-admin-form label {
    min-width: 0;
}

.license-master-page .license-inline-form input,
.license-master-page .license-admin-form input,
.license-master-page .license-admin-form select,
.license-master-page .license-admin-form textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.license-master-page .license-sensitive-field {
    display: grid;
    gap: 6px;
}

.license-master-page .license-history-panel .table-responsive {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
}

@media (max-width: 900px) {
    .license-master-page .license-inline-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .license-master-page {
        gap: 16px;
    }

    .license-master-page .license-security-badge,
    .license-master-page .license-inline-form .btn-primary,
    .license-master-page .license-admin-form .btn-primary {
        width: 100%;
    }

    .license-master-page .license-history-panel .data-table {
        min-width: 560px;
    }
}
/* Zero Grau: painel inicial simples para operação diária. */
.dashboard-simple-home { margin-bottom: 24px; }
.dashboard-simple-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.dashboard-simple-card { color: inherit; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.dashboard-simple-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(15,23,42,.14); }
.dashboard-attention-box { margin-top: 20px; padding: 18px; border: 1px solid #e5e7eb; border-radius: 14px; background: #fff; }
.dashboard-attention-box h3 { margin: 0 0 12px; font-size: 1rem; }
.dashboard-attention-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dashboard-attention-item { padding: 12px 14px; border-radius: 10px; color: inherit; text-decoration: none; background: #f8fafc; }
.dashboard-attention-item.is-warning { background: #fff7ed; color: #9a3412; }
.dashboard-attention-item.is-ok { background: #f0fdf4; color: #166534; }
.dashboard-more-details { margin-top: 22px; }
.dashboard-more-details > summary { cursor: pointer; display: inline-block; padding: 10px 14px; border-radius: 9px; background: #eef2ff; color: #3730a3; font-weight: 700; }
.dashboard-more-details[open] > summary { margin-bottom: 20px; }
@media (max-width: 1100px) { .dashboard-simple-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .dashboard-simple-kpis, .dashboard-attention-list { grid-template-columns: 1fr; } }
/* Zero Grau operational skin: navy workspace with orange action accents. */
.zero-grau-mode .sidebar { background: #102a43; }
.zero-grau-mode .sidebar-brand { border-bottom-color: rgba(255,255,255,.14); }
.zero-grau-mode .brand-tag { color: #ff9f1c; font-size: .64rem; letter-spacing: .04em; }
.zero-grau-mode .topbar { border-top: 4px solid #f97316; }
.zero-grau-mode .topbar h1 { color: #102a43; }
.zero-grau-header-name { font-size: .7em; font-weight: 700; color: #f97316; }
.zero-grau-mode .sidebar-link-feature { background: #f97316; color: #fff; }
.zero-grau-mode .sidebar-link-feature:hover { background: #ea580c; }

/* Administrative desktop content sizing: shared by full-width modules. */
@media (min-width: 768px) {
    .app-shell > .main-area {
        flex: 1 1 auto;
        width: auto;
        max-width: none;
        min-width: 0;
    }

    .dashboard-master {
        width: 100%;
        max-width: none;
        justify-self: stretch;
    }

    .dashboard-master .dashboard-simple-kpis,
    .dashboard-master .dashboard-quick-grid,
    .dashboard-master .dashboard-primary-kpis,
    .dashboard-master .dashboard-secondary-kpis {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .dashboard-master .dashboard-panel,
    .dashboard-master .dashboard-hero {
        width: 100%;
        box-sizing: border-box;
    }

    .dashboard-master .dashboard-title-row {
        align-items: center;
    }
}

@media (min-width: 768px) and (max-width: 1279px) {
    .dashboard-master .dashboard-simple-kpis,
    .dashboard-master .dashboard-quick-grid,
    .dashboard-master .dashboard-primary-kpis,
    .dashboard-master .dashboard-secondary-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .dashboard-master .dashboard-simple-kpis,
    .dashboard-master .dashboard-quick-grid,
    .dashboard-master .dashboard-primary-kpis,
    .dashboard-master .dashboard-secondary-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
/* Zero Grau — Nova compra em tela única */
.purchase-single-page{max-width:1500px;margin:0 auto}.purchase-single-form{display:grid;gap:18px}.purchase-step-card{background:#fff;border:1px solid #e5e7eb;border-radius:16px;padding:22px;box-shadow:0 6px 22px rgba(15,23,42,.05)}.purchase-step-heading{display:flex;gap:12px;align-items:flex-start;margin-bottom:18px}.purchase-step-heading>span{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:#2563eb;color:#fff;font-weight:700}.purchase-step-heading h3{margin:0;color:#0f172a}.purchase-step-heading p{margin:4px 0 0;color:#64748b}.purchase-field-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.purchase-field-grid label,.quick-modal label{display:grid;gap:6px;color:#334155;font-weight:600}.purchase-field-grid em,.quick-modal em{color:#dc2626;font-style:normal}.field-wide{grid-column:1/-1}.inline-field{display:flex;gap:8px}.inline-field select,.inline-field input{flex:1}.purchase-step-card input,.purchase-step-card select,.purchase-step-card textarea,.quick-modal input,.quick-modal textarea{width:100%;box-sizing:border-box}.secondary-note-fields,.xml-optional,.observations-collapsed{margin-top:16px;color:#475569}.secondary-note-fields summary,.xml-optional summary,.observations-collapsed summary{cursor:pointer;font-weight:600}.xml-optional p{font-size:.88rem;color:#64748b}.add-product-bar{display:flex;gap:10px;margin-bottom:14px}.add-product-bar select{flex:1}.purchase-lines{display:grid;gap:10px}.empty-purchase-state{padding:22px;text-align:center;border:1px dashed #cbd5e1;border-radius:10px;color:#64748b}.purchase-line,.installment-line{display:grid;grid-template-columns:minmax(200px,2fr) 1fr 1fr auto auto;gap:12px;align-items:end;border:1px solid #e2e8f0;border-radius:10px;padding:12px}.purchase-line label{display:grid;gap:5px;font-size:.85rem;color:#475569}.product-line-name{display:grid;gap:4px}.product-line-name small{color:#64748b}.item-subtotal{white-space:nowrap}.payment-choice{display:flex;gap:20px;margin-bottom:14px}.payment-choice label{display:flex;gap:8px;align-items:center;font-weight:700}.payment-choice input{width:auto}.installment-tools{padding:14px;background:#f8fafc;border-radius:12px;margin-bottom:14px}.installment-table{display:grid;gap:8px}.installment-line{grid-template-columns:70px 1fr 1fr auto}.summary-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:12px}.summary-grid div{padding:12px;background:#f8fafc;border-radius:10px;color:#64748b}.summary-grid strong{display:block;color:#0f172a;margin-top:5px}.purchase-total-box{display:grid;grid-template-columns:1fr 220px;gap:12px;align-items:center;margin-top:16px;padding:16px;border-top:1px solid #e2e8f0}.purchase-total-box>span{display:flex;justify-content:space-between}.purchase-total-box label{display:grid;gap:5px}.purchase-grand-total{grid-column:1/-1;display:flex;justify-content:space-between;align-items:center;font-size:1.1rem;color:#0f172a}.purchase-grand-total b{font-size:1.7rem;color:#ea580c}.purchase-submit-bar{display:flex;justify-content:flex-end;gap:10px;position:sticky;bottom:12px;z-index:4;background:rgba(255,255,255,.94);padding:12px;border-radius:14px;box-shadow:0 5px 20px rgba(15,23,42,.12)}.quick-modal{position:fixed;inset:0;background:rgba(15,23,42,.55);z-index:30;display:grid;place-items:center;padding:16px}.quick-modal[hidden]{display:none}.quick-modal-card{position:relative;background:#fff;border-radius:16px;padding:24px;width:min(480px,100%);display:grid;gap:12px}.quick-modal-card form{display:grid;gap:12px}.quick-modal-close{position:absolute;right:12px;top:8px;border:0;background:transparent;font-size:28px;cursor:pointer}
@media(max-width:900px){.purchase-field-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.summary-grid{grid-template-columns:repeat(3,1fr)}.purchase-line{grid-template-columns:1fr 1fr}.product-line-name{grid-column:1/-1}.purchase-total-box{grid-template-columns:1fr}.purchase-grand-total{grid-column:1}}
@media(max-width:600px){.purchase-step-card{padding:16px;border-radius:12px}.purchase-field-grid,.summary-grid{grid-template-columns:1fr}.field-wide{grid-column:auto}.inline-field,.add-product-bar{display:grid}.purchase-line,.installment-line{grid-template-columns:1fr}.purchase-line button,.installment-line button{width:100%}.purchase-submit-bar{bottom:0;margin:0 -8px;border-radius:12px 12px 0 0;justify-content:stretch}.purchase-submit-bar>*{flex:1;text-align:center}.purchase-grand-total b{font-size:1.35rem}}
@media(max-width:600px){.purchase-single-form{grid-template-columns:minmax(0,1fr)}.purchase-single-form,.purchase-step-card,.add-product-bar,.inline-field{width:100%;min-width:0;box-sizing:border-box}.add-product-bar>*,.inline-field>*{width:100%;min-width:0;box-sizing:border-box}.purchase-step-card{overflow:hidden}}

/* Ajuste visual final Zero Grau: ação operacional em laranja. */
.purchase-single-page #add-product-button {
    background: #ea580c;
    border-color: #ea580c;
    color: #fff;
}
.purchase-single-page #add-product-button:hover {
    background: #c2410c;
    border-color: #c2410c;
}
.purchase-single-page #add-product-button:focus-visible,
.purchase-single-page #new-supplier-button:focus-visible {
    outline: 3px solid rgba(234, 88, 12, .35);
    outline-offset: 2px;
}
.purchase-single-page #new-supplier-button {
    color: #c2410c;
    background: #fff7ed;
    border-color: #fb923c;
    white-space: nowrap;
}
.purchase-single-page #new-supplier-button:hover {
    color: #9a3412;
    background: #ffedd5;
    border-color: #ea580c;
}
.purchase-xml-import-alert {
    border-left: 4px solid #ea580c;
    background: #fff7ed;
    color: #7c2d12;
}
.financial-attachment-link {
    border-color: #ea580c;
    color: #c2410c;
    background: #fff7ed;
}
.financial-attachment-link:hover {
    border-color: #c2410c;
    background: #ffedd5;
}
