:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #16a34a;
    --error: #dc2626;
    --bg: #f1f5f9;
    --surface: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --radius: 12px;
}

* { box-sizing: border-box; }

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

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 16px;
}

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

.topbar__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.brand { font-weight: 700; font-size: 1.1rem; color: var(--text); }
.brand--center { text-align: center; display: block; }

.nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 0.92rem; }
.nav a { color: var(--text); }
.nav__user { color: var(--muted); margin-left: auto; }

.inline-form { margin: 0; }
.link-btn {
    background: none; border: none; color: var(--primary);
    cursor: pointer; padding: 0; font-size: inherit;
}

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

.form label { display: block; margin-bottom: 14px; font-weight: 500; }
.form input, .form select, .form textarea {
    width: 100%;
    padding: 10px 12px;
    margin-top: 6px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
}

.btn {
    display: inline-block;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
}
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); }
.btn--block { width: 100%; }
.btn--ghost { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.alert { padding: 12px 14px; border-radius: 8px; margin-bottom: 14px; font-weight: 500; }
.alert--success { background: #dcfce7; color: #166534; }
.alert--error { background: #fee2e2; color: #991b1b; }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 10px; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.table th { color: var(--muted); font-weight: 600; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.badge--green { background: #dcfce7; color: #166534; }
.badge--red { background: #fee2e2; color: #991b1b; }
.badge--yellow { background: #fef9c3; color: #854d0e; }
.badge--gray { background: #e2e8f0; color: #334155; }

.auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 16px; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; width: 100%; max-width: 420px; }

/* Tela de ponto */
.ponto-clock { text-align: center; font-size: 2.4rem; font-weight: 700; margin: 8px 0; }
.ponto-status { text-align: center; color: var(--muted); margin-bottom: 20px; }
.ponto-btn {
    display: block;
    width: 220px; height: 220px;
    margin: 0 auto;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
    transition: transform 0.1s ease;
}
.ponto-btn:active { transform: scale(0.96); }
.ponto-btn:disabled { background: #94a3b8; box-shadow: none; }

.grid { display: grid; gap: 12px; }
.grid--2 { grid-template-columns: 1fr 1fr; }
.grid--stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center; }
.stat__value { font-size: 1.8rem; font-weight: 700; }
.stat__label { color: var(--muted); font-size: 0.85rem; }

#map { height: 340px; border-radius: var(--radius); border: 1px solid var(--border); }

@media (max-width: 600px) {
    .grid--2 { grid-template-columns: 1fr; }
    .ponto-clock { font-size: 1.9rem; }
}
