:root {
    color-scheme: light;
    --navy: #012b49;
    --blue: #024b80;
    --gold: #f3b52b;
    --ink: #173047;
    --muted: #627588;
    --line: #dfe7ed;
    --surface: #f4f7f9;
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background: var(--surface);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #b57d00; outline-offset: 4px; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .6; }
p { line-height: 1.7; }
h1, h2 { line-height: 1.15; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 2px; }
.muted { color: var(--muted); font-size: 14px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 17px; border: 1px solid #cbd7df; border-radius: 8px; background: white; text-decoration: none; font-size: 13px; font-weight: 600; line-height: 1.4; }
.button:hover { background: #edf3f7; }
.button.primary { background: var(--blue); color: white; border-color: var(--blue); }
.button.primary:hover { background: var(--navy); }
.button.subtle { background: #ffffff0d; color: white; border-color: #ffffff30; }
.back-site { text-decoration: none; font-size: 13px; }
.back-site:hover { text-decoration: underline; }
.notice { border: 1px solid var(--line); background: #edf3f8; padding: 16px 20px; border-radius: 10px; font-size: 13px; line-height: 1.7; margin: 24px 0; }
.notice p { margin: 5px 0 0; }
.notice.error { background: #fff1ef; border-color: #efc8c2; color: #923a2f; }
.notice.success { background: #eef9f2; border-color: #c1e6cf; color: #226542; }
.notice.setup { background: #fff9e9; border-color: #ebdeb6; color: #746135; font-size: 12px; }
.notice.setup strong { display: block; }
/* Login centrado. La imagen se activa al agregar assets/img/login-background.jpg. */
.login-layout { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 32px 16px; background-color: #fff; background-position: center; background-size: cover; background-repeat: no-repeat; }
.login-layout.has-background { background-image: linear-gradient(#0008, #0008), url("img/login-background.jpg"); }
.login-card { width: 100%; max-width: 420px; padding: 36px 34px 32px; border: 1px solid #d6d6d6; border-top: 4px solid #24469c; border-radius: 12px; background: #fff; box-shadow: 0 12px 35px #152b431a; text-align: center; }
.login-card h1 { color: #24469c; font-size: 24px; font-weight: 700; letter-spacing: -.4px; margin: 0 0 24px; }
.login-description { color: #626262; font-size: 14px; margin: 0 0 28px; }
.login-card .notice { text-align: left; }
.login-back { display: inline-block; color: #6a6a6a; font-size: 12px; margin-top: 22px; }
.section-marker { display: inline-flex; width: 48px; height: 48px; border: 1px solid #e8dcae; align-items: center; justify-content: center; background: #fbf4dc; border-radius: 13px; font-size: 25px; color: #99741e; }
.google-button { width: 100%; min-height: 52px; border: 1px solid #24469c; padding: 12px 16px; border-radius: 6px; background: #24469c; display: flex; align-items: center; justify-content: center; gap: 12px; color: #fff; font-size: 15px; font-weight: 600; }
.google-button:hover:not(:disabled) { border-color: #193779; background: #193779; }
.google-button svg { width: 25px; height: 25px; padding: 3px; border-radius: 3px; background: #fff; flex-shrink: 0; }
.login-footer { margin-top: 28px; color: #555; text-align: center; font-size: 13px; }
.login-footer strong { color: #f47c16; font-size: 14px; font-weight: 700; }
.login-footer p { margin: 4px 0 0; }
/* Plataforma y administración. */
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 265px; padding: 30px 22px; background: linear-gradient(155deg, #023b60, #011d32); color: white; display: flex; flex-direction: column; overflow-y: auto; }
.brand { display: flex; gap: 15px; align-items: center; text-decoration: none; font-weight: 600; font-size: 17px; padding-bottom: 36px; }
.brand img { width: 53px; height: 65px; object-fit: contain; }
.brand small { display: block; margin-top: 5px; font-size: 11px; color: #aac4d7; font-weight: 400; }
.sidebar nav a { display: block; border-radius: 8px; padding: 13px 15px; margin-bottom: 5px; color: #c7dce9; text-decoration: none; font-size: 13px; }
.sidebar nav a:hover, .sidebar nav a[aria-current] { color: white; background: #ffffff13; }
.sidebar nav a[aria-current] { border-left: 3px solid var(--gold); }
.nav-label { font-size: 9px; letter-spacing: 1.8px; color: #8daabf; margin: 28px 15px 12px; }
.session-panel { margin-top: auto; padding-top: 45px; display: grid; gap: 12px; }
.session-label { font-size: 9px; letter-spacing: 1px; color: #8daabf; }
.session-panel strong { font-size: 13px; }
.session-email { font-size: 11px; color: #adc7d8; overflow-wrap: anywhere; }
.session-panel .back-site { font-size: 11px; color: #adc7d8; }
.workspace { margin-left: 265px; padding: 0 38px 20px; min-height: 100vh; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 80px; border-bottom: 1px solid var(--line); font-size: 10px; letter-spacing: .6px; color: var(--muted); }
.divider { color: #a3b5c2; margin: 0 12px; }
.badge { border: 1px solid #e9d798; background: #fcf5dc; color: #81682a; padding: 7px 12px; border-radius: 6px; font-size: 11px; white-space: nowrap; }
.page-heading { padding: 32px 0 12px; }
.page-heading .eyebrow { color: var(--muted); font-size: 9px; }
.page-heading h1 { margin: 12px 0; font-size: clamp(28px, 3vw, 37px); letter-spacing: -1px; }
.section-heading { display: flex; gap: 15px; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 22px; }
.report-card { text-decoration: none; background: white; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.report-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px #1730470d; }
.report-art { height: 115px; padding: 30px; font-size: 42px; color: #d4e5ef; background: linear-gradient(135deg, #024b80, #012b49); display: flex; align-items: center; justify-content: space-between; }
.report-art span { font-size: 10px; letter-spacing: 2px; color: #f7c44b; }
.report-body { padding: 25px; }
.category { color: #5f7e93; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; }
.report-body h2 { font-size: 21px; margin: 12px 0; }
.report-body p { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.card-link { display: inline-block; margin-top: 15px; font-size: 12px; font-weight: 600; color: var(--blue); }
.empty-state, .status-card { border: 1px solid var(--line); border-radius: 14px; background: white; padding: 40px; }
.empty-state h2 { font-size: 24px; }
.empty-state p { max-width: 700px; color: var(--muted); font-size: 14px; }
.status-card { max-width: 650px; margin: 15vh auto; }
.app-footer { color: #80909d; font-size: 10px; padding: 35px 0 10px; }
.viewer { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: white; }
.viewer-toolbar { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 15px; font-size: 12px; flex-wrap: wrap; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.report-container { height: max(540px, 73vh); background: white; }
.report-container iframe { width: 100%; height: 100%; border: 0; }
.report-container:fullscreen { height: 100vh; width: 100vw; }
.panel { border: 1px solid var(--line); border-radius: 12px; background: white; padding: 25px; margin-bottom: 22px; }
.field { display: grid; gap: 8px; margin-bottom: 20px; }
.field label, .field-label { font-size: 12px; font-weight: 600; }
.field input, .field textarea, .field select, .filters input { width: 100%; padding: 12px; border: 1px solid #cbd7df; border-radius: 7px; color: var(--ink); background: white; min-width: 0; }
.field textarea { resize: vertical; line-height: 1.6; }
.field .embed-input { font-family: Consolas, monospace; font-size: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: white; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f9fbfc; font-size: 10px; letter-spacing: .5px; color: var(--muted); text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
td small { display: block; margin-top: 6px; color: var(--muted); }
.status { display: inline-block; padding: 5px 9px; border-radius: 12px; font-size: 10px; font-weight: 600; }
.status.on { background: #e5f5eb; color: #287049; }
.status.off { background: #fbebe6; color: #9a4d3a; }
.filters { display: flex; gap: 12px; margin-bottom: 20px; }
.filters input { max-width: 420px; }
summary { cursor: pointer; font-size: 12px; font-weight: 600; padding: 10px 0; }
details .report-form, details .user-form { min-width: 260px; margin-top: 10px; }
.report-options { display: grid; gap: 10px; max-height: 260px; overflow-y: auto; margin: 15px 0 22px; }
.report-option { display: flex; align-items: flex-start; gap: 10px; font-size: 12px; line-height: 1.5; }
.pagination { display: flex; align-items: center; gap: 15px; margin-top: 20px; font-size: 12px; }
@media (max-width: 1000px) {
    .sidebar { width: 225px; padding: 25px 18px; }
    .workspace { margin-left: 225px; padding: 0 24px 20px; }
}
@media (max-width: 700px) {
    .login-card { padding: 30px 24px 26px; }
    .sidebar { position: static; width: auto; padding: 20px; }
    .brand { padding-bottom: 18px; }
    .brand img { height: 47px; }
    .sidebar nav { display: flex; flex-wrap: wrap; gap: 5px; }
    .sidebar nav a { font-size: 12px; padding: 10px; }
    .nav-label { display: none; }
    .session-panel { padding-top: 20px; grid-template-columns: 1fr auto; align-items: center; }
    .session-label { display: none; }
    .session-email { grid-column: 1; grid-row: 2; }
    .session-panel form { grid-column: 2; grid-row: 1 / 3; }
    .workspace { margin-left: 0; padding: 0 18px 20px; }
    .topbar { min-height: 65px; font-size: 9px; }
    .divider { margin: 0 5px; }
    .form-grid { grid-template-columns: 1fr; gap: 0; }
    .empty-state, .panel, .status-card { padding: 25px; }
    .status-card { margin: 15vh 18px; }
    .section-heading { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
    .report-card { transition: none; }
}
