:root {
    --blue: #0d6efd;
    --blue-dark: #0952c4;
    --bg: #f4f7fb;
    --text: #1f2937;
    --border: #e2e8f0;
    --green: #16a34a;
    --red: #dc2626;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.topbar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 12px 20px;
    flex-wrap: wrap;
}

.brand {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--blue-dark);
    text-decoration: none;
}

.nav { display: flex; gap: 14px; flex-wrap: wrap; flex: 1; }
.nav a {
    color: #475569;
    text-decoration: none;
    font-size: .92rem;
    padding: 6px 10px;
    border-radius: 6px;
}
.nav a:hover, .nav a.active { background: #eef2ff; color: var(--blue-dark); }
.nav a.btn-nav-highlight { background: var(--blue); color: #fff; }
.nav a.btn-nav-highlight:hover { background: var(--blue-dark); color: #fff; }

.user-menu { display: flex; align-items: center; gap: 12px; font-size: .9rem; }
.user-menu a { color: var(--red); text-decoration: none; }

.container { max-width: 1100px; margin: 0 auto; padding: 24px 20px 60px; }

.footer { text-align: center; color: #94a3b8; font-size: .82rem; padding: 20px; }

.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: .92rem; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-info { background: #dbeafe; color: #1e40af; }

.page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.page-head h1 { font-size: 1.4rem; margin: 0; }

.card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 20px; margin-bottom: 20px; }

table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: .9rem; }
th { background: #f8fafc; font-weight: 600; color: #475569; }
tr:last-child td { border-bottom: none; }

.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 7px;
    border: none;
    background: var(--blue);
    color: #fff;
    text-decoration: none;
    font-size: .88rem;
    cursor: pointer;
}
.btn:hover { background: var(--blue-dark); }
.btn-secondary { background: #64748b; }
.btn-secondary:hover { background: #475569; }
.btn-danger { background: var(--red); }
.btn-danger:hover { background: #b91c1c; }
.btn-success { background: var(--green); }
.btn-success:hover { background: #15803d; }
.btn-sm { padding: 5px 10px; font-size: .8rem; }
.btn-whatsapp { background: #25D366; }
.btn-whatsapp:hover { background: #1ea952; }

.actions { display: flex; gap: 8px; flex-wrap: wrap; }

form .field { margin-bottom: 14px; }
label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 5px; color: #334155; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], select, textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 7px;
    font-size: .92rem;
    font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }

.item-row { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 10px; align-items: end; margin-bottom: 10px; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.badge-pendente { background: #fef3c7; color: #92400e; }
.badge-enviado { background: #dbeafe; color: #1e40af; }
.badge-concluido { background: #dcfce7; color: #166534; }

.login-wrap { max-width: 380px; margin: 80px auto; }
.login-wrap .card { text-align: left; }
.login-wrap h1 { text-align: center; font-size: 1.3rem; }

.empty { text-align: center; color: #94a3b8; padding: 40px 0; }
