/* Mercantico refresh: grafica distinta e più moderna */
:root{
    --mc-bg:#f4f6f8;
    --mc-surface:#ffffff;
    --mc-surface-2:#f8fafc;
    --mc-text:#1f2937;
    --mc-muted:#64748b;
    --mc-border:#d9e2ec;
    --mc-primary:#2563eb;
    --mc-primary-dark:#1d4ed8;
    --mc-accent:#0f766e;
    --mc-danger:#dc2626;
    --mc-warn:#b45309;
    --mc-radius:14px;
}

body{
    background:var(--mc-bg) !important;
    color:var(--mc-text);
    font-family:Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.side{
    background:#0f172a !important;
    color:#e5e7eb !important;
    box-shadow:8px 0 24px rgba(15,23,42,.18);
}

.brand{
    color:#fff !important;
    text-shadow:none !important;
    letter-spacing:.02em;
}

.side-nav a,
.quick-actions a{
    border:0 !important;
    border-radius:12px !important;
    background:transparent !important;
    color:#dbeafe !important;
    box-shadow:none !important;
    margin:5px 8px !important;
}

.side-nav a:hover,
.side-nav a:focus{
    background:rgba(37,99,235,.22) !important;
    color:#fff !important;
}

.nav-section{
    color:#93c5fd !important;
    letter-spacing:.08em;
    font-size:11px !important;
}

.quick-sale,
.quick-move{
    background:linear-gradient(135deg,#2563eb,#0f766e) !important;
    color:#fff !important;
    font-weight:800;
}

.main{
    background:var(--mc-bg) !important;
}

h1{
    background:transparent !important;
    color:var(--mc-text) !important;
    border-bottom:3px solid var(--mc-primary) !important;
    text-shadow:none !important;
}

.panel{
    background:var(--mc-surface) !important;
    border:1px solid var(--mc-border) !important;
    border-radius:var(--mc-radius) !important;
    box-shadow:0 10px 28px rgba(15,23,42,.06) !important;
}

button,
.btn,
input[type="submit"]{
    border:0 !important;
    border-radius:11px !important;
    background:var(--mc-primary) !important;
    color:#fff !important;
    box-shadow:0 8px 18px rgba(37,99,235,.20) !important;
    font-weight:800 !important;
    text-shadow:none !important;
    transition:transform .12s ease, box-shadow .12s ease, background .12s ease;
}

button:hover,
.btn:hover,
input[type="submit"]:hover{
    background:var(--mc-primary-dark) !important;
    transform:translateY(-1px);
    box-shadow:0 12px 24px rgba(37,99,235,.25) !important;
}

.btn.soft,
button.soft{
    background:#e8eefc !important;
    color:#1e3a8a !important;
    box-shadow:none !important;
}

.btn.danger,
button.danger,
.danger{
    background:var(--mc-danger) !important;
    color:#fff !important;
}

table{
    border-collapse:separate !important;
    border-spacing:0 !important;
    overflow:hidden;
    border-radius:12px;
}

th{
    background:#e2e8f0 !important;
    color:#111827 !important;
    text-shadow:none !important;
    border-color:#cbd5e1 !important;
}

td{
    border-color:#e2e8f0 !important;
}

tr:nth-child(even) td{
    background:#f8fafc;
}

input,
select,
textarea{
    border:1px solid #cbd5e1 !important;
    border-radius:10px !important;
    background:#fff !important;
    color:var(--mc-text) !important;
}

.customer-hero{
    display:grid;
    grid-template-columns:1fr auto;
    gap:20px;
    align-items:start;
}

.eyebrow{
    text-transform:uppercase;
    color:var(--mc-primary);
    font-size:12px;
    font-weight:900;
    letter-spacing:.08em;
}

.customer-hero h2{
    margin:4px 0 12px;
    font-size:28px;
}

.customer-fields{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:10px;
}

.customer-fields span{
    background:var(--mc-surface-2);
    border:1px solid var(--mc-border);
    border-radius:12px;
    padding:10px;
}

.customer-fields b{
    display:block;
    color:var(--mc-muted);
    font-size:12px;
    margin-bottom:3px;
}

.customer-actions{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    justify-content:flex-end;
}

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

.workflow-card{
    display:block;
    text-decoration:none;
    color:var(--mc-text);
    background:linear-gradient(180deg,#fff,#f8fafc);
    border:1px solid var(--mc-border);
    border-radius:16px;
    padding:16px;
    min-height:105px;
    box-shadow:0 8px 22px rgba(15,23,42,.06);
}

.workflow-card span{
    display:block;
    color:var(--mc-muted);
    font-weight:800;
    margin-bottom:10px;
}

.workflow-card b{
    display:block;
    font-size:26px;
    color:var(--mc-text);
}

.workflow-card small{
    display:block;
    margin-top:4px;
    color:var(--mc-muted);
    font-weight:700;
}

.workflow-card.primary{
    background:linear-gradient(135deg,#2563eb,#0f766e);
    color:#fff;
}

.workflow-card.primary span,
.workflow-card.primary b{
    color:#fff;
}

.workflow-card.money{
    border-color:#86efac;
}

.workflow-card.warn{
    border-color:#fbbf24;
}

.workflow-card.journal{
    border-color:#93c5fd;
}

.workflow-card.done{
    border-color:#99f6e4;
}

.journal-pill{
    display:inline-block;
    border-radius:999px;
    padding:6px 9px;
    font-size:12px;
    font-weight:900;
    line-height:1.15;
    white-space:nowrap;
}

.journal-pill.done{
    background:#d1fae5;
    color:#065f46;
}

.journal-pill.todo{
    background:#fef3c7;
    color:#92400e;
}

.journal-pill.muted{
    background:#e5e7eb;
    color:#4b5563;
}

@media(max-width:980px){
    .customer-hero{
        grid-template-columns:1fr;
    }
    .customer-actions{
        justify-content:flex-start;
    }
    .customer-fields,
    .client-workflow-grid{
        grid-template-columns:1fr;
    }
}
