:root {
    /* ===== CORES BASE ===== */
    --color-bg-main: #0f1115;
    --color-bg-panel: #161a21;
    --color-bg-soft: #1e2430;

    --color-text-main: #e6e8ec;
    --color-text-muted: #aeb4c2;
    --color-text-inverse: #0f1115;

    --color-primary: #d4af37; /* dourado */
    --color-danger: #c0392b;
    --color-success: #27ae60;
    --color-warning: #f1c40f;

    --color-border: #2b3240;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    background-color: var(--color-bg-main);
    color: var(--color-text-main);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0;
    margin-bottom: 50px; 
}

/* CONTAINER PADRÃO */
.container {
    max-width: 1100px;
    margin: auto;
    padding: 16px;
    border-radius: 8px;
}

/* TÍTULOS */
h1 {
    font-size: clamp(20px, 3vw, 26px);
    margin-bottom: 16px;
}

/* FORMULÁRIOS */
label {
    font-weight: 600;
    margin-top: 12px;
    display: block;
}

input,
select,
textarea,
button {
    width: 100%;
    font-size: 15px;
    padding: 10px;
    margin-top: 6px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

/* BOTÃO PRINCIPAL */
button {
    background: #c9a227;
    color: #000;
    border: none;
    font-weight: 700;
    cursor: pointer;
}

button:hover {
    background: #b28f1e;
}

/* TABELAS RESPONSIVAS */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

th,
td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

th {
    background: #f0f0f0;
}

/* MENSAGENS */
.msg {
    margin-top: 16px;
    padding: 12px;
    border-radius: 6px;
}

.success {
    background: #d4edda;
    color: #155724;
}

.error {
    background: #f8d7da;
    color: #721c24;
}

/* MOBILE AJUSTES */
@media (max-width: 768px) {
    .container {
        padding: 14px;
        border-radius: 0;
    }

    table {
        font-size: 14px;
    }
}

.login-logo {
    text-align: center;
    margin-bottom: 24px;
}

.login-logo img {
    max-width: 220px;
    width: 100%;
    height: auto;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--color-text-main);
    margin-top: 0;
}

p, li, td, th, label {
    color: var(--color-text-main);
}

small, .muted {
    color: var(--color-text-muted);
}

.container,
.panel,
.card,
.table-wrapper {
    background: var(--color-bg-panel);
    color: var(--color-text-main);
}

table {
    width: 100%;
    border-collapse: collapse;
    color: var(--color-text-main);
}

th {
    text-align: left;
    background: var(--color-bg-soft);
}

th, td {
    padding: 10px;
    border-bottom: 1px solid var(--color-border);
}

input,
select,
textarea {
    background: var(--color-bg-soft);
    color: var(--color-text-main);
    border: 1px solid var(--color-border);
}

input::placeholder {
    color: var(--color-text-muted);
}

button,
.btn-primary {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    border: none;
    cursor: pointer;
}

button.secondary {
    background: transparent;
    color: var(--color-text-main);
    border: 1px solid var(--color-border);
}

/* ===============================
   INPUT DATE – ÍCONE CALENDÁRIO
   =============================== */
input[type="date"] {
    color-scheme: white; /* força ícone claro */
}

input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.9;
    cursor: pointer;
}

/* ===============================
   KPI – VALORES PRINCIPAIS
   =============================== */
.kpi .value {
    color: #0f172a;        /* azul escuro / quase preto */
    font-weight: 700;
    opacity: 1;            /* remove efeito de desabilitado */
}

#kpiPeso {
    color: #2563eb; /* azul */
}

#kpiReceita {
    color: #16a34a; /* verde */
}

#kpiCusto {
    color: #dc2626; /* vermelho */
}


/* ===============================
   SELECT – ESTILO PROFISSIONAL
   =============================== */
select {
    width: 100%;
    padding: 12px 42px 12px 14px;
    font-size: 14px;
    font-weight: 600;
    color: #e5e7eb;
    background-color: #0f172a; /* fundo escuro elegante */
    border: 1px solid #1f2937;
    border-radius: 8px;
    outline: none;

    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    background-image:
        linear-gradient(45deg, transparent 50%, #94a3b8 50%),
        linear-gradient(135deg, #94a3b8 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 3px),
        calc(100% - 12px) calc(50% - 3px);
    background-size:
        6px 6px,
        6px 6px;
    background-repeat: no-repeat;

    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

select:hover {
    border-color: #334155;
}

select:focus {
    border-color: #2563eb; /* azul Tycoon */
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

select:disabled {
    background-color: #020617;
    color: #64748b;
    border-color: #1e293b;
    cursor: not-allowed;
}

.login-footer {
    margin-top: 18px;
    text-align: center;
    font-size: 0.9rem;
    color: #9aa0aa;
}

.login-footer span {
    margin-right: 6px;
}

.login-footer .link-register {
    color: #d4af37; /* dourado Tycoon */
    font-weight: 600;
    text-decoration: none;
    position: relative;
}

.login-footer .link-register::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 1px;
    background: rgba(212, 175, 55, 0.5);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.login-footer .link-register:hover::after {
    transform: scaleX(1);
}

.login-footer .link-register {
    padding: 6px 12px;
    border: 1px solid rgba(212,175,55,.4);
    border-radius: 6px;
    margin-left: 6px;
}

.login-footer .link-register:hover {
    background: rgba(212,175,55,.08);
}
