:root{--brand:#0f766e;--dark:#0f172a;--muted:#64748b;--bg:#f8fafc;--card:#fff}*{box-sizing:border-box}body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:var(--bg);color:var(--dark)}#loader{position:fixed;inset:0;background:#fff;z-index:99;display:grid;place-items:center}#loader:after{content:"";width:44px;height:44px;border:4px solid #d1fae5;border-top-color:var(--brand);border-radius:50%;animation:s .8s linear infinite}.loaded #loader{display:none}@keyframes s{to{transform:rotate(360deg)}}aside{position:fixed;inset:0 auto 0 0;width:250px;background:#042f2e;color:#fff;padding:24px;display:flex;flex-direction:column;gap:8px}aside a,aside button{color:#fff;text-decoration:none;background:rgba(255,255,255,.08);border:0;border-radius:12px;padding:12px;text-align:left;cursor:pointer}aside a:hover,aside button:hover{background:var(--brand)}main{padding:32px}.with-menu{margin-left:250px}.card{background:var(--card);border-radius:18px;padding:22px;box-shadow:0 12px 35px rgba(15,23,42,.08);border:1px solid #e2e8f0}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:18px;margin:20px 0}.grid.two{grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}.card span{display:block;color:var(--muted);font-size:.9rem}.card strong{font-size:2rem}.login{min-height:100vh;display:grid;place-items:center}.narrow{width:min(430px,92vw)}label{display:block;margin:14px 0;color:var(--muted)}input{width:100%;padding:13px;border:1px solid #cbd5e1;border-radius:12px}.primary,form button,.toolbar button{background:var(--brand);color:#fff;border:0;border-radius:12px;padding:13px 18px;font-weight:700;cursor:pointer}.toolbar{display:flex;gap:10px;margin:16px 0}.table-wrap{overflow:auto;max-height:70vh}table{width:100%;border-collapse:collapse;white-space:nowrap}th,td{padding:13px;border-bottom:1px solid #e2e8f0;text-align:left}th{background:#f1f5f9;position:sticky;top:0}.alert{background:#fee2e2;color:#991b1b;border-radius:12px;padding:12px;margin-bottom:16px}@media(max-width:800px){aside{position:static;width:auto}.with-menu{margin-left:0}main{padding:18px}}

/* Dashboard */
.dashboard-container {
    padding: 4px 0;
}

.page-header {
    margin-bottom: 24px;
}

.page-header h1 {
    margin: 0 0 6px;
    font-size: 28px;
}

.page-header p {
    margin: 0;
    color: var(--muted);
}

.stat-card,
.financial-card {
    transition: .25s ease;
}

.stat-card:hover,
.financial-card:hover {
    transform: translateY(-3px);
}

.stat-title,
.financial-title {
    display: block;
    color: var(--muted);
    font-size: .9rem;
    margin-bottom: 10px;
}

.stat-value,
.financial-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
}


.financial-card.success {
    background: linear-gradient(135deg, #0f766e, #14b8a6);
    color: #fff;
}

.financial-card.danger {
    background: linear-gradient(135deg, #991b1b, #ef4444);
    color: #fff;
}

.financial-card.success .financial-title,
.financial-card.danger .financial-title {
    color: rgba(255,255,255,.85);
}

.stats-grid,
.financial-grid {
    display: grid;
    gap: 18px;
    margin: 20px 0;
}

.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.financial-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.stat-card,
.financial-card {
    background: var(--card);
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 12px 35px rgba(15,23,42,.08);
    border: 1px solid #e2e8f0;
}

/* Layout premium ERP2026 */
.erp-sidebar {
    width: 270px;
    background:
        radial-gradient(circle at top left, rgba(20,184,166,.28), transparent 35%),
        linear-gradient(180deg, #022c22 0%, #064e3b 100%);
    padding: 24px 18px;
    box-shadow: 12px 0 35px rgba(15,23,42,.18);
}

.with-menu {
    margin-left: 270px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 8px 22px;
    border-bottom: 1px solid rgba(255,255,255,.12);
    margin-bottom: 18px;
}

.brand-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, #14b8a6, #0f766e);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 12px 24px rgba(20,184,166,.28);
}

.sidebar-brand h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.1;
}

.sidebar-brand span {
    font-size: 12px;
    color: #a7f3d0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.erp-sidebar a,
.erp-sidebar button {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    min-height: 46px;
    border-radius: 14px;
    font-size: 15px;
    transition: .25s ease;
}

.erp-sidebar a:hover,
.erp-sidebar button:hover {
    background: rgba(20,184,166,.95);
    transform: translateX(4px);
}

.erp-sidebar .icon {
    width: 26px;
    height: 26px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.12);
    font-size: 14px;
    flex-shrink: 0;
}

.logout-form {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,.12);
}

