:root {
    --primary-color: #003366;
    --primary-hover: #002244;
    --accent-color: #00fcdf;
    --bg-light: #f4f6f9;
    --text-color: #333333;
    --border-color: #cccccc;
    --danger: #c0392b;
    --danger-hover: #a93226;
    --success: #1e7e34;
    --muted: #666666;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body { background: var(--bg-light); color: var(--text-color); min-height: 100vh; }
a { color: var(--primary-color); }
.hidden { display: none !important; }

.login-body {
    display: flex; align-items: center; justify-content: center; min-height: 100vh;
    background: linear-gradient(135deg, #003366 0%, #001122 100%); padding: 1.5rem;
}
.login-container {
    background: #fff; padding: 2.5rem; border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); width: 100%; max-width: 460px; text-align: center;
}
.login-logo { width: 88px; height: 88px; border-radius: 8px; object-fit: contain; margin-bottom: 0.75rem; background: #fff; }
.login-header h2 { font-size: 1.05rem; color: var(--primary-color); }
.login-header h3 { font-size: 0.95rem; color: #555; margin-bottom: 0.35rem; }
.login-header p { font-size: 0.9rem; font-weight: bold; margin-bottom: 1.5rem; color: #777; }
.login-google-block { margin-bottom: 0.35rem; }
.login-hint { margin-top: 0.65rem; font-size: 0.8rem; color: var(--muted); line-height: 1.4; }
.login-admin { margin-top: 1.35rem; border-top: 1px solid var(--border-color); padding-top: 0.85rem; text-align: left; }
.login-admin-summary {
    list-style: none; cursor: pointer; color: var(--muted); font-size: 0.78rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.04em; text-align: center; padding: 0.35rem 0.5rem;
}
.login-admin-summary::-webkit-details-marker { display: none; }
.login-admin-summary::after { content: ' ▾'; }
.login-admin[open] .login-admin-summary::after { content: ' ▴'; }
.login-admin-hint { margin: 0.65rem 0 0.85rem; font-size: 0.8rem; color: var(--muted); text-align: center; line-height: 1.4; }
.login-form { text-align: left; }
.login-form .form-group { margin-bottom: 1rem; }

.site-header {
    background: linear-gradient(135deg, #003366 0%, #001122 100%);
    color: #fff; padding: 1.25rem 1.5rem; border-bottom: 4px solid var(--accent-color);
}
.site-header-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; gap: 1.25rem; }
.site-logo { width: 72px; height: 72px; flex-shrink: 0; border-radius: 6px; object-fit: contain; background: #fff; }
.site-header-text h1 { font-size: 1.15rem; font-weight: 700; line-height: 1.3; }
.site-header-text .subtitle { margin-top: 0.25rem; font-size: 0.95rem; color: rgba(255,255,255,0.85); }
.month-badge {
    display: inline-block; margin-top: 0.5rem; background: rgba(0, 252, 223, 0.15);
    border: 1px solid var(--accent-color); color: var(--accent-color);
    padding: 0.2rem 0.75rem; border-radius: 4px; font-size: 0.85rem; font-weight: 600;
}
.header-nav { margin-left: auto; display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.header-nav a, .header-nav .nav-btn, .header-nav .nav-link-btn {
    color: #fff; text-decoration: none; font-size: 0.85rem; font-weight: 600;
    padding: 0.4rem 0.75rem; border: 1px solid rgba(255,255,255,0.35); border-radius: 4px;
    background: transparent; cursor: pointer; font-family: inherit;
}
.header-nav a:hover, .header-nav .nav-btn:hover, .header-nav .nav-btn.active, .header-nav .nav-link-btn:hover {
    background: rgba(255,255,255,0.12); border-color: var(--accent-color);
}
.header-nav .nav-btn.active { color: var(--accent-color); }
.header-user { color: rgba(255,255,255,0.9); font-size: 0.85rem; padding: 0.4rem 0.5rem; }
.logout-form { display: inline; margin: 0; }

.page-wrap { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.content-section { display: none; }
.content-section.active { display: block; }
.panel-card {
    background: #fff; border: 1px solid var(--border-color); border-radius: 6px;
    padding: 1.75rem; box-shadow: 0 2px 8px rgba(0, 51, 102, 0.06);
}
.stack-top { margin-top: 1.1rem; }
.panel-card h2 { color: var(--primary-color); font-size: 1.25rem; margin-bottom: 0.35rem; }
.panel-card .lead { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.25rem; line-height: 1.45; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: 0.9rem; font-weight: 600; color: var(--primary-color); }
.form-group label .req { color: var(--danger); }
.form-group input, .form-group select, .form-group textarea {
    border: 1px solid var(--border-color); border-radius: 4px; padding: 0.55rem 0.7rem;
    font-size: 0.95rem; color: var(--text-color); background: #fff; width: 100%;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 2px rgba(0, 51, 102, 0.15);
}
.form-group textarea { min-height: 100px; resize: vertical; line-height: 1.45; }
.hint { font-size: 0.8rem; color: var(--muted); }
.inline-fields { display: flex; gap: 0.5rem; }
.inline-fields input { max-width: 7rem; }
.form-actions { margin-top: 1.25rem; display: flex; justify-content: flex-end; gap: 0.75rem; flex-wrap: wrap; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
    border: none; border-radius: 4px; padding: 0.55rem 1.1rem; font-size: 0.9rem; font-weight: 600;
    cursor: pointer; text-decoration: none; transition: background 0.15s;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary { background: var(--primary-color); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-secondary { background: #e9ecef; color: var(--primary-color); }
.btn-secondary:hover:not(:disabled) { background: #dee2e6; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: var(--danger-hover); }
.btn-sm { padding: 0.3rem 0.6rem; font-size: 0.78rem; }
.btn-block { width: 100%; }
.btn-google {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
    background: #fff; color: #3c4043; border: 1px solid #dadce0; font-weight: 600;
}
.btn-google:hover { background: #f7f8f8; }
.google-g { width: 1.25rem; height: 1.25rem; display: block; }

.alert { padding: 0.85rem 1rem; border-radius: 4px; margin-bottom: 1rem; font-size: 0.9rem; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-danger { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }

.card-list { display: flex; flex-direction: column; gap: 0.85rem; }
.req-card { border: 1px solid #e6eef5; border-left: 4px solid var(--primary-color); border-radius: 4px; padding: 0.95rem 1rem; background: #fafbfc; }
.req-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.35rem; }
.req-head h3 { color: var(--primary-color); font-size: 1rem; }
.req-card p { margin: 0.25rem 0; line-height: 1.45; white-space: pre-wrap; }
.row-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.7rem; }
.empty { color: var(--muted); font-size: 0.92rem; }
.badge { display: inline-block; border-radius: 99px; padding: 0.15rem 0.55rem; font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.badge-pendiente { background: #fff3cd; color: #856404; }
.badge-observaciones { background: #e7f5ff; color: #1864ab; }
.badge-aprobado { background: #d4edda; color: #155724; }
.badge-rechazado { background: #f8d7da; color: #721c24; }
.badge-finalizado { background: #d8f3ef; color: #0b5345; }

.edit-form, .sugerencias { margin-top: 0.85rem; padding-top: 0.75rem; border-top: 1px solid #e6eef5; }
.edit-form h3, .sugerencias h3 { color: var(--primary-color); font-size: 0.92rem; margin-bottom: 0.6rem; }
.sugerencias blockquote { margin: 0.45rem 0; padding: 0.55rem 0.7rem; background: #fff; border-left: 3px solid var(--accent-color); }
.sugerencias blockquote p { white-space: pre-wrap; }

.modal-backdrop {
    position: fixed; inset: 0; background: rgba(0, 17, 34, 0.55);
    display: flex; align-items: center; justify-content: center; padding: 1rem; z-index: 1000;
}
.modal-card {
    width: min(520px, 100%); background: #fff; border-radius: 8px; border: 1px solid var(--border-color);
    box-shadow: 0 12px 36px rgba(0, 30, 60, 0.25); padding: 1.25rem 1.35rem 1.35rem;
}
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.5rem; }
.modal-header h3 { color: var(--primary-color); font-size: 1.1rem; }
.modal-close { border: none; background: transparent; color: var(--muted); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.modal-lead { color: var(--muted); font-size: 0.9rem; margin-bottom: 1rem; }

.report-sheet {
    background: #fff; border: 1px solid var(--border-color); border-top: 8px solid var(--primary-color);
    border-radius: 6px; padding: 2rem 2.1rem;
}
.report-code {
    display: inline-block; background: var(--primary-color); color: #fff;
    padding: 0.25rem 0.7rem; border-radius: 4px; font-weight: 700; letter-spacing: 0.04em;
}
.report-sheet h2 { margin-top: 0.7rem; }
.report-table { width: 100%; border-collapse: collapse; margin-top: 0.5rem; }
.report-table th, .report-table td { text-align: left; padding: 0.55rem 0.35rem; border-bottom: 1px solid #e6eef5; vertical-align: top; }
.report-table th { width: 36%; color: var(--primary-color); }
.report-foot { margin-top: 1.3rem; font-size: 0.82rem; color: var(--muted); line-height: 1.45; }

@media (max-width: 800px) {
    .site-header-inner { flex-direction: column; align-items: flex-start; }
    .header-nav { margin-left: 0; }
    .form-grid { grid-template-columns: 1fr; }
}
@media print {
    .site-header, .alert { display: none !important; }
    body { background: #fff; }
    .report-sheet { border: none; box-shadow: none; }
}
