/* Minimal app-wide styles. Palette follows the Lobie cyan (#00bdeb). */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --brand: #00bdeb;
    --brand-dark: #0096ba;
    --ink: #171717;
    --ink-soft: #525252;
    --line: #e5e5e5;
    --bg: #f7f8fa;
    --danger: #c0392b;
    --ok: #1e8e3e;
    --warn: #b26a00;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--ink);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top bar */
.topbar {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 12px 24px;
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.topbar-brand { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 700; letter-spacing: 0.25em; color: var(--brand); }
.brand-app { font-size: 12px; color: var(--ink-soft); }
.topbar-nav { display: flex; gap: 16px; flex: 1; }
.nav-link {
    text-decoration: none; color: var(--ink-soft); font-weight: 500;
    padding: 6px 10px; border-radius: 6px;
}
.nav-link:hover { background: var(--bg); color: var(--ink); }
.topbar-user { display: flex; align-items: center; gap: 12px; }
.user-email { font-size: 14px; color: var(--ink-soft); }
.inline-form { display: inline; }

/* Layout */
.content { flex: 1; padding: 24px; max-width: 1280px; width: 100%; margin: 0 auto; }
.footer {
    display: flex; justify-content: space-between; padding: 10px 24px;
    font-size: 12px; color: var(--ink-soft); border-top: 1px solid var(--line);
}
.card {
    background: #fff; border: 1px solid var(--line); border-radius: 10px;
    padding: 24px;
}
.card h1 { font-size: 22px; margin-bottom: 12px; }
.muted { color: var(--ink-soft); }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    border: 1px solid var(--line); background: #fff; color: var(--ink);
    padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 500;
    cursor: pointer; text-decoration: none; transition: all .15s;
}
.btn:hover { background: var(--bg); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-danger { color: var(--danger); border-color: #f2c3bd; }
.btn-ghost { border-color: transparent; color: var(--ink-soft); }

/* Login page */
.login-body {
    display: flex; align-items: center; justify-content: center;
    background: #fff;
}
.login-box {
    width: 100%; max-width: 420px; padding: 40px 32px;
    display: flex; flex-direction: column; align-items: center; gap: 20px;
    text-align: center;
}
.login-brand { display: flex; flex-direction: column; gap: 4px; }
.login-brand .brand-name { font-size: 28px; }
.login-title { font-size: 24px; font-weight: 600; }
.login-subtitle { color: var(--ink-soft); }
.btn-google { width: 100%; justify-content: center; padding: 14px; font-size: 16px; }
.login-footnote { font-size: 13px; color: var(--ink-soft); }

/* Errors */
.error-message {
    background: #fee; border: 1px solid #fcc; color: #c33;
    padding: 12px 16px; border-radius: 8px; font-size: 14px; width: 100%;
}
.error-card h1 { color: var(--danger); }

/* Tables (used from M3 on) */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td {
    text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line);
}
.table th { color: var(--ink-soft); font-weight: 600; white-space: nowrap; }
.table tr:hover td { background: var(--bg); }

/* Filters and forms */
.filter-bar {
    display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end;
    margin: 16px 0;
}
.filter-bar label, #edit-form label {
    display: flex; flex-direction: column; gap: 4px;
    font-size: 13px; color: var(--ink-soft); font-weight: 500;
}
select, input[type="number"], input[type="text"], input[type="file"] {
    padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px;
    font-size: 14px; font-family: inherit; background: #fff; color: var(--ink);
}
/* One height for every control in a filter row, so bottoms line up exactly. */
.filter-bar select, .filter-bar input, .filter-bar .btn {
    height: 38px; box-sizing: border-box;
}
#upload-form select[name="apelido"] { min-width: 230px; max-width: 320px; }
.form-hint { font-size: 12px; color: var(--ink-soft); margin: -6px 0 12px; }
#edit-form { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.field-row { display: flex; gap: 14px; }
.form-actions { display: flex; gap: 10px; margin-top: 8px; }
.section-title { font-size: 15px; margin: 18px 0 8px; color: var(--ink-soft); }
.detail-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start;
}
@media (max-width: 980px) { .detail-grid { grid-template-columns: 1fr; } }
.table.kv th { width: 40%; font-weight: 500; }
/* Must outrank `.table th/.table td` (class+element) or it never applies. */
.table th.num, .table td.num, .num { text-align: right; }
.mono { font-family: ui-monospace, monospace; font-size: 13px; }
.small { font-size: 12px; }
.disabled-form { opacity: .75; }

.batch-bar {
    display: flex; align-items: center; gap: 12px; margin: 12px 0;
    padding: 10px 12px; background: var(--bg); border-radius: 8px;
}
.batch-bar .inline { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.approval-actions { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }

/* Detail modal */
.modal-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(23, 23, 23, .45);
    display: flex; align-items: flex-start; justify-content: center;
    padding: 40px 16px; overflow-y: auto;
}
.modal-overlay[hidden] { display: none; }
.modal-box {
    background: #fff; border-radius: 12px; width: 100%; max-width: 720px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
    display: flex; flex-direction: column; max-height: calc(100vh - 80px);
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.modal-header h2 { font-size: 18px; }
.modal-body { padding: 16px 20px; overflow-y: auto; }
.modal-footer {
    padding: 12px 20px; border-top: 1px solid var(--line);
    display: flex; justify-content: flex-end; gap: 10px;
}

/* Badges */
.badge {
    display: inline-block; padding: 2px 8px; border-radius: 999px;
    font-size: 12px; font-weight: 600;
}
.badge-ok { background: #e6f4ea; color: var(--ok); }
.badge-warn { background: #fff4e0; color: var(--warn); }
.badge-err { background: #fdecea; color: var(--danger); }
.badge-neutral { background: #eef1f4; color: var(--ink-soft); }