.logout-form button {
    justify-content: flex-start;
    background: rgba(239,68,68,.18);
}

.logout-form button:hover {
    background: #dc2626;
}

/* Layout geral premium ERP2026 */
body {
    background:
        radial-gradient(circle at top right, rgba(20,184,166,.10), transparent 28%),
        #f8fafc;
}

main {
    min-height: 100vh;
}

main.with-menu {
    padding: 34px;
}

h1 {
    font-size: 30px;
    margin: 0 0 20px;
    letter-spacing: -.4px;
}

.card {
    border-radius: 22px;
    box-shadow: 0 18px 45px rgba(15,23,42,.08);
}

.card:hover {
    transform: translateY(-2px);
    transition: .25s ease;
}

.primary,
form button,
.toolbar button {
    box-shadow: 0 12px 24px rgba(15,118,110,.22);
}

.table-wrap {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 14px 35px rgba(15,23,42,.06);
}

table {
    background: #fff;
}

th {
    color: #334155;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

td {
    color: #334155;
}

tr:hover td {
    background: #f8fafc;
}

input {
    transition: .2s ease;
}

input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(15,118,110,.12);
}

.alert {
    border: 1px solid #fecaca;
}

.svg-icon{
    width:18px;
    height:18px;
    flex-shrink:0;
}

.action-btn{
    min-height:40px;
    padding:0 14px;
    display:inline-flex;
    align-items:center;
    gap:8px;
    border-radius:12px;
    font-weight:700;
    transition:.2s ease;
}

.action-btn svg{
    transition:.2s ease;
}

.action-btn:hover svg{
    transform:scale(1.08);
}

.svg-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.action-btn svg,
.btn svg,
.search-box svg {
    transition: .2s ease;
}

.action-btn:hover svg,
.btn:hover svg {
    transform: scale(1.08);
}

.premium-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 30px;
    margin-bottom: 20px;
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(59,130,246,.35), transparent 35%),
        linear-gradient(135deg, #020617, #0f172a 55%, #1e3a8a);
    color: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
}

.premium-hero h1 {
    margin: 6px 0;
    font-size: 30px;
    font-weight: 850;
}

.premium-hero p {
    margin: 0;
    color: rgba(255,255,255,.72);
}

.module-eyebrow {
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .16em;
    color: #93c5fd;
}

.premium-main-action,
.icon-btn,
.icon-action {
    width: 42px;
    height: 42px;
    min-width: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: .2s ease;
}

.premium-main-action {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 18px;
    color: #fff;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.2);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.2);
}

.premium-main-action:hover {
    background: #2563eb;
    color: #fff;
    transform: translateY(-2px);
}

.compact-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 18px;
}

