body { font-family: Arial, sans-serif; padding: 20px; background-color: #f4f4f9; }
.card { background: white; padding: 20px; border-radius: 8px; max-width: 1050px; margin: 0 auto; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.card-sm { max-width: 380px; }
input, select, button { width: 100%; margin-bottom: 10px; padding: 10px; box-sizing: border-box; border-radius: 4px; border: 1px solid #ccc; font-size: 13px; }
button { background-color: #2563eb; color: white; border: none; cursor: pointer; font-weight: bold; }
button:hover { background-color: #1d4ed8; }

.btn-volver { background-color: #6b7280; width: auto; margin-bottom: 15px; }
.btn-guardar { background-color: #10b981; margin-top: 20px; font-size: 15px; }
.btn-danger { background-color: #dc2626; width: auto; }
.btn-sm { width: auto; padding: 5px 10px; font-size: 12px; margin-bottom: 0; }
.btn-abrir { background-color: #10b981; }
.btn-cerrar { background-color: #f59e0b; }
.btn-excel { background-color: #059669; width: auto; margin-bottom: 0; }
.btn-eliminar { background-color: #ef4444; color: white; border: none; padding: 4px 8px; border-radius: 4px; cursor: pointer; font-size: 11px; }
.btn-editar { background-color: #f59e0b; color: white; border: none; padding: 4px 8px; border-radius: 4px; cursor: pointer; font-size: 11px; margin-right: 5px; }
.btn-ok { background-color: #10b981; color: white; border: none; padding: 4px 8px; border-radius: 4px; cursor: pointer; font-size: 11px; margin-right: 5px; }

.oculto { display: none !important; }

.contenedor-tabla { overflow-x: auto; margin-top: 15px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { border: 1px solid #d1d5db; padding: 8px; text-align: center; vertical-align: middle; }
th { background-color: #f3f4f6; color: #1f2937; }
.th-izq { text-align: left; }

.badge { display: inline-block; padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: bold; text-transform: uppercase; margin-top: 3px; }
.badge-abierto { background-color: #d1fae5; color: #065f46; }
.badge-cerrado { background-color: #fee2e2; color: #991b1b; }
.badge-nivel { background-color: #e0e7ff; color: #4338ca; margin-left: 10px; }

.celda-periodo { display: flex; gap: 4px; justify-content: center; align-items: center; }
.input-num { width: 42px; padding: 4px; text-align: center; border: 1px solid #ccc; border-radius: 4px; font-size: 12px; margin-bottom: 0; }
.input-num:disabled { background-color: #e5e7eb; color: #6b7280; cursor: not-allowed; }
.input-f { border-color: #fca5a5; }

.promedio-final { font-weight: bold; font-size: 14px; color: #1d4ed8; }
.promedio-pendiente { color: #9ca3af; font-style: italic; font-weight: normal; }

.grid-admin { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
@media (max-width: 768px) { .grid-admin { grid-template-columns: 1fr; } }
.box-admin { border: 1px solid #e5e7eb; padding: 15px; border-radius: 6px; background-color: #f9fafb; }
.box-admin-full { margin-top: 20px; border: 1px solid #e5e7eb; padding: 15px; border-radius: 6px; background-color: #f9fafb; }

.admin-tabs { display: flex; gap: 10px; margin-bottom: 20px; border-bottom: 2px solid #e5e7eb; padding-bottom: 10px; flex-wrap: wrap; }
.tab-btn { background: none; color: #6b7280; border: none; font-weight: bold; font-size: 14px; cursor: pointer; padding: 8px 16px; width: auto; border-radius: 0; }
.tab-btn:hover { background: #f3f4f6; }
.tab-btn.active { color: #2563eb; border-bottom: 3px solid #2563eb; }
.admin-section { display: none; }
.admin-section.active { display: block; }