:root {
    --bg: #f5f7fb;
    --card: #ffffff;
    --text: #172033;
    --muted: #6c768a;
    --border: #dde3ee;
    --primary: #111827;
    --accent: #f3c216;
    --danger: #b42318;
    --success: #166534;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.topbar {
    background: var(--primary);
    color: #fff;
    padding: 14px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
    width: 44px;
    height: 44px;
    border: 2px solid var(--accent);
    color: var(--accent);
    display: grid;
    place-items: center;
    font-weight: 800;
    border-radius: 8px;
}
.brand span { display: block; color: #cbd5e1; font-size: 13px; margin-top: 2px; }
.nav { display: flex; gap: 10px; flex-wrap: wrap; }
.nav a {
    color: #fff;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,.18);
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 14px;
}
.nav a:hover { background: rgba(255,255,255,.12); }

.container { width: min(1180px, 94vw); margin: 26px auto; }
.footer { text-align: center; padding: 26px; color: var(--muted); font-size: 13px; }

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 10px 22px rgba(15,23,42,.04);
    margin-bottom: 18px;
}
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

h1, h2, h3 { margin: 0 0 14px; }
.muted { color: var(--muted); }
.stat { font-size: 30px; font-weight: 800; }
.badge {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eef2ff;
    color: #1e3a8a;
    font-size: 12px;
    font-weight: 700;
}
.badge-success { background: #dcfce7; color: var(--success); }
.badge-danger { background: #fee2e2; color: var(--danger); }
.badge-warning { background: #fef3c7; color: #92400e; }

form label { display: block; font-weight: 700; margin-bottom: 6px; }
input, select, textarea {
    width: 100%;
    padding: 10px 11px;
    border: 1px solid var(--border);
    border-radius: 9px;
    font: inherit;
    background: #fff;
}
textarea { min-height: 88px; resize: vertical; }
.form-row { margin-bottom: 14px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
button, .button {
    border: none;
    background: var(--primary);
    color: #fff;
    padding: 10px 14px;
    border-radius: 9px;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    font-weight: 700;
}
.button-secondary { background: #475569; }
.button-accent { background: #b28700; }
.button-danger { background: var(--danger); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 11px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { color: #334155; font-size: 13px; background: #f8fafc; }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }
.alert { padding: 12px; border-radius: 10px; margin-bottom: 16px; }
.alert-error { background: #fee2e2; color: #7f1d1d; }
.alert-success { background: #dcfce7; color: #14532d; }

.login-box { width: min(430px, 94vw); margin: 50px auto; }
.whatsapp-box {
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 14px;
}

@media (max-width: 760px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .topbar { align-items: flex-start; }
    .nav { width: 100%; }
    .nav a { flex: 1; text-align: center; }
}