.compact-search {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.compact-search-box {
    width: 300px;
    height: 42px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 13px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px rgba(15, 23, 42, .055);
}

.compact-search-box input {
    width: 100%;
    height: 38px;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 13px;
    color: #0f172a;
}

.compact-search-box input::placeholder {
    color: #94a3b8;
}

.icon-btn.dark {
    background: #0f172a;
    color: #fff;
    box-shadow: 0 10px 22px rgba(15, 23, 42, .18);
}

.icon-btn.light {
    background: #f1f5f9;
    color: #0f172a;
}

.icon-action.view {
    background: #e0f2fe;
    color: #0369a1;
}

.icon-action.edit {
    background: #eef2ff;
    color: #4338ca;
}

.icon-action.delete {
    background: #fee2e2;
    color: #b91c1c;
}

.icon-btn:hover,
.icon-action:hover {
    transform: translateY(-2px);
    filter: brightness(.97);
}

.svg-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.premium-main-action .svg-icon {
    width: 22px;
    height: 22px;
}

.premium-card {
    padding: 22px;
    border-radius: 26px;
    background: #fff;
    border: 1px solid #edf2f7;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .08);
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.table-header h2 {
    margin: 0;
    font-size: 20px;
    color: #0f172a;
}

.table-header p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 13px;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.premium-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.premium-table th {
    padding: 10px 16px;
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #64748b;
}

.premium-table td {
    padding: 15px 16px;
    background: #f8fafc;
    border-top: 1px solid #eef2f7;
    border-bottom: 1px solid #eef2f7;
    color: #334155;
    font-size: 14px;
}

.premium-table td:first-child {
    border-left: 1px solid #eef2f7;
    border-radius: 16px 0 0 16px;
    font-weight: 750;
    color: #0f172a;
}

.premium-table td:last-child {
    border-right: 1px solid #eef2f7;
    border-radius: 0 16px 16px 0;
}

.actions-col {
    width: 160px;
    text-align: right;
}

.actions-cell {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.inline-delete {
    margin: 0;
}

.badge {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-neutral {
    background: #e2e8f0;
    color: #334155;
}

.empty-state {
    padding: 48px 20px;
    text-align: center;
    border: 1px dashed #cbd5e1;
    border-radius: 22px;
    background: #f8fafc;
}

.empty-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 30px;
}

.empty-state h3 {
    margin: 0 0 8px;
    color: #0f172a;
}

.empty-state p {
    margin: 0 0 18px;
    color: #64748b;
}

.btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    border-radius: 14px;
    border: 0;
    font-weight: 750;
    text-decoration: none;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.detail-item {
    padding: 16px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
}

.detail-item span {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.detail-item strong {
    display: block;
    color: #0f172a;
    font-size: 15px;
}

.form-card {
    padding: 24px;
}

.module-form {
    width: 100%;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-grid label {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-grid label span {
    font-size: 13px;
    font-weight: 800;
    color: #334155;
}

.form-grid input {
    height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid #dbe3ef;
    outline: none;
    font-size: 14px;
    color: #0f172a;
    background: #fff;
    transition: .2s ease;
}

.form-grid input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
}

body.modal-open {
    overflow: hidden;
}

.confirm-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, .58);
    backdrop-filter: blur(8px);
}

.confirm-modal-backdrop[hidden] {
    display: none;
}

.confirm-modal {
    width: min(420px, 100%);
    padding: 28px;
    border-radius: 26px;
    background: #fff;
    text-align: center;
    box-shadow: 0 30px 90px rgba(15, 23, 42, .35);
    border: 1px solid rgba(226, 232, 240, .9);
    animation: modalPop .18s ease-out;
}

.confirm-modal-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    color: #b91c1c;
    background: #fee2e2;
}

.confirm-modal-icon .svg-icon {
    width: 26px;
    height: 26px;
}

.confirm-modal h3 {
    margin: 0 0 8px;
    font-size: 21px;
    color: #0f172a;
}

.confirm-modal p {
    margin: 0;
    color: #64748b;
    line-height: 1.6;
    font-size: 14px;
}

.confirm-modal-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
}

.modal-btn {
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: .2s ease;
}

.modal-btn.cancel {
    background: #f1f5f9;
    color: #0f172a;
}

.modal-btn.danger {
    background: #dc2626;
    color: #fff;
    box-shadow: 0 12px 24px rgba(220, 38, 38, .24);
}

.modal-btn:hover {
    transform: translateY(-1px);
    filter: brightness(.97);
}

.dashboard-premium {
    display: grid;
    gap: 20px;
}

.dash-hero,
.audit-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 30px;
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(59,130,246,.36), transparent 35%),
        linear-gradient(135deg, #020617, #0f172a 55%, #1e3a8a);
    color: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
}

