* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #FFECD7 !important;
    color: #1e293b;
    min-height: 100vh;
}

.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-container {
    width: 100%;
    max-width: 380px;
    padding: 2.5rem 2rem;
    background-color: #ffffff;
    border-radius: 14px;
    box-shadow: 0 10px 25px -5px rgba(180, 83, 9, 0.1);
    border: 1px solid #fed7aa;
    text-align: center;
}

.logo-wrapper {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-logo {
    max-width: 180px;
    max-height: 90px;
    object-fit: contain;
}

.app-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #fed7aa;
    margin-bottom: 1.75rem;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-logo {
    height: 42px;
    width: auto;
}

.tabs-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #fed7aa;
    padding-bottom: 0.5rem;
}

.tab-btn {
    background: #ffffff;
    border: 1px solid #fed7aa;
    color: #64748b;
    font-size: 0.92rem;
    font-weight: 600;
    padding: 0.6rem 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: #fffaf5;
    color: #0284c7;
}

.tab-btn.active {
    background: #0284c7 !important;
    border-color: #0284c7 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.2);
}

.badge-red {
    background: #ef4444;
    color: #fff;
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
}

.stats-grid, .finance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.stat-card, .card-fin {
    background-color: #ffffff;
    border: 1px solid #fed7aa;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 4px 12px rgba(180, 83, 9, 0.05);
}

.stat-card h3, .card-fin h4 {
    font-size: 0.8rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

.stat-card .val, .card-fin .valor {
    font-size: 1.7rem;
    font-weight: 700;
    color: #0f172a;
}

.card-fin small {
    font-size: 0.75rem;
    color: #94a3b8;
    display: block;
    margin-top: 0.35rem;
}

.panel-card {
    background-color: #ffffff;
    border: 1px solid #fed7aa;
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: 0 6px 16px rgba(180, 83, 9, 0.06);
    margin-bottom: 1.5rem;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.btn-primary {
    background: #0284c7;
    color: #fff;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #0369a1;
}

.btn-outline {
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    color: #334155;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-outline:hover {
    background: #fffaf5;
    border-color: #94a3b8;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
    background-color: #ffffff;
}

th {
    padding: 0.85rem 1rem;
    color: #64748b;
    border-bottom: 2px solid #fed7aa;
    font-weight: 600;
    background-color: #fffaf5;
}

td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

tr:hover {
    background-color: #fffaf5;
}

.stepper-container {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.step-node {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #64748b;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.step-node:hover {
    border-color: #0284c7;
    color: #0284c7;
}

.step-node.completed {
    background: #e0f2fe;
    border-color: #bae6fd;
    color: #0369a1;
}

.step-node.current {
    background: #0284c7;
    border-color: #0284c7;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
}

.step-arrow {
    color: #cbd5e1;
    font-size: 0.7rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px;
    color: #0f172a !important;
    outline: none;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus, textarea:focus {
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 650px) {
    .charts-grid { grid-template-columns: 1fr; }
}

.chart-box {
    background: #ffffff;
    border: 1px solid #fed7aa;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 4px 12px rgba(180, 83, 9, 0.05);
}

.chart-box h4 {
    font-size: 0.85rem;
    color: #475569;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-bg {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.modal-card {
    background: #ffffff;
    border: 1px solid #fed7aa;
    border-radius: 14px;
    max-width: 520px;
    width: 90%;
    padding: 1.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
}

.btn-ficha {
    background: #e0f2fe;
    color: #0284c7;
    border: 1px solid #bae6fd;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.linha-confirmada { border-left: 4px solid #22c55e !important; }
.linha-pendente { border-left: 4px solid #ef4444 !important; }
.linha-imprimindo { border-left: 4px solid #0284c7 !important; }