.dash-eyebrow {
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .16em;
    color: #93c5fd;
}

.dash-hero h1,
.audit-hero h1 {
    margin: 8px 0 6px;
    font-size: 32px;
    font-weight: 850;
}

.dash-hero p,
.audit-hero p {
    margin: 0;
    color: rgba(255,255,255,.72);
}

.dash-hero-badge,
.audit-counter {
    min-width: 150px;
    padding: 16px;
    border-radius: 22px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.18);
    text-align: right;
}

.dash-hero-badge span,
.audit-counter span {
    display: block;
    font-size: 12px;
    color: rgba(255,255,255,.75);
}

.dash-hero-badge strong,
.audit-counter strong {
    display: block;
    margin-top: 4px;
    font-size: 22px;
}

.finance-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.finance-card {
    padding: 24px;
    border-radius: 24px;
    background: #fff;
    border: 1px solid #edf2f7;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .08);
}

.finance-card span {
    display: block;
    font-size: 13px;
    color: #64748b;
    font-weight: 800;
}

.finance-card strong {
    display: block;
    margin-top: 8px;
    font-size: 28px;
    color: #0f172a;
}

.finance-card.primary {
    border-left: 5px solid #2563eb;
}

.finance-card.danger {
    border-left: 5px solid #dc2626;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid #edf2f7;
    box-shadow: 0 14px 35px rgba(15, 23, 42, .065);
}

.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: #eff6ff;
    color: #2563eb;
}

.dash-icon {
    width: 23px;
    height: 23px;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.stat-card span {
    display: block;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.stat-card strong {
    display: block;
    margin-top: 4px;
    color: #0f172a;
    font-size: 24px;
}

.dashboard-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.premium-panel {
    padding: 22px;
    border-radius: 24px;
    background: #fff;
    border: 1px solid #edf2f7;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .075);
}

.panel-header h2 {
    margin: 0;
    font-size: 19px;
    color: #0f172a;
}

.panel-header p {
    margin: 5px 0 0;
    color: #64748b;
    font-size: 13px;
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.quick-links a {
    padding: 14px;
    border-radius: 16px;
    background: #f8fafc;
    color: #0f172a;
    text-decoration: none;
    font-weight: 800;
    border: 1px solid #eef2f7;
    transition: .2s ease;
}

.quick-links a:hover {
    background: #2563eb;
    color: #fff;
    transform: translateY(-1px);
}

.activity-list {
    margin-top: 16px;
    display: grid;
    gap: 10px;
}

.activity-item {
    padding: 13px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
}

.activity-item span,
.activity-item small {
    display: block;
    color: #64748b;
    font-size: 12px;
}

.activity-item strong {
    display: block;
    margin: 3px 0;
    color: #0f172a;
    font-size: 13px;
}

.audit-filter-panel {
    margin: 18px 0;
}

.audit-filters {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.filter-input {
    width: 330px;
    height: 42px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 13px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px rgba(15,23,42,.055);
}

.filter-input input {
    width: 100%;
    border: 0;
    outline: 0;
    font-size: 13px;
}

.audit-filters select {
    height: 42px;
    padding: 0 12px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #0f172a;
    font-weight: 700;
    outline: none;
}

.audit-table td strong,
.audit-table td small {
    display: block;
}

.audit-table td small {
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
}

.audit-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 850;
}

.audit-badge.success {
    background: #dcfce7;
    color: #166534;
}

.audit-badge.warning {
    background: #fef3c7;
    color: #92400e;
}

.audit-badge.danger {
    background: #fee2e2;
    color: #991b1b;
}

.audit-badge.info {
    background: #e0f2fe;
    color: #0369a1;
}

.audit-badge.neutral {
    background: #e2e8f0;
    color: #334155;
}

.empty-mini {
    padding: 18px;
    border-radius: 16px;
    background: #f8fafc;
    color: #64748b;
    text-align: center;
}

.finance-amount {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.finance-amount strong {
    margin: 0;
    line-height: 1;
}

.finance-amount small {
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .04em;
    color: #64748b;
}

/* Correção Dashboard - cards financeiros */
.finance-card {
    display: block !important;
}

.finance-card .finance-label {
    display: block !important;
    width: 100%;
    margin: 0 0 14px 0;
    font-size: 13px;
    font-weight: 800;
    color: #64748b;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.finance-card .finance-amount {
    display: block !important;
    width: 100%;
    margin-top: 0;
}

.finance-card .finance-amount strong {
    display: block !important;
    margin: 0;
    line-height: 1.05;
    font-size: 32px;
    font-weight: 850;
    color: #0f172a;
}

.finance-card .finance-amount small {
    display: block !important;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #64748b;
}

/* Correção Dashboard - cards financeiros */
.finance-card {
    display: block !important;
} 

.finance-card .finance-label {
    display: block !important;
    width: 100%;
    margin: 0 0 14px 0;
    font-size: 13px;
    font-weight: 800;
    color: #64748b;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.finance-card .finance-amount {
    display: block !important;
    width: 100%;
    margin-top: 0;
}

.finance-card .finance-amount strong {
    display: block !important;
    margin: 0;
    line-height: 1.05;
    font-size: 32px;
    font-weight: 850;
    color: #0f172a;
}

.finance-card .finance-amount small {
    display: block !important;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #64748b;
}

.check-row {
    min-height: 46px;
    flex-direction: row !important;
    align-items: center;
    gap: 10px !important;
    padding: 0 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #dbe3ef;
}

.check-row input {
    width: 18px;
    height: 18px;
    padding: 0;
}

.check-row span {
    margin: 0;
    color: #334155;
}

@media (max-width: 1000px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-split,
    .finance-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dash-hero,
    .audit-hero,
    .audit-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-input {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(.94) translateY(8px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@media (max-width: 768px) {
    .details-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .premium-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .compact-toolbar,
    .compact-search {
        justify-content: stretch;
        width: 100%;
    }

    .compact-search-box {
        width: 100%;
    }

    .actions-cell {
        justify-content: flex-start;
    }

    .actions-col {
        width: auto;
    }
}

@media(max-width:800px) {
    main.with-menu {
        padding: 18px;
    }

    h1 {
        font-size: 24px;
    }

    .card strong {
        font-size: 1.6rem;
    }
}

/* Sidebar premium com SVG e scroll */
.erp-sidebar {
    width: 280px;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    background:
        radial-gradient(circle at top left, rgba(20,184,166,.35), transparent 35%),
        linear-gradient(180deg, #021f1b 0%, #064e3b 100%);
    padding: 22px 16px;
    box-shadow: 14px 0 40px rgba(15,23,42,.22);
    scrollbar-width: thin;
    scrollbar-color: #14b8a6 transparent;
}

.erp-sidebar::-webkit-scrollbar {
    width: 6px;
}

.erp-sidebar::-webkit-scrollbar-thumb {
    background: #14b8a6;
    border-radius: 999px;
}

.with-menu {
    margin-left: 280px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 10px 8px 22px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,.12);
}

.brand-icon {
    width: 50px;
    height: 50px;
    border-radius: 18px;
    background: linear-gradient(135deg, #14b8a6, #0f766e);
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 14px 28px rgba(20,184,166,.30);
}

.brand-icon svg,
.erp-sidebar svg {
    width: 21px;
    height: 21px;
    fill: currentColor;
    flex-shrink: 0;
}

.sidebar-brand h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.1;
}

.sidebar-brand span {
    font-size: 12px;
    color: #a7f3d0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.erp-sidebar a,
.erp-sidebar button {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 47px;
    width: 100%;
    border-radius: 15px;
    color: #ecfeff;
    background: rgba(255,255,255,.075);
    border: 1px solid rgba(255,255,255,.08);
    text-decoration: none;
    padding: 12px 13px;
    font-size: 15px;
    font-weight: 600;
    transition: .25s ease;
}

.erp-sidebar a:hover,
.erp-sidebar button:hover {
    background: rgba(20,184,166,.95);
    border-color: rgba(255,255,255,.22);
    transform: translateX(4px);
}

.erp-sidebar a svg,
.erp-sidebar button svg {
    width: 22px;
    height: 22px;
    opacity: .95;
}

.logout-form {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,.12);
}

.logout-form button {
    background: rgba(239,68,68,.18);
    cursor: pointer;
}

.logout-form button:hover {
    background: #dc2626;
}

/* Permite também usar imagens como ícones */
.erp-sidebar img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
    filter: brightness(0) invert(1);
}

@media(max-width:800px) {
    .erp-sidebar {
        position: static;
        width: 100%;
        height: auto;
        max-height: 78vh;
        border-radius: 0 0 24px 24px;
    }

    .with-menu {
        margin-left: 0;
    }
}

/* Listagens premium */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.page-header p {
    color: var(--muted);
    margin: 4px 0 0;
}

.filter-form {
    flex-wrap: wrap;
}

.filter-form input {
    max-width: 380px;
}

.secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    color: #0f172a;
    text-decoration: none;
    border-radius: 12px;
    padding: 13px 18px;
    font-weight: 700;
}

.secondary:hover {
    background: #cbd5e1;
}

/* Refinamento profissional - ERP reestruturado */
:root {
    --brand-2: #14b8a6;
    --surface: #ffffff;
    --line: #e2e8f0;
    --soft: #f1f5f9;
    --danger: #dc2626;
    --warning: #d97706;
    --success: #0f766e;
}

body {
    line-height: 1.5;
}

.erp-sidebar a.active {
    background: rgba(20,184,166,.95);
    border-color: rgba(255,255,255,.28);
    box-shadow: inset 4px 0 0 rgba(255,255,255,.9), 0 12px 24px rgba(20,184,166,.22);
}

.premium-header {
    padding: 22px 24px;
    border-radius: 26px;
    background:
        radial-gradient(circle at top right, rgba(20,184,166,.16), transparent 34%),
        linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--line);
    box-shadow: 0 18px 45px rgba(15,23,42,.07);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--brand);
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: .12em;
    margin-bottom: 6px;
}

.btn,
.primary,
.secondary,
.toolbar button,
form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    text-decoration: none;
    white-space: nowrap;
}

.toolbar-card {
    margin-bottom: 18px;
}

.search-box {
    display: grid;
    gap: 7px;
    min-width: min(440px, 100%);
    margin: 0;
}

.search-box span {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.table-card {
    padding: 0;
    overflow: hidden;
}

.table-summary {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.table-summary strong {
    font-size: 24px;
    color: var(--brand);
}

.table-summary span,
.text-muted {
    color: var(--muted);
}

.table-wrap {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    max-height: 68vh;
}

thead th {
    top: 0;
    z-index: 2;
}

.money {
    color: #0f172a;
    font-size: 14px;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.badge-success { background: #ccfbf1; color: #115e59; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-neutral { background: #e2e8f0; color: #334155; }

.actions-col,
.row-actions {
    text-align: right;
}

.row-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.mini-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 7px 11px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #0f172a;
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
}

.mini-btn:hover {
    background: #dbeafe;
}

.mini-btn.disabled {
    opacity: .55;
    pointer-events: none;
}

.empty-state {
    padding: 34px !important;
    text-align: center;
}

.empty-state strong,
.empty-state span {
    display: block;
}

@media(max-width:800px) {
    .page-header {
        align-items: stretch;
        flex-direction: column;
    }

    .toolbar {
        flex-direction: column;
    }

    .filter-form input,
    .search-box {
        max-width: none;
        width: 100%;
    }
}
